diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c98fba3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +/.yarn/ + +js/ledger.js +packages/bundle/dist/main.js diff --git a/node_modules/browser-resolve/empty.js b/.gitmodules similarity index 100% rename from node_modules/browser-resolve/empty.js rename to .gitmodules diff --git a/Dockerfile b/Dockerfile index 3fb8e21..c1db6a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM nginx:1.17.5 -ENV GIT_URL https://github.com/kadena-community/kadena-transfer-js +ENV GIT_URL https://github.com/kadena-community/kadena-transfer-js.git RUN apt-get -y update \ && apt-get -y install git \ diff --git a/README.md b/README.md index 11e6916..3a09d52 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,18 @@ Cross chain transfer is a more complex transaction than single chain transfer, i node scripts/cross-chain-transfer-offline.js ``` +### Update ledger-os.js (Bundled dependencies) + + Sometimes all ledger dependencies gets updates in their repos so we need + to get the file ledger-os.js updated as well. + + To do this we need follow those steps: + - install browserify globally + - cd ledger-bundle + - npm run-script build + + The desired file should appear on the util folder. + ## Docker ``` diff --git a/docs/index.html b/docs/index.html index 7b28ed0..95b8393 100644 --- a/docs/index.html +++ b/docs/index.html @@ -49,6 +49,7 @@

Kadena Coin Transfer

+ diff --git a/docs/transfer-ledger-create.html b/docs/transfer-ledger-create.html new file mode 100644 index 0000000..4b2f301 --- /dev/null +++ b/docs/transfer-ledger-create.html @@ -0,0 +1,1082 @@ + + + Kadena Transfer Tool + + + + + + + + + + + + + +
+
+ +

Kadena Coin Transfer

+
+ +
+ Caution +
+

+ Blockchain transactions are irreversable. If you make a mistake, + your coins may not be recoverable. Before you transfer large sums, + it is always best to do a small test transaction first and then + send those coins back to the sender to verify that the receiver's + account works as expected. +

+
+
+
+ + +
+
+
+
+ + Show Ledger Account Name +
+
+
+

+
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+
+
+

+
+
+
+ +
+
Sign with Ledger
+
Make Transfer
+
Reset
+
+
+ +
+ + +
+ + + +
+ + + diff --git a/index.html b/index.html index 799caaf..42cc158 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ - +
diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js b/ledger-bundle/bundle.js similarity index 100% rename from node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js rename to ledger-bundle/bundle.js diff --git a/ledger-bundle/main.js b/ledger-bundle/main.js new file mode 100644 index 0000000..a559c44 --- /dev/null +++ b/ledger-bundle/main.js @@ -0,0 +1,13 @@ +const Kadena = require("hw-app-kda").default; +const SpeculosTransport = require("@ledgerhq/hw-transport-node-speculos").default; +const TranspWeb = require("@ledgerhq/hw-transport-webhid").default; +const WebUSB = require("@ledgerhq/hw-transport-webusb").default; + +function load_modules(){ + window.Kadena = Kadena; + window.SpeculosTransport = SpeculosTransport; + window.TranspWeb = TranspWeb; + window.WebUSB = WebUSB; +} + +load_modules(); diff --git a/ledger-bundle/main1.js b/ledger-bundle/main1.js new file mode 100644 index 0000000..4c6a8f0 --- /dev/null +++ b/ledger-bundle/main1.js @@ -0,0 +1,12558 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i dataLength) { + data = data.slice(0, dataLength); + } + return { + data: data, + dataLength: dataLength, + sequence: sequence + }; + }, + getReducedResult: function (acc) { + if (acc && acc.dataLength === acc.data.length) { + return acc.data; + } + } + }; +}; +exports["default"] = createHIDframing; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":5,"buffer":165}],3:[function(require,module,exports){ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _a; +exports.__esModule = true; +exports.getInfosForServiceUuid = exports.getBluetoothServiceUuids = exports.identifyProductName = exports.identifyUSBProductId = exports.identifyTargetId = exports.getDeviceModel = exports.ledgerUSBVendorId = exports.DeviceModelId = exports.IIWebUSB = exports.IICCID = exports.IIU2F = exports.IIKeyboardHID = exports.IIGenericHID = void 0; +var semver_1 = __importDefault(require("semver")); +/** + * The USB product IDs will be defined as MMII, encoding a model (MM) and an interface bitfield (II) + * + ** Model + * Ledger Nano S : 0x10 + * Ledger Blue : 0x00 + * Ledger Nano X : 0x40 + * + ** Interface support bitfield + * Generic HID : 0x01 + * Keyboard HID : 0x02 + * U2F : 0x04 + * CCID : 0x08 + * WebUSB : 0x10 + */ +exports.IIGenericHID = 0x01; +exports.IIKeyboardHID = 0x02; +exports.IIU2F = 0x04; +exports.IICCID = 0x08; +exports.IIWebUSB = 0x10; +var DeviceModelId; +(function (DeviceModelId) { + DeviceModelId["blue"] = "blue"; + DeviceModelId["nanoS"] = "nanoS"; + DeviceModelId["nanoSP"] = "nanoSP"; + DeviceModelId["nanoX"] = "nanoX"; +})(DeviceModelId = exports.DeviceModelId || (exports.DeviceModelId = {})); +var devices = (_a = {}, + _a[DeviceModelId.blue] = { + id: DeviceModelId.blue, + productName: "Ledger Blue", + productIdMM: 0x00, + legacyUsbProductId: 0x0000, + usbOnly: true, + memorySize: 480 * 1024, + masks: [0x31000000, 0x31010000], + getBlockSize: function (_firwareVersion) { return 4 * 1024; } + }, + _a[DeviceModelId.nanoS] = { + id: DeviceModelId.nanoS, + productName: "Ledger Nano S", + productIdMM: 0x10, + legacyUsbProductId: 0x0001, + usbOnly: true, + memorySize: 320 * 1024, + masks: [0x31100000], + getBlockSize: function (firmwareVersion) { + var _a; + return semver_1["default"].lt((_a = semver_1["default"].coerce(firmwareVersion)) !== null && _a !== void 0 ? _a : "", "2.0.0") + ? 4 * 1024 + : 2 * 1024; + } + }, + _a[DeviceModelId.nanoSP] = { + id: DeviceModelId.nanoSP, + productName: "Ledger Nano SP", + productIdMM: 0x50, + legacyUsbProductId: 0x0005, + usbOnly: true, + memorySize: 1533 * 1024, + masks: [0x33100000], + getBlockSize: function (_firmwareVersion) { return 32; } + }, + _a[DeviceModelId.nanoX] = { + id: DeviceModelId.nanoX, + productName: "Ledger Nano X", + productIdMM: 0x40, + legacyUsbProductId: 0x0004, + usbOnly: false, + memorySize: 2 * 1024 * 1024, + masks: [0x33000000], + getBlockSize: function (_firwareVersion) { return 4 * 1024; }, + bluetoothSpec: [ + { + // this is the legacy one (prototype version). we will eventually drop it. + serviceUuid: "d973f2e0-b19e-11e2-9e96-0800200c9a66", + notifyUuid: "d973f2e1-b19e-11e2-9e96-0800200c9a66", + writeUuid: "d973f2e2-b19e-11e2-9e96-0800200c9a66", + writeCmdUuid: "d973f2e3-b19e-11e2-9e96-0800200c9a66" + }, + { + serviceUuid: "13d63400-2c97-0004-0000-4c6564676572", + notifyUuid: "13d63400-2c97-0004-0001-4c6564676572", + writeUuid: "13d63400-2c97-0004-0002-4c6564676572", + writeCmdUuid: "13d63400-2c97-0004-0003-4c6564676572" + }, + ] + }, + _a); +var productMap = { + Blue: DeviceModelId.blue, + "Nano S": DeviceModelId.nanoS, + "Nano X": DeviceModelId.nanoX +}; +var devicesList = Object.values(devices); +/** + * + */ +exports.ledgerUSBVendorId = 0x2c97; +/** + * + */ +var getDeviceModel = function (id) { + var info = devices[id]; + if (!info) + throw new Error("device '" + id + "' does not exist"); + return info; +}; +exports.getDeviceModel = getDeviceModel; +/** + * Given a `targetId`, return the deviceModel associated to it, + * based on the first two bytes. + */ +var identifyTargetId = function (targetId) { + var deviceModel = devicesList.find(function (_a) { + var masks = _a.masks; + return masks.find(function (mask) { return (targetId & 0xffff0000) === mask; }); + }); + return deviceModel; +}; +exports.identifyTargetId = identifyTargetId; +/** + * + */ +var identifyUSBProductId = function (usbProductId) { + var legacy = devicesList.find(function (d) { return d.legacyUsbProductId === usbProductId; }); + if (legacy) + return legacy; + var mm = usbProductId >> 8; + var deviceModel = devicesList.find(function (d) { return d.productIdMM === mm; }); + return deviceModel; +}; +exports.identifyUSBProductId = identifyUSBProductId; +var identifyProductName = function (productName) { + var productId = productMap[productName]; + if (!productId && productName.startsWith("Nano S")) { + productId = DeviceModelId.nanoSP; + } + var deviceModel = devicesList.find(function (d) { return d.id === productId; }); + return deviceModel; +}; +exports.identifyProductName = identifyProductName; +var bluetoothServices = []; +var serviceUuidToInfos = {}; +for (var id in devices) { + var deviceModel = devices[id]; + var bluetoothSpec = deviceModel.bluetoothSpec; + if (bluetoothSpec) { + for (var i = 0; i < bluetoothSpec.length; i++) { + var spec = bluetoothSpec[i]; + bluetoothServices.push(spec.serviceUuid); + serviceUuidToInfos[spec.serviceUuid] = serviceUuidToInfos[spec.serviceUuid.replace(/-/g, "")] = __assign({ deviceModel: deviceModel }, spec); + } + } +} +/** + * + */ +var getBluetoothServiceUuids = function () { return bluetoothServices; }; +exports.getBluetoothServiceUuids = getBluetoothServiceUuids; +/** + * + */ +var getInfosForServiceUuid = function (uuid) { return serviceUuidToInfos[uuid.toLowerCase()]; }; +exports.getInfosForServiceUuid = getInfosForServiceUuid; + +},{"semver":144}],4:[function(require,module,exports){ +"use strict"; +/* eslint-disable no-continue */ +/* eslint-disable no-unused-vars */ +/* eslint-disable no-param-reassign */ +/* eslint-disable no-prototype-builtins */ +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +exports.__esModule = true; +exports.serializeError = exports.deserializeError = exports.createCustomErrorClass = exports.addCustomErrorDeserializer = void 0; +var errorClasses = {}; +var deserializers = {}; +var addCustomErrorDeserializer = function (name, deserializer) { + deserializers[name] = deserializer; +}; +exports.addCustomErrorDeserializer = addCustomErrorDeserializer; +var createCustomErrorClass = function (name) { + var C = function CustomError(message, fields) { + Object.assign(this, fields); + this.name = name; + this.message = message || name; + this.stack = new Error().stack; + }; + C.prototype = new Error(); + errorClasses[name] = C; + return C; +}; +exports.createCustomErrorClass = createCustomErrorClass; +// inspired from https://github.com/programble/errio/blob/master/index.js +var deserializeError = function (object) { + if (typeof object === "object" && object) { + try { + // $FlowFixMe FIXME HACK + var msg = JSON.parse(object.message); + if (msg.message && msg.name) { + object = msg; + } + } + catch (e) { + // nothing + } + var error = void 0; + if (typeof object.name === "string") { + var name_1 = object.name; + var des = deserializers[name_1]; + if (des) { + error = des(object); + } + else { + var constructor = name_1 === "Error" ? Error : errorClasses[name_1]; + if (!constructor) { + console.warn("deserializing an unknown class '" + name_1 + "'"); + constructor = (0, exports.createCustomErrorClass)(name_1); + } + error = Object.create(constructor.prototype); + try { + for (var prop in object) { + if (object.hasOwnProperty(prop)) { + error[prop] = object[prop]; + } + } + } + catch (e) { + // sometimes setting a property can fail (e.g. .name) + } + } + } + else { + error = new Error(object.message); + } + if (!error.stack && Error.captureStackTrace) { + Error.captureStackTrace(error, exports.deserializeError); + } + return error; + } + return new Error(String(object)); +}; +exports.deserializeError = deserializeError; +// inspired from https://github.com/sindresorhus/serialize-error/blob/master/index.js +var serializeError = function (value) { + if (!value) + return value; + if (typeof value === "object") { + return destroyCircular(value, []); + } + if (typeof value === "function") { + return "[Function: " + (value.name || "anonymous") + "]"; + } + return value; +}; +exports.serializeError = serializeError; +// https://www.npmjs.com/package/destroy-circular +function destroyCircular(from, seen) { + var e_1, _a; + var to = {}; + seen.push(from); + try { + for (var _b = __values(Object.keys(from)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + var value = from[key]; + if (typeof value === "function") { + continue; + } + if (!value || typeof value !== "object") { + to[key] = value; + continue; + } + if (seen.indexOf(from[key]) === -1) { + to[key] = destroyCircular(from[key], seen.slice(0)); + continue; + } + to[key] = "[Circular]"; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b["return"])) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (typeof from.name === "string") { + to.name = from.name; + } + if (typeof from.message === "string") { + to.message = from.message; + } + if (typeof from.stack === "string") { + to.stack = from.stack; + } + return to; +} + +},{}],5:[function(require,module,exports){ +"use strict"; +exports.__esModule = true; +exports.NotEnoughBalanceInParentAccount = exports.NotEnoughBalanceToDelegate = exports.NotEnoughBalance = exports.NoAddressesFound = exports.NetworkDown = exports.ManagerUninstallBTCDep = exports.ManagerNotEnoughSpaceError = exports.ManagerFirmwareNotEnoughSpaceError = exports.ManagerDeviceLockedError = exports.ManagerAppDepUninstallRequired = exports.ManagerAppDepInstallRequired = exports.ManagerAppRelyOnBTCError = exports.ManagerAppAlreadyInstalledError = exports.LedgerAPINotAvailable = exports.LedgerAPIErrorWithMessage = exports.LedgerAPIError = exports.UnknownMCU = exports.LatestMCUInstalledError = exports.InvalidAddressBecauseDestinationIsAlsoSource = exports.InvalidAddress = exports.InvalidXRPTag = exports.HardResetFail = exports.FirmwareNotRecognized = exports.FeeEstimationFailed = exports.EthAppPleaseEnableContractData = exports.EnpointConfigError = exports.DisconnectedDeviceDuringOperation = exports.DisconnectedDevice = exports.DeviceSocketNoBulkStatus = exports.DeviceSocketFail = exports.DeviceNameInvalid = exports.DeviceHalted = exports.DeviceInOSUExpected = exports.DeviceOnDashboardUnexpected = exports.DeviceOnDashboardExpected = exports.DeviceNotGenuineError = exports.DeviceGenuineSocketEarlyClose = exports.DeviceAppVerifyNotSupported = exports.CurrencyNotSupported = exports.CashAddrNotSupported = exports.CantOpenDevice = exports.BtcUnmatchedApp = exports.BluetoothRequired = exports.AmountRequired = exports.AccountNotSupported = exports.AccountNameRequiredError = exports.addCustomErrorDeserializer = exports.createCustomErrorClass = exports.deserializeError = exports.serializeError = void 0; +exports.StatusCodes = exports.TransportError = exports.DBNotReset = exports.DBWrongPassword = exports.NoDBPathGiven = exports.FirmwareOrAppUpdateRequired = exports.LedgerAPI5xx = exports.LedgerAPI4xx = exports.GenuineCheckFailed = exports.PairingFailed = exports.SyncError = exports.FeeTooHigh = exports.FeeRequired = exports.FeeNotLoaded = exports.CantScanQRCode = exports.ETHAddressNonEIP = exports.WrongAppForCurrency = exports.WrongDeviceForAccount = exports.WebsocketConnectionFailed = exports.WebsocketConnectionError = exports.DeviceShouldStayInApp = exports.TransportWebUSBGestureRequired = exports.TransportRaceCondition = exports.TransportInterfaceNotAvailable = exports.TransportOpenUserCancelled = exports.UserRefusedOnDevice = exports.UserRefusedAllowManager = exports.UserRefusedFirmwareUpdate = exports.UserRefusedAddress = exports.UserRefusedDeviceNameChange = exports.UpdateYourApp = exports.UpdateIncorrectSig = exports.UpdateIncorrectHash = exports.UpdateFetchFileFail = exports.UnavailableTezosOriginatedAccountSend = exports.UnavailableTezosOriginatedAccountReceive = exports.RecipientRequired = exports.MCUNotGenuineToDashboard = exports.UnexpectedBootloader = exports.TimeoutTagged = exports.RecommendUndelegation = exports.RecommendSubAccountsToEmpty = exports.PasswordIncorrectError = exports.PasswordsDontMatchError = exports.GasLessThanEstimate = exports.NotSupportedLegacyAddress = exports.NotEnoughGas = exports.NoAccessToCamera = exports.NotEnoughBalanceBecauseDestinationNotCreated = exports.NotEnoughSpendableBalance = void 0; +exports.TransportStatusError = exports.getAltStatusMessage = void 0; +var helpers_1 = require("./helpers"); +exports.serializeError = helpers_1.serializeError; +exports.deserializeError = helpers_1.deserializeError; +exports.createCustomErrorClass = helpers_1.createCustomErrorClass; +exports.addCustomErrorDeserializer = helpers_1.addCustomErrorDeserializer; +exports.AccountNameRequiredError = (0, helpers_1.createCustomErrorClass)("AccountNameRequired"); +exports.AccountNotSupported = (0, helpers_1.createCustomErrorClass)("AccountNotSupported"); +exports.AmountRequired = (0, helpers_1.createCustomErrorClass)("AmountRequired"); +exports.BluetoothRequired = (0, helpers_1.createCustomErrorClass)("BluetoothRequired"); +exports.BtcUnmatchedApp = (0, helpers_1.createCustomErrorClass)("BtcUnmatchedApp"); +exports.CantOpenDevice = (0, helpers_1.createCustomErrorClass)("CantOpenDevice"); +exports.CashAddrNotSupported = (0, helpers_1.createCustomErrorClass)("CashAddrNotSupported"); +exports.CurrencyNotSupported = (0, helpers_1.createCustomErrorClass)("CurrencyNotSupported"); +exports.DeviceAppVerifyNotSupported = (0, helpers_1.createCustomErrorClass)("DeviceAppVerifyNotSupported"); +exports.DeviceGenuineSocketEarlyClose = (0, helpers_1.createCustomErrorClass)("DeviceGenuineSocketEarlyClose"); +exports.DeviceNotGenuineError = (0, helpers_1.createCustomErrorClass)("DeviceNotGenuine"); +exports.DeviceOnDashboardExpected = (0, helpers_1.createCustomErrorClass)("DeviceOnDashboardExpected"); +exports.DeviceOnDashboardUnexpected = (0, helpers_1.createCustomErrorClass)("DeviceOnDashboardUnexpected"); +exports.DeviceInOSUExpected = (0, helpers_1.createCustomErrorClass)("DeviceInOSUExpected"); +exports.DeviceHalted = (0, helpers_1.createCustomErrorClass)("DeviceHalted"); +exports.DeviceNameInvalid = (0, helpers_1.createCustomErrorClass)("DeviceNameInvalid"); +exports.DeviceSocketFail = (0, helpers_1.createCustomErrorClass)("DeviceSocketFail"); +exports.DeviceSocketNoBulkStatus = (0, helpers_1.createCustomErrorClass)("DeviceSocketNoBulkStatus"); +exports.DisconnectedDevice = (0, helpers_1.createCustomErrorClass)("DisconnectedDevice"); +exports.DisconnectedDeviceDuringOperation = (0, helpers_1.createCustomErrorClass)("DisconnectedDeviceDuringOperation"); +exports.EnpointConfigError = (0, helpers_1.createCustomErrorClass)("EnpointConfig"); +exports.EthAppPleaseEnableContractData = (0, helpers_1.createCustomErrorClass)("EthAppPleaseEnableContractData"); +exports.FeeEstimationFailed = (0, helpers_1.createCustomErrorClass)("FeeEstimationFailed"); +exports.FirmwareNotRecognized = (0, helpers_1.createCustomErrorClass)("FirmwareNotRecognized"); +exports.HardResetFail = (0, helpers_1.createCustomErrorClass)("HardResetFail"); +exports.InvalidXRPTag = (0, helpers_1.createCustomErrorClass)("InvalidXRPTag"); +exports.InvalidAddress = (0, helpers_1.createCustomErrorClass)("InvalidAddress"); +exports.InvalidAddressBecauseDestinationIsAlsoSource = (0, helpers_1.createCustomErrorClass)("InvalidAddressBecauseDestinationIsAlsoSource"); +exports.LatestMCUInstalledError = (0, helpers_1.createCustomErrorClass)("LatestMCUInstalledError"); +exports.UnknownMCU = (0, helpers_1.createCustomErrorClass)("UnknownMCU"); +exports.LedgerAPIError = (0, helpers_1.createCustomErrorClass)("LedgerAPIError"); +exports.LedgerAPIErrorWithMessage = (0, helpers_1.createCustomErrorClass)("LedgerAPIErrorWithMessage"); +exports.LedgerAPINotAvailable = (0, helpers_1.createCustomErrorClass)("LedgerAPINotAvailable"); +exports.ManagerAppAlreadyInstalledError = (0, helpers_1.createCustomErrorClass)("ManagerAppAlreadyInstalled"); +exports.ManagerAppRelyOnBTCError = (0, helpers_1.createCustomErrorClass)("ManagerAppRelyOnBTC"); +exports.ManagerAppDepInstallRequired = (0, helpers_1.createCustomErrorClass)("ManagerAppDepInstallRequired"); +exports.ManagerAppDepUninstallRequired = (0, helpers_1.createCustomErrorClass)("ManagerAppDepUninstallRequired"); +exports.ManagerDeviceLockedError = (0, helpers_1.createCustomErrorClass)("ManagerDeviceLocked"); +exports.ManagerFirmwareNotEnoughSpaceError = (0, helpers_1.createCustomErrorClass)("ManagerFirmwareNotEnoughSpace"); +exports.ManagerNotEnoughSpaceError = (0, helpers_1.createCustomErrorClass)("ManagerNotEnoughSpace"); +exports.ManagerUninstallBTCDep = (0, helpers_1.createCustomErrorClass)("ManagerUninstallBTCDep"); +exports.NetworkDown = (0, helpers_1.createCustomErrorClass)("NetworkDown"); +exports.NoAddressesFound = (0, helpers_1.createCustomErrorClass)("NoAddressesFound"); +exports.NotEnoughBalance = (0, helpers_1.createCustomErrorClass)("NotEnoughBalance"); +exports.NotEnoughBalanceToDelegate = (0, helpers_1.createCustomErrorClass)("NotEnoughBalanceToDelegate"); +exports.NotEnoughBalanceInParentAccount = (0, helpers_1.createCustomErrorClass)("NotEnoughBalanceInParentAccount"); +exports.NotEnoughSpendableBalance = (0, helpers_1.createCustomErrorClass)("NotEnoughSpendableBalance"); +exports.NotEnoughBalanceBecauseDestinationNotCreated = (0, helpers_1.createCustomErrorClass)("NotEnoughBalanceBecauseDestinationNotCreated"); +exports.NoAccessToCamera = (0, helpers_1.createCustomErrorClass)("NoAccessToCamera"); +exports.NotEnoughGas = (0, helpers_1.createCustomErrorClass)("NotEnoughGas"); +exports.NotSupportedLegacyAddress = (0, helpers_1.createCustomErrorClass)("NotSupportedLegacyAddress"); +exports.GasLessThanEstimate = (0, helpers_1.createCustomErrorClass)("GasLessThanEstimate"); +exports.PasswordsDontMatchError = (0, helpers_1.createCustomErrorClass)("PasswordsDontMatch"); +exports.PasswordIncorrectError = (0, helpers_1.createCustomErrorClass)("PasswordIncorrect"); +exports.RecommendSubAccountsToEmpty = (0, helpers_1.createCustomErrorClass)("RecommendSubAccountsToEmpty"); +exports.RecommendUndelegation = (0, helpers_1.createCustomErrorClass)("RecommendUndelegation"); +exports.TimeoutTagged = (0, helpers_1.createCustomErrorClass)("TimeoutTagged"); +exports.UnexpectedBootloader = (0, helpers_1.createCustomErrorClass)("UnexpectedBootloader"); +exports.MCUNotGenuineToDashboard = (0, helpers_1.createCustomErrorClass)("MCUNotGenuineToDashboard"); +exports.RecipientRequired = (0, helpers_1.createCustomErrorClass)("RecipientRequired"); +exports.UnavailableTezosOriginatedAccountReceive = (0, helpers_1.createCustomErrorClass)("UnavailableTezosOriginatedAccountReceive"); +exports.UnavailableTezosOriginatedAccountSend = (0, helpers_1.createCustomErrorClass)("UnavailableTezosOriginatedAccountSend"); +exports.UpdateFetchFileFail = (0, helpers_1.createCustomErrorClass)("UpdateFetchFileFail"); +exports.UpdateIncorrectHash = (0, helpers_1.createCustomErrorClass)("UpdateIncorrectHash"); +exports.UpdateIncorrectSig = (0, helpers_1.createCustomErrorClass)("UpdateIncorrectSig"); +exports.UpdateYourApp = (0, helpers_1.createCustomErrorClass)("UpdateYourApp"); +exports.UserRefusedDeviceNameChange = (0, helpers_1.createCustomErrorClass)("UserRefusedDeviceNameChange"); +exports.UserRefusedAddress = (0, helpers_1.createCustomErrorClass)("UserRefusedAddress"); +exports.UserRefusedFirmwareUpdate = (0, helpers_1.createCustomErrorClass)("UserRefusedFirmwareUpdate"); +exports.UserRefusedAllowManager = (0, helpers_1.createCustomErrorClass)("UserRefusedAllowManager"); +exports.UserRefusedOnDevice = (0, helpers_1.createCustomErrorClass)("UserRefusedOnDevice"); // TODO rename because it's just for transaction refusal +exports.TransportOpenUserCancelled = (0, helpers_1.createCustomErrorClass)("TransportOpenUserCancelled"); +exports.TransportInterfaceNotAvailable = (0, helpers_1.createCustomErrorClass)("TransportInterfaceNotAvailable"); +exports.TransportRaceCondition = (0, helpers_1.createCustomErrorClass)("TransportRaceCondition"); +exports.TransportWebUSBGestureRequired = (0, helpers_1.createCustomErrorClass)("TransportWebUSBGestureRequired"); +exports.DeviceShouldStayInApp = (0, helpers_1.createCustomErrorClass)("DeviceShouldStayInApp"); +exports.WebsocketConnectionError = (0, helpers_1.createCustomErrorClass)("WebsocketConnectionError"); +exports.WebsocketConnectionFailed = (0, helpers_1.createCustomErrorClass)("WebsocketConnectionFailed"); +exports.WrongDeviceForAccount = (0, helpers_1.createCustomErrorClass)("WrongDeviceForAccount"); +exports.WrongAppForCurrency = (0, helpers_1.createCustomErrorClass)("WrongAppForCurrency"); +exports.ETHAddressNonEIP = (0, helpers_1.createCustomErrorClass)("ETHAddressNonEIP"); +exports.CantScanQRCode = (0, helpers_1.createCustomErrorClass)("CantScanQRCode"); +exports.FeeNotLoaded = (0, helpers_1.createCustomErrorClass)("FeeNotLoaded"); +exports.FeeRequired = (0, helpers_1.createCustomErrorClass)("FeeRequired"); +exports.FeeTooHigh = (0, helpers_1.createCustomErrorClass)("FeeTooHigh"); +exports.SyncError = (0, helpers_1.createCustomErrorClass)("SyncError"); +exports.PairingFailed = (0, helpers_1.createCustomErrorClass)("PairingFailed"); +exports.GenuineCheckFailed = (0, helpers_1.createCustomErrorClass)("GenuineCheckFailed"); +exports.LedgerAPI4xx = (0, helpers_1.createCustomErrorClass)("LedgerAPI4xx"); +exports.LedgerAPI5xx = (0, helpers_1.createCustomErrorClass)("LedgerAPI5xx"); +exports.FirmwareOrAppUpdateRequired = (0, helpers_1.createCustomErrorClass)("FirmwareOrAppUpdateRequired"); +// db stuff, no need to translate +exports.NoDBPathGiven = (0, helpers_1.createCustomErrorClass)("NoDBPathGiven"); +exports.DBWrongPassword = (0, helpers_1.createCustomErrorClass)("DBWrongPassword"); +exports.DBNotReset = (0, helpers_1.createCustomErrorClass)("DBNotReset"); +/** + * TransportError is used for any generic transport errors. + * e.g. Error thrown when data received by exchanges are incorrect or if exchanged failed to communicate with the device for various reason. + */ +function TransportError(message, id) { + this.name = "TransportError"; + this.message = message; + this.stack = new Error().stack; + this.id = id; +} +exports.TransportError = TransportError; +TransportError.prototype = new Error(); +(0, helpers_1.addCustomErrorDeserializer)("TransportError", function (e) { return new TransportError(e.message, e.id); }); +exports.StatusCodes = { + PIN_REMAINING_ATTEMPTS: 0x63c0, + INCORRECT_LENGTH: 0x6700, + MISSING_CRITICAL_PARAMETER: 0x6800, + COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 0x6981, + SECURITY_STATUS_NOT_SATISFIED: 0x6982, + CONDITIONS_OF_USE_NOT_SATISFIED: 0x6985, + INCORRECT_DATA: 0x6a80, + NOT_ENOUGH_MEMORY_SPACE: 0x6a84, + REFERENCED_DATA_NOT_FOUND: 0x6a88, + FILE_ALREADY_EXISTS: 0x6a89, + INCORRECT_P1_P2: 0x6b00, + INS_NOT_SUPPORTED: 0x6d00, + CLA_NOT_SUPPORTED: 0x6e00, + TECHNICAL_PROBLEM: 0x6f00, + OK: 0x9000, + MEMORY_PROBLEM: 0x9240, + NO_EF_SELECTED: 0x9400, + INVALID_OFFSET: 0x9402, + FILE_NOT_FOUND: 0x9404, + INCONSISTENT_FILE: 0x9408, + ALGORITHM_NOT_SUPPORTED: 0x9484, + INVALID_KCV: 0x9485, + CODE_NOT_INITIALIZED: 0x9802, + ACCESS_CONDITION_NOT_FULFILLED: 0x9804, + CONTRADICTION_SECRET_CODE_STATUS: 0x9808, + CONTRADICTION_INVALIDATION: 0x9810, + CODE_BLOCKED: 0x9840, + MAX_VALUE_REACHED: 0x9850, + GP_AUTH_FAILED: 0x6300, + LICENSING: 0x6f42, + HALTED: 0x6faa +}; +function getAltStatusMessage(code) { + switch (code) { + // improve text of most common errors + case 0x6700: + return "Incorrect length"; + case 0x6800: + return "Missing critical parameter"; + case 0x6982: + return "Security not satisfied (dongle locked or have invalid access rights)"; + case 0x6985: + return "Condition of use not satisfied (denied by the user?)"; + case 0x6a80: + return "Invalid data received"; + case 0x6b00: + return "Invalid parameter received"; + } + if (0x6f00 <= code && code <= 0x6fff) { + return "Internal error, please report"; + } +} +exports.getAltStatusMessage = getAltStatusMessage; +/** + * Error thrown when a device returned a non success status. + * the error.statusCode is one of the `StatusCodes` exported by this library. + */ +function TransportStatusError(statusCode) { + this.name = "TransportStatusError"; + var statusText = Object.keys(exports.StatusCodes).find(function (k) { return exports.StatusCodes[k] === statusCode; }) || + "UNKNOWN_ERROR"; + var smsg = getAltStatusMessage(statusCode) || statusText; + var statusCodeStr = statusCode.toString(16); + this.message = "Ledger device: " + smsg + " (0x" + statusCodeStr + ")"; + this.stack = new Error().stack; + this.statusCode = statusCode; + this.statusText = statusText; +} +exports.TransportStatusError = TransportStatusError; +TransportStatusError.prototype = new Error(); +(0, helpers_1.addCustomErrorDeserializer)("TransportStatusError", function (e) { return new TransportStatusError(e.statusCode); }); + +},{"./helpers":4}],6:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var rxjs_1 = require("rxjs"); +var net_1 = __importDefault(require("net")); +var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport")); +var errors_1 = require("@ledgerhq/errors"); +var logs_1 = require("@ledgerhq/logs"); +/** + * Speculos TCP transport implementation + * + * @example + * import SpeculosTransport from "@ledgerhq/hw-transport-node-speculos"; + * const transport = await SpeculosTransport.open({ apduPort }); + * const res = await transport.send(0xE0, 0x01, 0, 0); + */ +var SpeculosTransport = /** @class */ (function (_super) { + __extends(SpeculosTransport, _super); + function SpeculosTransport(apduSocket, opts) { + var _this = _super.call(this) || this; + _this.rejectExchange = function (_e) { }; + _this.resolveExchange = function (_b) { }; + _this.automationEvents = new rxjs_1.Subject(); + /** + * Send a speculos button command + * typically "Ll" would press and release the left button + * typically "Rr" would press and release the right button + * @param {*} command + */ + _this.button = function (command) { + return new Promise(function (resolve, reject) { + (0, logs_1.log)("speculos-button", command); + var _a = _this.opts, buttonPort = _a.buttonPort, host = _a.host; + if (!buttonPort) + throw new Error("buttonPort is missing"); + var socket = new net_1["default"].Socket(); + socket.on("error", function (e) { + socket.destroy(); + reject(e); + }); + socket.connect(buttonPort, host || "127.0.0.1", function () { + socket.write(Buffer.from(command, "ascii")); + socket.destroy(); + resolve(); + }); + }); + }; + _this.opts = opts; + _this.apduSocket = apduSocket; + apduSocket.on("error", function (e) { + _this.emit("disconnect", new errors_1.DisconnectedDevice(e.message)); + _this.rejectExchange(e); + _this.apduSocket.destroy(); + }); + apduSocket.on("end", function () { + _this.emit("disconnect", new errors_1.DisconnectedDevice()); + _this.rejectExchange(new errors_1.DisconnectedDeviceDuringOperation()); + }); + apduSocket.on("data", function (data) { + try { + _this.resolveExchange(decodeAPDUPayload(data)); + } + catch (e) { + _this.rejectExchange(e); + } + }); + var automationPort = opts.automationPort; + if (automationPort) { + var socket_1 = new net_1["default"].Socket(); + _this.automationSocket = socket_1; + socket_1.on("error", function (e) { + (0, logs_1.log)("speculos-automation-error", String(e)); + socket_1.destroy(); + }); + socket_1.on("data", function (data) { + (0, logs_1.log)("speculos-automation-data", data.toString("ascii")); + var split = data.toString("ascii").split("\n"); + split + .filter(function (ascii) { return !!ascii; }) + .forEach(function (ascii) { + var json = JSON.parse(ascii); + _this.automationEvents.next(json); + }); + }); + socket_1.connect(automationPort, opts.host || "127.0.0.1"); + } + return _this; + } + SpeculosTransport.prototype.exchange = function (apdu) { + return __awaiter(this, void 0, void 0, function () { + var hex, encoded, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + hex = apdu.toString("hex"); + (0, logs_1.log)("apdu", "=> " + hex); + encoded = encodeAPDU(apdu); + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.rejectExchange = reject; + _this.resolveExchange = resolve; + _this.apduSocket.write(encoded); + })]; + case 1: + res = _a.sent(); + (0, logs_1.log)("apdu", "<= " + res.toString("hex")); + return [2 /*return*/, res]; + } + }); + }); + }; + SpeculosTransport.prototype.setScrambleKey = function () { }; + SpeculosTransport.prototype.close = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (this.automationSocket) + this.automationSocket.destroy(); + this.apduSocket.destroy(); + return [2 /*return*/, Promise.resolve()]; + }); + }); + }; + SpeculosTransport.isSupported = function () { return Promise.resolve(true); }; + // this transport is not discoverable + SpeculosTransport.list = function () { return Promise.resolve([]); }; + SpeculosTransport.listen = function (_observer) { return ({ + unsubscribe: function () { } + }); }; + /** + * + */ + SpeculosTransport.open = function (opts) { + return new Promise(function (resolve, reject) { + var socket = new net_1["default"].Socket(); + socket.on("error", function (e) { + socket.destroy(); + reject(e); + }); + socket.on("end", function () { + reject(new errors_1.DisconnectedDevice("tcp closed")); + }); + socket.connect(opts.apduPort, opts.host || "127.0.0.1", function () { + // we delay a bit the transport creation to make sure the tcp does not hang up + setTimeout(function () { + resolve(new SpeculosTransport(socket, opts)); + }, 100); + }); + }); + }; + return SpeculosTransport; +}(hw_transport_1["default"])); +exports["default"] = SpeculosTransport; +function encodeAPDU(apdu) { + var size = Buffer.allocUnsafe(4); + size.writeUIntBE(apdu.length, 0, 4); + return Buffer.concat([size, apdu]); +} +function decodeAPDUPayload(data) { + var dataLength = data.readUIntBE(0, 4); // 4 bytes tells the data length + var size = dataLength + 2; // size does not include the status code so we add 2 + var payload = data.slice(4); + if (payload.length !== size) { + throw new errors_1.TransportError("Expected payload of length ".concat(size, " but got ").concat(payload.length), ""); + } + return payload; +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":5,"@ledgerhq/hw-transport":10,"@ledgerhq/logs":11,"buffer":165,"net":163,"rxjs":15}],7:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport")); +var hid_framing_1 = __importDefault(require("@ledgerhq/devices/lib/hid-framing")); +var devices_1 = require("@ledgerhq/devices"); +var logs_1 = require("@ledgerhq/logs"); +var errors_1 = require("@ledgerhq/errors"); +var ledgerDevices = [ + { + vendorId: devices_1.ledgerUSBVendorId + }, +]; +var isSupported = function () { + return Promise.resolve(!!(window.navigator && window.navigator.hid)); +}; +var getHID = function () { + // $FlowFixMe + var hid = navigator.hid; + if (!hid) + throw new errors_1.TransportError("navigator.hid is not supported", "HIDNotSupported"); + return hid; +}; +function requestLedgerDevices() { + return __awaiter(this, void 0, void 0, function () { + var device; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getHID().requestDevice({ + filters: ledgerDevices + })]; + case 1: + device = _a.sent(); + if (Array.isArray(device)) + return [2 /*return*/, device]; + return [2 /*return*/, [device]]; + } + }); + }); +} +function getLedgerDevices() { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getHID().getDevices()]; + case 1: + devices = _a.sent(); + return [2 /*return*/, devices.filter(function (d) { return d.vendorId === devices_1.ledgerUSBVendorId; })]; + } + }); + }); +} +function getFirstLedgerDevice() { + return __awaiter(this, void 0, void 0, function () { + var existingDevices, devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getLedgerDevices()]; + case 1: + existingDevices = _a.sent(); + if (existingDevices.length > 0) + return [2 /*return*/, existingDevices[0]]; + return [4 /*yield*/, requestLedgerDevices()]; + case 2: + devices = _a.sent(); + return [2 /*return*/, devices[0]]; + } + }); + }); +} +/** + * WebHID Transport implementation + * @example + * import TransportWebHID from "@ledgerhq/hw-transport-webhid"; + * ... + * TransportWebHID.create().then(transport => ...) + */ +var TransportWebHID = /** @class */ (function (_super) { + __extends(TransportWebHID, _super); + function TransportWebHID(device) { + var _this = _super.call(this) || this; + _this.channel = Math.floor(Math.random() * 0xffff); + _this.packetSize = 64; + _this.inputs = []; + _this.read = function () { + if (_this.inputs.length) { + return Promise.resolve(_this.inputs.shift()); + } + return new Promise(function (success) { + _this.inputCallback = success; + }); + }; + _this.onInputReport = function (e) { + var buffer = Buffer.from(e.data.buffer); + if (_this.inputCallback) { + _this.inputCallback(buffer); + _this.inputCallback = null; + } + else { + _this.inputs.push(buffer); + } + }; + _this._disconnectEmitted = false; + _this._emitDisconnect = function (e) { + if (_this._disconnectEmitted) + return; + _this._disconnectEmitted = true; + _this.emit("disconnect", e); + }; + /** + * Exchange with the device using APDU protocol. + * @param apdu + * @returns a promise of apdu response + */ + _this.exchange = function (apdu) { return __awaiter(_this, void 0, void 0, function () { + var b; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeAtomicImpl(function () { return __awaiter(_this, void 0, void 0, function () { + var _a, channel, packetSize, framing, blocks, i, result, acc, buffer; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this, channel = _a.channel, packetSize = _a.packetSize; + (0, logs_1.log)("apdu", "=> " + apdu.toString("hex")); + framing = (0, hid_framing_1["default"])(channel, packetSize); + blocks = framing.makeBlocks(apdu); + i = 0; + _b.label = 1; + case 1: + if (!(i < blocks.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, this.device.sendReport(0, blocks[i])]; + case 2: + _b.sent(); + _b.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: + if (!!(result = framing.getReducedResult(acc))) return [3 /*break*/, 6]; + return [4 /*yield*/, this.read()]; + case 5: + buffer = _b.sent(); + acc = framing.reduceResponse(acc, buffer); + return [3 /*break*/, 4]; + case 6: + (0, logs_1.log)("apdu", "<= " + result.toString("hex")); + return [2 /*return*/, result]; + } + }); + }); })["catch"](function (e) { + if (e && e.message && e.message.includes("write")) { + _this._emitDisconnect(e); + throw new errors_1.DisconnectedDeviceDuringOperation(e.message); + } + throw e; + })]; + case 1: + b = _a.sent(); + return [2 /*return*/, b]; + } + }); + }); }; + _this.device = device; + _this.deviceModel = + typeof device.productId === "number" + ? (0, devices_1.identifyUSBProductId)(device.productId) + : undefined; + device.addEventListener("inputreport", _this.onInputReport); + return _this; + } + /** + * Similar to create() except it will always display the device permission (even if some devices are already accepted). + */ + TransportWebHID.request = function () { + return __awaiter(this, void 0, void 0, function () { + var _a, device; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, requestLedgerDevices()]; + case 1: + _a = __read.apply(void 0, [_b.sent(), 1]), device = _a[0]; + return [2 /*return*/, TransportWebHID.open(device)]; + } + }); + }); + }; + /** + * Similar to create() except it will never display the device permission (it returns a Promise, null if it fails to find a device). + */ + TransportWebHID.openConnected = function () { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getLedgerDevices()]; + case 1: + devices = _a.sent(); + if (devices.length === 0) + return [2 /*return*/, null]; + return [2 /*return*/, TransportWebHID.open(devices[0])]; + } + }); + }); + }; + /** + * Create a Ledger transport with a HIDDevice + */ + TransportWebHID.open = function (device) { + return __awaiter(this, void 0, void 0, function () { + var transport, onDisconnect; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, device.open()]; + case 1: + _a.sent(); + transport = new TransportWebHID(device); + onDisconnect = function (e) { + if (device === e.device) { + getHID().removeEventListener("disconnect", onDisconnect); + transport._emitDisconnect(new errors_1.DisconnectedDevice()); + } + }; + getHID().addEventListener("disconnect", onDisconnect); + return [2 /*return*/, transport]; + } + }); + }); + }; + /** + * Release the transport device + */ + TransportWebHID.prototype.close = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeBusyPromise]; + case 1: + _a.sent(); + this.device.removeEventListener("inputreport", this.onInputReport); + return [4 /*yield*/, this.device.close()]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + TransportWebHID.prototype.setScrambleKey = function () { }; + /** + * Check if WebUSB transport is supported. + */ + TransportWebHID.isSupported = isSupported; + /** + * List the WebUSB devices that was previously authorized by the user. + */ + TransportWebHID.list = getLedgerDevices; + /** + * Actively listen to WebUSB devices and emit ONE device + * that was either accepted before, if not it will trigger the native permission UI. + * + * Important: it must be called in the context of a UI click! + */ + TransportWebHID.listen = function (observer) { + var unsubscribed = false; + getFirstLedgerDevice().then(function (device) { + if (!device) { + observer.error(new errors_1.TransportOpenUserCancelled("Access denied to use Ledger device")); + } + else if (!unsubscribed) { + var deviceModel = typeof device.productId === "number" + ? (0, devices_1.identifyUSBProductId)(device.productId) + : undefined; + observer.next({ + type: "add", + descriptor: device, + deviceModel: deviceModel + }); + observer.complete(); + } + }, function (error) { + observer.error(new errors_1.TransportOpenUserCancelled(error.message)); + }); + function unsubscribe() { + unsubscribed = true; + } + return { + unsubscribe: unsubscribe + }; + }; + return TransportWebHID; +}(hw_transport_1["default"])); +exports["default"] = TransportWebHID; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/devices":3,"@ledgerhq/devices/lib/hid-framing":2,"@ledgerhq/errors":5,"@ledgerhq/hw-transport":10,"@ledgerhq/logs":11,"buffer":165}],8:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport")); +var hid_framing_1 = __importDefault(require("@ledgerhq/devices/lib/hid-framing")); +var devices_1 = require("@ledgerhq/devices"); +var logs_1 = require("@ledgerhq/logs"); +var errors_1 = require("@ledgerhq/errors"); +var webusb_1 = require("./webusb"); +var configurationValue = 1; +var endpointNumber = 3; +/** + * WebUSB Transport implementation + * @example + * import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; + * ... + * TransportWebUSB.create().then(transport => ...) + */ +var TransportWebUSB = /** @class */ (function (_super) { + __extends(TransportWebUSB, _super); + function TransportWebUSB(device, interfaceNumber) { + var _this = _super.call(this) || this; + _this.channel = Math.floor(Math.random() * 0xffff); + _this.packetSize = 64; + _this._disconnectEmitted = false; + _this._emitDisconnect = function (e) { + if (_this._disconnectEmitted) + return; + _this._disconnectEmitted = true; + _this.emit("disconnect", e); + }; + _this.device = device; + _this.interfaceNumber = interfaceNumber; + _this.deviceModel = (0, devices_1.identifyUSBProductId)(device.productId); + return _this; + } + /** + * Similar to create() except it will always display the device permission (even if some devices are already accepted). + */ + TransportWebUSB.request = function () { + return __awaiter(this, void 0, void 0, function () { + var device; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, webusb_1.requestLedgerDevice)()]; + case 1: + device = _a.sent(); + return [2 /*return*/, TransportWebUSB.open(device)]; + } + }); + }); + }; + /** + * Similar to create() except it will never display the device permission (it returns a Promise, null if it fails to find a device). + */ + TransportWebUSB.openConnected = function () { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, webusb_1.getLedgerDevices)()]; + case 1: + devices = _a.sent(); + if (devices.length === 0) + return [2 /*return*/, null]; + return [2 /*return*/, TransportWebUSB.open(devices[0])]; + } + }); + }); + }; + /** + * Create a Ledger transport with a USBDevice + */ + TransportWebUSB.open = function (device) { + return __awaiter(this, void 0, void 0, function () { + var iface, interfaceNumber, e_1, transport, onDisconnect; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, device.open()]; + case 1: + _a.sent(); + if (!(device.configuration === null)) return [3 /*break*/, 3]; + return [4 /*yield*/, device.selectConfiguration(configurationValue)]; + case 2: + _a.sent(); + _a.label = 3; + case 3: return [4 /*yield*/, gracefullyResetDevice(device)]; + case 4: + _a.sent(); + iface = device.configurations[0].interfaces.find(function (_a) { + var alternates = _a.alternates; + return alternates.some(function (a) { return a.interfaceClass === 255; }); + }); + if (!iface) { + throw new errors_1.TransportInterfaceNotAvailable("No WebUSB interface found for your Ledger device. Please upgrade firmware or contact techsupport."); + } + interfaceNumber = iface.interfaceNumber; + _a.label = 5; + case 5: + _a.trys.push([5, 7, , 9]); + return [4 /*yield*/, device.claimInterface(interfaceNumber)]; + case 6: + _a.sent(); + return [3 /*break*/, 9]; + case 7: + e_1 = _a.sent(); + return [4 /*yield*/, device.close()]; + case 8: + _a.sent(); + throw new errors_1.TransportInterfaceNotAvailable(e_1.message); + case 9: + transport = new TransportWebUSB(device, interfaceNumber); + onDisconnect = function (e) { + if (device === e.device) { + // $FlowFixMe + navigator.usb.removeEventListener("disconnect", onDisconnect); + transport._emitDisconnect(new errors_1.DisconnectedDevice()); + } + }; + // $FlowFixMe + navigator.usb.addEventListener("disconnect", onDisconnect); + return [2 /*return*/, transport]; + } + }); + }); + }; + /** + * Release the transport device + */ + TransportWebUSB.prototype.close = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeBusyPromise]; + case 1: + _a.sent(); + return [4 /*yield*/, this.device.releaseInterface(this.interfaceNumber)]; + case 2: + _a.sent(); + return [4 /*yield*/, gracefullyResetDevice(this.device)]; + case 3: + _a.sent(); + return [4 /*yield*/, this.device.close()]; + case 4: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + /** + * Exchange with the device using APDU protocol. + * @param apdu + * @returns a promise of apdu response + */ + TransportWebUSB.prototype.exchange = function (apdu) { + return __awaiter(this, void 0, void 0, function () { + var b; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeAtomicImpl(function () { return __awaiter(_this, void 0, void 0, function () { + var _a, channel, packetSize, framing, blocks, i, result, acc, r, buffer; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this, channel = _a.channel, packetSize = _a.packetSize; + (0, logs_1.log)("apdu", "=> " + apdu.toString("hex")); + framing = (0, hid_framing_1["default"])(channel, packetSize); + blocks = framing.makeBlocks(apdu); + i = 0; + _b.label = 1; + case 1: + if (!(i < blocks.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, this.device.transferOut(endpointNumber, blocks[i])]; + case 2: + _b.sent(); + _b.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: + if (!!(result = framing.getReducedResult(acc))) return [3 /*break*/, 6]; + return [4 /*yield*/, this.device.transferIn(endpointNumber, packetSize)]; + case 5: + r = _b.sent(); + buffer = Buffer.from(r.data.buffer); + acc = framing.reduceResponse(acc, buffer); + return [3 /*break*/, 4]; + case 6: + (0, logs_1.log)("apdu", "<= " + result.toString("hex")); + return [2 /*return*/, result]; + } + }); + }); })["catch"](function (e) { + if (e && e.message && e.message.includes("disconnected")) { + _this._emitDisconnect(e); + throw new errors_1.DisconnectedDeviceDuringOperation(e.message); + } + throw e; + })]; + case 1: + b = _a.sent(); + return [2 /*return*/, b]; + } + }); + }); + }; + TransportWebUSB.prototype.setScrambleKey = function () { }; + /** + * Check if WebUSB transport is supported. + */ + TransportWebUSB.isSupported = webusb_1.isSupported; + /** + * List the WebUSB devices that was previously authorized by the user. + */ + TransportWebUSB.list = webusb_1.getLedgerDevices; + /** + * Actively listen to WebUSB devices and emit ONE device + * that was either accepted before, if not it will trigger the native permission UI. + * + * Important: it must be called in the context of a UI click! + */ + TransportWebUSB.listen = function (observer) { + var unsubscribed = false; + (0, webusb_1.getFirstLedgerDevice)().then(function (device) { + if (!unsubscribed) { + var deviceModel = (0, devices_1.identifyUSBProductId)(device.productId); + observer.next({ + type: "add", + descriptor: device, + deviceModel: deviceModel + }); + observer.complete(); + } + }, function (error) { + if (window.DOMException && + error instanceof window.DOMException && + error.code === 18) { + observer.error(new errors_1.TransportWebUSBGestureRequired(error.message)); + } + else { + observer.error(new errors_1.TransportOpenUserCancelled(error.message)); + } + }); + function unsubscribe() { + unsubscribed = true; + } + return { + unsubscribe: unsubscribe + }; + }; + return TransportWebUSB; +}(hw_transport_1["default"])); +exports["default"] = TransportWebUSB; +function gracefullyResetDevice(device) { + return __awaiter(this, void 0, void 0, function () { + var err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, device.reset()]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_1 = _a.sent(); + console.warn(err_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"./webusb":9,"@ledgerhq/devices":3,"@ledgerhq/devices/lib/hid-framing":2,"@ledgerhq/errors":5,"@ledgerhq/hw-transport":10,"@ledgerhq/logs":11,"buffer":165}],9:[function(require,module,exports){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +exports.__esModule = true; +exports.isSupported = exports.getFirstLedgerDevice = exports.getLedgerDevices = exports.requestLedgerDevice = void 0; +var devices_1 = require("@ledgerhq/devices"); +var ledgerDevices = [ + { + vendorId: devices_1.ledgerUSBVendorId + }, +]; +function requestLedgerDevice() { + return __awaiter(this, void 0, void 0, function () { + var device; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, navigator.usb.requestDevice({ + filters: ledgerDevices + })]; + case 1: + device = _a.sent(); + return [2 /*return*/, device]; + } + }); + }); +} +exports.requestLedgerDevice = requestLedgerDevice; +function getLedgerDevices() { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, navigator.usb.getDevices()]; + case 1: + devices = _a.sent(); + return [2 /*return*/, devices.filter(function (d) { return d.vendorId === devices_1.ledgerUSBVendorId; })]; + } + }); + }); +} +exports.getLedgerDevices = getLedgerDevices; +function getFirstLedgerDevice() { + return __awaiter(this, void 0, void 0, function () { + var existingDevices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getLedgerDevices()]; + case 1: + existingDevices = _a.sent(); + if (existingDevices.length > 0) + return [2 /*return*/, existingDevices[0]]; + return [2 /*return*/, requestLedgerDevice()]; + } + }); + }); +} +exports.getFirstLedgerDevice = getFirstLedgerDevice; +var isSupported = function () { + return Promise.resolve(!!navigator && + !!navigator.usb && + typeof navigator.usb.getDevices === "function"); +}; +exports.isSupported = isSupported; + +},{"@ledgerhq/devices":3}],10:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.getAltStatusMessage = exports.StatusCodes = exports.TransportStatusError = exports.TransportError = void 0; +var events_1 = __importDefault(require("events")); +var errors_1 = require("@ledgerhq/errors"); +exports.TransportError = errors_1.TransportError; +exports.StatusCodes = errors_1.StatusCodes; +exports.getAltStatusMessage = errors_1.getAltStatusMessage; +exports.TransportStatusError = errors_1.TransportStatusError; +/** + * Transport defines the generic interface to share between node/u2f impl + * A **Descriptor** is a parametric type that is up to be determined for the implementation. + * it can be for instance an ID, an file path, a URL,... + */ +var Transport = /** @class */ (function () { + function Transport() { + var _this = this; + this.exchangeTimeout = 30000; + this.unresponsiveTimeout = 15000; + this.deviceModel = null; + this._events = new events_1["default"](); + /** + * wrapper on top of exchange to simplify work of the implementation. + * @param cla + * @param ins + * @param p1 + * @param p2 + * @param data + * @param statusList is a list of accepted status code (shorts). [0x9000] by default + * @return a Promise of response buffer + */ + this.send = function (cla, ins, p1, p2, data, statusList) { + if (data === void 0) { data = Buffer.alloc(0); } + if (statusList === void 0) { statusList = [errors_1.StatusCodes.OK]; } + return __awaiter(_this, void 0, void 0, function () { + var response, sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (data.length >= 256) { + throw new errors_1.TransportError("data.length exceed 256 bytes limit. Got: " + data.length, "DataLengthTooBig"); + } + return [4 /*yield*/, this.exchange(Buffer.concat([ + Buffer.from([cla, ins, p1, p2]), + Buffer.from([data.length]), + data, + ]))]; + case 1: + response = _a.sent(); + sw = response.readUInt16BE(response.length - 2); + if (!statusList.some(function (s) { return s === sw; })) { + throw new errors_1.TransportStatusError(sw); + } + return [2 /*return*/, response]; + } + }); + }); + }; + this.exchangeAtomicImpl = function (f) { return __awaiter(_this, void 0, void 0, function () { + var resolveBusy, busyPromise, unresponsiveReached, timeout, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.exchangeBusyPromise) { + throw new errors_1.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect."); + } + busyPromise = new Promise(function (r) { + resolveBusy = r; + }); + this.exchangeBusyPromise = busyPromise; + unresponsiveReached = false; + timeout = setTimeout(function () { + unresponsiveReached = true; + _this.emit("unresponsive"); + }, this.unresponsiveTimeout); + _a.label = 1; + case 1: + _a.trys.push([1, , 3, 4]); + return [4 /*yield*/, f()]; + case 2: + res = _a.sent(); + if (unresponsiveReached) { + this.emit("responsive"); + } + return [2 /*return*/, res]; + case 3: + clearTimeout(timeout); + if (resolveBusy) + resolveBusy(); + this.exchangeBusyPromise = null; + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); }; + this._appAPIlock = null; + } + /** + * low level api to communicate with the device + * This method is for implementations to implement but should not be directly called. + * Instead, the recommanded way is to use send() method + * @param apdu the data to send + * @return a Promise of response data + */ + Transport.prototype.exchange = function (_apdu) { + throw new Error("exchange not implemented"); + }; + /** + * set the "scramble key" for the next exchanges with the device. + * Each App can have a different scramble key and they internally will set it at instanciation. + * @param key the scramble key + */ + Transport.prototype.setScrambleKey = function (_key) { }; + /** + * close the exchange with the device. + * @return a Promise that ends when the transport is closed. + */ + Transport.prototype.close = function () { + return Promise.resolve(); + }; + /** + * Listen to an event on an instance of transport. + * Transport implementation can have specific events. Here is the common events: + * * `"disconnect"` : triggered if Transport is disconnected + */ + Transport.prototype.on = function (eventName, cb) { + this._events.on(eventName, cb); + }; + /** + * Stop listening to an event on an instance of transport. + */ + Transport.prototype.off = function (eventName, cb) { + this._events.removeListener(eventName, cb); + }; + Transport.prototype.emit = function (event) { + var _a; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + (_a = this._events).emit.apply(_a, __spreadArray([event], __read(args), false)); + }; + /** + * Enable or not logs of the binary exchange + */ + Transport.prototype.setDebugMode = function () { + console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore."); + }; + /** + * Set a timeout (in milliseconds) for the exchange call. Only some transport might implement it. (e.g. U2F) + */ + Transport.prototype.setExchangeTimeout = function (exchangeTimeout) { + this.exchangeTimeout = exchangeTimeout; + }; + /** + * Define the delay before emitting "unresponsive" on an exchange that does not respond + */ + Transport.prototype.setExchangeUnresponsiveTimeout = function (unresponsiveTimeout) { + this.unresponsiveTimeout = unresponsiveTimeout; + }; + /** + * create() allows to open the first descriptor available or + * throw if there is none or if timeout is reached. + * This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase) + * @example + TransportFoo.create().then(transport => ...) + */ + Transport.create = function (openTimeout, listenTimeout) { + var _this = this; + if (openTimeout === void 0) { openTimeout = 3000; } + return new Promise(function (resolve, reject) { + var found = false; + var sub = _this.listen({ + next: function (e) { + found = true; + if (sub) + sub.unsubscribe(); + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + _this.open(e.descriptor, openTimeout).then(resolve, reject); + }, + error: function (e) { + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + reject(e); + }, + complete: function () { + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + if (!found) { + reject(new errors_1.TransportError(_this.ErrorMessage_NoDeviceFound, "NoDeviceFound")); + } + } + }); + var listenTimeoutId = listenTimeout + ? setTimeout(function () { + sub.unsubscribe(); + reject(new errors_1.TransportError(_this.ErrorMessage_ListenTimeout, "ListenTimeout")); + }, listenTimeout) + : null; + }); + }; + Transport.prototype.decorateAppAPIMethods = function (self, methods, scrambleKey) { + var e_1, _a; + try { + for (var methods_1 = __values(methods), methods_1_1 = methods_1.next(); !methods_1_1.done; methods_1_1 = methods_1.next()) { + var methodName = methods_1_1.value; + self[methodName] = this.decorateAppAPIMethod(methodName, self[methodName], self, scrambleKey); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (methods_1_1 && !methods_1_1.done && (_a = methods_1["return"])) _a.call(methods_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + Transport.prototype.decorateAppAPIMethod = function (methodName, f, ctx, scrambleKey) { + var _this = this; + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(_this, void 0, void 0, function () { + var _appAPIlock; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _appAPIlock = this._appAPIlock; + if (_appAPIlock) { + return [2 /*return*/, Promise.reject(new errors_1.TransportError("Ledger Device is busy (lock " + _appAPIlock + ")", "TransportLocked"))]; + } + _a.label = 1; + case 1: + _a.trys.push([1, , 3, 4]); + this._appAPIlock = methodName; + this.setScrambleKey(scrambleKey); + return [4 /*yield*/, f.apply(ctx, args)]; + case 2: return [2 /*return*/, _a.sent()]; + case 3: + this._appAPIlock = null; + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + }; + Transport.ErrorMessage_ListenTimeout = "No Ledger device found (timeout)"; + Transport.ErrorMessage_NoDeviceFound = "No Ledger device found"; + return Transport; +}()); +exports["default"] = Transport; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":5,"buffer":165,"events":166}],11:[function(require,module,exports){ +"use strict"; +exports.__esModule = true; +exports.listen = exports.log = void 0; +var id = 0; +var subscribers = []; +/** + * log something + * @param type a namespaced identifier of the log (it is not a level like "debug", "error" but more like "apdu-in", "apdu-out", etc...) + * @param message a clear message of the log associated to the type + */ +var log = function (type, message, data) { + var obj = { + type: type, + id: String(++id), + date: new Date() + }; + if (message) + obj.message = message; + if (data) + obj.data = data; + dispatch(obj); +}; +exports.log = log; +/** + * listen to logs. + * @param cb that is called for each future log() with the Log object + * @return a function that can be called to unsubscribe the listener + */ +var listen = function (cb) { + subscribers.push(cb); + return function () { + var i = subscribers.indexOf(cb); + if (i !== -1) { + // equivalent of subscribers.splice(i, 1) // https://twitter.com/Rich_Harris/status/1125850391155965952 + subscribers[i] = subscribers[subscribers.length - 1]; + subscribers.pop(); + } + }; +}; +exports.listen = listen; +function dispatch(log) { + for (var i = 0; i < subscribers.length; i++) { + try { + subscribers[i](log); + } + catch (e) { + console.error(e); + } + } +} +if (typeof window !== "undefined") { + window.__ledgerLogsListen = exports.listen; +} + +},{}],12:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var hw_app_obsidian_common_1 = require("hw-app-obsidian-common"); +/** + * Kadena API + * + * @example + * import Kadena from "hw-app-kda"; + * const kda = new Kadena(transport) + */ +var Kadena = /** @class */ (function (_super) { + __extends(Kadena, _super); + function Kadena(transport) { + return _super.call(this, transport, "KDA") || this; + } + return Kadena; +}(hw_app_obsidian_common_1.Common)); +exports["default"] = Kadena; + +},{"hw-app-obsidian-common":13}],13:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +exports.__esModule = true; +exports.Common = void 0; +/** + * Common API for ledger apps + * + * @example + * import Kadena from "hw-app-kda"; + * const kda = new Kadena(transport) + */ +var Common = /** @class */ (function () { + function Common(transport, scrambleKey, appName) { + if (appName === void 0) { appName = null; } + this.transport = transport; + this.appName = appName; + transport.decorateAppAPIMethods(this, ["menu", "getPublicKey", "signHash", "getVersion"], "KDA"); + } + /** + * Retrieves the public key associated with a particular BIP32 path from the ledger app. + * + * @param path - the path to retrieve. + */ + Common.prototype.getPublicKey = function (path) { + return __awaiter(this, void 0, void 0, function () { + var cla, ins, p1, p2, payload, response, responseSize, publicKey, res; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + cla = 0x00; + ins = 0x02; + p1 = 0; + p2 = 0; + payload = buildBip32KeyPayload(path); + console.log("getPublicKey payload", payload.toString("hex")); // TODO remove + return [4 /*yield*/, this.sendChunks(cla, ins, p1, p2, payload)]; + case 1: + response = _a.sent(); + console.log("getPublicKey response", response.toString("hex")); // TODO remove + responseSize = response[0]; + publicKey = response.slice(1, 1 + responseSize); + res = { + publicKey: publicKey.toString("hex") + }; + return [2 /*return*/, res]; + } + }); + }); + }; + /** + * Sign a transaction with the key at a BIP32 path. + * + * @param txn - The transaction; this can be any of a node Buffer, Uint8Array, or a hexadecimal string, encoding the form of the transaction appropriate for hashing and signing. + * @param path - the path to use when signing the transaction. + */ + Common.prototype.signTransaction = function (path, txn) { + return __awaiter(this, void 0, void 0, function () { + var paths, cla, ins, p1, p2, rawTxn, hashSize, bip32KeyPayload, payload, response, signature; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + paths = splitPath(path); + cla = 0x00; + ins = 0x03; + p1 = 0; + p2 = 0; + rawTxn = typeof txn == "string" ? Buffer.from(txn, "hex") : Buffer.from(txn); + hashSize = Buffer.alloc(4); + hashSize.writeUInt32LE(rawTxn.length, 0); + bip32KeyPayload = buildBip32KeyPayload(path); + payload = Buffer.concat([hashSize, rawTxn, bip32KeyPayload]); + console.error("signHash payload", payload.toString("hex")); // TODO remove + return [4 /*yield*/, this.sendChunks(cla, ins, p1, p2, payload)]; + case 1: + response = _a.sent(); + console.log("signHash response", response.toString("hex")); // TODO remove + signature = response.toString("hex"); + return [2 /*return*/, { + signature: signature + }]; + } + }); + }); + }; + /** + * Retrieve the app version on the attached ledger device. + * @alpha TODO this doesn't exist yet + */ + Common.prototype.getVersion = function () { + return __awaiter(this, void 0, void 0, function () { + var _a, major, minor, patch, appName; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, this.transport.send(0x80, 0x00, 0x00, 0x00, Buffer.alloc(0))]; + case 1: + _a = __read.apply(void 0, [_b.sent()]), major = _a[0], minor = _a[1], patch = _a[2], appName = _a.slice(3); + return [2 /*return*/, { + major: major, + minor: minor, + patch: patch + }]; + } + }); + }); + }; + /** + * Send a raw payload as chunks to a particular APDU instruction. + * + * @remarks + * + * This is intended to be used to implement a more useful API in this class and subclasses of it, not for end use. + */ + Common.prototype.sendChunks = function (cla, ins, p1, p2, payload) { + return __awaiter(this, void 0, void 0, function () { + var rv, chunkSize, i; + return __generator(this, function (_a) { + chunkSize = 230; + for (i = 0; i < payload.length; i += chunkSize) { + rv = this.transport.send(cla, ins, p1, p2, payload.slice(i, i + chunkSize)); + } + return [2 /*return*/, rv]; + }); + }); + }; + return Common; +}()); +exports.Common = Common; +function buildBip32KeyPayload(path) { + var paths = splitPath(path); + // Bip32Key payload is: + // 1 byte with number of elements in u32 array path + // Followed by the u32 array itself + var payload = Buffer.alloc(1 + paths.length * 4); + payload[0] = paths.length; + paths.forEach(function (element, index) { + payload.writeUInt32LE(element, 1 + 4 * index); + }); + return payload; +} +// TODO use bip32-path library +function splitPath(path) { + var result = []; + var components = path.split("/"); + components.forEach(function (element) { + var number = parseInt(element, 10); + if (isNaN(number)) { + return; // FIXME shouldn't it throws instead? + } + if (element.length > 1 && element[element.length - 1] === "'") { + number += 0x80000000; + } + result.push(number); + }); + return result; +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"buffer":165}],14:[function(require,module,exports){ +'use strict' + +// A linked list to keep track of recently-used-ness +const Yallist = require('yallist') + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache + +},{"yallist":162}],15:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("./internal/Observable"); +exports.Observable = Observable_1.Observable; +var ConnectableObservable_1 = require("./internal/observable/ConnectableObservable"); +exports.ConnectableObservable = ConnectableObservable_1.ConnectableObservable; +var groupBy_1 = require("./internal/operators/groupBy"); +exports.GroupedObservable = groupBy_1.GroupedObservable; +var observable_1 = require("./internal/symbol/observable"); +exports.observable = observable_1.observable; +var Subject_1 = require("./internal/Subject"); +exports.Subject = Subject_1.Subject; +var BehaviorSubject_1 = require("./internal/BehaviorSubject"); +exports.BehaviorSubject = BehaviorSubject_1.BehaviorSubject; +var ReplaySubject_1 = require("./internal/ReplaySubject"); +exports.ReplaySubject = ReplaySubject_1.ReplaySubject; +var AsyncSubject_1 = require("./internal/AsyncSubject"); +exports.AsyncSubject = AsyncSubject_1.AsyncSubject; +var asap_1 = require("./internal/scheduler/asap"); +exports.asap = asap_1.asap; +exports.asapScheduler = asap_1.asapScheduler; +var async_1 = require("./internal/scheduler/async"); +exports.async = async_1.async; +exports.asyncScheduler = async_1.asyncScheduler; +var queue_1 = require("./internal/scheduler/queue"); +exports.queue = queue_1.queue; +exports.queueScheduler = queue_1.queueScheduler; +var animationFrame_1 = require("./internal/scheduler/animationFrame"); +exports.animationFrame = animationFrame_1.animationFrame; +exports.animationFrameScheduler = animationFrame_1.animationFrameScheduler; +var VirtualTimeScheduler_1 = require("./internal/scheduler/VirtualTimeScheduler"); +exports.VirtualTimeScheduler = VirtualTimeScheduler_1.VirtualTimeScheduler; +exports.VirtualAction = VirtualTimeScheduler_1.VirtualAction; +var Scheduler_1 = require("./internal/Scheduler"); +exports.Scheduler = Scheduler_1.Scheduler; +var Subscription_1 = require("./internal/Subscription"); +exports.Subscription = Subscription_1.Subscription; +var Subscriber_1 = require("./internal/Subscriber"); +exports.Subscriber = Subscriber_1.Subscriber; +var Notification_1 = require("./internal/Notification"); +exports.Notification = Notification_1.Notification; +exports.NotificationKind = Notification_1.NotificationKind; +var pipe_1 = require("./internal/util/pipe"); +exports.pipe = pipe_1.pipe; +var noop_1 = require("./internal/util/noop"); +exports.noop = noop_1.noop; +var identity_1 = require("./internal/util/identity"); +exports.identity = identity_1.identity; +var isObservable_1 = require("./internal/util/isObservable"); +exports.isObservable = isObservable_1.isObservable; +var ArgumentOutOfRangeError_1 = require("./internal/util/ArgumentOutOfRangeError"); +exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; +var EmptyError_1 = require("./internal/util/EmptyError"); +exports.EmptyError = EmptyError_1.EmptyError; +var ObjectUnsubscribedError_1 = require("./internal/util/ObjectUnsubscribedError"); +exports.ObjectUnsubscribedError = ObjectUnsubscribedError_1.ObjectUnsubscribedError; +var UnsubscriptionError_1 = require("./internal/util/UnsubscriptionError"); +exports.UnsubscriptionError = UnsubscriptionError_1.UnsubscriptionError; +var TimeoutError_1 = require("./internal/util/TimeoutError"); +exports.TimeoutError = TimeoutError_1.TimeoutError; +var bindCallback_1 = require("./internal/observable/bindCallback"); +exports.bindCallback = bindCallback_1.bindCallback; +var bindNodeCallback_1 = require("./internal/observable/bindNodeCallback"); +exports.bindNodeCallback = bindNodeCallback_1.bindNodeCallback; +var combineLatest_1 = require("./internal/observable/combineLatest"); +exports.combineLatest = combineLatest_1.combineLatest; +var concat_1 = require("./internal/observable/concat"); +exports.concat = concat_1.concat; +var defer_1 = require("./internal/observable/defer"); +exports.defer = defer_1.defer; +var empty_1 = require("./internal/observable/empty"); +exports.empty = empty_1.empty; +var forkJoin_1 = require("./internal/observable/forkJoin"); +exports.forkJoin = forkJoin_1.forkJoin; +var from_1 = require("./internal/observable/from"); +exports.from = from_1.from; +var fromEvent_1 = require("./internal/observable/fromEvent"); +exports.fromEvent = fromEvent_1.fromEvent; +var fromEventPattern_1 = require("./internal/observable/fromEventPattern"); +exports.fromEventPattern = fromEventPattern_1.fromEventPattern; +var generate_1 = require("./internal/observable/generate"); +exports.generate = generate_1.generate; +var iif_1 = require("./internal/observable/iif"); +exports.iif = iif_1.iif; +var interval_1 = require("./internal/observable/interval"); +exports.interval = interval_1.interval; +var merge_1 = require("./internal/observable/merge"); +exports.merge = merge_1.merge; +var never_1 = require("./internal/observable/never"); +exports.never = never_1.never; +var of_1 = require("./internal/observable/of"); +exports.of = of_1.of; +var onErrorResumeNext_1 = require("./internal/observable/onErrorResumeNext"); +exports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext; +var pairs_1 = require("./internal/observable/pairs"); +exports.pairs = pairs_1.pairs; +var partition_1 = require("./internal/observable/partition"); +exports.partition = partition_1.partition; +var race_1 = require("./internal/observable/race"); +exports.race = race_1.race; +var range_1 = require("./internal/observable/range"); +exports.range = range_1.range; +var throwError_1 = require("./internal/observable/throwError"); +exports.throwError = throwError_1.throwError; +var timer_1 = require("./internal/observable/timer"); +exports.timer = timer_1.timer; +var using_1 = require("./internal/observable/using"); +exports.using = using_1.using; +var zip_1 = require("./internal/observable/zip"); +exports.zip = zip_1.zip; +var scheduled_1 = require("./internal/scheduled/scheduled"); +exports.scheduled = scheduled_1.scheduled; +var empty_2 = require("./internal/observable/empty"); +exports.EMPTY = empty_2.EMPTY; +var never_2 = require("./internal/observable/never"); +exports.NEVER = never_2.NEVER; +var config_1 = require("./internal/config"); +exports.config = config_1.config; + +},{"./internal/AsyncSubject":16,"./internal/BehaviorSubject":17,"./internal/Notification":19,"./internal/Observable":20,"./internal/ReplaySubject":23,"./internal/Scheduler":24,"./internal/Subject":25,"./internal/Subscriber":27,"./internal/Subscription":28,"./internal/config":29,"./internal/observable/ConnectableObservable":31,"./internal/observable/bindCallback":32,"./internal/observable/bindNodeCallback":33,"./internal/observable/combineLatest":34,"./internal/observable/concat":35,"./internal/observable/defer":36,"./internal/observable/empty":37,"./internal/observable/forkJoin":38,"./internal/observable/from":39,"./internal/observable/fromEvent":41,"./internal/observable/fromEventPattern":42,"./internal/observable/generate":43,"./internal/observable/iif":44,"./internal/observable/interval":45,"./internal/observable/merge":46,"./internal/observable/never":47,"./internal/observable/of":48,"./internal/observable/onErrorResumeNext":49,"./internal/observable/pairs":50,"./internal/observable/partition":51,"./internal/observable/race":52,"./internal/observable/range":53,"./internal/observable/throwError":54,"./internal/observable/timer":55,"./internal/observable/using":56,"./internal/observable/zip":57,"./internal/operators/groupBy":60,"./internal/scheduled/scheduled":70,"./internal/scheduler/VirtualTimeScheduler":80,"./internal/scheduler/animationFrame":81,"./internal/scheduler/asap":82,"./internal/scheduler/async":83,"./internal/scheduler/queue":84,"./internal/symbol/observable":86,"./internal/util/ArgumentOutOfRangeError":88,"./internal/util/EmptyError":89,"./internal/util/ObjectUnsubscribedError":91,"./internal/util/TimeoutError":92,"./internal/util/UnsubscriptionError":93,"./internal/util/identity":96,"./internal/util/isObservable":104,"./internal/util/noop":107,"./internal/util/pipe":109}],16:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("./Subject"); +var Subscription_1 = require("./Subscription"); +var AsyncSubject = (function (_super) { + __extends(AsyncSubject, _super); + function AsyncSubject() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.value = null; + _this.hasNext = false; + _this.hasCompleted = false; + return _this; + } + AsyncSubject.prototype._subscribe = function (subscriber) { + if (this.hasError) { + subscriber.error(this.thrownError); + return Subscription_1.Subscription.EMPTY; + } + else if (this.hasCompleted && this.hasNext) { + subscriber.next(this.value); + subscriber.complete(); + return Subscription_1.Subscription.EMPTY; + } + return _super.prototype._subscribe.call(this, subscriber); + }; + AsyncSubject.prototype.next = function (value) { + if (!this.hasCompleted) { + this.value = value; + this.hasNext = true; + } + }; + AsyncSubject.prototype.error = function (error) { + if (!this.hasCompleted) { + _super.prototype.error.call(this, error); + } + }; + AsyncSubject.prototype.complete = function () { + this.hasCompleted = true; + if (this.hasNext) { + _super.prototype.next.call(this, this.value); + } + _super.prototype.complete.call(this); + }; + return AsyncSubject; +}(Subject_1.Subject)); +exports.AsyncSubject = AsyncSubject; + +},{"./Subject":25,"./Subscription":28}],17:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("./Subject"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var BehaviorSubject = (function (_super) { + __extends(BehaviorSubject, _super); + function BehaviorSubject(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject.prototype, "value", { + get: function () { + return this.getValue(); + }, + enumerable: true, + configurable: true + }); + BehaviorSubject.prototype._subscribe = function (subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + if (subscription && !subscription.closed) { + subscriber.next(this._value); + } + return subscription; + }; + BehaviorSubject.prototype.getValue = function () { + if (this.hasError) { + throw this.thrownError; + } + else if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else { + return this._value; + } + }; + BehaviorSubject.prototype.next = function (value) { + _super.prototype.next.call(this, this._value = value); + }; + return BehaviorSubject; +}(Subject_1.Subject)); +exports.BehaviorSubject = BehaviorSubject; + +},{"./Subject":25,"./util/ObjectUnsubscribedError":91}],18:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("./Subscriber"); +var InnerSubscriber = (function (_super) { + __extends(InnerSubscriber, _super); + function InnerSubscriber(parent, outerValue, outerIndex) { + var _this = _super.call(this) || this; + _this.parent = parent; + _this.outerValue = outerValue; + _this.outerIndex = outerIndex; + _this.index = 0; + return _this; + } + InnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); + }; + InnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error, this); + this.unsubscribe(); + }; + InnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(this); + this.unsubscribe(); + }; + return InnerSubscriber; +}(Subscriber_1.Subscriber)); +exports.InnerSubscriber = InnerSubscriber; + +},{"./Subscriber":27}],19:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var empty_1 = require("./observable/empty"); +var of_1 = require("./observable/of"); +var throwError_1 = require("./observable/throwError"); +var NotificationKind; +(function (NotificationKind) { + NotificationKind["NEXT"] = "N"; + NotificationKind["ERROR"] = "E"; + NotificationKind["COMPLETE"] = "C"; +})(NotificationKind = exports.NotificationKind || (exports.NotificationKind = {})); +var Notification = (function () { + function Notification(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + Notification.prototype.observe = function (observer) { + switch (this.kind) { + case 'N': + return observer.next && observer.next(this.value); + case 'E': + return observer.error && observer.error(this.error); + case 'C': + return observer.complete && observer.complete(); + } + }; + Notification.prototype.do = function (next, error, complete) { + var kind = this.kind; + switch (kind) { + case 'N': + return next && next(this.value); + case 'E': + return error && error(this.error); + case 'C': + return complete && complete(); + } + }; + Notification.prototype.accept = function (nextOrObserver, error, complete) { + if (nextOrObserver && typeof nextOrObserver.next === 'function') { + return this.observe(nextOrObserver); + } + else { + return this.do(nextOrObserver, error, complete); + } + }; + Notification.prototype.toObservable = function () { + var kind = this.kind; + switch (kind) { + case 'N': + return of_1.of(this.value); + case 'E': + return throwError_1.throwError(this.error); + case 'C': + return empty_1.empty(); + } + throw new Error('unexpected notification kind value'); + }; + Notification.createNext = function (value) { + if (typeof value !== 'undefined') { + return new Notification('N', value); + } + return Notification.undefinedValueNotification; + }; + Notification.createError = function (err) { + return new Notification('E', undefined, err); + }; + Notification.createComplete = function () { + return Notification.completeNotification; + }; + Notification.completeNotification = new Notification('C'); + Notification.undefinedValueNotification = new Notification('N', undefined); + return Notification; +}()); +exports.Notification = Notification; + +},{"./observable/empty":37,"./observable/of":48,"./observable/throwError":54}],20:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var canReportError_1 = require("./util/canReportError"); +var toSubscriber_1 = require("./util/toSubscriber"); +var observable_1 = require("./symbol/observable"); +var pipe_1 = require("./util/pipe"); +var config_1 = require("./config"); +var Observable = (function () { + function Observable(subscribe) { + this._isScalar = false; + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var operator = this.operator; + var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete); + if (operator) { + sink.add(operator.call(sink, this.source)); + } + else { + sink.add(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? + this._subscribe(sink) : + this._trySubscribe(sink)); + } + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + if (sink.syncErrorThrowable) { + sink.syncErrorThrowable = false; + if (sink.syncErrorThrown) { + throw sink.syncErrorValue; + } + } + } + return sink; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + sink.syncErrorThrown = true; + sink.syncErrorValue = err; + } + if (canReportError_1.canReportError(sink)) { + sink.error(err); + } + else { + console.warn(err); + } + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscription; + subscription = _this.subscribe(function (value) { + try { + next(value); + } + catch (err) { + reject(err); + if (subscription) { + subscription.unsubscribe(); + } + } + }, reject, resolve); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var source = this.source; + return source && source.subscribe(subscriber); + }; + Observable.prototype[observable_1.observable] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + if (operations.length === 0) { + return this; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); +exports.Observable = Observable; +function getPromiseCtor(promiseCtor) { + if (!promiseCtor) { + promiseCtor = config_1.config.Promise || Promise; + } + if (!promiseCtor) { + throw new Error('no Promise impl found'); + } + return promiseCtor; +} + +},{"./config":29,"./symbol/observable":86,"./util/canReportError":94,"./util/pipe":109,"./util/toSubscriber":116}],21:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var config_1 = require("./config"); +var hostReportError_1 = require("./util/hostReportError"); +exports.empty = { + closed: true, + next: function (value) { }, + error: function (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + hostReportError_1.hostReportError(err); + } + }, + complete: function () { } +}; + +},{"./config":29,"./util/hostReportError":95}],22:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("./Subscriber"); +var OuterSubscriber = (function (_super) { + __extends(OuterSubscriber, _super); + function OuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + OuterSubscriber.prototype.notifyError = function (error, innerSub) { + this.destination.error(error); + }; + OuterSubscriber.prototype.notifyComplete = function (innerSub) { + this.destination.complete(); + }; + return OuterSubscriber; +}(Subscriber_1.Subscriber)); +exports.OuterSubscriber = OuterSubscriber; + +},{"./Subscriber":27}],23:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("./Subject"); +var queue_1 = require("./scheduler/queue"); +var Subscription_1 = require("./Subscription"); +var observeOn_1 = require("./operators/observeOn"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var SubjectSubscription_1 = require("./SubjectSubscription"); +var ReplaySubject = (function (_super) { + __extends(ReplaySubject, _super); + function ReplaySubject(bufferSize, windowTime, scheduler) { + if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; } + if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; } + var _this = _super.call(this) || this; + _this.scheduler = scheduler; + _this._events = []; + _this._infiniteTimeWindow = false; + _this._bufferSize = bufferSize < 1 ? 1 : bufferSize; + _this._windowTime = windowTime < 1 ? 1 : windowTime; + if (windowTime === Number.POSITIVE_INFINITY) { + _this._infiniteTimeWindow = true; + _this.next = _this.nextInfiniteTimeWindow; + } + else { + _this.next = _this.nextTimeWindow; + } + return _this; + } + ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) { + if (!this.isStopped) { + var _events = this._events; + _events.push(value); + if (_events.length > this._bufferSize) { + _events.shift(); + } + } + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype.nextTimeWindow = function (value) { + if (!this.isStopped) { + this._events.push(new ReplayEvent(this._getNow(), value)); + this._trimBufferThenGetEvents(); + } + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype._subscribe = function (subscriber) { + var _infiniteTimeWindow = this._infiniteTimeWindow; + var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents(); + var scheduler = this.scheduler; + var len = _events.length; + var subscription; + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else if (this.isStopped || this.hasError) { + subscription = Subscription_1.Subscription.EMPTY; + } + else { + this.observers.push(subscriber); + subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber); + } + if (scheduler) { + subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler)); + } + if (_infiniteTimeWindow) { + for (var i = 0; i < len && !subscriber.closed; i++) { + subscriber.next(_events[i]); + } + } + else { + for (var i = 0; i < len && !subscriber.closed; i++) { + subscriber.next(_events[i].value); + } + } + if (this.hasError) { + subscriber.error(this.thrownError); + } + else if (this.isStopped) { + subscriber.complete(); + } + return subscription; + }; + ReplaySubject.prototype._getNow = function () { + return (this.scheduler || queue_1.queue).now(); + }; + ReplaySubject.prototype._trimBufferThenGetEvents = function () { + var now = this._getNow(); + var _bufferSize = this._bufferSize; + var _windowTime = this._windowTime; + var _events = this._events; + var eventsCount = _events.length; + var spliceCount = 0; + while (spliceCount < eventsCount) { + if ((now - _events[spliceCount].time) < _windowTime) { + break; + } + spliceCount++; + } + if (eventsCount > _bufferSize) { + spliceCount = Math.max(spliceCount, eventsCount - _bufferSize); + } + if (spliceCount > 0) { + _events.splice(0, spliceCount); + } + return _events; + }; + return ReplaySubject; +}(Subject_1.Subject)); +exports.ReplaySubject = ReplaySubject; +var ReplayEvent = (function () { + function ReplayEvent(time, value) { + this.time = time; + this.value = value; + } + return ReplayEvent; +}()); + +},{"./Subject":25,"./SubjectSubscription":26,"./Subscription":28,"./operators/observeOn":64,"./scheduler/queue":84,"./util/ObjectUnsubscribedError":91}],24:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Scheduler = (function () { + function Scheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler.now; } + this.SchedulerAction = SchedulerAction; + this.now = now; + } + Scheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { delay = 0; } + return new this.SchedulerAction(this, work).schedule(state, delay); + }; + Scheduler.now = function () { return Date.now(); }; + return Scheduler; +}()); +exports.Scheduler = Scheduler; + +},{}],25:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("./Observable"); +var Subscriber_1 = require("./Subscriber"); +var Subscription_1 = require("./Subscription"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var SubjectSubscription_1 = require("./SubjectSubscription"); +var rxSubscriber_1 = require("../internal/symbol/rxSubscriber"); +var SubjectSubscriber = (function (_super) { + __extends(SubjectSubscriber, _super); + function SubjectSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + return _this; + } + return SubjectSubscriber; +}(Subscriber_1.Subscriber)); +exports.SubjectSubscriber = SubjectSubscriber; +var Subject = (function (_super) { + __extends(Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.observers = []; + _this.closed = false; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype[rxSubscriber_1.rxSubscriber] = function () { + return new SubjectSubscriber(this); + }; + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype.next = function (value) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + if (!this.isStopped) { + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].next(value); + } + } + }; + Subject.prototype.error = function (err) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + this.hasError = true; + this.thrownError = err; + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].error(err); + } + this.observers.length = 0; + }; + Subject.prototype.complete = function () { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].complete(); + } + this.observers.length = 0; + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = true; + this.closed = true; + this.observers = null; + }; + Subject.prototype._trySubscribe = function (subscriber) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else { + return _super.prototype._trySubscribe.call(this, subscriber); + } + }; + Subject.prototype._subscribe = function (subscriber) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else if (this.hasError) { + subscriber.error(this.thrownError); + return Subscription_1.Subscription.EMPTY; + } + else if (this.isStopped) { + subscriber.complete(); + return Subscription_1.Subscription.EMPTY; + } + else { + this.observers.push(subscriber); + return new SubjectSubscription_1.SubjectSubscription(this, subscriber); + } + }; + Subject.prototype.asObservable = function () { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(Observable_1.Observable)); +exports.Subject = Subject; +var AnonymousSubject = (function (_super) { + __extends(AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var destination = this.destination; + if (destination && destination.next) { + destination.next(value); + } + }; + AnonymousSubject.prototype.error = function (err) { + var destination = this.destination; + if (destination && destination.error) { + this.destination.error(err); + } + }; + AnonymousSubject.prototype.complete = function () { + var destination = this.destination; + if (destination && destination.complete) { + this.destination.complete(); + } + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var source = this.source; + if (source) { + return this.source.subscribe(subscriber); + } + else { + return Subscription_1.Subscription.EMPTY; + } + }; + return AnonymousSubject; +}(Subject)); +exports.AnonymousSubject = AnonymousSubject; + +},{"../internal/symbol/rxSubscriber":87,"./Observable":20,"./SubjectSubscription":26,"./Subscriber":27,"./Subscription":28,"./util/ObjectUnsubscribedError":91}],26:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscription_1 = require("./Subscription"); +var SubjectSubscription = (function (_super) { + __extends(SubjectSubscription, _super); + function SubjectSubscription(subject, subscriber) { + var _this = _super.call(this) || this; + _this.subject = subject; + _this.subscriber = subscriber; + _this.closed = false; + return _this; + } + SubjectSubscription.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.closed = true; + var subject = this.subject; + var observers = subject.observers; + this.subject = null; + if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { + return; + } + var subscriberIndex = observers.indexOf(this.subscriber); + if (subscriberIndex !== -1) { + observers.splice(subscriberIndex, 1); + } + }; + return SubjectSubscription; +}(Subscription_1.Subscription)); +exports.SubjectSubscription = SubjectSubscription; + +},{"./Subscription":28}],27:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var isFunction_1 = require("./util/isFunction"); +var Observer_1 = require("./Observer"); +var Subscription_1 = require("./Subscription"); +var rxSubscriber_1 = require("../internal/symbol/rxSubscriber"); +var config_1 = require("./config"); +var hostReportError_1 = require("./util/hostReportError"); +var Subscriber = (function (_super) { + __extends(Subscriber, _super); + function Subscriber(destinationOrNext, error, complete) { + var _this = _super.call(this) || this; + _this.syncErrorValue = null; + _this.syncErrorThrown = false; + _this.syncErrorThrowable = false; + _this.isStopped = false; + switch (arguments.length) { + case 0: + _this.destination = Observer_1.empty; + break; + case 1: + if (!destinationOrNext) { + _this.destination = Observer_1.empty; + break; + } + if (typeof destinationOrNext === 'object') { + if (destinationOrNext instanceof Subscriber) { + _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; + _this.destination = destinationOrNext; + destinationOrNext.add(_this); + } + else { + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext); + } + break; + } + default: + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete); + break; + } + return _this; + } + Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () { return this; }; + Subscriber.create = function (next, error, complete) { + var subscriber = new Subscriber(next, error, complete); + subscriber.syncErrorThrowable = false; + return subscriber; + }; + Subscriber.prototype.next = function (value) { + if (!this.isStopped) { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (!this.isStopped) { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (!this.isStopped) { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + this.destination.error(err); + this.unsubscribe(); + }; + Subscriber.prototype._complete = function () { + this.destination.complete(); + this.unsubscribe(); + }; + Subscriber.prototype._unsubscribeAndRecycle = function () { + var _parentOrParents = this._parentOrParents; + this._parentOrParents = null; + this.unsubscribe(); + this.closed = false; + this.isStopped = false; + this._parentOrParents = _parentOrParents; + return this; + }; + return Subscriber; +}(Subscription_1.Subscription)); +exports.Subscriber = Subscriber; +var SafeSubscriber = (function (_super) { + __extends(SafeSubscriber, _super); + function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) { + var _this = _super.call(this) || this; + _this._parentSubscriber = _parentSubscriber; + var next; + var context = _this; + if (isFunction_1.isFunction(observerOrNext)) { + next = observerOrNext; + } + else if (observerOrNext) { + next = observerOrNext.next; + error = observerOrNext.error; + complete = observerOrNext.complete; + if (observerOrNext !== Observer_1.empty) { + context = Object.create(observerOrNext); + if (isFunction_1.isFunction(context.unsubscribe)) { + _this.add(context.unsubscribe.bind(context)); + } + context.unsubscribe = _this.unsubscribe.bind(_this); + } + } + _this._context = context; + _this._next = next; + _this._error = error; + _this._complete = complete; + return _this; + } + SafeSubscriber.prototype.next = function (value) { + if (!this.isStopped && this._next) { + var _parentSubscriber = this._parentSubscriber; + if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._next, value); + } + else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.error = function (err) { + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + var useDeprecatedSynchronousErrorHandling = config_1.config.useDeprecatedSynchronousErrorHandling; + if (this._error) { + if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._error, err); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, this._error, err); + this.unsubscribe(); + } + } + else if (!_parentSubscriber.syncErrorThrowable) { + this.unsubscribe(); + if (useDeprecatedSynchronousErrorHandling) { + throw err; + } + hostReportError_1.hostReportError(err); + } + else { + if (useDeprecatedSynchronousErrorHandling) { + _parentSubscriber.syncErrorValue = err; + _parentSubscriber.syncErrorThrown = true; + } + else { + hostReportError_1.hostReportError(err); + } + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.complete = function () { + var _this = this; + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + if (this._complete) { + var wrappedComplete = function () { return _this._complete.call(_this._context); }; + if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(wrappedComplete); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, wrappedComplete); + this.unsubscribe(); + } + } + else { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { + try { + fn.call(this._context, value); + } + catch (err) { + this.unsubscribe(); + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + hostReportError_1.hostReportError(err); + } + } + }; + SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { + if (!config_1.config.useDeprecatedSynchronousErrorHandling) { + throw new Error('bad call'); + } + try { + fn.call(this._context, value); + } + catch (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + parent.syncErrorValue = err; + parent.syncErrorThrown = true; + return true; + } + else { + hostReportError_1.hostReportError(err); + return true; + } + } + return false; + }; + SafeSubscriber.prototype._unsubscribe = function () { + var _parentSubscriber = this._parentSubscriber; + this._context = null; + this._parentSubscriber = null; + _parentSubscriber.unsubscribe(); + }; + return SafeSubscriber; +}(Subscriber)); +exports.SafeSubscriber = SafeSubscriber; + +},{"../internal/symbol/rxSubscriber":87,"./Observer":21,"./Subscription":28,"./config":29,"./util/hostReportError":95,"./util/isFunction":99}],28:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var isArray_1 = require("./util/isArray"); +var isObject_1 = require("./util/isObject"); +var isFunction_1 = require("./util/isFunction"); +var UnsubscriptionError_1 = require("./util/UnsubscriptionError"); +var Subscription = (function () { + function Subscription(unsubscribe) { + this.closed = false; + this._parentOrParents = null; + this._subscriptions = null; + if (unsubscribe) { + this._ctorUnsubscribe = true; + this._unsubscribe = unsubscribe; + } + } + Subscription.prototype.unsubscribe = function () { + var errors; + if (this.closed) { + return; + } + var _a = this, _parentOrParents = _a._parentOrParents, _ctorUnsubscribe = _a._ctorUnsubscribe, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + this.closed = true; + this._parentOrParents = null; + this._subscriptions = null; + if (_parentOrParents instanceof Subscription) { + _parentOrParents.remove(this); + } + else if (_parentOrParents !== null) { + for (var index = 0; index < _parentOrParents.length; ++index) { + var parent_1 = _parentOrParents[index]; + parent_1.remove(this); + } + } + if (isFunction_1.isFunction(_unsubscribe)) { + if (_ctorUnsubscribe) { + this._unsubscribe = undefined; + } + try { + _unsubscribe.call(this); + } + catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e]; + } + } + if (isArray_1.isArray(_subscriptions)) { + var index = -1; + var len = _subscriptions.length; + while (++index < len) { + var sub = _subscriptions[index]; + if (isObject_1.isObject(sub)) { + try { + sub.unsubscribe(); + } + catch (e) { + errors = errors || []; + if (e instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = errors.concat(flattenUnsubscriptionErrors(e.errors)); + } + else { + errors.push(e); + } + } + } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + }; + Subscription.prototype.add = function (teardown) { + var subscription = teardown; + if (!teardown) { + return Subscription.EMPTY; + } + switch (typeof teardown) { + case 'function': + subscription = new Subscription(teardown); + case 'object': + if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') { + return subscription; + } + else if (this.closed) { + subscription.unsubscribe(); + return subscription; + } + else if (!(subscription instanceof Subscription)) { + var tmp = subscription; + subscription = new Subscription(); + subscription._subscriptions = [tmp]; + } + break; + default: { + throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); + } + } + var _parentOrParents = subscription._parentOrParents; + if (_parentOrParents === null) { + subscription._parentOrParents = this; + } + else if (_parentOrParents instanceof Subscription) { + if (_parentOrParents === this) { + return subscription; + } + subscription._parentOrParents = [_parentOrParents, this]; + } + else if (_parentOrParents.indexOf(this) === -1) { + _parentOrParents.push(this); + } + else { + return subscription; + } + var subscriptions = this._subscriptions; + if (subscriptions === null) { + this._subscriptions = [subscription]; + } + else { + subscriptions.push(subscription); + } + return subscription; + }; + Subscription.prototype.remove = function (subscription) { + var subscriptions = this._subscriptions; + if (subscriptions) { + var subscriptionIndex = subscriptions.indexOf(subscription); + if (subscriptionIndex !== -1) { + subscriptions.splice(subscriptionIndex, 1); + } + } + }; + Subscription.EMPTY = (function (empty) { + empty.closed = true; + return empty; + }(new Subscription())); + return Subscription; +}()); +exports.Subscription = Subscription; +function flattenUnsubscriptionErrors(errors) { + return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []); +} + +},{"./util/UnsubscriptionError":93,"./util/isArray":97,"./util/isFunction":99,"./util/isObject":103}],29:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var _enable_super_gross_mode_that_will_cause_bad_things = false; +exports.config = { + Promise: undefined, + set useDeprecatedSynchronousErrorHandling(value) { + if (value) { + var error = new Error(); + console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack); + } + else if (_enable_super_gross_mode_that_will_cause_bad_things) { + console.log('RxJS: Back to a better error behavior. Thank you. <3'); + } + _enable_super_gross_mode_that_will_cause_bad_things = value; + }, + get useDeprecatedSynchronousErrorHandling() { + return _enable_super_gross_mode_that_will_cause_bad_things; + }, +}; + +},{}],30:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("./Subscriber"); +var Observable_1 = require("./Observable"); +var subscribeTo_1 = require("./util/subscribeTo"); +var SimpleInnerSubscriber = (function (_super) { + __extends(SimpleInnerSubscriber, _super); + function SimpleInnerSubscriber(parent) { + var _this = _super.call(this) || this; + _this.parent = parent; + return _this; + } + SimpleInnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(value); + }; + SimpleInnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error); + this.unsubscribe(); + }; + SimpleInnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(); + this.unsubscribe(); + }; + return SimpleInnerSubscriber; +}(Subscriber_1.Subscriber)); +exports.SimpleInnerSubscriber = SimpleInnerSubscriber; +var ComplexInnerSubscriber = (function (_super) { + __extends(ComplexInnerSubscriber, _super); + function ComplexInnerSubscriber(parent, outerValue, outerIndex) { + var _this = _super.call(this) || this; + _this.parent = parent; + _this.outerValue = outerValue; + _this.outerIndex = outerIndex; + return _this; + } + ComplexInnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(this.outerValue, value, this.outerIndex, this); + }; + ComplexInnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error); + this.unsubscribe(); + }; + ComplexInnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(this); + this.unsubscribe(); + }; + return ComplexInnerSubscriber; +}(Subscriber_1.Subscriber)); +exports.ComplexInnerSubscriber = ComplexInnerSubscriber; +var SimpleOuterSubscriber = (function (_super) { + __extends(SimpleOuterSubscriber, _super); + function SimpleOuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + SimpleOuterSubscriber.prototype.notifyNext = function (innerValue) { + this.destination.next(innerValue); + }; + SimpleOuterSubscriber.prototype.notifyError = function (err) { + this.destination.error(err); + }; + SimpleOuterSubscriber.prototype.notifyComplete = function () { + this.destination.complete(); + }; + return SimpleOuterSubscriber; +}(Subscriber_1.Subscriber)); +exports.SimpleOuterSubscriber = SimpleOuterSubscriber; +var ComplexOuterSubscriber = (function (_super) { + __extends(ComplexOuterSubscriber, _super); + function ComplexOuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + ComplexOuterSubscriber.prototype.notifyNext = function (_outerValue, innerValue, _outerIndex, _innerSub) { + this.destination.next(innerValue); + }; + ComplexOuterSubscriber.prototype.notifyError = function (error) { + this.destination.error(error); + }; + ComplexOuterSubscriber.prototype.notifyComplete = function (_innerSub) { + this.destination.complete(); + }; + return ComplexOuterSubscriber; +}(Subscriber_1.Subscriber)); +exports.ComplexOuterSubscriber = ComplexOuterSubscriber; +function innerSubscribe(result, innerSubscriber) { + if (innerSubscriber.closed) { + return undefined; + } + if (result instanceof Observable_1.Observable) { + return result.subscribe(innerSubscriber); + } + var subscription; + try { + subscription = subscribeTo_1.subscribeTo(result)(innerSubscriber); + } + catch (error) { + innerSubscriber.error(error); + } + return subscription; +} +exports.innerSubscribe = innerSubscribe; + +},{"./Observable":20,"./Subscriber":27,"./util/subscribeTo":110}],31:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("../Subject"); +var Observable_1 = require("../Observable"); +var Subscriber_1 = require("../Subscriber"); +var Subscription_1 = require("../Subscription"); +var refCount_1 = require("../operators/refCount"); +var ConnectableObservable = (function (_super) { + __extends(ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._refCount = 0; + _this._isComplete = false; + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable.prototype.connect = function () { + var connection = this._connection; + if (!connection) { + this._isComplete = false; + connection = this._connection = new Subscription_1.Subscription(); + connection.add(this.source + .subscribe(new ConnectableSubscriber(this.getSubject(), this))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable.prototype.refCount = function () { + return refCount_1.refCount()(this); + }; + return ConnectableObservable; +}(Observable_1.Observable)); +exports.ConnectableObservable = ConnectableObservable; +exports.connectableObservableDescriptor = (function () { + var connectableProto = ConnectableObservable.prototype; + return { + operator: { value: null }, + _refCount: { value: 0, writable: true }, + _subject: { value: null, writable: true }, + _connection: { value: null, writable: true }, + _subscribe: { value: connectableProto._subscribe }, + _isComplete: { value: connectableProto._isComplete, writable: true }, + getSubject: { value: connectableProto.getSubject }, + connect: { value: connectableProto.connect }, + refCount: { value: connectableProto.refCount } + }; +})(); +var ConnectableSubscriber = (function (_super) { + __extends(ConnectableSubscriber, _super); + function ConnectableSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + ConnectableSubscriber.prototype._error = function (err) { + this._unsubscribe(); + _super.prototype._error.call(this, err); + }; + ConnectableSubscriber.prototype._complete = function () { + this.connectable._isComplete = true; + this._unsubscribe(); + _super.prototype._complete.call(this); + }; + ConnectableSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (connectable) { + this.connectable = null; + var connection = connectable._connection; + connectable._refCount = 0; + connectable._subject = null; + connectable._connection = null; + if (connection) { + connection.unsubscribe(); + } + } + }; + return ConnectableSubscriber; +}(Subject_1.SubjectSubscriber)); +var RefCountOperator = (function () { + function RefCountOperator(connectable) { + this.connectable = connectable; + } + RefCountOperator.prototype.call = function (subscriber, source) { + var connectable = this.connectable; + connectable._refCount++; + var refCounter = new RefCountSubscriber(subscriber, connectable); + var subscription = source.subscribe(refCounter); + if (!refCounter.closed) { + refCounter.connection = connectable.connect(); + } + return subscription; + }; + return RefCountOperator; +}()); +var RefCountSubscriber = (function (_super) { + __extends(RefCountSubscriber, _super); + function RefCountSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + RefCountSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (!connectable) { + this.connection = null; + return; + } + this.connectable = null; + var refCount = connectable._refCount; + if (refCount <= 0) { + this.connection = null; + return; + } + connectable._refCount = refCount - 1; + if (refCount > 1) { + this.connection = null; + return; + } + var connection = this.connection; + var sharedConnection = connectable._connection; + this.connection = null; + if (sharedConnection && (!connection || sharedConnection === connection)) { + sharedConnection.unsubscribe(); + } + }; + return RefCountSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Observable":20,"../Subject":25,"../Subscriber":27,"../Subscription":28,"../operators/refCount":65}],32:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var AsyncSubject_1 = require("../AsyncSubject"); +var map_1 = require("../operators/map"); +var canReportError_1 = require("../util/canReportError"); +var isArray_1 = require("../util/isArray"); +var isScheduler_1 = require("../util/isScheduler"); +function bindCallback(callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + }; + } + } + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var context = this; + var subject; + var params = { + context: context, + subject: subject, + callbackFunc: callbackFunc, + scheduler: scheduler, + }; + return new Observable_1.Observable(function (subscriber) { + if (!scheduler) { + if (!subject) { + subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); + subject.complete(); + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + if (canReportError_1.canReportError(subject)) { + subject.error(err); + } + else { + console.warn(err); + } + } + } + return subject.subscribe(subscriber); + } + else { + var state = { + args: args, subscriber: subscriber, params: params, + }; + return scheduler.schedule(dispatch, 0, state); + } + }); + }; +} +exports.bindCallback = bindCallback; +function dispatch(state) { + var _this = this; + var self = this; + var args = state.args, subscriber = state.subscriber, params = state.params; + var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler; + var subject = params.subject; + if (!subject) { + subject = params.subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; + _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject })); + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + subject.error(err); + } + } + this.add(subject.subscribe(subscriber)); +} +function dispatchNext(state) { + var value = state.value, subject = state.subject; + subject.next(value); + subject.complete(); +} +function dispatchError(state) { + var err = state.err, subject = state.subject; + subject.error(err); +} + +},{"../AsyncSubject":16,"../Observable":20,"../operators/map":61,"../util/canReportError":94,"../util/isArray":97,"../util/isScheduler":106}],33:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var AsyncSubject_1 = require("../AsyncSubject"); +var map_1 = require("../operators/map"); +var canReportError_1 = require("../util/canReportError"); +var isScheduler_1 = require("../util/isScheduler"); +var isArray_1 = require("../util/isArray"); +function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + }; + } + } + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var params = { + subject: undefined, + args: args, + callbackFunc: callbackFunc, + scheduler: scheduler, + context: this, + }; + return new Observable_1.Observable(function (subscriber) { + var context = params.context; + var subject = params.subject; + if (!scheduler) { + if (!subject) { + subject = params.subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + var err = innerArgs.shift(); + if (err) { + subject.error(err); + return; + } + subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); + subject.complete(); + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + if (canReportError_1.canReportError(subject)) { + subject.error(err); + } + else { + console.warn(err); + } + } + } + return subject.subscribe(subscriber); + } + else { + return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context }); + } + }); + }; +} +exports.bindNodeCallback = bindNodeCallback; +function dispatch(state) { + var _this = this; + var params = state.params, subscriber = state.subscriber, context = state.context; + var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler; + var subject = params.subject; + if (!subject) { + subject = params.subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + var err = innerArgs.shift(); + if (err) { + _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject })); + } + else { + var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; + _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject })); + } + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject })); + } + } + this.add(subject.subscribe(subscriber)); +} +function dispatchNext(arg) { + var value = arg.value, subject = arg.subject; + subject.next(value); + subject.complete(); +} +function dispatchError(arg) { + var err = arg.err, subject = arg.subject; + subject.error(err); +} + +},{"../AsyncSubject":16,"../Observable":20,"../operators/map":61,"../util/canReportError":94,"../util/isArray":97,"../util/isScheduler":106}],34:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var isScheduler_1 = require("../util/isScheduler"); +var isArray_1 = require("../util/isArray"); +var OuterSubscriber_1 = require("../OuterSubscriber"); +var subscribeToResult_1 = require("../util/subscribeToResult"); +var fromArray_1 = require("./fromArray"); +var NONE = {}; +function combineLatest() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var resultSelector = undefined; + var scheduler = undefined; + if (isScheduler_1.isScheduler(observables[observables.length - 1])) { + scheduler = observables.pop(); + } + if (typeof observables[observables.length - 1] === 'function') { + resultSelector = observables.pop(); + } + if (observables.length === 1 && isArray_1.isArray(observables[0])) { + observables = observables[0]; + } + return fromArray_1.fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector)); +} +exports.combineLatest = combineLatest; +var CombineLatestOperator = (function () { + function CombineLatestOperator(resultSelector) { + this.resultSelector = resultSelector; + } + CombineLatestOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector)); + }; + return CombineLatestOperator; +}()); +exports.CombineLatestOperator = CombineLatestOperator; +var CombineLatestSubscriber = (function (_super) { + __extends(CombineLatestSubscriber, _super); + function CombineLatestSubscriber(destination, resultSelector) { + var _this = _super.call(this, destination) || this; + _this.resultSelector = resultSelector; + _this.active = 0; + _this.values = []; + _this.observables = []; + return _this; + } + CombineLatestSubscriber.prototype._next = function (observable) { + this.values.push(NONE); + this.observables.push(observable); + }; + CombineLatestSubscriber.prototype._complete = function () { + var observables = this.observables; + var len = observables.length; + if (len === 0) { + this.destination.complete(); + } + else { + this.active = len; + this.toRespond = len; + for (var i = 0; i < len; i++) { + var observable = observables[i]; + this.add(subscribeToResult_1.subscribeToResult(this, observable, undefined, i)); + } + } + }; + CombineLatestSubscriber.prototype.notifyComplete = function (unused) { + if ((this.active -= 1) === 0) { + this.destination.complete(); + } + }; + CombineLatestSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { + var values = this.values; + var oldVal = values[outerIndex]; + var toRespond = !this.toRespond + ? 0 + : oldVal === NONE ? --this.toRespond : this.toRespond; + values[outerIndex] = innerValue; + if (toRespond === 0) { + if (this.resultSelector) { + this._tryResultSelector(values); + } + else { + this.destination.next(values.slice()); + } + } + }; + CombineLatestSubscriber.prototype._tryResultSelector = function (values) { + var result; + try { + result = this.resultSelector.apply(this, values); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return CombineLatestSubscriber; +}(OuterSubscriber_1.OuterSubscriber)); +exports.CombineLatestSubscriber = CombineLatestSubscriber; + +},{"../OuterSubscriber":22,"../util/isArray":97,"../util/isScheduler":106,"../util/subscribeToResult":115,"./fromArray":40}],35:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var of_1 = require("./of"); +var concatAll_1 = require("../operators/concatAll"); +function concat() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(of_1.of.apply(void 0, observables)); +} +exports.concat = concat; + +},{"../operators/concatAll":58,"./of":48}],36:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var from_1 = require("./from"); +var empty_1 = require("./empty"); +function defer(observableFactory) { + return new Observable_1.Observable(function (subscriber) { + var input; + try { + input = observableFactory(); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var source = input ? from_1.from(input) : empty_1.empty(); + return source.subscribe(subscriber); + }); +} +exports.defer = defer; + +},{"../Observable":20,"./empty":37,"./from":39}],37:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +exports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); }); +function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports.EMPTY; +} +exports.empty = empty; +function emptyScheduled(scheduler) { + return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); +} + +},{"../Observable":20}],38:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isArray_1 = require("../util/isArray"); +var map_1 = require("../operators/map"); +var isObject_1 = require("../util/isObject"); +var from_1 = require("./from"); +function forkJoin() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + if (sources.length === 1) { + var first_1 = sources[0]; + if (isArray_1.isArray(first_1)) { + return forkJoinInternal(first_1, null); + } + if (isObject_1.isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) { + var keys = Object.keys(first_1); + return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys); + } + } + if (typeof sources[sources.length - 1] === 'function') { + var resultSelector_1 = sources.pop(); + sources = (sources.length === 1 && isArray_1.isArray(sources[0])) ? sources[0] : sources; + return forkJoinInternal(sources, null).pipe(map_1.map(function (args) { return resultSelector_1.apply(void 0, args); })); + } + return forkJoinInternal(sources, null); +} +exports.forkJoin = forkJoin; +function forkJoinInternal(sources, keys) { + return new Observable_1.Observable(function (subscriber) { + var len = sources.length; + if (len === 0) { + subscriber.complete(); + return; + } + var values = new Array(len); + var completed = 0; + var emitted = 0; + var _loop_1 = function (i) { + var source = from_1.from(sources[i]); + var hasValue = false; + subscriber.add(source.subscribe({ + next: function (value) { + if (!hasValue) { + hasValue = true; + emitted++; + } + values[i] = value; + }, + error: function (err) { return subscriber.error(err); }, + complete: function () { + completed++; + if (completed === len || !hasValue) { + if (emitted === len) { + subscriber.next(keys ? + keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) : + values); + } + subscriber.complete(); + } + } + })); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + }); +} + +},{"../Observable":20,"../operators/map":61,"../util/isArray":97,"../util/isObject":103,"./from":39}],39:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var subscribeTo_1 = require("../util/subscribeTo"); +var scheduled_1 = require("../scheduled/scheduled"); +function from(input, scheduler) { + if (!scheduler) { + if (input instanceof Observable_1.Observable) { + return input; + } + return new Observable_1.Observable(subscribeTo_1.subscribeTo(input)); + } + else { + return scheduled_1.scheduled(input, scheduler); + } +} +exports.from = from; + +},{"../Observable":20,"../scheduled/scheduled":70,"../util/subscribeTo":110}],40:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var subscribeToArray_1 = require("../util/subscribeToArray"); +var scheduleArray_1 = require("../scheduled/scheduleArray"); +function fromArray(input, scheduler) { + if (!scheduler) { + return new Observable_1.Observable(subscribeToArray_1.subscribeToArray(input)); + } + else { + return scheduleArray_1.scheduleArray(input, scheduler); + } +} +exports.fromArray = fromArray; + +},{"../Observable":20,"../scheduled/scheduleArray":66,"../util/subscribeToArray":111}],41:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isArray_1 = require("../util/isArray"); +var isFunction_1 = require("../util/isFunction"); +var map_1 = require("../operators/map"); +var toString = (function () { return Object.prototype.toString; })(); +function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + } + return new Observable_1.Observable(function (subscriber) { + function handler(e) { + if (arguments.length > 1) { + subscriber.next(Array.prototype.slice.call(arguments)); + } + else { + subscriber.next(e); + } + } + setupSubscription(target, eventName, handler, subscriber, options); + }); +} +exports.fromEvent = fromEvent; +function setupSubscription(sourceObj, eventName, handler, subscriber, options) { + var unsubscribe; + if (isEventTarget(sourceObj)) { + var source_1 = sourceObj; + sourceObj.addEventListener(eventName, handler, options); + unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); }; + } + else if (isJQueryStyleEventEmitter(sourceObj)) { + var source_2 = sourceObj; + sourceObj.on(eventName, handler); + unsubscribe = function () { return source_2.off(eventName, handler); }; + } + else if (isNodeStyleEventEmitter(sourceObj)) { + var source_3 = sourceObj; + sourceObj.addListener(eventName, handler); + unsubscribe = function () { return source_3.removeListener(eventName, handler); }; + } + else if (sourceObj && sourceObj.length) { + for (var i = 0, len = sourceObj.length; i < len; i++) { + setupSubscription(sourceObj[i], eventName, handler, subscriber, options); + } + } + else { + throw new TypeError('Invalid event target'); + } + subscriber.add(unsubscribe); +} +function isNodeStyleEventEmitter(sourceObj) { + return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function'; +} +function isJQueryStyleEventEmitter(sourceObj) { + return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function'; +} +function isEventTarget(sourceObj) { + return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function'; +} + +},{"../Observable":20,"../operators/map":61,"../util/isArray":97,"../util/isFunction":99}],42:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isArray_1 = require("../util/isArray"); +var isFunction_1 = require("../util/isFunction"); +var map_1 = require("../operators/map"); +function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + } + return new Observable_1.Observable(function (subscriber) { + var handler = function () { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue; + try { + retValue = addHandler(handler); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (!isFunction_1.isFunction(removeHandler)) { + return undefined; + } + return function () { return removeHandler(handler, retValue); }; + }); +} +exports.fromEventPattern = fromEventPattern; + +},{"../Observable":20,"../operators/map":61,"../util/isArray":97,"../util/isFunction":99}],43:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var identity_1 = require("../util/identity"); +var isScheduler_1 = require("../util/isScheduler"); +function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) { + var resultSelector; + var initialState; + if (arguments.length == 1) { + var options = initialStateOrOptions; + initialState = options.initialState; + condition = options.condition; + iterate = options.iterate; + resultSelector = options.resultSelector || identity_1.identity; + scheduler = options.scheduler; + } + else if (resultSelectorOrObservable === undefined || isScheduler_1.isScheduler(resultSelectorOrObservable)) { + initialState = initialStateOrOptions; + resultSelector = identity_1.identity; + scheduler = resultSelectorOrObservable; + } + else { + initialState = initialStateOrOptions; + resultSelector = resultSelectorOrObservable; + } + return new Observable_1.Observable(function (subscriber) { + var state = initialState; + if (scheduler) { + return scheduler.schedule(dispatch, 0, { + subscriber: subscriber, + iterate: iterate, + condition: condition, + resultSelector: resultSelector, + state: state + }); + } + do { + if (condition) { + var conditionResult = void 0; + try { + conditionResult = condition(state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (!conditionResult) { + subscriber.complete(); + break; + } + } + var value = void 0; + try { + value = resultSelector(state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + subscriber.next(value); + if (subscriber.closed) { + break; + } + try { + state = iterate(state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + } while (true); + return undefined; + }); +} +exports.generate = generate; +function dispatch(state) { + var subscriber = state.subscriber, condition = state.condition; + if (subscriber.closed) { + return undefined; + } + if (state.needIterate) { + try { + state.state = state.iterate(state.state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + } + else { + state.needIterate = true; + } + if (condition) { + var conditionResult = void 0; + try { + conditionResult = condition(state.state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (!conditionResult) { + subscriber.complete(); + return undefined; + } + if (subscriber.closed) { + return undefined; + } + } + var value; + try { + value = state.resultSelector(state.state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (subscriber.closed) { + return undefined; + } + subscriber.next(value); + if (subscriber.closed) { + return undefined; + } + return this.schedule(state); +} + +},{"../Observable":20,"../util/identity":96,"../util/isScheduler":106}],44:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var defer_1 = require("./defer"); +var empty_1 = require("./empty"); +function iif(condition, trueResult, falseResult) { + if (trueResult === void 0) { trueResult = empty_1.EMPTY; } + if (falseResult === void 0) { falseResult = empty_1.EMPTY; } + return defer_1.defer(function () { return condition() ? trueResult : falseResult; }); +} +exports.iif = iif; + +},{"./defer":36,"./empty":37}],45:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var async_1 = require("../scheduler/async"); +var isNumeric_1 = require("../util/isNumeric"); +function interval(period, scheduler) { + if (period === void 0) { period = 0; } + if (scheduler === void 0) { scheduler = async_1.async; } + if (!isNumeric_1.isNumeric(period) || period < 0) { + period = 0; + } + if (!scheduler || typeof scheduler.schedule !== 'function') { + scheduler = async_1.async; + } + return new Observable_1.Observable(function (subscriber) { + subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period })); + return subscriber; + }); +} +exports.interval = interval; +function dispatch(state) { + var subscriber = state.subscriber, counter = state.counter, period = state.period; + subscriber.next(counter); + this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period); +} + +},{"../Observable":20,"../scheduler/async":83,"../util/isNumeric":102}],46:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isScheduler_1 = require("../util/isScheduler"); +var mergeAll_1 = require("../operators/mergeAll"); +var fromArray_1 = require("./fromArray"); +function merge() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var concurrent = Number.POSITIVE_INFINITY; + var scheduler = null; + var last = observables[observables.length - 1]; + if (isScheduler_1.isScheduler(last)) { + scheduler = observables.pop(); + if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { + concurrent = observables.pop(); + } + } + else if (typeof last === 'number') { + concurrent = observables.pop(); + } + if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) { + return observables[0]; + } + return mergeAll_1.mergeAll(concurrent)(fromArray_1.fromArray(observables, scheduler)); +} +exports.merge = merge; + +},{"../Observable":20,"../operators/mergeAll":62,"../util/isScheduler":106,"./fromArray":40}],47:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var noop_1 = require("../util/noop"); +exports.NEVER = new Observable_1.Observable(noop_1.noop); +function never() { + return exports.NEVER; +} +exports.never = never; + +},{"../Observable":20,"../util/noop":107}],48:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var isScheduler_1 = require("../util/isScheduler"); +var fromArray_1 = require("./fromArray"); +var scheduleArray_1 = require("../scheduled/scheduleArray"); +function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args[args.length - 1]; + if (isScheduler_1.isScheduler(scheduler)) { + args.pop(); + return scheduleArray_1.scheduleArray(args, scheduler); + } + else { + return fromArray_1.fromArray(args); + } +} +exports.of = of; + +},{"../scheduled/scheduleArray":66,"../util/isScheduler":106,"./fromArray":40}],49:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var from_1 = require("./from"); +var isArray_1 = require("../util/isArray"); +var empty_1 = require("./empty"); +function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + if (sources.length === 0) { + return empty_1.EMPTY; + } + var first = sources[0], remainder = sources.slice(1); + if (sources.length === 1 && isArray_1.isArray(first)) { + return onErrorResumeNext.apply(void 0, first); + } + return new Observable_1.Observable(function (subscriber) { + var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); }; + return from_1.from(first).subscribe({ + next: function (value) { subscriber.next(value); }, + error: subNext, + complete: subNext, + }); + }); +} +exports.onErrorResumeNext = onErrorResumeNext; + +},{"../Observable":20,"../util/isArray":97,"./empty":37,"./from":39}],50:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +function pairs(obj, scheduler) { + if (!scheduler) { + return new Observable_1.Observable(function (subscriber) { + var keys = Object.keys(obj); + for (var i = 0; i < keys.length && !subscriber.closed; i++) { + var key = keys[i]; + if (obj.hasOwnProperty(key)) { + subscriber.next([key, obj[key]]); + } + } + subscriber.complete(); + }); + } + else { + return new Observable_1.Observable(function (subscriber) { + var keys = Object.keys(obj); + var subscription = new Subscription_1.Subscription(); + subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj })); + return subscription; + }); + } +} +exports.pairs = pairs; +function dispatch(state) { + var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj; + if (!subscriber.closed) { + if (index < keys.length) { + var key = keys[index]; + subscriber.next([key, obj[key]]); + subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj })); + } + else { + subscriber.complete(); + } + } +} +exports.dispatch = dispatch; + +},{"../Observable":20,"../Subscription":28}],51:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var not_1 = require("../util/not"); +var subscribeTo_1 = require("../util/subscribeTo"); +var filter_1 = require("../operators/filter"); +var Observable_1 = require("../Observable"); +function partition(source, predicate, thisArg) { + return [ + filter_1.filter(predicate, thisArg)(new Observable_1.Observable(subscribeTo_1.subscribeTo(source))), + filter_1.filter(not_1.not(predicate, thisArg))(new Observable_1.Observable(subscribeTo_1.subscribeTo(source))) + ]; +} +exports.partition = partition; + +},{"../Observable":20,"../operators/filter":59,"../util/not":108,"../util/subscribeTo":110}],52:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var isArray_1 = require("../util/isArray"); +var fromArray_1 = require("./fromArray"); +var OuterSubscriber_1 = require("../OuterSubscriber"); +var subscribeToResult_1 = require("../util/subscribeToResult"); +function race() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + if (observables.length === 1) { + if (isArray_1.isArray(observables[0])) { + observables = observables[0]; + } + else { + return observables[0]; + } + } + return fromArray_1.fromArray(observables, undefined).lift(new RaceOperator()); +} +exports.race = race; +var RaceOperator = (function () { + function RaceOperator() { + } + RaceOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new RaceSubscriber(subscriber)); + }; + return RaceOperator; +}()); +exports.RaceOperator = RaceOperator; +var RaceSubscriber = (function (_super) { + __extends(RaceSubscriber, _super); + function RaceSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.hasFirst = false; + _this.observables = []; + _this.subscriptions = []; + return _this; + } + RaceSubscriber.prototype._next = function (observable) { + this.observables.push(observable); + }; + RaceSubscriber.prototype._complete = function () { + var observables = this.observables; + var len = observables.length; + if (len === 0) { + this.destination.complete(); + } + else { + for (var i = 0; i < len && !this.hasFirst; i++) { + var observable = observables[i]; + var subscription = subscribeToResult_1.subscribeToResult(this, observable, undefined, i); + if (this.subscriptions) { + this.subscriptions.push(subscription); + } + this.add(subscription); + } + this.observables = null; + } + }; + RaceSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { + if (!this.hasFirst) { + this.hasFirst = true; + for (var i = 0; i < this.subscriptions.length; i++) { + if (i !== outerIndex) { + var subscription = this.subscriptions[i]; + subscription.unsubscribe(); + this.remove(subscription); + } + } + this.subscriptions = null; + } + this.destination.next(innerValue); + }; + return RaceSubscriber; +}(OuterSubscriber_1.OuterSubscriber)); +exports.RaceSubscriber = RaceSubscriber; + +},{"../OuterSubscriber":22,"../util/isArray":97,"../util/subscribeToResult":115,"./fromArray":40}],53:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function range(start, count, scheduler) { + if (start === void 0) { start = 0; } + return new Observable_1.Observable(function (subscriber) { + if (count === undefined) { + count = start; + start = 0; + } + var index = 0; + var current = start; + if (scheduler) { + return scheduler.schedule(dispatch, 0, { + index: index, count: count, start: start, subscriber: subscriber + }); + } + else { + do { + if (index++ >= count) { + subscriber.complete(); + break; + } + subscriber.next(current++); + if (subscriber.closed) { + break; + } + } while (true); + } + return undefined; + }); +} +exports.range = range; +function dispatch(state) { + var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber; + if (index >= count) { + subscriber.complete(); + return; + } + subscriber.next(start); + if (subscriber.closed) { + return; + } + state.index = index + 1; + state.start = start + 1; + this.schedule(state); +} +exports.dispatch = dispatch; + +},{"../Observable":20}],54:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function throwError(error, scheduler) { + if (!scheduler) { + return new Observable_1.Observable(function (subscriber) { return subscriber.error(error); }); + } + else { + return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); }); + } +} +exports.throwError = throwError; +function dispatch(_a) { + var error = _a.error, subscriber = _a.subscriber; + subscriber.error(error); +} + +},{"../Observable":20}],55:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var async_1 = require("../scheduler/async"); +var isNumeric_1 = require("../util/isNumeric"); +var isScheduler_1 = require("../util/isScheduler"); +function timer(dueTime, periodOrScheduler, scheduler) { + if (dueTime === void 0) { dueTime = 0; } + var period = -1; + if (isNumeric_1.isNumeric(periodOrScheduler)) { + period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler); + } + else if (isScheduler_1.isScheduler(periodOrScheduler)) { + scheduler = periodOrScheduler; + } + if (!isScheduler_1.isScheduler(scheduler)) { + scheduler = async_1.async; + } + return new Observable_1.Observable(function (subscriber) { + var due = isNumeric_1.isNumeric(dueTime) + ? dueTime + : (+dueTime - scheduler.now()); + return scheduler.schedule(dispatch, due, { + index: 0, period: period, subscriber: subscriber + }); + }); +} +exports.timer = timer; +function dispatch(state) { + var index = state.index, period = state.period, subscriber = state.subscriber; + subscriber.next(index); + if (subscriber.closed) { + return; + } + else if (period === -1) { + return subscriber.complete(); + } + state.index = index + 1; + this.schedule(state, period); +} + +},{"../Observable":20,"../scheduler/async":83,"../util/isNumeric":102,"../util/isScheduler":106}],56:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var from_1 = require("./from"); +var empty_1 = require("./empty"); +function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function (subscriber) { + var resource; + try { + resource = resourceFactory(); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var result; + try { + result = observableFactory(resource); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var source = result ? from_1.from(result) : empty_1.EMPTY; + var subscription = source.subscribe(subscriber); + return function () { + subscription.unsubscribe(); + if (resource) { + resource.unsubscribe(); + } + }; + }); +} +exports.using = using; + +},{"../Observable":20,"./empty":37,"./from":39}],57:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var fromArray_1 = require("./fromArray"); +var isArray_1 = require("../util/isArray"); +var Subscriber_1 = require("../Subscriber"); +var iterator_1 = require("../../internal/symbol/iterator"); +var innerSubscribe_1 = require("../innerSubscribe"); +function zip() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var resultSelector = observables[observables.length - 1]; + if (typeof resultSelector === 'function') { + observables.pop(); + } + return fromArray_1.fromArray(observables, undefined).lift(new ZipOperator(resultSelector)); +} +exports.zip = zip; +var ZipOperator = (function () { + function ZipOperator(resultSelector) { + this.resultSelector = resultSelector; + } + ZipOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector)); + }; + return ZipOperator; +}()); +exports.ZipOperator = ZipOperator; +var ZipSubscriber = (function (_super) { + __extends(ZipSubscriber, _super); + function ZipSubscriber(destination, resultSelector, values) { + if (values === void 0) { values = Object.create(null); } + var _this = _super.call(this, destination) || this; + _this.resultSelector = resultSelector; + _this.iterators = []; + _this.active = 0; + _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined; + return _this; + } + ZipSubscriber.prototype._next = function (value) { + var iterators = this.iterators; + if (isArray_1.isArray(value)) { + iterators.push(new StaticArrayIterator(value)); + } + else if (typeof value[iterator_1.iterator] === 'function') { + iterators.push(new StaticIterator(value[iterator_1.iterator]())); + } + else { + iterators.push(new ZipBufferIterator(this.destination, this, value)); + } + }; + ZipSubscriber.prototype._complete = function () { + var iterators = this.iterators; + var len = iterators.length; + this.unsubscribe(); + if (len === 0) { + this.destination.complete(); + return; + } + this.active = len; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + if (iterator.stillUnsubscribed) { + var destination = this.destination; + destination.add(iterator.subscribe()); + } + else { + this.active--; + } + } + }; + ZipSubscriber.prototype.notifyInactive = function () { + this.active--; + if (this.active === 0) { + this.destination.complete(); + } + }; + ZipSubscriber.prototype.checkIterators = function () { + var iterators = this.iterators; + var len = iterators.length; + var destination = this.destination; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) { + return; + } + } + var shouldComplete = false; + var args = []; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + var result = iterator.next(); + if (iterator.hasCompleted()) { + shouldComplete = true; + } + if (result.done) { + destination.complete(); + return; + } + args.push(result.value); + } + if (this.resultSelector) { + this._tryresultSelector(args); + } + else { + destination.next(args); + } + if (shouldComplete) { + destination.complete(); + } + }; + ZipSubscriber.prototype._tryresultSelector = function (args) { + var result; + try { + result = this.resultSelector.apply(this, args); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return ZipSubscriber; +}(Subscriber_1.Subscriber)); +exports.ZipSubscriber = ZipSubscriber; +var StaticIterator = (function () { + function StaticIterator(iterator) { + this.iterator = iterator; + this.nextResult = iterator.next(); + } + StaticIterator.prototype.hasValue = function () { + return true; + }; + StaticIterator.prototype.next = function () { + var result = this.nextResult; + this.nextResult = this.iterator.next(); + return result; + }; + StaticIterator.prototype.hasCompleted = function () { + var nextResult = this.nextResult; + return Boolean(nextResult && nextResult.done); + }; + return StaticIterator; +}()); +var StaticArrayIterator = (function () { + function StaticArrayIterator(array) { + this.array = array; + this.index = 0; + this.length = 0; + this.length = array.length; + } + StaticArrayIterator.prototype[iterator_1.iterator] = function () { + return this; + }; + StaticArrayIterator.prototype.next = function (value) { + var i = this.index++; + var array = this.array; + return i < this.length ? { value: array[i], done: false } : { value: null, done: true }; + }; + StaticArrayIterator.prototype.hasValue = function () { + return this.array.length > this.index; + }; + StaticArrayIterator.prototype.hasCompleted = function () { + return this.array.length === this.index; + }; + return StaticArrayIterator; +}()); +var ZipBufferIterator = (function (_super) { + __extends(ZipBufferIterator, _super); + function ZipBufferIterator(destination, parent, observable) { + var _this = _super.call(this, destination) || this; + _this.parent = parent; + _this.observable = observable; + _this.stillUnsubscribed = true; + _this.buffer = []; + _this.isComplete = false; + return _this; + } + ZipBufferIterator.prototype[iterator_1.iterator] = function () { + return this; + }; + ZipBufferIterator.prototype.next = function () { + var buffer = this.buffer; + if (buffer.length === 0 && this.isComplete) { + return { value: null, done: true }; + } + else { + return { value: buffer.shift(), done: false }; + } + }; + ZipBufferIterator.prototype.hasValue = function () { + return this.buffer.length > 0; + }; + ZipBufferIterator.prototype.hasCompleted = function () { + return this.buffer.length === 0 && this.isComplete; + }; + ZipBufferIterator.prototype.notifyComplete = function () { + if (this.buffer.length > 0) { + this.isComplete = true; + this.parent.notifyInactive(); + } + else { + this.destination.complete(); + } + }; + ZipBufferIterator.prototype.notifyNext = function (innerValue) { + this.buffer.push(innerValue); + this.parent.checkIterators(); + }; + ZipBufferIterator.prototype.subscribe = function () { + return innerSubscribe_1.innerSubscribe(this.observable, new innerSubscribe_1.SimpleInnerSubscriber(this)); + }; + return ZipBufferIterator; +}(innerSubscribe_1.SimpleOuterSubscriber)); + +},{"../../internal/symbol/iterator":85,"../Subscriber":27,"../innerSubscribe":30,"../util/isArray":97,"./fromArray":40}],58:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var mergeAll_1 = require("./mergeAll"); +function concatAll() { + return mergeAll_1.mergeAll(1); +} +exports.concatAll = concatAll; + +},{"./mergeAll":62}],59:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function filter(predicate, thisArg) { + return function filterOperatorFunction(source) { + return source.lift(new FilterOperator(predicate, thisArg)); + }; +} +exports.filter = filter; +var FilterOperator = (function () { + function FilterOperator(predicate, thisArg) { + this.predicate = predicate; + this.thisArg = thisArg; + } + FilterOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg)); + }; + return FilterOperator; +}()); +var FilterSubscriber = (function (_super) { + __extends(FilterSubscriber, _super); + function FilterSubscriber(destination, predicate, thisArg) { + var _this = _super.call(this, destination) || this; + _this.predicate = predicate; + _this.thisArg = thisArg; + _this.count = 0; + return _this; + } + FilterSubscriber.prototype._next = function (value) { + var result; + try { + result = this.predicate.call(this.thisArg, value, this.count++); + } + catch (err) { + this.destination.error(err); + return; + } + if (result) { + this.destination.next(value); + } + }; + return FilterSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Subscriber":27}],60:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +var Subscription_1 = require("../Subscription"); +var Observable_1 = require("../Observable"); +var Subject_1 = require("../Subject"); +function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) { + return function (source) { + return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector)); + }; +} +exports.groupBy = groupBy; +var GroupByOperator = (function () { + function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) { + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.durationSelector = durationSelector; + this.subjectSelector = subjectSelector; + } + GroupByOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)); + }; + return GroupByOperator; +}()); +var GroupBySubscriber = (function (_super) { + __extends(GroupBySubscriber, _super); + function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) { + var _this = _super.call(this, destination) || this; + _this.keySelector = keySelector; + _this.elementSelector = elementSelector; + _this.durationSelector = durationSelector; + _this.subjectSelector = subjectSelector; + _this.groups = null; + _this.attemptedToUnsubscribe = false; + _this.count = 0; + return _this; + } + GroupBySubscriber.prototype._next = function (value) { + var key; + try { + key = this.keySelector(value); + } + catch (err) { + this.error(err); + return; + } + this._group(value, key); + }; + GroupBySubscriber.prototype._group = function (value, key) { + var groups = this.groups; + if (!groups) { + groups = this.groups = new Map(); + } + var group = groups.get(key); + var element; + if (this.elementSelector) { + try { + element = this.elementSelector(value); + } + catch (err) { + this.error(err); + } + } + else { + element = value; + } + if (!group) { + group = (this.subjectSelector ? this.subjectSelector() : new Subject_1.Subject()); + groups.set(key, group); + var groupedObservable = new GroupedObservable(key, group, this); + this.destination.next(groupedObservable); + if (this.durationSelector) { + var duration = void 0; + try { + duration = this.durationSelector(new GroupedObservable(key, group)); + } + catch (err) { + this.error(err); + return; + } + this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this))); + } + } + if (!group.closed) { + group.next(element); + } + }; + GroupBySubscriber.prototype._error = function (err) { + var groups = this.groups; + if (groups) { + groups.forEach(function (group, key) { + group.error(err); + }); + groups.clear(); + } + this.destination.error(err); + }; + GroupBySubscriber.prototype._complete = function () { + var groups = this.groups; + if (groups) { + groups.forEach(function (group, key) { + group.complete(); + }); + groups.clear(); + } + this.destination.complete(); + }; + GroupBySubscriber.prototype.removeGroup = function (key) { + this.groups.delete(key); + }; + GroupBySubscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.attemptedToUnsubscribe = true; + if (this.count === 0) { + _super.prototype.unsubscribe.call(this); + } + } + }; + return GroupBySubscriber; +}(Subscriber_1.Subscriber)); +var GroupDurationSubscriber = (function (_super) { + __extends(GroupDurationSubscriber, _super); + function GroupDurationSubscriber(key, group, parent) { + var _this = _super.call(this, group) || this; + _this.key = key; + _this.group = group; + _this.parent = parent; + return _this; + } + GroupDurationSubscriber.prototype._next = function (value) { + this.complete(); + }; + GroupDurationSubscriber.prototype._unsubscribe = function () { + var _a = this, parent = _a.parent, key = _a.key; + this.key = this.parent = null; + if (parent) { + parent.removeGroup(key); + } + }; + return GroupDurationSubscriber; +}(Subscriber_1.Subscriber)); +var GroupedObservable = (function (_super) { + __extends(GroupedObservable, _super); + function GroupedObservable(key, groupSubject, refCountSubscription) { + var _this = _super.call(this) || this; + _this.key = key; + _this.groupSubject = groupSubject; + _this.refCountSubscription = refCountSubscription; + return _this; + } + GroupedObservable.prototype._subscribe = function (subscriber) { + var subscription = new Subscription_1.Subscription(); + var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject; + if (refCountSubscription && !refCountSubscription.closed) { + subscription.add(new InnerRefCountSubscription(refCountSubscription)); + } + subscription.add(groupSubject.subscribe(subscriber)); + return subscription; + }; + return GroupedObservable; +}(Observable_1.Observable)); +exports.GroupedObservable = GroupedObservable; +var InnerRefCountSubscription = (function (_super) { + __extends(InnerRefCountSubscription, _super); + function InnerRefCountSubscription(parent) { + var _this = _super.call(this) || this; + _this.parent = parent; + parent.count++; + return _this; + } + InnerRefCountSubscription.prototype.unsubscribe = function () { + var parent = this.parent; + if (!parent.closed && !this.closed) { + _super.prototype.unsubscribe.call(this); + parent.count -= 1; + if (parent.count === 0 && parent.attemptedToUnsubscribe) { + parent.unsubscribe(); + } + } + }; + return InnerRefCountSubscription; +}(Subscription_1.Subscription)); + +},{"../Observable":20,"../Subject":25,"../Subscriber":27,"../Subscription":28}],61:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function map(project, thisArg) { + return function mapOperation(source) { + if (typeof project !== 'function') { + throw new TypeError('argument is not a function. Are you looking for `mapTo()`?'); + } + return source.lift(new MapOperator(project, thisArg)); + }; +} +exports.map = map; +var MapOperator = (function () { + function MapOperator(project, thisArg) { + this.project = project; + this.thisArg = thisArg; + } + MapOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg)); + }; + return MapOperator; +}()); +exports.MapOperator = MapOperator; +var MapSubscriber = (function (_super) { + __extends(MapSubscriber, _super); + function MapSubscriber(destination, project, thisArg) { + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.count = 0; + _this.thisArg = thisArg || _this; + return _this; + } + MapSubscriber.prototype._next = function (value) { + var result; + try { + result = this.project.call(this.thisArg, value, this.count++); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return MapSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Subscriber":27}],62:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var mergeMap_1 = require("./mergeMap"); +var identity_1 = require("../util/identity"); +function mergeAll(concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); +} +exports.mergeAll = mergeAll; + +},{"../util/identity":96,"./mergeMap":63}],63:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var map_1 = require("./map"); +var from_1 = require("../observable/from"); +var innerSubscribe_1 = require("../innerSubscribe"); +function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + if (typeof resultSelector === 'function') { + return function (source) { return source.pipe(mergeMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); }; + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); }; +} +exports.mergeMap = mergeMap; +var MergeMapOperator = (function () { + function MergeMapOperator(project, concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + this.project = project; + this.concurrent = concurrent; + } + MergeMapOperator.prototype.call = function (observer, source) { + return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent)); + }; + return MergeMapOperator; +}()); +exports.MergeMapOperator = MergeMapOperator; +var MergeMapSubscriber = (function (_super) { + __extends(MergeMapSubscriber, _super); + function MergeMapSubscriber(destination, project, concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.concurrent = concurrent; + _this.hasCompleted = false; + _this.buffer = []; + _this.active = 0; + _this.index = 0; + return _this; + } + MergeMapSubscriber.prototype._next = function (value) { + if (this.active < this.concurrent) { + this._tryNext(value); + } + else { + this.buffer.push(value); + } + }; + MergeMapSubscriber.prototype._tryNext = function (value) { + var result; + var index = this.index++; + try { + result = this.project(value, index); + } + catch (err) { + this.destination.error(err); + return; + } + this.active++; + this._innerSub(result); + }; + MergeMapSubscriber.prototype._innerSub = function (ish) { + var innerSubscriber = new innerSubscribe_1.SimpleInnerSubscriber(this); + var destination = this.destination; + destination.add(innerSubscriber); + var innerSubscription = innerSubscribe_1.innerSubscribe(ish, innerSubscriber); + if (innerSubscription !== innerSubscriber) { + destination.add(innerSubscription); + } + }; + MergeMapSubscriber.prototype._complete = function () { + this.hasCompleted = true; + if (this.active === 0 && this.buffer.length === 0) { + this.destination.complete(); + } + this.unsubscribe(); + }; + MergeMapSubscriber.prototype.notifyNext = function (innerValue) { + this.destination.next(innerValue); + }; + MergeMapSubscriber.prototype.notifyComplete = function () { + var buffer = this.buffer; + this.active--; + if (buffer.length > 0) { + this._next(buffer.shift()); + } + else if (this.active === 0 && this.hasCompleted) { + this.destination.complete(); + } + }; + return MergeMapSubscriber; +}(innerSubscribe_1.SimpleOuterSubscriber)); +exports.MergeMapSubscriber = MergeMapSubscriber; +exports.flatMap = mergeMap; + +},{"../innerSubscribe":30,"../observable/from":39,"./map":61}],64:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +var Notification_1 = require("../Notification"); +function observeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return function observeOnOperatorFunction(source) { + return source.lift(new ObserveOnOperator(scheduler, delay)); + }; +} +exports.observeOn = observeOn; +var ObserveOnOperator = (function () { + function ObserveOnOperator(scheduler, delay) { + if (delay === void 0) { delay = 0; } + this.scheduler = scheduler; + this.delay = delay; + } + ObserveOnOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay)); + }; + return ObserveOnOperator; +}()); +exports.ObserveOnOperator = ObserveOnOperator; +var ObserveOnSubscriber = (function (_super) { + __extends(ObserveOnSubscriber, _super); + function ObserveOnSubscriber(destination, scheduler, delay) { + if (delay === void 0) { delay = 0; } + var _this = _super.call(this, destination) || this; + _this.scheduler = scheduler; + _this.delay = delay; + return _this; + } + ObserveOnSubscriber.dispatch = function (arg) { + var notification = arg.notification, destination = arg.destination; + notification.observe(destination); + this.unsubscribe(); + }; + ObserveOnSubscriber.prototype.scheduleMessage = function (notification) { + var destination = this.destination; + destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination))); + }; + ObserveOnSubscriber.prototype._next = function (value) { + this.scheduleMessage(Notification_1.Notification.createNext(value)); + }; + ObserveOnSubscriber.prototype._error = function (err) { + this.scheduleMessage(Notification_1.Notification.createError(err)); + this.unsubscribe(); + }; + ObserveOnSubscriber.prototype._complete = function () { + this.scheduleMessage(Notification_1.Notification.createComplete()); + this.unsubscribe(); + }; + return ObserveOnSubscriber; +}(Subscriber_1.Subscriber)); +exports.ObserveOnSubscriber = ObserveOnSubscriber; +var ObserveOnMessage = (function () { + function ObserveOnMessage(notification, destination) { + this.notification = notification; + this.destination = destination; + } + return ObserveOnMessage; +}()); +exports.ObserveOnMessage = ObserveOnMessage; + +},{"../Notification":19,"../Subscriber":27}],65:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function refCount() { + return function refCountOperatorFunction(source) { + return source.lift(new RefCountOperator(source)); + }; +} +exports.refCount = refCount; +var RefCountOperator = (function () { + function RefCountOperator(connectable) { + this.connectable = connectable; + } + RefCountOperator.prototype.call = function (subscriber, source) { + var connectable = this.connectable; + connectable._refCount++; + var refCounter = new RefCountSubscriber(subscriber, connectable); + var subscription = source.subscribe(refCounter); + if (!refCounter.closed) { + refCounter.connection = connectable.connect(); + } + return subscription; + }; + return RefCountOperator; +}()); +var RefCountSubscriber = (function (_super) { + __extends(RefCountSubscriber, _super); + function RefCountSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + RefCountSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (!connectable) { + this.connection = null; + return; + } + this.connectable = null; + var refCount = connectable._refCount; + if (refCount <= 0) { + this.connection = null; + return; + } + connectable._refCount = refCount - 1; + if (refCount > 1) { + this.connection = null; + return; + } + var connection = this.connection; + var sharedConnection = connectable._connection; + this.connection = null; + if (sharedConnection && (!connection || sharedConnection === connection)) { + sharedConnection.unsubscribe(); + } + }; + return RefCountSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Subscriber":27}],66:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +function scheduleArray(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + var i = 0; + sub.add(scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + return; + } + subscriber.next(input[i++]); + if (!subscriber.closed) { + sub.add(this.schedule()); + } + })); + return sub; + }); +} +exports.scheduleArray = scheduleArray; + +},{"../Observable":20,"../Subscription":28}],67:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +var iterator_1 = require("../symbol/iterator"); +function scheduleIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + var iterator; + sub.add(function () { + if (iterator && typeof iterator.return === 'function') { + iterator.return(); + } + }); + sub.add(scheduler.schedule(function () { + iterator = input[iterator_1.iterator](); + sub.add(scheduler.schedule(function () { + if (subscriber.closed) { + return; + } + var value; + var done; + try { + var result = iterator.next(); + value = result.value; + done = result.done; + } + catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } + else { + subscriber.next(value); + this.schedule(); + } + })); + })); + return sub; + }); +} +exports.scheduleIterable = scheduleIterable; + +},{"../Observable":20,"../Subscription":28,"../symbol/iterator":85}],68:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +var observable_1 = require("../symbol/observable"); +function scheduleObservable(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function () { + var observable = input[observable_1.observable](); + sub.add(observable.subscribe({ + next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); }, + error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); }, + complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); }, + })); + })); + return sub; + }); +} +exports.scheduleObservable = scheduleObservable; + +},{"../Observable":20,"../Subscription":28,"../symbol/observable":86}],69:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +function schedulePromise(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function () { return input.then(function (value) { + sub.add(scheduler.schedule(function () { + subscriber.next(value); + sub.add(scheduler.schedule(function () { return subscriber.complete(); })); + })); + }, function (err) { + sub.add(scheduler.schedule(function () { return subscriber.error(err); })); + }); })); + return sub; + }); +} +exports.schedulePromise = schedulePromise; + +},{"../Observable":20,"../Subscription":28}],70:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var scheduleObservable_1 = require("./scheduleObservable"); +var schedulePromise_1 = require("./schedulePromise"); +var scheduleArray_1 = require("./scheduleArray"); +var scheduleIterable_1 = require("./scheduleIterable"); +var isInteropObservable_1 = require("../util/isInteropObservable"); +var isPromise_1 = require("../util/isPromise"); +var isArrayLike_1 = require("../util/isArrayLike"); +var isIterable_1 = require("../util/isIterable"); +function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + else if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + else if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + else if (isIterable_1.isIterable(input) || typeof input === 'string') { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + } + throw new TypeError((input !== null && typeof input || input) + ' is not observable'); +} +exports.scheduled = scheduled; + +},{"../util/isArrayLike":98,"../util/isInteropObservable":100,"../util/isIterable":101,"../util/isPromise":105,"./scheduleArray":66,"./scheduleIterable":67,"./scheduleObservable":68,"./schedulePromise":69}],71:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscription_1 = require("../Subscription"); +var Action = (function (_super) { + __extends(Action, _super); + function Action(scheduler, work) { + return _super.call(this) || this; + } + Action.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + return this; + }; + return Action; +}(Subscription_1.Subscription)); +exports.Action = Action; + +},{"../Subscription":28}],72:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var AnimationFrameAction = (function (_super) { + __extends(AnimationFrameAction, _super); + function AnimationFrameAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); })); + }; + AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + cancelAnimationFrame(id); + scheduler.scheduled = undefined; + } + return undefined; + }; + return AnimationFrameAction; +}(AsyncAction_1.AsyncAction)); +exports.AnimationFrameAction = AnimationFrameAction; + +},{"./AsyncAction":76}],73:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AnimationFrameScheduler = (function (_super) { + __extends(AnimationFrameScheduler, _super); + function AnimationFrameScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler.prototype.flush = function (action) { + this.active = true; + this.scheduled = undefined; + var actions = this.actions; + var error; + var index = -1; + var count = actions.length; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this.active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AnimationFrameScheduler = AnimationFrameScheduler; + +},{"./AsyncScheduler":77}],74:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Immediate_1 = require("../util/Immediate"); +var AsyncAction_1 = require("./AsyncAction"); +var AsapAction = (function (_super) { + __extends(AsapAction, _super); + function AsapAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler.scheduled || (scheduler.scheduled = Immediate_1.Immediate.setImmediate(scheduler.flush.bind(scheduler, null))); + }; + AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + Immediate_1.Immediate.clearImmediate(id); + scheduler.scheduled = undefined; + } + return undefined; + }; + return AsapAction; +}(AsyncAction_1.AsyncAction)); +exports.AsapAction = AsapAction; + +},{"../util/Immediate":90,"./AsyncAction":76}],75:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AsapScheduler = (function (_super) { + __extends(AsapScheduler, _super); + function AsapScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler.prototype.flush = function (action) { + this.active = true; + this.scheduled = undefined; + var actions = this.actions; + var error; + var index = -1; + var count = actions.length; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this.active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AsapScheduler = AsapScheduler; + +},{"./AsyncScheduler":77}],76:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Action_1 = require("./Action"); +var AsyncAction = (function (_super) { + __extends(AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && this.delay === delay && this.pending === false) { + return id; + } + clearInterval(id); + return undefined; + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, delay) { + var errored = false; + var errorValue = undefined; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = !!e && e || new Error(e); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype._unsubscribe = function () { + var id = this.id; + var scheduler = this.scheduler; + var actions = scheduler.actions; + var index = actions.indexOf(this); + this.work = null; + this.state = null; + this.pending = false; + this.scheduler = null; + if (index !== -1) { + actions.splice(index, 1); + } + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + }; + return AsyncAction; +}(Action_1.Action)); +exports.AsyncAction = AsyncAction; + +},{"./Action":71}],77:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Scheduler_1 = require("../Scheduler"); +var AsyncScheduler = (function (_super) { + __extends(AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler_1.Scheduler.now; } + var _this = _super.call(this, SchedulerAction, function () { + if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) { + return AsyncScheduler.delegate.now(); + } + else { + return now(); + } + }) || this; + _this.actions = []; + _this.active = false; + _this.scheduled = undefined; + return _this; + } + AsyncScheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { delay = 0; } + if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { + return AsyncScheduler.delegate.schedule(work, delay, state); + } + else { + return _super.prototype.schedule.call(this, work, delay, state); + } + }; + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this.active) { + actions.push(action); + return; + } + var error; + this.active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this.active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; +}(Scheduler_1.Scheduler)); +exports.AsyncScheduler = AsyncScheduler; + +},{"../Scheduler":24}],78:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var QueueAction = (function (_super) { + __extends(QueueAction, _super); + function QueueAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction.prototype.execute = function (state, delay) { + return (delay > 0 || this.closed) ? + _super.prototype.execute.call(this, state, delay) : + this._execute(state, delay); + }; + QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + return scheduler.flush(this); + }; + return QueueAction; +}(AsyncAction_1.AsyncAction)); +exports.QueueAction = QueueAction; + +},{"./AsyncAction":76}],79:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var QueueScheduler = (function (_super) { + __extends(QueueScheduler, _super); + function QueueScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.QueueScheduler = QueueScheduler; + +},{"./AsyncScheduler":77}],80:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var VirtualTimeScheduler = (function (_super) { + __extends(VirtualTimeScheduler, _super); + function VirtualTimeScheduler(SchedulerAction, maxFrames) { + if (SchedulerAction === void 0) { SchedulerAction = VirtualAction; } + if (maxFrames === void 0) { maxFrames = Number.POSITIVE_INFINITY; } + var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler.prototype.flush = function () { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error, action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if (error = action.execute(action.state, action.delay)) { + break; + } + } + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler.frameTimeFactor = 10; + return VirtualTimeScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.VirtualTimeScheduler = VirtualTimeScheduler; +var VirtualAction = (function (_super) { + __extends(VirtualAction, _super); + function VirtualAction(scheduler, work, index) { + if (index === void 0) { index = scheduler.index += 1; } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + }; + VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction.sortActions); + return true; + }; + VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return undefined; + }; + VirtualAction.prototype._execute = function (state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction.sortActions = function (a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + }; + return VirtualAction; +}(AsyncAction_1.AsyncAction)); +exports.VirtualAction = VirtualAction; + +},{"./AsyncAction":76,"./AsyncScheduler":77}],81:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AnimationFrameAction_1 = require("./AnimationFrameAction"); +var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler"); +exports.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); +exports.animationFrame = exports.animationFrameScheduler; + +},{"./AnimationFrameAction":72,"./AnimationFrameScheduler":73}],82:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AsapAction_1 = require("./AsapAction"); +var AsapScheduler_1 = require("./AsapScheduler"); +exports.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); +exports.asap = exports.asapScheduler; + +},{"./AsapAction":74,"./AsapScheduler":75}],83:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +exports.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); +exports.async = exports.asyncScheduler; + +},{"./AsyncAction":76,"./AsyncScheduler":77}],84:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var QueueAction_1 = require("./QueueAction"); +var QueueScheduler_1 = require("./QueueScheduler"); +exports.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); +exports.queue = exports.queueScheduler; + +},{"./QueueAction":78,"./QueueScheduler":79}],85:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +exports.getSymbolIterator = getSymbolIterator; +exports.iterator = getSymbolIterator(); +exports.$$iterator = exports.iterator; + +},{}],86:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.observable = (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })(); + +},{}],87:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rxSubscriber = (function () { + return typeof Symbol === 'function' + ? Symbol('rxSubscriber') + : '@@rxSubscriber_' + Math.random(); +})(); +exports.$$rxSubscriber = exports.rxSubscriber; + +},{}],88:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ArgumentOutOfRangeErrorImpl = (function () { + function ArgumentOutOfRangeErrorImpl() { + Error.call(this); + this.message = 'argument out of range'; + this.name = 'ArgumentOutOfRangeError'; + return this; + } + ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype); + return ArgumentOutOfRangeErrorImpl; +})(); +exports.ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; + +},{}],89:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var EmptyErrorImpl = (function () { + function EmptyErrorImpl() { + Error.call(this); + this.message = 'no elements in sequence'; + this.name = 'EmptyError'; + return this; + } + EmptyErrorImpl.prototype = Object.create(Error.prototype); + return EmptyErrorImpl; +})(); +exports.EmptyError = EmptyErrorImpl; + +},{}],90:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var nextHandle = 1; +var RESOLVED = (function () { return Promise.resolve(); })(); +var activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +exports.Immediate = { + setImmediate: function (cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); }); + return handle; + }, + clearImmediate: function (handle) { + findAndClearHandle(handle); + }, +}; +exports.TestTools = { + pending: function () { + return Object.keys(activeHandles).length; + } +}; + +},{}],91:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ObjectUnsubscribedErrorImpl = (function () { + function ObjectUnsubscribedErrorImpl() { + Error.call(this); + this.message = 'object unsubscribed'; + this.name = 'ObjectUnsubscribedError'; + return this; + } + ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype); + return ObjectUnsubscribedErrorImpl; +})(); +exports.ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; + +},{}],92:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var TimeoutErrorImpl = (function () { + function TimeoutErrorImpl() { + Error.call(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + return this; + } + TimeoutErrorImpl.prototype = Object.create(Error.prototype); + return TimeoutErrorImpl; +})(); +exports.TimeoutError = TimeoutErrorImpl; + +},{}],93:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var UnsubscriptionErrorImpl = (function () { + function UnsubscriptionErrorImpl(errors) { + Error.call(this); + this.message = errors ? + errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + return this; + } + UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype); + return UnsubscriptionErrorImpl; +})(); +exports.UnsubscriptionError = UnsubscriptionErrorImpl; + +},{}],94:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function canReportError(observer) { + while (observer) { + var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped; + if (closed_1 || isStopped) { + return false; + } + else if (destination && destination instanceof Subscriber_1.Subscriber) { + observer = destination; + } + else { + observer = null; + } + } + return true; +} +exports.canReportError = canReportError; + +},{"../Subscriber":27}],95:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function hostReportError(err) { + setTimeout(function () { throw err; }, 0); +} +exports.hostReportError = hostReportError; + +},{}],96:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function identity(x) { + return x; +} +exports.identity = identity; + +},{}],97:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArray = (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })(); + +},{}],98:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); + +},{}],99:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isFunction(x) { + return typeof x === 'function'; +} +exports.isFunction = isFunction; + +},{}],100:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var observable_1 = require("../symbol/observable"); +function isInteropObservable(input) { + return input && typeof input[observable_1.observable] === 'function'; +} +exports.isInteropObservable = isInteropObservable; + +},{"../symbol/observable":86}],101:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var iterator_1 = require("../symbol/iterator"); +function isIterable(input) { + return input && typeof input[iterator_1.iterator] === 'function'; +} +exports.isIterable = isIterable; + +},{"../symbol/iterator":85}],102:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var isArray_1 = require("./isArray"); +function isNumeric(val) { + return !isArray_1.isArray(val) && (val - parseFloat(val) + 1) >= 0; +} +exports.isNumeric = isNumeric; + +},{"./isArray":97}],103:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isObject(x) { + return x !== null && typeof x === 'object'; +} +exports.isObject = isObject; + +},{}],104:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')); +} +exports.isObservable = isObservable; + +},{"../Observable":20}],105:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isPromise(value) { + return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; +} +exports.isPromise = isPromise; + +},{}],106:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isScheduler(value) { + return value && typeof value.schedule === 'function'; +} +exports.isScheduler = isScheduler; + +},{}],107:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function noop() { } +exports.noop = noop; + +},{}],108:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function not(pred, thisArg) { + function notPred() { + return !(notPred.pred.apply(notPred.thisArg, arguments)); + } + notPred.pred = pred; + notPred.thisArg = thisArg; + return notPred; +} +exports.not = not; + +},{}],109:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var identity_1 = require("./identity"); +function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); +} +exports.pipe = pipe; +function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; +} +exports.pipeFromArray = pipeFromArray; + +},{"./identity":96}],110:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var subscribeToArray_1 = require("./subscribeToArray"); +var subscribeToPromise_1 = require("./subscribeToPromise"); +var subscribeToIterable_1 = require("./subscribeToIterable"); +var subscribeToObservable_1 = require("./subscribeToObservable"); +var isArrayLike_1 = require("./isArrayLike"); +var isPromise_1 = require("./isPromise"); +var isObject_1 = require("./isObject"); +var iterator_1 = require("../symbol/iterator"); +var observable_1 = require("../symbol/observable"); +exports.subscribeTo = function (result) { + if (!!result && typeof result[observable_1.observable] === 'function') { + return subscribeToObservable_1.subscribeToObservable(result); + } + else if (isArrayLike_1.isArrayLike(result)) { + return subscribeToArray_1.subscribeToArray(result); + } + else if (isPromise_1.isPromise(result)) { + return subscribeToPromise_1.subscribeToPromise(result); + } + else if (!!result && typeof result[iterator_1.iterator] === 'function') { + return subscribeToIterable_1.subscribeToIterable(result); + } + else { + var value = isObject_1.isObject(result) ? 'an invalid object' : "'" + result + "'"; + var msg = "You provided " + value + " where a stream was expected." + + ' You can provide an Observable, Promise, Array, or Iterable.'; + throw new TypeError(msg); + } +}; + +},{"../symbol/iterator":85,"../symbol/observable":86,"./isArrayLike":98,"./isObject":103,"./isPromise":105,"./subscribeToArray":111,"./subscribeToIterable":112,"./subscribeToObservable":113,"./subscribeToPromise":114}],111:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.subscribeToArray = function (array) { return function (subscriber) { + for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); +}; }; + +},{}],112:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var iterator_1 = require("../symbol/iterator"); +exports.subscribeToIterable = function (iterable) { return function (subscriber) { + var iterator = iterable[iterator_1.iterator](); + do { + var item = void 0; + try { + item = iterator.next(); + } + catch (err) { + subscriber.error(err); + return subscriber; + } + if (item.done) { + subscriber.complete(); + break; + } + subscriber.next(item.value); + if (subscriber.closed) { + break; + } + } while (true); + if (typeof iterator.return === 'function') { + subscriber.add(function () { + if (iterator.return) { + iterator.return(); + } + }); + } + return subscriber; +}; }; + +},{"../symbol/iterator":85}],113:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var observable_1 = require("../symbol/observable"); +exports.subscribeToObservable = function (obj) { return function (subscriber) { + var obs = obj[observable_1.observable](); + if (typeof obs.subscribe !== 'function') { + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + } + else { + return obs.subscribe(subscriber); + } +}; }; + +},{"../symbol/observable":86}],114:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var hostReportError_1 = require("./hostReportError"); +exports.subscribeToPromise = function (promise) { return function (subscriber) { + promise.then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, hostReportError_1.hostReportError); + return subscriber; +}; }; + +},{"./hostReportError":95}],115:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var InnerSubscriber_1 = require("../InnerSubscriber"); +var subscribeTo_1 = require("./subscribeTo"); +var Observable_1 = require("../Observable"); +function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) { + if (innerSubscriber === void 0) { innerSubscriber = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); } + if (innerSubscriber.closed) { + return undefined; + } + if (result instanceof Observable_1.Observable) { + return result.subscribe(innerSubscriber); + } + return subscribeTo_1.subscribeTo(result)(innerSubscriber); +} +exports.subscribeToResult = subscribeToResult; + +},{"../InnerSubscriber":18,"../Observable":20,"./subscribeTo":110}],116:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +var rxSubscriber_1 = require("../symbol/rxSubscriber"); +var Observer_1 = require("../Observer"); +function toSubscriber(nextOrObserver, error, complete) { + if (nextOrObserver) { + if (nextOrObserver instanceof Subscriber_1.Subscriber) { + return nextOrObserver; + } + if (nextOrObserver[rxSubscriber_1.rxSubscriber]) { + return nextOrObserver[rxSubscriber_1.rxSubscriber](); + } + } + if (!nextOrObserver && !error && !complete) { + return new Subscriber_1.Subscriber(Observer_1.empty); + } + return new Subscriber_1.Subscriber(nextOrObserver, error, complete); +} +exports.toSubscriber = toSubscriber; + +},{"../Observer":21,"../Subscriber":27,"../symbol/rxSubscriber":87}],117:[function(require,module,exports){ +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) + } + + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + + const sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + const sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + const sameSemVer = this.semver.version === comp.semver.version + const differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + const oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<') + const oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>') + + return ( + sameDirectionIncreasing || + sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || + oppositeDirectionsGreaterThan + ) + } +} + +module.exports = Comparator + +const parseOptions = require('../internal/parse-options') +const {re, t} = require('../internal/re') +const cmp = require('../functions/cmp') +const debug = require('../internal/debug') +const SemVer = require('./semver') +const Range = require('./range') + +},{"../functions/cmp":121,"../internal/debug":146,"../internal/parse-options":148,"../internal/re":149,"./range":118,"./semver":119}],118:[function(require,module,exports){ +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) + + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.format() + return this + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range + .split(/\s*\|\|\s*/) + // map the range to a 2d array of comparators + .map(range => this.parseRange(range.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`) + } + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) + this.set = [first] + else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + + this.format() + } + + format () { + this.range = this.set + .map((comps) => { + return comps.join(' ').trim() + }) + .join('||') + .trim() + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + range = range.trim() + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) + return cached + + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + // in loose mode, throw out any that are not valid comparators + .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) + .map(comp => new Comparator(comp, this.options)) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const l = rangeList.length + const rangeMap = new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) + rangeMap.delete('') + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } +} +module.exports = Range + +const LRU = require('lru-cache') +const cache = new LRU({ max: 1000 }) + +const parseOptions = require('../internal/parse-options') +const Comparator = require('./comparator') +const debug = require('../internal/debug') +const SemVer = require('./semver') +const { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace +} = require('../internal/re') + +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +const replaceTildes = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceTilde(comp, options) + }).join(' ') + +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +const replaceCarets = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceCaret(comp, options) + }).join(' ') + +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } + + debug('caret return', ret) + return ret + }) +} + +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map((comp) => { + return replaceXRange(comp, options) + }).join(' ') +} + +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + if (gtlt === '<') + pr = '-0' + + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp.trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + + return (`${from} ${to}`).trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +},{"../internal/debug":146,"../internal/parse-options":148,"../internal/re":149,"./comparator":117,"./semver":119,"lru-cache":14}],119:[function(require,module,exports){ +const debug = require('../internal/debug') +const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') +const { re, t } = require('../internal/re') + +const parseOptions = require('../internal/parse-options') +const { compareIdentifiers } = require('../internal/identifiers') +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid Version: ${version}`) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + + if (other.version === this.version) { + return 0 + } + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.format() + this.raw = this.version + return this + } +} + +module.exports = SemVer + +},{"../internal/constants":145,"../internal/debug":146,"../internal/identifiers":147,"../internal/parse-options":148,"../internal/re":149}],120:[function(require,module,exports){ +const parse = require('./parse') +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean + +},{"./parse":136}],121:[function(require,module,exports){ +const eq = require('./eq') +const neq = require('./neq') +const gt = require('./gt') +const gte = require('./gte') +const lt = require('./lt') +const lte = require('./lte') + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + +},{"./eq":127,"./gt":128,"./gte":129,"./lt":131,"./lte":132,"./neq":135}],122:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const parse = require('./parse') +const {re, t} = require('../internal/re') + +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + let next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) + return null + + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) +} +module.exports = coerce + +},{"../classes/semver":119,"../internal/re":149,"./parse":136}],123:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild + +},{"../classes/semver":119}],124:[function(require,module,exports){ +const compare = require('./compare') +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose + +},{"./compare":125}],125:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + +},{"../classes/semver":119}],126:[function(require,module,exports){ +const parse = require('./parse') +const eq = require('./eq') + +const diff = (version1, version2) => { + if (eq(version1, version2)) { + return null + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} +module.exports = diff + +},{"./eq":127,"./parse":136}],127:[function(require,module,exports){ +const compare = require('./compare') +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq + +},{"./compare":125}],128:[function(require,module,exports){ +const compare = require('./compare') +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt + +},{"./compare":125}],129:[function(require,module,exports){ +const compare = require('./compare') +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + +},{"./compare":125}],130:[function(require,module,exports){ +const SemVer = require('../classes/semver') + +const inc = (version, release, options, identifier) => { + if (typeof (options) === 'string') { + identifier = options + options = undefined + } + + try { + return new SemVer(version, options).inc(release, identifier).version + } catch (er) { + return null + } +} +module.exports = inc + +},{"../classes/semver":119}],131:[function(require,module,exports){ +const compare = require('./compare') +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt + +},{"./compare":125}],132:[function(require,module,exports){ +const compare = require('./compare') +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + +},{"./compare":125}],133:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major + +},{"../classes/semver":119}],134:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor + +},{"../classes/semver":119}],135:[function(require,module,exports){ +const compare = require('./compare') +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + +},{"./compare":125}],136:[function(require,module,exports){ +const {MAX_LENGTH} = require('../internal/constants') +const { re, t } = require('../internal/re') +const SemVer = require('../classes/semver') + +const parseOptions = require('../internal/parse-options') +const parse = (version, options) => { + options = parseOptions(options) + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +module.exports = parse + +},{"../classes/semver":119,"../internal/constants":145,"../internal/parse-options":148,"../internal/re":149}],137:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch + +},{"../classes/semver":119}],138:[function(require,module,exports){ +const parse = require('./parse') +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease + +},{"./parse":136}],139:[function(require,module,exports){ +const compare = require('./compare') +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare + +},{"./compare":125}],140:[function(require,module,exports){ +const compareBuild = require('./compare-build') +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort + +},{"./compare-build":123}],141:[function(require,module,exports){ +const Range = require('../classes/range') +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies + +},{"../classes/range":118}],142:[function(require,module,exports){ +const compareBuild = require('./compare-build') +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort + +},{"./compare-build":123}],143:[function(require,module,exports){ +const parse = require('./parse') +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid + +},{"./parse":136}],144:[function(require,module,exports){ +// just pre-load all the stuff that index.js lazily exports +const internalRe = require('./internal/re') +module.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION, + SemVer: require('./classes/semver'), + compareIdentifiers: require('./internal/identifiers').compareIdentifiers, + rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers, + parse: require('./functions/parse'), + valid: require('./functions/valid'), + clean: require('./functions/clean'), + inc: require('./functions/inc'), + diff: require('./functions/diff'), + major: require('./functions/major'), + minor: require('./functions/minor'), + patch: require('./functions/patch'), + prerelease: require('./functions/prerelease'), + compare: require('./functions/compare'), + rcompare: require('./functions/rcompare'), + compareLoose: require('./functions/compare-loose'), + compareBuild: require('./functions/compare-build'), + sort: require('./functions/sort'), + rsort: require('./functions/rsort'), + gt: require('./functions/gt'), + lt: require('./functions/lt'), + eq: require('./functions/eq'), + neq: require('./functions/neq'), + gte: require('./functions/gte'), + lte: require('./functions/lte'), + cmp: require('./functions/cmp'), + coerce: require('./functions/coerce'), + Comparator: require('./classes/comparator'), + Range: require('./classes/range'), + satisfies: require('./functions/satisfies'), + toComparators: require('./ranges/to-comparators'), + maxSatisfying: require('./ranges/max-satisfying'), + minSatisfying: require('./ranges/min-satisfying'), + minVersion: require('./ranges/min-version'), + validRange: require('./ranges/valid'), + outside: require('./ranges/outside'), + gtr: require('./ranges/gtr'), + ltr: require('./ranges/ltr'), + intersects: require('./ranges/intersects'), + simplifyRange: require('./ranges/simplify'), + subset: require('./ranges/subset'), +} + +},{"./classes/comparator":117,"./classes/range":118,"./classes/semver":119,"./functions/clean":120,"./functions/cmp":121,"./functions/coerce":122,"./functions/compare":125,"./functions/compare-build":123,"./functions/compare-loose":124,"./functions/diff":126,"./functions/eq":127,"./functions/gt":128,"./functions/gte":129,"./functions/inc":130,"./functions/lt":131,"./functions/lte":132,"./functions/major":133,"./functions/minor":134,"./functions/neq":135,"./functions/parse":136,"./functions/patch":137,"./functions/prerelease":138,"./functions/rcompare":139,"./functions/rsort":140,"./functions/satisfies":141,"./functions/sort":142,"./functions/valid":143,"./internal/constants":145,"./internal/identifiers":147,"./internal/re":149,"./ranges/gtr":150,"./ranges/intersects":151,"./ranges/ltr":152,"./ranges/max-satisfying":153,"./ranges/min-satisfying":154,"./ranges/min-version":155,"./ranges/outside":156,"./ranges/simplify":157,"./ranges/subset":158,"./ranges/to-comparators":159,"./ranges/valid":160}],145:[function(require,module,exports){ +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +module.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH +} + +},{}],146:[function(require,module,exports){ +(function (process){(function (){ +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} + +module.exports = debug + +}).call(this)}).call(this,require('_process')) +},{"_process":168}],147:[function(require,module,exports){ +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers +} + +},{}],148:[function(require,module,exports){ +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((options, k) => { + options[k] = true + return options + }, {}) +module.exports = parseOptions + +},{}],149:[function(require,module,exports){ +const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants') +const debug = require('./debug') +exports = module.exports = {} + +// The actual regexps go on exports.re +const re = exports.re = [] +const src = exports.src = [] +const t = exports.t = {} +let R = 0 + +const createToken = (name, value, isGlobal) => { + const index = R++ + debug(index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCE', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') + +},{"./constants":145,"./debug":146}],150:[function(require,module,exports){ +// Determine if version is greater than all the versions possible in the range. +const outside = require('./outside') +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr + +},{"./outside":156}],151:[function(require,module,exports){ +const Range = require('../classes/range') +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} +module.exports = intersects + +},{"../classes/range":118}],152:[function(require,module,exports){ +const outside = require('./outside') +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr + +},{"./outside":156}],153:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Range = require('../classes/range') + +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} +module.exports = maxSatisfying + +},{"../classes/range":118,"../classes/semver":119}],154:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Range = require('../classes/range') +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} +module.exports = minSatisfying + +},{"../classes/range":118,"../classes/semver":119}],155:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Range = require('../classes/range') +const gt = require('../functions/gt') + +const minVersion = (range, loose) => { + range = new Range(range, loose) + + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} +module.exports = minVersion + +},{"../classes/range":118,"../classes/semver":119,"../functions/gt":128}],156:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Comparator = require('../classes/comparator') +const {ANY} = Comparator +const Range = require('../classes/range') +const satisfies = require('../functions/satisfies') +const gt = require('../functions/gt') +const lt = require('../functions/lt') +const lte = require('../functions/lte') +const gte = require('../functions/gte') + +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) + + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let high = null + let low = null + + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +module.exports = outside + +},{"../classes/comparator":117,"../classes/range":118,"../classes/semver":119,"../functions/gt":128,"../functions/gte":129,"../functions/lt":131,"../functions/lte":132,"../functions/satisfies":141}],157:[function(require,module,exports){ +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = require('../functions/satisfies.js') +const compare = require('../functions/compare.js') +module.exports = (versions, range, options) => { + const set = [] + let min = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!min) + min = version + } else { + if (prev) { + set.push([min, prev]) + } + prev = null + min = null + } + } + if (min) + set.push([min, null]) + + const ranges = [] + for (const [min, max] of set) { + if (min === max) + ranges.push(min) + else if (!max && min === v[0]) + ranges.push('*') + else if (!max) + ranges.push(`>=${min}`) + else if (min === v[0]) + ranges.push(`<=${max}`) + else + ranges.push(`${min} - ${max}`) + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range +} + +},{"../functions/compare.js":125,"../functions/satisfies.js":141}],158:[function(require,module,exports){ +const Range = require('../classes/range.js') +const Comparator = require('../classes/comparator.js') +const { ANY } = Comparator +const satisfies = require('../functions/satisfies.js') +const compare = require('../functions/compare.js') + +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true + +const subset = (sub, dom, options = {}) => { + if (sub === dom) + return true + + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) + continue OUTER + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) + return false + } + return true +} + +const simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true + + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true + else if (options.includePrerelease) + sub = [ new Comparator('>=0.0.0-0') ] + else + sub = [ new Comparator('>=0.0.0') ] + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true + else + dom = [ new Comparator('>=0.0.0') ] + } + + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') + gt = higherGT(gt, c, options) + else if (c.operator === '<' || c.operator === '<=') + lt = lowerLT(lt, c, options) + else + eqSet.add(c.semver) + } + + if (eqSet.size > 1) + return null + + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) + return null + else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + return null + } + + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null + + if (lt && !satisfies(eq, String(lt), options)) + return null + + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false + } + + return true + } + + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) + return false + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + return false + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) + return false + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + return false + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false + } + + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false + + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) + return false + + return true +} + +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a +} + +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} + +module.exports = subset + +},{"../classes/comparator.js":117,"../classes/range.js":118,"../functions/compare.js":125,"../functions/satisfies.js":141}],159:[function(require,module,exports){ +const Range = require('../classes/range') + +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) + +module.exports = toComparators + +},{"../classes/range":118}],160:[function(require,module,exports){ +const Range = require('../classes/range') +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} +module.exports = validRange + +},{"../classes/range":118}],161:[function(require,module,exports){ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} + +},{}],162:[function(require,module,exports){ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} + +},{"./iterator.js":161}],163:[function(require,module,exports){ + +},{}],164:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],165:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"base64-js":164,"buffer":165,"ieee754":167}],166:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} + +},{}],167:[function(require,module,exports){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],168:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // 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 + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // 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. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}]},{},[1]); diff --git a/ledger-bundle/package-lock.json b/ledger-bundle/package-lock.json new file mode 100644 index 0000000..6085430 --- /dev/null +++ b/ledger-bundle/package-lock.json @@ -0,0 +1,400 @@ +{ + "name": "ledger-bundle", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ledgerhq/devices": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.20.0.tgz", + "integrity": "sha512-WehM7HGdb+nSUzyUlz1t2qJ8Tg4I+rQkOJJsx0/Dpjkx6/+1hHcX6My/apPuwh39qahqwYhjszq0H1YzGDS0Yg==", + "requires": { + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/logs": "^6.10.0", + "rxjs": "6", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@ledgerhq/errors": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", + "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" + }, + "@ledgerhq/hw-transport": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.20.0.tgz", + "integrity": "sha512-5KS0Y6CbWRDOv3FgNIfk53ViQOIZqMxAw0RuOexreW5GMwuYfK7ddGi4142qcu7YrxkGo7cNe42wBbx1hdXl0Q==", + "requires": { + "@ledgerhq/devices": "^6.20.0", + "@ledgerhq/errors": "^6.10.0", + "events": "^3.3.0" + } + }, + "@ledgerhq/hw-transport-node-speculos": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.20.0.tgz", + "integrity": "sha512-YtxdIG77wprdoSI/+ufSDG39t4mF20Wn5nXhqCx+bPLd/mVm70m1vfetLi8zAtYE4NTjo1lDhpbj2nAtLVRU7A==", + "requires": { + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.20.0", + "@ledgerhq/logs": "^6.10.0", + "rxjs": "6" + } + }, + "@ledgerhq/hw-transport-webhid": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.20.0.tgz", + "integrity": "sha512-vpbeKmvlQQHQIT7MOAt8TJV7706YkvfEsW2it/vQKAKGjmAYWgrLDXLLgmA1rEDschq0w63crOSp0El4doy+JQ==", + "requires": { + "@ledgerhq/devices": "^6.20.0", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.20.0", + "@ledgerhq/logs": "^6.10.0" + } + }, + "@ledgerhq/hw-transport-webusb": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.20.0.tgz", + "integrity": "sha512-7rtgOEuEZ7/O5JofcglUVck7RXH5D8vS3zP5SjPURhvSFiJVGrtOVS+Qna7gXqGdkesDcNF0xBkwme+67n4Imw==", + "requires": { + "@ledgerhq/devices": "^6.20.0", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.20.0", + "@ledgerhq/logs": "^6.10.0" + } + }, + "@ledgerhq/logs": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", + "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "hw-app-kda": { + "version": "git+https://github.com/obsidiansystems/hw-app-kda.git#f0d50050debbd8119da195637d5c367e36312764", + "from": "git+https://github.com/obsidiansystems/hw-app-kda.git", + "requires": { + "@ledgerhq/hw-transport": "^6.3.0", + "hw-app-obsidian-common": "git+http://github.com/obsidiansystems/hw-app-obsidian-common#9fd33f6218f34c0e3a7da96b63656a2b3ae76e95" + } + }, + "hw-app-obsidian-common": { + "version": "git+http://github.com/obsidiansystems/hw-app-obsidian-common#9fd33f6218f34c0e3a7da96b63656a2b3ae76e95", + "from": "git+http://github.com/obsidiansystems/hw-app-obsidian-common#9fd33f6218f34c0e3a7da96b63656a2b3ae76e95", + "requires": { + "@ledgerhq/hw-transport": "^6.3.0", + "typedoc": "^0.22.7" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, + "marked": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", + "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "shiki": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz", + "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==", + "requires": { + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tsconfig": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", + "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", + "requires": { + "any-promise": "^1.3.0", + "parse-json": "^2.2.0", + "strip-bom": "^2.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "tsify": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/tsify/-/tsify-5.0.4.tgz", + "integrity": "sha512-XAZtQ5OMPsJFclkZ9xMZWkSNyMhMxEPsz3D2zu79yoKorH9j/DT4xCloJeXk5+cDhosEibu4bseMVjyPOAyLJA==", + "requires": { + "convert-source-map": "^1.1.0", + "fs.realpath": "^1.0.0", + "object-assign": "^4.1.0", + "semver": "^6.1.0", + "through2": "^2.0.0", + "tsconfig": "^5.0.3" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "typedoc": { + "version": "0.22.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz", + "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==", + "requires": { + "glob": "^7.2.0", + "lunr": "^2.3.9", + "marked": "^4.0.10", + "minimatch": "^3.0.4", + "shiki": "^0.10.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "vscode-oniguruma": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", + "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==" + }, + "vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/ledger-bundle/package.json b/ledger-bundle/package.json new file mode 100644 index 0000000..7b20219 --- /dev/null +++ b/ledger-bundle/package.json @@ -0,0 +1,18 @@ +{ + "name": "ledger-bundle", + "version": "0.0.0", + "description": "A bundler for ledger related hardware (Kadena)", + "main": "main.js", + "scripts": { + "build": "browserify main.js -p [ tsify --noImplicitAny ] > ../util/ledger-os.js" + }, + "author": "Alexandre Garcia de Oliveira (Romefeller)", + "license": "ISC", + "dependencies": { + "@ledgerhq/hw-transport-node-speculos": "^6.20.0", + "@ledgerhq/hw-transport-webhid": "^6.20.0", + "@ledgerhq/hw-transport-webusb": "^6.20.0", + "hw-app-kda": "git+https://github.com/obsidiansystems/hw-app-kda.git", + "tsify": "^5.0.4" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/lerna.json similarity index 56% rename from node_modules/resolve/test/resolver/multirepo/lerna.json rename to lerna.json index d6707ca..8e0a097 100644 --- a/node_modules/resolve/test/resolver/multirepo/lerna.json +++ b/lerna.json @@ -2,5 +2,7 @@ "packages": [ "packages/*" ], + "npmClient": "yarn", + "useWorkspaces": true, "version": "0.0.0" } diff --git a/node_modules/.bin/JSONStream b/node_modules/.bin/JSONStream deleted file mode 120000 index 3983a36..0000000 --- a/node_modules/.bin/JSONStream +++ /dev/null @@ -1 +0,0 @@ -../JSONStream/bin.js \ No newline at end of file diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 120000 index cf76760..0000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/blue-tape b/node_modules/.bin/blue-tape deleted file mode 120000 index 2925bce..0000000 --- a/node_modules/.bin/blue-tape +++ /dev/null @@ -1 +0,0 @@ -../blue-tape/bin/blue-tape.js \ No newline at end of file diff --git a/node_modules/.bin/browser-pack b/node_modules/.bin/browser-pack deleted file mode 120000 index 1d047b9..0000000 --- a/node_modules/.bin/browser-pack +++ /dev/null @@ -1 +0,0 @@ -../browser-pack/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/browserify b/node_modules/.bin/browserify deleted file mode 120000 index ab156b3..0000000 --- a/node_modules/.bin/browserify +++ /dev/null @@ -1 +0,0 @@ -../browserify/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/deps-sort b/node_modules/.bin/deps-sort deleted file mode 120000 index b2dda9e..0000000 --- a/node_modules/.bin/deps-sort +++ /dev/null @@ -1 +0,0 @@ -../deps-sort/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/detective b/node_modules/.bin/detective deleted file mode 120000 index 8c3093a..0000000 --- a/node_modules/.bin/detective +++ /dev/null @@ -1 +0,0 @@ -../detective/bin/detective.js \ No newline at end of file diff --git a/node_modules/.bin/insert-module-globals b/node_modules/.bin/insert-module-globals deleted file mode 120000 index 68af3a9..0000000 --- a/node_modules/.bin/insert-module-globals +++ /dev/null @@ -1 +0,0 @@ -../insert-module-globals/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/miller-rabin b/node_modules/.bin/miller-rabin deleted file mode 120000 index c175fe9..0000000 --- a/node_modules/.bin/miller-rabin +++ /dev/null @@ -1 +0,0 @@ -../miller-rabin/bin/miller-rabin \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp deleted file mode 120000 index 017896c..0000000 --- a/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/module-deps b/node_modules/.bin/module-deps deleted file mode 120000 index 66a1f24..0000000 --- a/node_modules/.bin/module-deps +++ /dev/null @@ -1 +0,0 @@ -../module-deps/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/sha.js b/node_modules/.bin/sha.js deleted file mode 120000 index 3c76105..0000000 --- a/node_modules/.bin/sha.js +++ /dev/null @@ -1 +0,0 @@ -../sha.js/bin.js \ No newline at end of file diff --git a/node_modules/.bin/tape b/node_modules/.bin/tape deleted file mode 120000 index dc4bc23..0000000 --- a/node_modules/.bin/tape +++ /dev/null @@ -1 +0,0 @@ -../tape/bin/tape \ No newline at end of file diff --git a/node_modules/.bin/umd b/node_modules/.bin/umd deleted file mode 120000 index 69767ed..0000000 --- a/node_modules/.bin/umd +++ /dev/null @@ -1 +0,0 @@ -../umd/bin/cli.js \ No newline at end of file diff --git a/node_modules/.bin/undeclared-identifiers b/node_modules/.bin/undeclared-identifiers deleted file mode 120000 index c95efdb..0000000 --- a/node_modules/.bin/undeclared-identifiers +++ /dev/null @@ -1 +0,0 @@ -../undeclared-identifiers/bin.js \ No newline at end of file diff --git a/node_modules/JSONStream/.travis.yml b/node_modules/JSONStream/.travis.yml deleted file mode 100644 index 5f30bb5..0000000 --- a/node_modules/JSONStream/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 4 - - 5 - - 6 -sudo: false - - diff --git a/node_modules/JSONStream/LICENSE.APACHE2 b/node_modules/JSONStream/LICENSE.APACHE2 deleted file mode 100644 index 6366c04..0000000 --- a/node_modules/JSONStream/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/JSONStream/LICENSE.MIT b/node_modules/JSONStream/LICENSE.MIT deleted file mode 100644 index 6eafbd7..0000000 --- a/node_modules/JSONStream/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/JSONStream/bin.js b/node_modules/JSONStream/bin.js deleted file mode 100755 index af2b6ac..0000000 --- a/node_modules/JSONStream/bin.js +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env node - -var JSONStream = require('./') - -if(!module.parent && process.title !== 'browser') { - process.stdin - .pipe(JSONStream.parse(process.argv[2])) - .pipe(JSONStream.stringify('[', ',\n', ']\n', 2)) - .pipe(process.stdout) -} - - diff --git a/node_modules/JSONStream/examples/all_docs.js b/node_modules/JSONStream/examples/all_docs.js deleted file mode 100644 index fa87fe5..0000000 --- a/node_modules/JSONStream/examples/all_docs.js +++ /dev/null @@ -1,13 +0,0 @@ -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) - , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - , logger = es.mapSync(function (data) { //create a stream that logs to stderr, - console.error(data) - return data - }) - -req.pipe(parser) -parser.pipe(logger) diff --git a/node_modules/JSONStream/index.js b/node_modules/JSONStream/index.js deleted file mode 100755 index f4ed901..0000000 --- a/node_modules/JSONStream/index.js +++ /dev/null @@ -1,247 +0,0 @@ -'use strict' - -var Parser = require('jsonparse') - , through = require('through') - -var bufferFrom = Buffer.from && Buffer.from !== Uint8Array.from - -/* - - the value of this.stack that creationix's jsonparse has is weird. - - it makes this code ugly, but his problem is way harder that mine, - so i'll forgive him. - -*/ - -exports.parse = function (path, map) { - var header, footer - var parser = new Parser() - var stream = through(function (chunk) { - if('string' === typeof chunk) - chunk = bufferFrom ? Buffer.from(chunk) : new Buffer(chunk) - parser.write(chunk) - }, - function (data) { - if(data) - stream.write(data) - if (header) - stream.emit('header', header) - if (footer) - stream.emit('footer', footer) - stream.queue(null) - }) - - if('string' === typeof path) - path = path.split('.').map(function (e) { - if (e === '$*') - return {emitKey: true} - else if (e === '*') - return true - else if (e === '') // '..'.split('.') returns an empty string - return {recurse: true} - else - return e - }) - - - var count = 0, _key - if(!path || !path.length) - path = null - - parser.onValue = function (value) { - if (!this.root) - stream.root = value - - if(! path) return - - var i = 0 // iterates on path - var j = 0 // iterates on stack - var emitKey = false; - var emitPath = false; - while (i < path.length) { - var key = path[i] - var c - j++ - - if (key && !key.recurse) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (! check(key, c.key)) { - setHeaderFooter(c.key, value) - return - } - emitKey = !!key.emitKey; - emitPath = !!key.emitPath; - i++ - } else { - i++ - var nextKey = path[i] - if (! nextKey) return - while (true) { - c = (j === this.stack.length) ? this : this.stack[j] - if (!c) return - if (check(nextKey, c.key)) { - i++; - if (!Object.isFrozen(this.stack[j])) - this.stack[j].value = null - break - } else { - setHeaderFooter(c.key, value) - } - j++ - } - } - - } - - // emit header - if (header) { - stream.emit('header', header); - header = false; - } - if (j !== this.stack.length) return - - count ++ - var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key]) - var data = value - if(null != data) - if(null != (data = map ? map(data, actualPath) : data)) { - if (emitKey || emitPath) { - data = { value: data }; - if (emitKey) - data["key"] = this.key; - if (emitPath) - data["path"] = actualPath; - } - - stream.queue(data) - } - if (this.value) delete this.value[this.key] - for(var k in this.stack) - if (!Object.isFrozen(this.stack[k])) - this.stack[k].value = null - } - parser._onToken = parser.onToken; - - parser.onToken = function (token, value) { - parser._onToken(token, value); - if (this.stack.length === 0) { - if (stream.root) { - if(!path) - stream.queue(stream.root) - count = 0; - stream.root = null; - } - } - } - - parser.onError = function (err) { - if(err.message.indexOf("at position") > -1) - err.message = "Invalid JSON (" + err.message + ")"; - stream.emit('error', err) - } - - return stream - - function setHeaderFooter(key, value) { - // header has not been emitted yet - if (header !== false) { - header = header || {} - header[key] = value - } - - // footer has not been emitted yet but header has - if (footer !== false && header === false) { - footer = footer || {} - footer[key] = value - } - } -} - -function check (x, y) { - if ('string' === typeof x) - return y == x - else if (x && 'function' === typeof x.exec) - return x.exec(y) - else if ('boolean' === typeof x || 'object' === typeof x) - return x - else if ('function' === typeof x) - return x(y) - return false -} - -exports.stringify = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '[\n' - sep = '\n,\n' - cl = '\n]\n' - - } - - //else, what ever you like - - var stream - , first = true - , anyData = false - stream = through(function (data) { - anyData = true - try { - var json = JSON.stringify(data, null, indent) - } catch (err) { - return stream.emit('error', err) - } - if(first) { first = false ; stream.queue(op + json)} - else stream.queue(sep + json) - }, - function (data) { - if(!anyData) - stream.queue(op) - stream.queue(cl) - stream.queue(null) - }) - - return stream -} - -exports.stringifyObject = function (op, sep, cl, indent) { - indent = indent || 0 - if (op === false){ - op = '' - sep = '\n' - cl = '' - } else if (op == null) { - - op = '{\n' - sep = '\n,\n' - cl = '\n}\n' - - } - - //else, what ever you like - - var first = true - var anyData = false - var stream = through(function (data) { - anyData = true - var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent) - if(first) { first = false ; this.queue(op + json)} - else this.queue(sep + json) - }, - function (data) { - if(!anyData) this.queue(op) - this.queue(cl) - - this.queue(null) - }) - - return stream -} - - diff --git a/node_modules/JSONStream/package.json b/node_modules/JSONStream/package.json deleted file mode 100644 index 545f309..0000000 --- a/node_modules/JSONStream/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "JSONStream@^1.0.3", - "_id": "JSONStream@1.3.5", - "_inBundle": false, - "_integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "_location": "/JSONStream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "JSONStream@^1.0.3", - "name": "JSONStream", - "escapedName": "JSONStream", - "rawSpec": "^1.0.3", - "saveSpec": null, - "fetchSpec": "^1.0.3" - }, - "_requiredBy": [ - "/browser-pack", - "/browserify", - "/deps-sort", - "/insert-module-globals", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "_shasum": "3208c1f08d3a4d99261ab64f92302bc15e111ca0", - "_spec": "JSONStream@^1.0.3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "bin": { - "JSONStream": "./bin.js" - }, - "bugs": { - "url": "https://github.com/dominictarr/JSONStream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "deprecated": false, - "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", - "devDependencies": { - "assertions": "~2.2.2", - "event-stream": "~0.7.0", - "it-is": "~1", - "render": "~0.1.1", - "tape": "~2.12.3", - "trees": "~0.0.3" - }, - "engines": { - "node": "*" - }, - "homepage": "http://github.com/dominictarr/JSONStream", - "keywords": [ - "json", - "stream", - "streaming", - "parser", - "async", - "parsing" - ], - "license": "(MIT OR Apache-2.0)", - "name": "JSONStream", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/JSONStream.git" - }, - "scripts": { - "test": "node test/run.js" - }, - "version": "1.3.5" -} diff --git a/node_modules/JSONStream/readme.markdown b/node_modules/JSONStream/readme.markdown deleted file mode 100644 index 422c3df..0000000 --- a/node_modules/JSONStream/readme.markdown +++ /dev/null @@ -1,207 +0,0 @@ -# JSONStream - -streaming JSON.parse and stringify - -![](https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master) - -## install -```npm install JSONStream``` - -## example - -``` js - -var request = require('request') - , JSONStream = require('JSONStream') - , es = require('event-stream') - -request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) - .pipe(JSONStream.parse('rows.*')) - .pipe(es.mapSync(function (data) { - console.error(data) - return data - })) -``` - -## JSONStream.parse(path) - -parse stream of values that match a path - -``` js - JSONStream.parse('rows.*.doc') -``` - -The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below). - -If your keys have keys that include `.` or `*` etc, use an array instead. -`['row', true, /^doc/]`. - -If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`. -any object that matches the path will be emitted as 'data' (and `pipe`d down stream) - -If `path` is empty or null, no 'data' events are emitted. - -If you want to have keys emitted, you can prefix your `*` operator with `$`: `obj.$*` - in this case the data passed to the stream is an object with a `key` holding the key and a `value` property holding the data. - -### Examples - -query a couchdb view: - -``` bash -curl -sS localhost:5984/tests/_all_docs&include_docs=true -``` -you will get something like this: - -``` js -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} - -``` - -we are probably most interested in the `rows.*.doc` - -create a `Stream` that parses the documents from the feed like this: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc - -stream.on('data', function(data) { - console.log('received:', data); -}); -//emits anything from _before_ the first match -stream.on('header', function (data) { - console.log('header:', data) // => {"total_rows":129,"offset":0} -}) - -``` -awesome! - -In case you wanted the contents the doc emitted: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]) //rows, ANYTHING, doc, items in docs with keys - -stream.on('data', function(data) { - console.log('key:', data.key); - console.log('value:', data.value); -}); - -``` - -You can also emit the path: - -``` js -var stream = JSONStream.parse(['rows', true, 'doc', {emitPath: true}]) //rows, ANYTHING, doc, items in docs with keys - -stream.on('data', function(data) { - console.log('path:', data.path); - console.log('value:', data.value); -}); - -``` - -### recursive patterns (..) - -`JSONStream.parse('docs..value')` -(or `JSONStream.parse(['docs', {recurse: true}, 'value'])` using an array) -will emit every `value` object that is a child, grand-child, etc. of the -`docs` object. In this example, it will match exactly 5 times at various depth -levels, emitting 0, 1, 2, 3 and 4 as results. - -```js -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": 1}, - {"value": 2}, - {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, - {"value": 4} - ] -} -``` - -## JSONStream.parse(pattern, map) - -provide a function that can be used to map or filter -the json output. `map` is passed the value at that node of the pattern, -if `map` return non-nullish (anything but `null` or `undefined`) -that value will be emitted in the stream. If it returns a nullish value, -nothing will be emitted. - -`JSONStream` also emits `'header'` and `'footer'` events, -the `'header'` event contains anything in the output that was before -the first match, and the `'footer'`, is anything after the last match. - -## JSONStream.stringify(open, sep, close) - -Create a writable stream. - -you may pass in custom `open`, `close`, and `seperator` strings. -But, by default, `JSONStream.stringify()` will create an array, -(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) - -If you call `JSONStream.stringify(false)` -the elements will only be seperated by a newline. - -If you only write one item this will be valid JSON. - -If you write many items, -you can use a `RegExp` to split it into valid chunks. - -## JSONStream.stringifyObject(open, sep, close) - -Very much like `JSONStream.stringify`, -but creates a writable stream for objects instead of arrays. - -Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. - -When you `.write()` to the stream you must supply an array with `[ key, data ]` -as the first argument. - -## unix tool - -query npm to see all the modules that browserify has ever depended on. - -``` bash -curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies' -``` - -## numbers - -numbers will be emitted as numbers. -huge numbers that cannot be represented in memory as javascript numbers will be emitted as strings. -cf https://github.com/creationix/jsonparse/commit/044b268f01c4b8f97fb936fc85d3bcfba179e5bb for details. - -## Acknowlegements - -this module depends on https://github.com/creationix/jsonparse -by Tim Caswell -and also thanks to Florent Jaby for teaching me about parsing with: -https://github.com/Floby/node-json-streams - -## license - -Dual-licensed under the MIT License or the Apache License, version 2.0 - diff --git a/node_modules/JSONStream/test/bool.js b/node_modules/JSONStream/test/bool.js deleted file mode 100644 index 6c386d6..0000000 --- a/node_modules/JSONStream/test/bool.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([true]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/JSONStream/test/browser.js b/node_modules/JSONStream/test/browser.js deleted file mode 100644 index 3c28d49..0000000 --- a/node_modules/JSONStream/test/browser.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape') -var JSONStream = require('../') -var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}' - -test('basic parsing', function (t) { - t.plan(2) - var parsed = JSONStream.parse("rows.*") - var parsedKeys = {} - parsed.on('data', function(match) { - parsedKeys[Object.keys(match)[0]] = true - }) - parsed.on('end', function() { - t.equal(!!parsedKeys['hello'], true) - t.equal(!!parsedKeys['foo'], true) - }) - parsed.write(testData) - parsed.end() -}) \ No newline at end of file diff --git a/node_modules/JSONStream/test/destroy_missing.js b/node_modules/JSONStream/test/destroy_missing.js deleted file mode 100644 index 315fdc8..0000000 --- a/node_modules/JSONStream/test/destroy_missing.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var JSONStream = require('../'); - - -var server = net.createServer(function(client) { - var parser = JSONStream.parse([]); - parser.on('end', function() { - console.log('close') - console.error('PASSED'); - server.close(); - }); - client.pipe(parser); - var n = 4 - client.on('data', function () { - if(--n) return - client.end(); - }) -}); -server.listen(9999); - - -var client = net.connect({ port : 9999 }, function() { - fs.createReadStream(file).pipe(client).on('data', console.log) //.resume(); -}); diff --git a/node_modules/JSONStream/test/doubledot1.js b/node_modules/JSONStream/test/doubledot1.js deleted file mode 100644 index 78149b9..0000000 --- a/node_modules/JSONStream/test/doubledot1.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse('rows..rev') - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - for (var i = 0 ; i < expected.rows.length ; i++) - it(parsed[i]).deepEqual(expected.rows[i].value.rev) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/doubledot2.js b/node_modules/JSONStream/test/doubledot2.js deleted file mode 100644 index b0bc5b1..0000000 --- a/node_modules/JSONStream/test/doubledot2.js +++ /dev/null @@ -1,30 +0,0 @@ - var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','depth.json') - , JSONStream = require('../') - , it = require('it-is') - - var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['docs', {recurse: true}, 'value']) - , called = 0 - , ended = false - , parsed = [] - - fs.createReadStream(file).pipe(parser) - - parser.on('data', function (data) { - called ++ - parsed.push(data) - }) - - parser.on('end', function () { - ended = true - }) - - process.on('exit', function () { - var expectedValues = [0, [1], {"a": 2}, "3", 4] - it(called).equal(expectedValues.length) - for (var i = 0 ; i < 5 ; i++) - it(parsed[i]).deepEqual(expectedValues[i]) - console.error('PASSED') - }) diff --git a/node_modules/JSONStream/test/empty.js b/node_modules/JSONStream/test/empty.js deleted file mode 100644 index 19e888c..0000000 --- a/node_modules/JSONStream/test/empty.js +++ /dev/null @@ -1,44 +0,0 @@ -var JSONStream = require('../') - , stream = require('stream') - , it = require('it-is') - -var output = [ [], [] ] - -var parser1 = JSONStream.parse(['docs', /./]) -parser1.on('data', function(data) { - output[0].push(data) -}) - -var parser2 = JSONStream.parse(['docs', /./]) -parser2.on('data', function(data) { - output[1].push(data) -}) - -var pending = 2 -function onend () { - if (--pending > 0) return - it(output).deepEqual([ - [], [{hello: 'world'}] - ]) - console.error('PASSED') -} -parser1.on('end', onend) -parser2.on('end', onend) - -function makeReadableStream() { - var readStream = new stream.Stream() - readStream.readable = true - readStream.write = function (data) { this.emit('data', data) } - readStream.end = function (data) { this.emit('end') } - return readStream -} - -var emptyArray = makeReadableStream() -emptyArray.pipe(parser1) -emptyArray.write('{"docs":[]}') -emptyArray.end() - -var objectArray = makeReadableStream() -objectArray.pipe(parser2) -objectArray.write('{"docs":[{"hello":"world"}]}') -objectArray.end() diff --git a/node_modules/JSONStream/test/error_contents.js b/node_modules/JSONStream/test/error_contents.js deleted file mode 100644 index 13c27ae..0000000 --- a/node_modules/JSONStream/test/error_contents.js +++ /dev/null @@ -1,45 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','error.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows']) - , called = 0 - , headerCalled = 0 - , footerCalled = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('header', function (data) { - headerCalled ++ - it(data).deepEqual({ - error: 'error_code', - message: 'this is an error message' - }) -}) - -parser.on('footer', function (data) { - footerCalled ++ -}) - -parser.on('data', function (data) { - called ++ - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(0) - it(headerCalled).equal(1) - it(footerCalled).equal(0) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/fixtures/all_npm.json b/node_modules/JSONStream/test/fixtures/all_npm.json deleted file mode 100644 index 6303ea2..0000000 --- a/node_modules/JSONStream/test/fixtures/all_npm.json +++ /dev/null @@ -1,4030 +0,0 @@ -{"total_rows":4028,"offset":0,"rows":[ -{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, -{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, -{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, -{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, -{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, -{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, -{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, -{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, -{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, -{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, -{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, -{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, -{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, -{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, -{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, -{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, -{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, -{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, -{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, -{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, -{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, -{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, -{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, -{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, -{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, -{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, -{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, -{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, -{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, -{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, -{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, -{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, -{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, -{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, -{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, -{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, -{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, -{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, -{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, -{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, -{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, -{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, -{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, -{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, -{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, -{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, -{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, -{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, -{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, -{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, -{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, -{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, -{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, -{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, -{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, -{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, -{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, -{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, -{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, -{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, -{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, -{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, -{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, -{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, -{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, -{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, -{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, -{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, -{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, -{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, -{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, -{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, -{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, -{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, -{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, -{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, -{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, -{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, -{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, -{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, -{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, -{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, -{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, -{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, -{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, -{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, -{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, -{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, -{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, -{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, -{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, -{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, -{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, -{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, -{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, -{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, -{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, -{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, -{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, -{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, -{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, -{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, -{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, -{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, -{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, -{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, -{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, -{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, -{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, -{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, -{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, -{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, -{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, -{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, -{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, -{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, -{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, -{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, -{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, -{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, -{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, -{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, -{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, -{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, -{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, -{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, -{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, -{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, -{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, -{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, -{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, -{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, -{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, -{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, -{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, -{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, -{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, -{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, -{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, -{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, -{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, -{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, -{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, -{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, -{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, -{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, -{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, -{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, -{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, -{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, -{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, -{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, -{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, -{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, -{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, -{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, -{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, -{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, -{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, -{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, -{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, -{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, -{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, -{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, -{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, -{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, -{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, -{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, -{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, -{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, -{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, -{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, -{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, -{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, -{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, -{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, -{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, -{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, -{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, -{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, -{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, -{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, -{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, -{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, -{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, -{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, -{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, -{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, -{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, -{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, -{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, -{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, -{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, -{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, -{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, -{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, -{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, -{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, -{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, -{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, -{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, -{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, -{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, -{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, -{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, -{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, -{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, -{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, -{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, -{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, -{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, -{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, -{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, -{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, -{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, -{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, -{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, -{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, -{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, -{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, -{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, -{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, -{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, -{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, -{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, -{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, -{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, -{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, -{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, -{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, -{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, -{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, -{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, -{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, -{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, -{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, -{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, -{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, -{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, -{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, -{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, -{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, -{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, -{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, -{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, -{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, -{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, -{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, -{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, -{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, -{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, -{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, -{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, -{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, -{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, -{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, -{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, -{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, -{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, -{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, -{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, -{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, -{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, -{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, -{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, -{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, -{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, -{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, -{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, -{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, -{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, -{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, -{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, -{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, -{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, -{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, -{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, -{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, -{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, -{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, -{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, -{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, -{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, -{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, -{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, -{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, -{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, -{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, -{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, -{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, -{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, -{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, -{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, -{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, -{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, -{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, -{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, -{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, -{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, -{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, -{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, -{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, -{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, -{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, -{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, -{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, -{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, -{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, -{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, -{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, -{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, -{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, -{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, -{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, -{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, -{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, -{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, -{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, -{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, -{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, -{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, -{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, -{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, -{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, -{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, -{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, -{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, -{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, -{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, -{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, -{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, -{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, -{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, -{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, -{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, -{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, -{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, -{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, -{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, -{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, -{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, -{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, -{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, -{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, -{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, -{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, -{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, -{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, -{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, -{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, -{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, -{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, -{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, -{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, -{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, -{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, -{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, -{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, -{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, -{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, -{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, -{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, -{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, -{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, -{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, -{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, -{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, -{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, -{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, -{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, -{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, -{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, -{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, -{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, -{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, -{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, -{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, -{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, -{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, -{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, -{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, -{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, -{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, -{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, -{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, -{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, -{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, -{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, -{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, -{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, -{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, -{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, -{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, -{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, -{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, -{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, -{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, -{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, -{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, -{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, -{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, -{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, -{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, -{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, -{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, -{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, -{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, -{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, -{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, -{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, -{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, -{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, -{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, -{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, -{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, -{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, -{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, -{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, -{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, -{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, -{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, -{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, -{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, -{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, -{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, -{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, -{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, -{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, -{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, -{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, -{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, -{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, -{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, -{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, -{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, -{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, -{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, -{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, -{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, -{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, -{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, -{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, -{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, -{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, -{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, -{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, -{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, -{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, -{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, -{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, -{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, -{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, -{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, -{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, -{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, -{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, -{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, -{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, -{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, -{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, -{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, -{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, -{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, -{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, -{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, -{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, -{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, -{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, -{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, -{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, -{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, -{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, -{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, -{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, -{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, -{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, -{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, -{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, -{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, -{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, -{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, -{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, -{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, -{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, -{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, -{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, -{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, -{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, -{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, -{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, -{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, -{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, -{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, -{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, -{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, -{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, -{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, -{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, -{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, -{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, -{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, -{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, -{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, -{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, -{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, -{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, -{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, -{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, -{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, -{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, -{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, -{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, -{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, -{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, -{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, -{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, -{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, -{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, -{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, -{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, -{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, -{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, -{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, -{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, -{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, -{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, -{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, -{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, -{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, -{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, -{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, -{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, -{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, -{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, -{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, -{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, -{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, -{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, -{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, -{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, -{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, -{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, -{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, -{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, -{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, -{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, -{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, -{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, -{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, -{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, -{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, -{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, -{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, -{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, -{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, -{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, -{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, -{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, -{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, -{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, -{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, -{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, -{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, -{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, -{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, -{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, -{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, -{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, -{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, -{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, -{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, -{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, -{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, -{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, -{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, -{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, -{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, -{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, -{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, -{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, -{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, -{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, -{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, -{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, -{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, -{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, -{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, -{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, -{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, -{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, -{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, -{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, -{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, -{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, -{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, -{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, -{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, -{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, -{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, -{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, -{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, -{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, -{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, -{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, -{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, -{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, -{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, -{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, -{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, -{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, -{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, -{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, -{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, -{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, -{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, -{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, -{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, -{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, -{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, -{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, -{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, -{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, -{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, -{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, -{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, -{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, -{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, -{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, -{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, -{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, -{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, -{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, -{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, -{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, -{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, -{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, -{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, -{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, -{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, -{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, -{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, -{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, -{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, -{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, -{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, -{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, -{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, -{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, -{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, -{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, -{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, -{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, -{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, -{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, -{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, -{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, -{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, -{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, -{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, -{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, -{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, -{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, -{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, -{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, -{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, -{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, -{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, -{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, -{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, -{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, -{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, -{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, -{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, -{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, -{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, -{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, -{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, -{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, -{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, -{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, -{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, -{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, -{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, -{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, -{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, -{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, -{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, -{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, -{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, -{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, -{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, -{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, -{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, -{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, -{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, -{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, -{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, -{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, -{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, -{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, -{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, -{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, -{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, -{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, -{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, -{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, -{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, -{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, -{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, -{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, -{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, -{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, -{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, -{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, -{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, -{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, -{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, -{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, -{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, -{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, -{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, -{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, -{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, -{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, -{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, -{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, -{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, -{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, -{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, -{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, -{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, -{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, -{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, -{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, -{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, -{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, -{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, -{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, -{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, -{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, -{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, -{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, -{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, -{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, -{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, -{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, -{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, -{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, -{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, -{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, -{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, -{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, -{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, -{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, -{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, -{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, -{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, -{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, -{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, -{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, -{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, -{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, -{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, -{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, -{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, -{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, -{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, -{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, -{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, -{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, -{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, -{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, -{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, -{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, -{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, -{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, -{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, -{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, -{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, -{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, -{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, -{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, -{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, -{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, -{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, -{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, -{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, -{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, -{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, -{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, -{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, -{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, -{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, -{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, -{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, -{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, -{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, -{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, -{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, -{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, -{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, -{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, -{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, -{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, -{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, -{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, -{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, -{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, -{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, -{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, -{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, -{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, -{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, -{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, -{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, -{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, -{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, -{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, -{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, -{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, -{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, -{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, -{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, -{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, -{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, -{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, -{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, -{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, -{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, -{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, -{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, -{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, -{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, -{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, -{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, -{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, -{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, -{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, -{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, -{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, -{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, -{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, -{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, -{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, -{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, -{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, -{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, -{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, -{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, -{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, -{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, -{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, -{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, -{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, -{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, -{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, -{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, -{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, -{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, -{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, -{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, -{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, -{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, -{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, -{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, -{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, -{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, -{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, -{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, -{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, -{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, -{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, -{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, -{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, -{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, -{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, -{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, -{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, -{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, -{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, -{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, -{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, -{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, -{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, -{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, -{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, -{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, -{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, -{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, -{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, -{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, -{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, -{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, -{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, -{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, -{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, -{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, -{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, -{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, -{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, -{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, -{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, -{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, -{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, -{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, -{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, -{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, -{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, -{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, -{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, -{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, -{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, -{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, -{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, -{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, -{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, -{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, -{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, -{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, -{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, -{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, -{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, -{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, -{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, -{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, -{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, -{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, -{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, -{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, -{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, -{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, -{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, -{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, -{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, -{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, -{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, -{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, -{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, -{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, -{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, -{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, -{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, -{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, -{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, -{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, -{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, -{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, -{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, -{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, -{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, -{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, -{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, -{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, -{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, -{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, -{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, -{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, -{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, -{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, -{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, -{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, -{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, -{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, -{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, -{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, -{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, -{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, -{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, -{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, -{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, -{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, -{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, -{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, -{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, -{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, -{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, -{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, -{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, -{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, -{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, -{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, -{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, -{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, -{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, -{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, -{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, -{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, -{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, -{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, -{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, -{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, -{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, -{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, -{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, -{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, -{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, -{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, -{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, -{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, -{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, -{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, -{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, -{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, -{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, -{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, -{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, -{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, -{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, -{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, -{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, -{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, -{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, -{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, -{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, -{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, -{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, -{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, -{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, -{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, -{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, -{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, -{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, -{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, -{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, -{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, -{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, -{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, -{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, -{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, -{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, -{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, -{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, -{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, -{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, -{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, -{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, -{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, -{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, -{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, -{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, -{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, -{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, -{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, -{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, -{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, -{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, -{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, -{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, -{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, -{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, -{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, -{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, -{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, -{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, -{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, -{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, -{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, -{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, -{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, -{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, -{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, -{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, -{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, -{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, -{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, -{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, -{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, -{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, -{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, -{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, -{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, -{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, -{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, -{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, -{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, -{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, -{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, -{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, -{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, -{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, -{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, -{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, -{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, -{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, -{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, -{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, -{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, -{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, -{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, -{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, -{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, -{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, -{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, -{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, -{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, -{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, -{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, -{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, -{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, -{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, -{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, -{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, -{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, -{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, -{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, -{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, -{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, -{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, -{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, -{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, -{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, -{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, -{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, -{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, -{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, -{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, -{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, -{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, -{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, -{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, -{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, -{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, -{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, -{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, -{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, -{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, -{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, -{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, -{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, -{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, -{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, -{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, -{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, -{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, -{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, -{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, -{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, -{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, -{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, -{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, -{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, -{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, -{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, -{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, -{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, -{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, -{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, -{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, -{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, -{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, -{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, -{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, -{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, -{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, -{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, -{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, -{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, -{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, -{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, -{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, -{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, -{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, -{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, -{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, -{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, -{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, -{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, -{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, -{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, -{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, -{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, -{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, -{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, -{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, -{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, -{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, -{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, -{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, -{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, -{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, -{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, -{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, -{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, -{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, -{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, -{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, -{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, -{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, -{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, -{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, -{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, -{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, -{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, -{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, -{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, -{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, -{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, -{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, -{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, -{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, -{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, -{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, -{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, -{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, -{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, -{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, -{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, -{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, -{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, -{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, -{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, -{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, -{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, -{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, -{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, -{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, -{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, -{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, -{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, -{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, -{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, -{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, -{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, -{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, -{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, -{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, -{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, -{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, -{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, -{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, -{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, -{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, -{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, -{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, -{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, -{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, -{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, -{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, -{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, -{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, -{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, -{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, -{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, -{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, -{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, -{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, -{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, -{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, -{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, -{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, -{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, -{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, -{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, -{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, -{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, -{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, -{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, -{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, -{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, -{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, -{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, -{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, -{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, -{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, -{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, -{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, -{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, -{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, -{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, -{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, -{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, -{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, -{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, -{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, -{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, -{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, -{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, -{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, -{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, -{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, -{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, -{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, -{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, -{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, -{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, -{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, -{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, -{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, -{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, -{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, -{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, -{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, -{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, -{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, -{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, -{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, -{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, -{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, -{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, -{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, -{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, -{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, -{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, -{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, -{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, -{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, -{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, -{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, -{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, -{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, -{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, -{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, -{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, -{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, -{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, -{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, -{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, -{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, -{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, -{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, -{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, -{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, -{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, -{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, -{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, -{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, -{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, -{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, -{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, -{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, -{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, -{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, -{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, -{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, -{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, -{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, -{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, -{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, -{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, -{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, -{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, -{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, -{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, -{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, -{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, -{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, -{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, -{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, -{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, -{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, -{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, -{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, -{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, -{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, -{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, -{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, -{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, -{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, -{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, -{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, -{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, -{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, -{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, -{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, -{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, -{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, -{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, -{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, -{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, -{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, -{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, -{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, -{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, -{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, -{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, -{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, -{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, -{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, -{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, -{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, -{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, -{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, -{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, -{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, -{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, -{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, -{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, -{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, -{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, -{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, -{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, -{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, -{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, -{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, -{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, -{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, -{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, -{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, -{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, -{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, -{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, -{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, -{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, -{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, -{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, -{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, -{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, -{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, -{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, -{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, -{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, -{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, -{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, -{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, -{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, -{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, -{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, -{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, -{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, -{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, -{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, -{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, -{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, -{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, -{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, -{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, -{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, -{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, -{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, -{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, -{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, -{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, -{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, -{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, -{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, -{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, -{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, -{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, -{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, -{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, -{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, -{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, -{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, -{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, -{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, -{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, -{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, -{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, -{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, -{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, -{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, -{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, -{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, -{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, -{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, -{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, -{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, -{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, -{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, -{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, -{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, -{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, -{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, -{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, -{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, -{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, -{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, -{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, -{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, -{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, -{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, -{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, -{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, -{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, -{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, -{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, -{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, -{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, -{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, -{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, -{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, -{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, -{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, -{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, -{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, -{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, -{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, -{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, -{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, -{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, -{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, -{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, -{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, -{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, -{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, -{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, -{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, -{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, -{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, -{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, -{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, -{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, -{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, -{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, -{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, -{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, -{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, -{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, -{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, -{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, -{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, -{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, -{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, -{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, -{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, -{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, -{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, -{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, -{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, -{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, -{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, -{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, -{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, -{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, -{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, -{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, -{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, -{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, -{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, -{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, -{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, -{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, -{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, -{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, -{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, -{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, -{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, -{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, -{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, -{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, -{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, -{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, -{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, -{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, -{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, -{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, -{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, -{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, -{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, -{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, -{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, -{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, -{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, -{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, -{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, -{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, -{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, -{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, -{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, -{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, -{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, -{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, -{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, -{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, -{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, -{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, -{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, -{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, -{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, -{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, -{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, -{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, -{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, -{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, -{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, -{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, -{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, -{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, -{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, -{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, -{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, -{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, -{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, -{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, -{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, -{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, -{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, -{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, -{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, -{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, -{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, -{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, -{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, -{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, -{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, -{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, -{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, -{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, -{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, -{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, -{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, -{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, -{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, -{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, -{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, -{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, -{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, -{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, -{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, -{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, -{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, -{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, -{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, -{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, -{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, -{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, -{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, -{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, -{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, -{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, -{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, -{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, -{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, -{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, -{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, -{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, -{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, -{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, -{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, -{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, -{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, -{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, -{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, -{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, -{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, -{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, -{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, -{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, -{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, -{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, -{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, -{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, -{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, -{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, -{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, -{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, -{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, -{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, -{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, -{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, -{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, -{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, -{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, -{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, -{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, -{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, -{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, -{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, -{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, -{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, -{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, -{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, -{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, -{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, -{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, -{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, -{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, -{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, -{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, -{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, -{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, -{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, -{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, -{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, -{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, -{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, -{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, -{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, -{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, -{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, -{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, -{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, -{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, -{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, -{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, -{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, -{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, -{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, -{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, -{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, -{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, -{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, -{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, -{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, -{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, -{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, -{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, -{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, -{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, -{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, -{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, -{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, -{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, -{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, -{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, -{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, -{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, -{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, -{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, -{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, -{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, -{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, -{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, -{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, -{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, -{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, -{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, -{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, -{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, -{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, -{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, -{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, -{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, -{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, -{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, -{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, -{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, -{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, -{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, -{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, -{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, -{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, -{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, -{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, -{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, -{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, -{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, -{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, -{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, -{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, -{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, -{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, -{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, -{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, -{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, -{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, -{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, -{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, -{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, -{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, -{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, -{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, -{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, -{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, -{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, -{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, -{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, -{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, -{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, -{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, -{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, -{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, -{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, -{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, -{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, -{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, -{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, -{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, -{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, -{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, -{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, -{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, -{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, -{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, -{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, -{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, -{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, -{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, -{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, -{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, -{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, -{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, -{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, -{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, -{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, -{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, -{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, -{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, -{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, -{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, -{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, -{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, -{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, -{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, -{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, -{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, -{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, -{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, -{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, -{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, -{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, -{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, -{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, -{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, -{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, -{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, -{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, -{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, -{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, -{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, -{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, -{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, -{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, -{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, -{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, -{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, -{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, -{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, -{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, -{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, -{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, -{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, -{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, -{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, -{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, -{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, -{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, -{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, -{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, -{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, -{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, -{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, -{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, -{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, -{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, -{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, -{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, -{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, -{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, -{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, -{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, -{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, -{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, -{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, -{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, -{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, -{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, -{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, -{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, -{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, -{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, -{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, -{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, -{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, -{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, -{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, -{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, -{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, -{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, -{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, -{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, -{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, -{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, -{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, -{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, -{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, -{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, -{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, -{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, -{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, -{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, -{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, -{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, -{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, -{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, -{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, -{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, -{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, -{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, -{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, -{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, -{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, -{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, -{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, -{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, -{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, -{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, -{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, -{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, -{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, -{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, -{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, -{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, -{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, -{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, -{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, -{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, -{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, -{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, -{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, -{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, -{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, -{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, -{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, -{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, -{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, -{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, -{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, -{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, -{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, -{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, -{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, -{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, -{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, -{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, -{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, -{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, -{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, -{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, -{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, -{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, -{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, -{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, -{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, -{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, -{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, -{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, -{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, -{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, -{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, -{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, -{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, -{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, -{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, -{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, -{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, -{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, -{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, -{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, -{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, -{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, -{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, -{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, -{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, -{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, -{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, -{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, -{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, -{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, -{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, -{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, -{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, -{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, -{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, -{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, -{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, -{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, -{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, -{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, -{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, -{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, -{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, -{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, -{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, -{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, -{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, -{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, -{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, -{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, -{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, -{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, -{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, -{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, -{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, -{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, -{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, -{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, -{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, -{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, -{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, -{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, -{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, -{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, -{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, -{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, -{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, -{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, -{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, -{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, -{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, -{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, -{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, -{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, -{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, -{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, -{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, -{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, -{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, -{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, -{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, -{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, -{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, -{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, -{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, -{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, -{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, -{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, -{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, -{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, -{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, -{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, -{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, -{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, -{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, -{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, -{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, -{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, -{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, -{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, -{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, -{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, -{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, -{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, -{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, -{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, -{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, -{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, -{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, -{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, -{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, -{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, -{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, -{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, -{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, -{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, -{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, -{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, -{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, -{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, -{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, -{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, -{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, -{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, -{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, -{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, -{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, -{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, -{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, -{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, -{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, -{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, -{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, -{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, -{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, -{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, -{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, -{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, -{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, -{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, -{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, -{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, -{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, -{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, -{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, -{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, -{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, -{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, -{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, -{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, -{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, -{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, -{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, -{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, -{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, -{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, -{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, -{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, -{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, -{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, -{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, -{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, -{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, -{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, -{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, -{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, -{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, -{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, -{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, -{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, -{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, -{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, -{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, -{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, -{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, -{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, -{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, -{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, -{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, -{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, -{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, -{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, -{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, -{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, -{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, -{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, -{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, -{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, -{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, -{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, -{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, -{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, -{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, -{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, -{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, -{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, -{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, -{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, -{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, -{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, -{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, -{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, -{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, -{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, -{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, -{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, -{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, -{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, -{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, -{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, -{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, -{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, -{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, -{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, -{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, -{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, -{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, -{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, -{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, -{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, -{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, -{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, -{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, -{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, -{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, -{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, -{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, -{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, -{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, -{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, -{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, -{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, -{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, -{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, -{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, -{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, -{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, -{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, -{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, -{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, -{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, -{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, -{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, -{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, -{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, -{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, -{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, -{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, -{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, -{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, -{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, -{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, -{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, -{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, -{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, -{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, -{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, -{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, -{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, -{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, -{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, -{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, -{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, -{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, -{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, -{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, -{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, -{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, -{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, -{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, -{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, -{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, -{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, -{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, -{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, -{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, -{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, -{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, -{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, -{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, -{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, -{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, -{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, -{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, -{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, -{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, -{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, -{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, -{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, -{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, -{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, -{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, -{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, -{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, -{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, -{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, -{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, -{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, -{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, -{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, -{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, -{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, -{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, -{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, -{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, -{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, -{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, -{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, -{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, -{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, -{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, -{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, -{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, -{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, -{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, -{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, -{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, -{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, -{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, -{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, -{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, -{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, -{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, -{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, -{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, -{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, -{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, -{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, -{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, -{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, -{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, -{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, -{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, -{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, -{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, -{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, -{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, -{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, -{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, -{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, -{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, -{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, -{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, -{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, -{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, -{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, -{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, -{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, -{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, -{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, -{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, -{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, -{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, -{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, -{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, -{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, -{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, -{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, -{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, -{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, -{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, -{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, -{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, -{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, -{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, -{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, -{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, -{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, -{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, -{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, -{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, -{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, -{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, -{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, -{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, -{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, -{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, -{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, -{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, -{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, -{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, -{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, -{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, -{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, -{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, -{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, -{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, -{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, -{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, -{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, -{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, -{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, -{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, -{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, -{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, -{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, -{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, -{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, -{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, -{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, -{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, -{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, -{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, -{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, -{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, -{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, -{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, -{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, -{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, -{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, -{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, -{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, -{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, -{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, -{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, -{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, -{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, -{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, -{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, -{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, -{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, -{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, -{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, -{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, -{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, -{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, -{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, -{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, -{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, -{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, -{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, -{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, -{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, -{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, -{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, -{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, -{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, -{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, -{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, -{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, -{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, -{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, -{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, -{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, -{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, -{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, -{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, -{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, -{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, -{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, -{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, -{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, -{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, -{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, -{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, -{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, -{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, -{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, -{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, -{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, -{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, -{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, -{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, -{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, -{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, -{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, -{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, -{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, -{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, -{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, -{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, -{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, -{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, -{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, -{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, -{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, -{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, -{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, -{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, -{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, -{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, -{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, -{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, -{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, -{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, -{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, -{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, -{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, -{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, -{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, -{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, -{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, -{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, -{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, -{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, -{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, -{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, -{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, -{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, -{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, -{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, -{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, -{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, -{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, -{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, -{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, -{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, -{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, -{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, -{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, -{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, -{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, -{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, -{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, -{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, -{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, -{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, -{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, -{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, -{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, -{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, -{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, -{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, -{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, -{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, -{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, -{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, -{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, -{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, -{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, -{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, -{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, -{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, -{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, -{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, -{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, -{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, -{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, -{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, -{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, -{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, -{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, -{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, -{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, -{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, -{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, -{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, -{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, -{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, -{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, -{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, -{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, -{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, -{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, -{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, -{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, -{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, -{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, -{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, -{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, -{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, -{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, -{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, -{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, -{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, -{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, -{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, -{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, -{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, -{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, -{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, -{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, -{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, -{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, -{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, -{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, -{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, -{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, -{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, -{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, -{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, -{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, -{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, -{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, -{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, -{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, -{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, -{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, -{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, -{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, -{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, -{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, -{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, -{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, -{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, -{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, -{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, -{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, -{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, -{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, -{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, -{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, -{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, -{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, -{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, -{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, -{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, -{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, -{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, -{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, -{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, -{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, -{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, -{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, -{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, -{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, -{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, -{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, -{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, -{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, -{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, -{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, -{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, -{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, -{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, -{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, -{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, -{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, -{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, -{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, -{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, -{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, -{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, -{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, -{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, -{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, -{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, -{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, -{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, -{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, -{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, -{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, -{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, -{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, -{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, -{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, -{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, -{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, -{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, -{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, -{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, -{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, -{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, -{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, -{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, -{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, -{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, -{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, -{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, -{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, -{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, -{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, -{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, -{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, -{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, -{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, -{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, -{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, -{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, -{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, -{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, -{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, -{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, -{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, -{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, -{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, -{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, -{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, -{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, -{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, -{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, -{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, -{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, -{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, -{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, -{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, -{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, -{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, -{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, -{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, -{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, -{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, -{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, -{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, -{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, -{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, -{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, -{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, -{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, -{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, -{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, -{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, -{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, -{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, -{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, -{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, -{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, -{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, -{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, -{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, -{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, -{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, -{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, -{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, -{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, -{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, -{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, -{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, -{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, -{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, -{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, -{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, -{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, -{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, -{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, -{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, -{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, -{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, -{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, -{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, -{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, -{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, -{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, -{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, -{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, -{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, -{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, -{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, -{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, -{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, -{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, -{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, -{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, -{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, -{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, -{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, -{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, -{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, -{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, -{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, -{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, -{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, -{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, -{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, -{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, -{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, -{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, -{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, -{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, -{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, -{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, -{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, -{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, -{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, -{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, -{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, -{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, -{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, -{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, -{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, -{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, -{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, -{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, -{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, -{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, -{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, -{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, -{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, -{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, -{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, -{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, -{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, -{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, -{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, -{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, -{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, -{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, -{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, -{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, -{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, -{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, -{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, -{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, -{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, -{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, -{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, -{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, -{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, -{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, -{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, -{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, -{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, -{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, -{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, -{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, -{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, -{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, -{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, -{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, -{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, -{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, -{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, -{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, -{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, -{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, -{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, -{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, -{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, -{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, -{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, -{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, -{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, -{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, -{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, -{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, -{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, -{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, -{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, -{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, -{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, -{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, -{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, -{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, -{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, -{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, -{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, -{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, -{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, -{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, -{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, -{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, -{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, -{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, -{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, -{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, -{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, -{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, -{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, -{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, -{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, -{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, -{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, -{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, -{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, -{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, -{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, -{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, -{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, -{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, -{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, -{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, -{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, -{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, -{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, -{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, -{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, -{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, -{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, -{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, -{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, -{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, -{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, -{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, -{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, -{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, -{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, -{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, -{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, -{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, -{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, -{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, -{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, -{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, -{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, -{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, -{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, -{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, -{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, -{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, -{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, -{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, -{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, -{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, -{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, -{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, -{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, -{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, -{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, -{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, -{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, -{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, -{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, -{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, -{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, -{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, -{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, -{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, -{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, -{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, -{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, -{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, -{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, -{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, -{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, -{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, -{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, -{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, -{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, -{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, -{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, -{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, -{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, -{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, -{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, -{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, -{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, -{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, -{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, -{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, -{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, -{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, -{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, -{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, -{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, -{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, -{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, -{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, -{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, -{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, -{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, -{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, -{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, -{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, -{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, -{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, -{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, -{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, -{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, -{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, -{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, -{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, -{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, -{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, -{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, -{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, -{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, -{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, -{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, -{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, -{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, -{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, -{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, -{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, -{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, -{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, -{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, -{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, -{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, -{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, -{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, -{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, -{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, -{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, -{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, -{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, -{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, -{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, -{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, -{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, -{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, -{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, -{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, -{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, -{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, -{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, -{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, -{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, -{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, -{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, -{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, -{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, -{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, -{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, -{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, -{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, -{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, -{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, -{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, -{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, -{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, -{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, -{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, -{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, -{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, -{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, -{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, -{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, -{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, -{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, -{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, -{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, -{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, -{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, -{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, -{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, -{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, -{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, -{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, -{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, -{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, -{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, -{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, -{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, -{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, -{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, -{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, -{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, -{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, -{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, -{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, -{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, -{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, -{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, -{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, -{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, -{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, -{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, -{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, -{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, -{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, -{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, -{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, -{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, -{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, -{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, -{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, -{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, -{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, -{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, -{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, -{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, -{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, -{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, -{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, -{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, -{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, -{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, -{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, -{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, -{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, -{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, -{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, -{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, -{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, -{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, -{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, -{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, -{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, -{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, -{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, -{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, -{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, -{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, -{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, -{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, -{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, -{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, -{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, -{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, -{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, -{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, -{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, -{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, -{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, -{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, -{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, -{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, -{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, -{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, -{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, -{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, -{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, -{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, -{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, -{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, -{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, -{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, -{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, -{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, -{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, -{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, -{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, -{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, -{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, -{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, -{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, -{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, -{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, -{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, -{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, -{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, -{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, -{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, -{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, -{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, -{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, -{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, -{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, -{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, -{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, -{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, -{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, -{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, -{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, -{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, -{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, -{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, -{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, -{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, -{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, -{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, -{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, -{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, -{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, -{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, -{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, -{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, -{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, -{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, -{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, -{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, -{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, -{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, -{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, -{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, -{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, -{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, -{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, -{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, -{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, -{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, -{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, -{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, -{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, -{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, -{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, -{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, -{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, -{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, -{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, -{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, -{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, -{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, -{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, -{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, -{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, -{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, -{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, -{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, -{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, -{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, -{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, -{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, -{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, -{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, -{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, -{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, -{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, -{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, -{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, -{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, -{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, -{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, -{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, -{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, -{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, -{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, -{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, -{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, -{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, -{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, -{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, -{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, -{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, -{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, -{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, -{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, -{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, -{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, -{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, -{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, -{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, -{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, -{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, -{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, -{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, -{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, -{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, -{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, -{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, -{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, -{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, -{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, -{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, -{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, -{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, -{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, -{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, -{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, -{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, -{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, -{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, -{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, -{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, -{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, -{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, -{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, -{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, -{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, -{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, -{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, -{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, -{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, -{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, -{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, -{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, -{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, -{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, -{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, -{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, -{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, -{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, -{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, -{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, -{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, -{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, -{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, -{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, -{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, -{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, -{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, -{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, -{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, -{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, -{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, -{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, -{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, -{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, -{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, -{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, -{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, -{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, -{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, -{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, -{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, -{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, -{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, -{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, -{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, -{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, -{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, -{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, -{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, -{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, -{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, -{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, -{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, -{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, -{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, -{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, -{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, -{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, -{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, -{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, -{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, -{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, -{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, -{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, -{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, -{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, -{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, -{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, -{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, -{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, -{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, -{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, -{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, -{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, -{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, -{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, -{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, -{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, -{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, -{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, -{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, -{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, -{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, -{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, -{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, -{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, -{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, -{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, -{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, -{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, -{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, -{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, -{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, -{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, -{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, -{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, -{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, -{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, -{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, -{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, -{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, -{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, -{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, -{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, -{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, -{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, -{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, -{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, -{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, -{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, -{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, -{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, -{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, -{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, -{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, -{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, -{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, -{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, -{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, -{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, -{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, -{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, -{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, -{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, -{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, -{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, -{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, -{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, -{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, -{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, -{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, -{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, -{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, -{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, -{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, -{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, -{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, -{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, -{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, -{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, -{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, -{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, -{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, -{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, -{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, -{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, -{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, -{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, -{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, -{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, -{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, -{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, -{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, -{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, -{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, -{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, -{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, -{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, -{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, -{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, -{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, -{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, -{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, -{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, -{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, -{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, -{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, -{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, -{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, -{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, -{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, -{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, -{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, -{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, -{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, -{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, -{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, -{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, -{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, -{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, -{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, -{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, -{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, -{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, -{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, -{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, -{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, -{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, -{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, -{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, -{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, -{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, -{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, -{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, -{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, -{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, -{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, -{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, -{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, -{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, -{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, -{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, -{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, -{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, -{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, -{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, -{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, -{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, -{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, -{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, -{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, -{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, -{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, -{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, -{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, -{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, -{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, -{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, -{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, -{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, -{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, -{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, -{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, -{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, -{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, -{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, -{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, -{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, -{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, -{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, -{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, -{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, -{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, -{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, -{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, -{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, -{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, -{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, -{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, -{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, -{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, -{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, -{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, -{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, -{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, -{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, -{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, -{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, -{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, -{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, -{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, -{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, -{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, -{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, -{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, -{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, -{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, -{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, -{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, -{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, -{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, -{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, -{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, -{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, -{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, -{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, -{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, -{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, -{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, -{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, -{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, -{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, -{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, -{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, -{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, -{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, -{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, -{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, -{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, -{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, -{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, -{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, -{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, -{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, -{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, -{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, -{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, -{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, -{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, -{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, -{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, -{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, -{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, -{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, -{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, -{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, -{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, -{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, -{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, -{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, -{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, -{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, -{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, -{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, -{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, -{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, -{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, -{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, -{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, -{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, -{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, -{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, -{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, -{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, -{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, -{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, -{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, -{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, -{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, -{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, -{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, -{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, -{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, -{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, -{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, -{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, -{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, -{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, -{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, -{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, -{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, -{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, -{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, -{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, -{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, -{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, -{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, -{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, -{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, -{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, -{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, -{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, -{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, -{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, -{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, -{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, -{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, -{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, -{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, -{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, -{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, -{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, -{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, -{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, -{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, -{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, -{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, -{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, -{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, -{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, -{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, -{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, -{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, -{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, -{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, -{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, -{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, -{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, -{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, -{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, -{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, -{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, -{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, -{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, -{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, -{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, -{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, -{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, -{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, -{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, -{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, -{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, -{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, -{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, -{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, -{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, -{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, -{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, -{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, -{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, -{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, -{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, -{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, -{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, -{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, -{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, -{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, -{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, -{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, -{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, -{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, -{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, -{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, -{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, -{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, -{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, -{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, -{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, -{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, -{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, -{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, -{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, -{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, -{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, -{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, -{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, -{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, -{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, -{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, -{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, -{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, -{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, -{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, -{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, -{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, -{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, -{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, -{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, -{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, -{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, -{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, -{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, -{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, -{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, -{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, -{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, -{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, -{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, -{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, -{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, -{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, -{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, -{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, -{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, -{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, -{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, -{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, -{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, -{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, -{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, -{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, -{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, -{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, -{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, -{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, -{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, -{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, -{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, -{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, -{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, -{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, -{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, -{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, -{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, -{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, -{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, -{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, -{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, -{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, -{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, -{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, -{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, -{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, -{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, -{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, -{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, -{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, -{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, -{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, -{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, -{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, -{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, -{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, -{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, -{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, -{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, -{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, -{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, -{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, -{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, -{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, -{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, -{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, -{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, -{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, -{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, -{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, -{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, -{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, -{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, -{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, -{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, -{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, -{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, -{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, -{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, -{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, -{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, -{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, -{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, -{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, -{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, -{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, -{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, -{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, -{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, -{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, -{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, -{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, -{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, -{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, -{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, -{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, -{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, -{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, -{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, -{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, -{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, -{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, -{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, -{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, -{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, -{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, -{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, -{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, -{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, -{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, -{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, -{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, -{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, -{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, -{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, -{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, -{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, -{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, -{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, -{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, -{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, -{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, -{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, -{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, -{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, -{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, -{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, -{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, -{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, -{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, -{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, -{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, -{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, -{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, -{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, -{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, -{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, -{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, -{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, -{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, -{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, -{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, -{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, -{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, -{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, -{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, -{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, -{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, -{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, -{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, -{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, -{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, -{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, -{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, -{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, -{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, -{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, -{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, -{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, -{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, -{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, -{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, -{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, -{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, -{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, -{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, -{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, -{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, -{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, -{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, -{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, -{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, -{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, -{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, -{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, -{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, -{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, -{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, -{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, -{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, -{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, -{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, -{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, -{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, -{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, -{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, -{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, -{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, -{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, -{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, -{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, -{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, -{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, -{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, -{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, -{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, -{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, -{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, -{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, -{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, -{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, -{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, -{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, -{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, -{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, -{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, -{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, -{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, -{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, -{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, -{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, -{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, -{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, -{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, -{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, -{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, -{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, -{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, -{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, -{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, -{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, -{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, -{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, -{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, -{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, -{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, -{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, -{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, -{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, -{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, -{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, -{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, -{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, -{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, -{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, -{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, -{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, -{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, -{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, -{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, -{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, -{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, -{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, -{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, -{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, -{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, -{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, -{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, -{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, -{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, -{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, -{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, -{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, -{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, -{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, -{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, -{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, -{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, -{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, -{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, -{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, -{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, -{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, -{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, -{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, -{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, -{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, -{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, -{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, -{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, -{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, -{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, -{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, -{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, -{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, -{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, -{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, -{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, -{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, -{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, -{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, -{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, -{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, -{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, -{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, -{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, -{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, -{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, -{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, -{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, -{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, -{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, -{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, -{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, -{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, -{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, -{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, -{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, -{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, -{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, -{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, -{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, -{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, -{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, -{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, -{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, -{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, -{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, -{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, -{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, -{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, -{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, -{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, -{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, -{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, -{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, -{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, -{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, -{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, -{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, -{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, -{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, -{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, -{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, -{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, -{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, -{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, -{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, -{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, -{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, -{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, -{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, -{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, -{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, -{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, -{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, -{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, -{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, -{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, -{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, -{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, -{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, -{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, -{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, -{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, -{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, -{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, -{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, -{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, -{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, -{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, -{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, -{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, -{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, -{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, -{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, -{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, -{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, -{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, -{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, -{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, -{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, -{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, -{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, -{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, -{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, -{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, -{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, -{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, -{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, -{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, -{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, -{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, -{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, -{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, -{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, -{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, -{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, -{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, -{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, -{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, -{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, -{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, -{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, -{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, -{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, -{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, -{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, -{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, -{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, -{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, -{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, -{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, -{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, -{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, -{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, -{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, -{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, -{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, -{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, -{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, -{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, -{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, -{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, -{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, -{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, -{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, -{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, -{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, -{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, -{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, -{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, -{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, -{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, -{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, -{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, -{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, -{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, -{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, -{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, -{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, -{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, -{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, -{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, -{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, -{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, -{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, -{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, -{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, -{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, -{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, -{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, -{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, -{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, -{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, -{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, -{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, -{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, -{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, -{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, -{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, -{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, -{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, -{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, -{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, -{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, -{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, -{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, -{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, -{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, -{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, -{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, -{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, -{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, -{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, -{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, -{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, -{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} -]} diff --git a/node_modules/JSONStream/test/fixtures/couch_sample.json b/node_modules/JSONStream/test/fixtures/couch_sample.json deleted file mode 100644 index b154c86..0000000 --- a/node_modules/JSONStream/test/fixtures/couch_sample.json +++ /dev/null @@ -1,18 +0,0 @@ -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - }, -]} diff --git a/node_modules/JSONStream/test/fixtures/depth.json b/node_modules/JSONStream/test/fixtures/depth.json deleted file mode 100644 index 9b4bfb9..0000000 --- a/node_modules/JSONStream/test/fixtures/depth.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "total": 5, - "docs": [ - { - "key": { - "value": 0, - "some": "property" - } - }, - {"value": [1]}, - {"value": {"a":2}}, - {"blbl": [{}, {"a":0, "b":1, "value":"3"}, 10]}, - {"value": 4} - ] -} diff --git a/node_modules/JSONStream/test/fixtures/error.json b/node_modules/JSONStream/test/fixtures/error.json deleted file mode 100644 index 9736f3e..0000000 --- a/node_modules/JSONStream/test/fixtures/error.json +++ /dev/null @@ -1 +0,0 @@ -{"error": "error_code", "message": "this is an error message"} diff --git a/node_modules/JSONStream/test/fixtures/header_footer.json b/node_modules/JSONStream/test/fixtures/header_footer.json deleted file mode 100644 index 6e4694d..0000000 --- a/node_modules/JSONStream/test/fixtures/header_footer.json +++ /dev/null @@ -1,19 +0,0 @@ -{"total_rows":129,"offset":0,"rows":[ - { "id":"change1_0.6995461115147918" - , "key":"change1_0.6995461115147918" - , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} - , "doc":{ - "_id": "change1_0.6995461115147918" - , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} - }, - { "id":"change2_0.6995461115147918" - , "key":"change2_0.6995461115147918" - , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} - , "doc":{ - "_id":"change2_0.6995461115147918" - , "_rev":"1-13677d36b98c0c075145bb8975105153" - , "hello":2 - } - } -], -"foo": {"bar": "baz"}} diff --git a/node_modules/JSONStream/test/fn.js b/node_modules/JSONStream/test/fn.js deleted file mode 100644 index 4acc672..0000000 --- a/node_modules/JSONStream/test/fn.js +++ /dev/null @@ -1,39 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -function fn (s) { - return !isNaN(parseInt(s, 10)) -} - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', fn]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/gen.js b/node_modules/JSONStream/test/gen.js deleted file mode 100644 index c233722..0000000 --- a/node_modules/JSONStream/test/gen.js +++ /dev/null @@ -1,135 +0,0 @@ -return // dont run this test for now since tape is weird and broken on 0.10 - -var fs = require('fs') -var JSONStream = require('../') -var file = process.argv[2] || '/tmp/JSONStream-test-large.json' -var size = Number(process.argv[3] || 100000) -var tape = require('tape') -// if (process.title !== 'browser') { - tape('out of mem', function (t) { - t.plan(1) - ////////////////////////////////////////////////////// - // Produces a random number between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomNumber = function (min, max) { - var number = Math.floor(Math.random() * (max - min + 1) + min); - return number; - }; - - ////////////////////////////////////////////////////// - // Produces a random string of a length between arg1 and arg2 - ////////////////////////////////////////////////////// - var randomString = function (min, max) { - - // add several spaces to increase chanses of creating 'words' - var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - var result = ''; - - var randomLength = randomNumber(min, max); - - for (var i = randomLength; i > 0; --i) { - result += chars[Math.round(Math.random() * (chars.length - 1))]; - } - return result; - }; - - ////////////////////////////////////////////////////// - // Produces a random JSON document, as a string - ////////////////////////////////////////////////////// - var randomJsonDoc = function () { - - var doc = { - "CrashOccurenceID": randomNumber(10000, 50000), - "CrashID": randomNumber(1000, 10000), - "SiteName": randomString(10, 25), - "MachineName": randomString(10, 25), - "Date": randomString(26, 26), - "ProcessDuration": randomString(18, 18), - "ThreadIdentityName": null, - "WindowsIdentityName": randomString(15, 40), - "OperatingSystemName": randomString(35, 65), - "DetailedExceptionInformation": randomString(100, 800) - }; - - doc = JSON.stringify(doc); - doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute - return doc; - }; - - ////////////////////////////////////////////////////// - // generates test data - ////////////////////////////////////////////////////// - var generateTestData = function (cb) { - - console.log('generating large data file...'); - - var stream = fs.createWriteStream(file, { - encoding: 'utf8' - }); - - var i = 0; - var max = size; - var writing = false - var split = ',\n'; - var doc = randomJsonDoc(); - stream.write('['); - - function write () { - if(writing) return - writing = true - while(++i < max) { - if(Math.random() < 0.001) - console.log('generate..', i + ' / ' + size) - if(!stream.write(doc + split)) { - writing = false - return stream.once('drain', write) - } - } - stream.write(doc + ']') - stream.end(); - console.log('END') - } - write() - stream.on('close', cb) - }; - - ////////////////////////////////////////////////////// - // Shows that parsing 100000 instances using JSONStream fails - // - // After several seconds, you will get this crash - // FATAL ERROR: JS Allocation failed - process out of memory - ////////////////////////////////////////////////////// - var testJSONStreamParse_causesOutOfMem = function (done) { - var items = 0 - console.log('parsing data files using JSONStream...'); - - var parser = JSONStream.parse([true]); - var stream = fs.createReadStream(file); - stream.pipe(parser); - - parser.on('data', function (data) { - items++ - if(Math.random() < 0.01) console.log(items, '...') - }); - - parser.on('end', function () { - t.equal(items, size) - }); - - }; - - ////////////////////////////////////////////////////// - // main - ////////////////////////////////////////////////////// - - fs.stat(file, function (err, stat) { - console.log(stat) - if(err) - generateTestData(testJSONStreamParse_causesOutOfMem); - else - testJSONStreamParse_causesOutOfMem() - }) - - }) - -// } diff --git a/node_modules/JSONStream/test/header_footer.js b/node_modules/JSONStream/test/header_footer.js deleted file mode 100644 index f18fc59..0000000 --- a/node_modules/JSONStream/test/header_footer.js +++ /dev/null @@ -1,55 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','header_footer.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) - , called = 0 - , headerCalled = 0 - , footerCalled = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('header', function (data) { - headerCalled ++ - it(data).deepEqual({ - total_rows: 129, - offset: 0 - }) -}) - -parser.on('footer', function (data) { - footerCalled ++ - it(data).deepEqual({ - foo: { bar: 'baz' } - }) -}) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - it(headerCalled).equal(1) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(headerCalled).equal(1) - it(footerCalled).equal(1) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/issues.js b/node_modules/JSONStream/test/issues.js deleted file mode 100644 index ea4c743..0000000 --- a/node_modules/JSONStream/test/issues.js +++ /dev/null @@ -1,34 +0,0 @@ -var JSONStream = require('../'); -var test = require('tape') - -test('#66', function (t) { - var error = 0; - var stream = JSONStream - .parse() - .on('error', function (err) { - t.ok(err); - error++; - }) - .on('end', function () { - t.ok(error === 1); - t.end(); - }); - - stream.write('["foo":bar['); - stream.end(); - -}); - -test('#81 - failure to parse nested objects', function (t) { - var stream = JSONStream - .parse('.bar.foo') - .on('error', function (err) { - t.error(err); - }) - .on('end', function () { - t.end(); - }); - - stream.write('{"bar":{"foo":"baz"}}'); - stream.end(); -}); diff --git a/node_modules/JSONStream/test/keys.js b/node_modules/JSONStream/test/keys.js deleted file mode 100644 index 747723d..0000000 --- a/node_modules/JSONStream/test/keys.js +++ /dev/null @@ -1,105 +0,0 @@ -var test = require('tape'); -var fs = require ('fs'); -var join = require('path').join; -var couch_sample_file = join(__dirname, 'fixtures','couch_sample.json'); -var JSONStream = require('../'); - -var fixture = { - obj: { - one: 1, - two: 2, - three: 3 - } -}; - -function assertFixtureKeys(stream, t) { - var keys = []; - var values = []; - stream.on('data', function(data) { - keys.push(data.key); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(keys, ['one', 'two', 'three']); - t.deepEqual(values, [1,2,3]); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -} - -test('keys via string', function(t) { - var stream = JSONStream.parse('obj.$*'); - assertFixtureKeys(stream, t); -}); - -test('keys via array', function(t) { - var stream = JSONStream.parse(['obj',{emitKey: true}]); - assertFixtureKeys(stream, t); -}); - -test('path via array', function(t) { - var stream = JSONStream.parse(['obj',{emitPath: true}]); - - var paths = []; - var values = []; - stream.on('data', function(data) { - console.log(JSON.stringify(data)); - paths.push(data.path); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(paths, [['obj', 'one'], ['obj', 'two'], ['obj', 'three']]); - t.deepEqual(values, [1,2,3]); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -}); - -test('advanced keys', function(t) { - var advanced = fs.readFileSync(couch_sample_file); - var stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]); - - var keys = []; - var values = []; - stream.on('data', function(data) { - keys.push(data.key); - values.push(data.value); - }); - - stream.on('end', function() { - t.deepEqual(keys, [ - '_id', '_rev', 'hello', - '_id', '_rev', 'hello' - ]); - t.deepEqual(values, [ - "change1_0.6995461115147918", "1-e240bae28c7bb3667f02760f6398d508", 1, - "change2_0.6995461115147918", "1-13677d36b98c0c075145bb8975105153", 2 - ]); - t.end(); - }); - stream.write(advanced); - stream.end(); -}); - -test('parent keys', function(t) { - var stream = JSONStream.parse('$*'); - var d = null; - stream.on('data', function(data) { - if(d) t.fail('should only be called once'); - d = data; - }); - - stream.on('end', function() { - t.deepEqual(d,{ - key: 'obj', - value: fixture.obj - }); - t.end(); - }); - stream.write(JSON.stringify(fixture)); - stream.end(); -}) diff --git a/node_modules/JSONStream/test/map.js b/node_modules/JSONStream/test/map.js deleted file mode 100644 index 29b9d89..0000000 --- a/node_modules/JSONStream/test/map.js +++ /dev/null @@ -1,40 +0,0 @@ - -var test = require('tape') - -var JSONStream = require('../') - -test('map function', function (t) { - - var actual = [] - - stream = JSONStream.parse([true], function (e) { return e*10 }) - stream.on('data', function (v) { actual.push(v)}) - stream.on('end', function () { - t.deepEqual(actual, [10,20,30,40,50,60]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - -test('filter function', function (t) { - - var actual = [] - - stream = JSONStream - .parse([true], function (e) { return e%2 ? e : null}) - .on('data', function (v) { actual.push(v)}) - .on('end', function () { - t.deepEqual(actual, [1,3,5]) - t.end() - - }) - - stream.write(JSON.stringify([1,2,3,4,5,6], null, 2)) - stream.end() - -}) - diff --git a/node_modules/JSONStream/test/multiple_objects.js b/node_modules/JSONStream/test/multiple_objects.js deleted file mode 100644 index 22f6324..0000000 --- a/node_modules/JSONStream/test/multiple_objects.js +++ /dev/null @@ -1,36 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var datas = {} - -var server = net.createServer(function(client) { - var data_calls = 0; - var parser = JSONStream.parse(['rows', true, 'key']); - parser.on('data', function(data) { - ++ data_calls; - datas[data] = (datas[data] || 0) + 1 - it(data).typeof('string') - }); - - parser.on('end', function() { - console.log('END') - var min = Infinity - for (var d in datas) - min = min > datas[d] ? datas[d] : min - it(min).equal(3); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + ' ' + str + '\n\n' + str - client.end(msgs); -}); diff --git a/node_modules/JSONStream/test/multiple_objects_error.js b/node_modules/JSONStream/test/multiple_objects_error.js deleted file mode 100644 index 83d113b..0000000 --- a/node_modules/JSONStream/test/multiple_objects_error.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require ('fs'); -var net = require('net'); -var join = require('path').join; -var file = join(__dirname, 'fixtures','all_npm.json'); -var it = require('it-is'); -var JSONStream = require('../'); - -var str = fs.readFileSync(file); - -var server = net.createServer(function(client) { - var data_calls = 0; - var parser = JSONStream.parse(); - parser.on('error', function(err) { - console.log(err); - server.close(); - }); - - parser.on('end', function() { - console.log('END'); - server.close(); - }); - client.pipe(parser); -}); -server.listen(9999); - -var client = net.connect({ port : 9999 }, function() { - var msgs = str + '}'; - client.end(msgs); -}); diff --git a/node_modules/JSONStream/test/null.js b/node_modules/JSONStream/test/null.js deleted file mode 100644 index 95dd60c..0000000 --- a/node_modules/JSONStream/test/null.js +++ /dev/null @@ -1,28 +0,0 @@ -var JSONStream = require('../') - -var data = [ - {ID: 1, optional: null}, - {ID: 2, optional: null}, - {ID: 3, optional: 20}, - {ID: 4, optional: null}, - {ID: 5, optional: 'hello'}, - {ID: 6, optional: null} -] - - -var test = require('tape') - -test ('null properties', function (t) { - var actual = [] - var stream = - - JSONStream.parse('*.optional') - .on('data', function (v) { actual.push(v) }) - .on('end', function () { - t.deepEqual(actual, [20, 'hello']) - t.end() - }) - - stream.write(JSON.stringify(data, null, 2)) - stream.end() -}) diff --git a/node_modules/JSONStream/test/parsejson.js b/node_modules/JSONStream/test/parsejson.js deleted file mode 100644 index e70dabc..0000000 --- a/node_modules/JSONStream/test/parsejson.js +++ /dev/null @@ -1,29 +0,0 @@ - - -/* - sometimes jsonparse changes numbers slightly. -*/ - -var r = Math.random() - , Parser = require('jsonparse') - , p = new Parser() - , assert = require('assert') - , times = 20 - , bufferFrom = Buffer.from && Buffer.from !== Uint8Array.from - , str - -while (times --) { - - assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') - - p.onValue = function (v) { - console.error('parsed', v) - assert.equal(v,r) - } - console.error('correct', r) - str = JSON.stringify([r]) - p.write (bufferFrom ? Buffer.from(str) : new Buffer(str)) - - - -} diff --git a/node_modules/JSONStream/test/run.js b/node_modules/JSONStream/test/run.js deleted file mode 100644 index 7d62e73..0000000 --- a/node_modules/JSONStream/test/run.js +++ /dev/null @@ -1,13 +0,0 @@ -var readdirSync = require('fs').readdirSync -var spawnSync = require('child_process').spawnSync -var extname = require('path').extname - -var files = readdirSync(__dirname) -files.forEach(function(file){ - if (extname(file) !== '.js' || file === 'run.js') - return - console.log(`*** ${file} ***`) - var result = spawnSync(process.argv0, [file], { stdio: 'inherit', cwd: __dirname} ) - if (result.status !== 0) - process.exit(result.status) -}) diff --git a/node_modules/JSONStream/test/stringify.js b/node_modules/JSONStream/test/stringify.js deleted file mode 100644 index b6de85e..0000000 --- a/node_modules/JSONStream/test/stringify.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - //JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(JSON.parse(lines.join(''))).deepEqual(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/JSONStream/test/stringify_object.js b/node_modules/JSONStream/test/stringify_object.js deleted file mode 100644 index 9490115..0000000 --- a/node_modules/JSONStream/test/stringify_object.js +++ /dev/null @@ -1,47 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - , es = require('event-stream') - , pending = 10 - , passed = true - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], - stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -for (var ix = 0; ix < pending; ix++) (function (count) { - var expected = {} - , stringify = JSONStream.stringifyObject() - - es.connect( - stringify, - es.writeArray(function (err, lines) { - it(JSON.parse(lines.join(''))).deepEqual(expected) - if (--pending === 0) { - console.error('PASSED') - } - }) - ) - - while (count --) { - var key = Math.random().toString(16).slice(2) - expected[key] = randomObj() - stringify.write([ key, expected[key] ]) - } - - process.nextTick(function () { - stringify.end() - }) -})(ix) diff --git a/node_modules/JSONStream/test/test.js b/node_modules/JSONStream/test/test.js deleted file mode 100644 index 8ea7c2e..0000000 --- a/node_modules/JSONStream/test/test.js +++ /dev/null @@ -1,35 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it.has({ - id: it.typeof('string'), - value: {rev: it.typeof('string')}, - key:it.typeof('string') - }) - parsed.push(data) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(expected.rows.length) - it(parsed).deepEqual(expected.rows) - console.error('PASSED') -}) diff --git a/node_modules/JSONStream/test/test2.js b/node_modules/JSONStream/test/test2.js deleted file mode 100644 index d09df7b..0000000 --- a/node_modules/JSONStream/test/test2.js +++ /dev/null @@ -1,29 +0,0 @@ - - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, '..','package.json') - , JSONStream = require('../') - , it = require('it-is') - -var expected = JSON.parse(fs.readFileSync(file)) - , parser = JSONStream.parse([]) - , called = 0 - , ended = false - , parsed = [] - -fs.createReadStream(file).pipe(parser) - -parser.on('data', function (data) { - called ++ - it(data).deepEqual(expected) -}) - -parser.on('end', function () { - ended = true -}) - -process.on('exit', function () { - it(called).equal(1) - console.error('PASSED') -}) \ No newline at end of file diff --git a/node_modules/JSONStream/test/two-ways.js b/node_modules/JSONStream/test/two-ways.js deleted file mode 100644 index 8f3b89c..0000000 --- a/node_modules/JSONStream/test/two-ways.js +++ /dev/null @@ -1,41 +0,0 @@ - -var fs = require ('fs') - , join = require('path').join - , file = join(__dirname, 'fixtures','all_npm.json') - , JSONStream = require('../') - , it = require('it-is').style('colour') - - function randomObj () { - return ( - Math.random () < 0.4 - ? {hello: 'eonuhckmqjk', - whatever: 236515, - lies: true, - nothing: [null], -// stuff: [Math.random(),Math.random(),Math.random()] - } - : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] - ) - } - -var expected = [] - , stringify = JSONStream.stringify() - , es = require('event-stream') - , stringified = '' - , called = 0 - , count = 10 - , ended = false - -while (count --) - expected.push(randomObj()) - - es.connect( - es.readArray(expected), - stringify, - JSONStream.parse([/./]), - es.writeArray(function (err, lines) { - - it(lines).has(expected) - console.error('PASSED') - }) - ) diff --git a/node_modules/acorn-node/.travis.yml b/node_modules/acorn-node/.travis.yml deleted file mode 100644 index 24123d4..0000000 --- a/node_modules/acorn-node/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: node_js -node_js: - - '12' - - '11' - - '10' - - '9' - - '8' - - '6' - - '4' - - '0.12' - - '0.10' - - '0.8' - - '0.6' -before_install: - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -sudo: false -matrix: - fast_finish: true - allow_failures: - - node_js: "0.6" diff --git a/node_modules/acorn-node/CHANGELOG.md b/node_modules/acorn-node/CHANGELOG.md deleted file mode 100644 index ce2c779..0000000 --- a/node_modules/acorn-node/CHANGELOG.md +++ /dev/null @@ -1,94 +0,0 @@ -# acorn-node change log - -All notable changes to this project will be documented in this file. - -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.8.2 - * Revert a breaking change in import.meta parsing. - -## 1.8.1 - * Fix crash in compiled private-class-elements code. - -## 1.8.0 - * Upgrade acorn to v7. - - For backwards compatibility, `acorn-node` still uses the `Import` node type for dynamic imports, _NOT_ `ImportExpression` like acorn v7 and estree. - * Add numeric separator support: - ```js - var a = 10_000_000_000_000_000_000_000_000n; - ``` - -## 1.7.0 - * Add class instance fields support: - ```js - class X { - pub = 1; - #priv = 2; - } - ``` - * Add class static fields support: - ```js - class X { - static pub = 1; - static #priv = 2; - } - ``` - * Add `export * as ns` support when `sourceType` is 'module': - ```js - export * as ns from './ns.mjs'; - ``` - -## 1.6.2 - - * Allow dynamic `import()` in scripts. - * Update minimum dependency versions, fixing a peerDependency warning. - * Add Node 10 and 11 to CI. - -## 1.6.1 - - * Update acorn-dynamic-import to v4. - -## 1.6.0 - - * Upgrade acorn to v6. - * Add bigint support. - -## 1.5.2 - - * Upgrade acorn to support optional catch binding in the AST walker. - -## 1.5.1 - - * Fix tests on Node <= 0.12. - -## 1.5.0 - - * Add tests for async iteration, optional catch binding, import.meta, - dynamic import, bigint (currently unsupported). - * Add import.meta support. (`sourceType: 'module'` only) - * Add dynamic import support. (`sourceType: 'module'` only) - * Fix optional catch binding support in the walker. - -## 1.4.0 - - * Upgrade acorn to 5.6, which supports optional catch bindings and other - new syntax features. - * Set ecmaVersion to 2019 to opt in to optional catch bindings etc. - -## 1.3.0 - - * Upgrade acorn to 5.4, which supports object spread and async iteration. - * Remove acorn5-object-spread plugin. - -## 1.2.0 - - * Expose `acorn/dist/walk` as `acorn-node/walk`. - -## 1.1.0 - - * Enable `allowHashBang` and `allowReturnOutsideFunction` by default. - -## 1.0.0 - - * Initial release. diff --git a/node_modules/acorn-node/LICENSE.md b/node_modules/acorn-node/LICENSE.md deleted file mode 100644 index 3698cf1..0000000 --- a/node_modules/acorn-node/LICENSE.md +++ /dev/null @@ -1,95 +0,0 @@ -# [Apache License 2.0](https://spdx.org/licenses/Apache-2.0) - -Copyright 2018 Renée Kooi - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -> http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -## acorn-bigint - -The code in the `lib/bigint` folder is compiled from code licensed as MIT: - -> Copyright (C) 2017-2018 by Adrian Heine -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - -Find the source code at https://github.com/acornjs/acorn-bigint. - -## acorn-import-meta - -The code in the `lib/import-meta` folder is compiled from code licensed as MIT: - -> Copyright (C) 2017-2018 by Adrian Heine -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - -Find the source code at https://github.com/acornjs/acorn-import-meta. - -## acorn-dynamic-import - -The code in the `lib/dynamic-import` folder is licensed as MIT: - -> MIT License -> -> Copyright (c) 2016 Jordan Gensler -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - -Find the source code at https://github.com/kesne/acorn-dynamic-import. diff --git a/node_modules/acorn-node/README.md b/node_modules/acorn-node/README.md deleted file mode 100644 index 37e871f..0000000 --- a/node_modules/acorn-node/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# acorn-node - -[Acorn](https://github.com/acornjs/acorn) preloaded with plugins for syntax parity with recent Node versions. - -It also includes versions of the plugins compiled with [Bublé](https://github.com/rich-harris/buble), so they can be run on old Node versions (0.6 and up). - -[![npm][npm-image]][npm-url] -[![travis][travis-image]][travis-url] -[![standard][standard-image]][standard-url] - -[npm-image]: https://img.shields.io/npm/v/acorn-node.svg?style=flat-square -[npm-url]: https://www.npmjs.com/package/acorn-node -[travis-image]: https://img.shields.io/travis/browserify/acorn-node/master.svg?style=flat-square -[travis-url]: https://travis-ci.org/browserify/acorn-node -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square -[standard-url]: http://npm.im/standard - -## Install - -``` -npm install acorn-node -``` - -## Usage - -```js -var acorn = require('acorn-node') -``` - -The API is the same as [acorn](https://github.com/acornjs/acorn), but the following syntax features are enabled by default: - - - Bigint syntax `10n` - - Numeric separators syntax `10_000` - - Public and private class instance fields - - Public and private class static fields - - Dynamic `import()` - - The `import.meta` property - - `export * as ns from` syntax - -And the following options have different defaults from acorn, to match Node modules: - - - `ecmaVersion: 2019` - - `allowHashBang: true` - - `allowReturnOutsideFunction: true` - -```js -var walk = require('acorn-node/walk') -``` - -The Acorn syntax tree walker. Comes preconfigured for the syntax plugins if necessary. -See the [acorn documentation](https://github.com/acornjs/acorn#distwalkjs) for details. - -## License - -The files in the repo root and the ./test folder are licensed as [Apache-2.0](LICENSE.md). - -The files in lib/ are generated from other packages: - -- lib/bigint: [acorn-bigint](https://github.com/acornjs/acorn-bigint]), MIT -- lib/class-private-elements: [acorn-class-private-elements](https://github.com/acornjs/acorn-class-private-elements), MIT -- lib/dynamic-import: [acorn-dynamic-import](https://github.com/acornjs/acorn-dynamic-import), MIT -- lib/export-ns-from: [acorn-export-ns-from](https://github.com/acornjs/acorn-export-ns-from), MIT -- lib/import-meta: [acorn-import-meta](https://github.com/acornjs/acorn-import-meta), MIT -- lib/numeric-separator: [acorn-numeric-separator](https://github.com/acornjs/acorn-numeric-separator]), MIT -- lib/static-class-features: [acorn-static-class-features](https://github.com/acornjs/acorn-static-class-features), MIT diff --git a/node_modules/acorn-node/build.js b/node_modules/acorn-node/build.js deleted file mode 100644 index ca08f35..0000000 --- a/node_modules/acorn-node/build.js +++ /dev/null @@ -1,36 +0,0 @@ -var fs = require('fs') -var path = require('path') -var mkdirp = require('mkdirp') -var buble = require('buble') - -var HEADER = '/* Generated by `npm run build`, do not edit! */\n\n' - -function compile (name, output, fix) { - console.log(name, '→', output) - mkdirp.sync(path.dirname(path.join(__dirname, output))) - var source = fs.readFileSync(require.resolve(name), 'utf8') - if (fix) source = fix(source) - var result = buble.transform(source, { - transforms: { - dangerousForOf: true - } - }) - fs.writeFileSync(path.join(__dirname, output), HEADER + result.code, 'utf8') -} - -function privateClassElements (str) { - return str.replace('acorn-private-class-elements', '../private-class-elements') -} - -compile('acorn-bigint', './lib/bigint/index.js') -compile('acorn-numeric-separator', './lib/numeric-separator/index.js') -compile('acorn-dynamic-import', './lib/dynamic-import/index.js') -compile('acorn-import-meta', './lib/import-meta/index.js') -compile('acorn-export-ns-from', './lib/export-ns-from/index.js') -compile('acorn-class-fields', './lib/class-fields/index.js', privateClassElements) -compile('acorn-static-class-features', './lib/static-class-features/index.js', privateClassElements) -compile('acorn-private-class-elements', './lib/private-class-elements/index.js', function (str) { - return str.replace('class extends Parser', 'class Parser_ extends Parser') - // it also works with v7 - .replace('if (acorn.version.indexOf("6.") != 0 || acorn.version.indexOf("6.0.") == 0) {', 'if (false) {') -}) diff --git a/node_modules/acorn-node/index.js b/node_modules/acorn-node/index.js deleted file mode 100644 index c0ec3bf..0000000 --- a/node_modules/acorn-node/index.js +++ /dev/null @@ -1,38 +0,0 @@ -var acorn = require('acorn') -var xtend = require('xtend') - -var CJSParser = acorn.Parser - .extend(require('./lib/bigint')) - .extend(require('./lib/class-fields')) - .extend(require('./lib/static-class-features')) - .extend(require('./lib/numeric-separator')) - .extend(require('./lib/dynamic-import').default) -var ESModulesParser = CJSParser - .extend(require('./lib/export-ns-from')) - .extend(require('./lib/import-meta')) - -function mapOptions (opts) { - if (!opts) opts = {} - return xtend({ - ecmaVersion: 2020, - allowHashBang: true, - allowReturnOutsideFunction: true - }, opts) -} - -function getParser (opts) { - if (!opts) opts = {} - return opts.sourceType === 'module' ? ESModulesParser : CJSParser -} - -module.exports = exports = xtend(acorn, { - parse: function parse (src, opts) { - return getParser(opts).parse(src, mapOptions(opts)) - }, - parseExpressionAt: function parseExpressionAt (src, offset, opts) { - return getParser(opts).parseExpressionAt(src, offset, mapOptions(opts)) - }, - tokenizer: function tokenizer (src, opts) { - return getParser(opts).tokenizer(src, mapOptions(opts)) - } -}) diff --git a/node_modules/acorn-node/lib/bigint/index.js b/node_modules/acorn-node/lib/bigint/index.js deleted file mode 100644 index 40f6a9f..0000000 --- a/node_modules/acorn-node/lib/bigint/index.js +++ /dev/null @@ -1,71 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -var acorn = require("acorn") -var tt = acorn.tokTypes -var isIdentifierStart = acorn.isIdentifierStart - -module.exports = function(Parser) { - return /*@__PURE__*/(function (Parser) { - function anonymous () { - Parser.apply(this, arguments); - } - - if ( Parser ) anonymous.__proto__ = Parser; - anonymous.prototype = Object.create( Parser && Parser.prototype ); - anonymous.prototype.constructor = anonymous; - - anonymous.prototype.parseLiteral = function parseLiteral (value) { - var node = Parser.prototype.parseLiteral.call(this, value) - if (node.raw.charCodeAt(node.raw.length - 1) == 110) { node.bigint = this.getNumberInput(node.start, node.end) } - return node - }; - - anonymous.prototype.readRadixNumber = function readRadixNumber (radix) { - var start = this.pos - this.pos += 2 // 0x - var val = this.readInt(radix) - if (val === null) { this.raise(this.start + 2, ("Expected number in radix " + radix)) } - if (this.input.charCodeAt(this.pos) == 110) { - var str = this.getNumberInput(start, this.pos) - val = typeof BigInt !== "undefined" ? BigInt(str) : null - ++this.pos - } else if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number") } - return this.finishToken(tt.num, val) - }; - - anonymous.prototype.readNumber = function readNumber (startsWithDot) { - var start = this.pos - - // Not an int - if (startsWithDot) { return Parser.prototype.readNumber.call(this, startsWithDot) } - - // Legacy octal - if (this.input.charCodeAt(start) === 48 && this.input.charCodeAt(start + 1) !== 110) { - return Parser.prototype.readNumber.call(this, startsWithDot) - } - - if (this.readInt(10) === null) { this.raise(start, "Invalid number") } - - // Not a BigInt, reset and parse again - if (this.input.charCodeAt(this.pos) != 110) { - this.pos = start - return Parser.prototype.readNumber.call(this, startsWithDot) - } - - var str = this.getNumberInput(start, this.pos) - var val = typeof BigInt !== "undefined" ? BigInt(str) : null - ++this.pos - return this.finishToken(tt.num, val) - }; - - // This is basically a hook for acorn-numeric-separator - anonymous.prototype.getNumberInput = function getNumberInput (start, end) { - if (Parser.prototype.getNumberInput) { return Parser.prototype.getNumberInput.call(this, start, end) } - return this.input.slice(start, end) - }; - - return anonymous; - }(Parser)) -} diff --git a/node_modules/acorn-node/lib/class-fields/index.js b/node_modules/acorn-node/lib/class-fields/index.js deleted file mode 100644 index e7f15ae..0000000 --- a/node_modules/acorn-node/lib/class-fields/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -var acorn = require("acorn") -var tt = acorn.tokTypes -var privateClassElements = require("../private-class-elements") - -function maybeParseFieldValue(field) { - if (this.eat(tt.eq)) { - var oldInFieldValue = this._inFieldValue - this._inFieldValue = true - field.value = this.parseExpression() - this._inFieldValue = oldInFieldValue - } else { field.value = null } -} - -module.exports = function(Parser) { - Parser = privateClassElements(Parser) - return /*@__PURE__*/(function (Parser) { - function anonymous () { - Parser.apply(this, arguments); - } - - if ( Parser ) anonymous.__proto__ = Parser; - anonymous.prototype = Object.create( Parser && Parser.prototype ); - anonymous.prototype.constructor = anonymous; - - anonymous.prototype.parseClassElement = function parseClassElement (_constructorAllowsSuper) { - if (this.options.ecmaVersion >= 8 && (this.type == tt.name || this.type == this.privateNameToken || this.type == tt.bracketL || this.type == tt.string)) { - var branch = this._branch() - if (branch.type == tt.bracketL) { - var count = 0 - do { - if (branch.eat(tt.bracketL)) { ++count } - else if (branch.eat(tt.bracketR)) { --count } - else { branch.next() } - } while (count > 0) - } else { branch.next() } - if (branch.type == tt.eq || branch.canInsertSemicolon() || branch.type == tt.semi) { - var node = this.startNode() - if (this.type == this.privateNameToken) { - this.parsePrivateClassElementName(node) - } else { - this.parsePropertyName(node) - } - if ((node.key.type === "Identifier" && node.key.name === "constructor") || - (node.key.type === "Literal" && node.key.value === "constructor")) { - this.raise(node.key.start, "Classes may not have a field called constructor") - } - maybeParseFieldValue.call(this, node) - this.finishNode(node, "FieldDefinition") - this.semicolon() - return node - } - } - - return Parser.prototype.parseClassElement.apply(this, arguments) - }; - - // Prohibit arguments in class field initializers - anonymous.prototype.parseIdent = function parseIdent (liberal, isBinding) { - var ident = Parser.prototype.parseIdent.call(this, liberal, isBinding) - if (this._inFieldValue && ident.name == "arguments") { this.raise(ident.start, "A class field initializer may not contain arguments") } - return ident - }; - - return anonymous; - }(Parser)) -} diff --git a/node_modules/acorn-node/lib/dynamic-import/index.js b/node_modules/acorn-node/lib/dynamic-import/index.js deleted file mode 100644 index bb37198..0000000 --- a/node_modules/acorn-node/lib/dynamic-import/index.js +++ /dev/null @@ -1,86 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DynamicImportKey = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) { descriptor.writable = true; } Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) { defineProperties(Constructor.prototype, protoProps); } if (staticProps) { defineProperties(Constructor, staticProps); } return Constructor; }; }(); - -var _get = function () { - function get(object, property, receiver) { if (object === null) { object = Function.prototype; } var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } - - return get; -}(); - -exports['default'] = dynamicImport; - -var _acorn = require('acorn'); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) { Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } } /* eslint-disable no-underscore-dangle */ - - -var DynamicImportKey = exports.DynamicImportKey = 'Import'; - -// NOTE: This allows `yield import()` to parse correctly. -_acorn.tokTypes._import.startsExpr = true; - -function parseDynamicImport() { - var node = this.startNode(); - this.next(); - if (this.type !== _acorn.tokTypes.parenL) { - this.unexpected(); - } - return this.finishNode(node, DynamicImportKey); -} - -function parenAfter() { - return (/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos)) - ); -} - -function dynamicImport(Parser) { - return function (_Parser) { - _inherits(_class, _Parser); - - function _class() { - _classCallCheck(this, _class); - - return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments)); - } - - _createClass(_class, [{ - key: 'parseStatement', - value: function () { - function parseStatement(context, topLevel, exports) { - if (this.type === _acorn.tokTypes._import && parenAfter.call(this)) { - return this.parseExpressionStatement(this.startNode(), this.parseExpression()); - } - return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseStatement', this).call(this, context, topLevel, exports); - } - - return parseStatement; - }() - }, { - key: 'parseExprAtom', - value: function () { - function parseExprAtom(refDestructuringErrors) { - if (this.type === _acorn.tokTypes._import) { - return parseDynamicImport.call(this); - } - return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseExprAtom', this).call(this, refDestructuringErrors); - } - - return parseExprAtom; - }() - }]); - - return _class; - }(Parser); -} \ No newline at end of file diff --git a/node_modules/acorn-node/lib/export-ns-from/index.js b/node_modules/acorn-node/lib/export-ns-from/index.js deleted file mode 100644 index 7196dc8..0000000 --- a/node_modules/acorn-node/lib/export-ns-from/index.js +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g - -var tt = require("acorn").tokTypes - -module.exports = function(Parser) { - return /*@__PURE__*/(function (Parser) { - function anonymous () { - Parser.apply(this, arguments); - } - - if ( Parser ) anonymous.__proto__ = Parser; - anonymous.prototype = Object.create( Parser && Parser.prototype ); - anonymous.prototype.constructor = anonymous; - - anonymous.prototype.parseExport = function parseExport (node, exports) { - skipWhiteSpace.lastIndex = this.pos - var skip = skipWhiteSpace.exec(this.input) - var next = this.input.charAt(this.pos + skip[0].length) - if (next !== "*") { return Parser.prototype.parseExport.call(this, node, exports) } - - this.next() - var specifier = this.startNode() - this.expect(tt.star) - if (this.eatContextual("as")) { - node.declaration = null - specifier.exported = this.parseIdent(true) - this.checkExport(exports, specifier.exported.name, this.lastTokStart) - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")] - } - this.expectContextual("from") - if (this.type !== tt.string) { this.unexpected() } - node.source = this.parseExprAtom() - this.semicolon() - return this.finishNode(node, node.specifiers ? "ExportNamedDeclaration" : "ExportAllDeclaration") - }; - - return anonymous; - }(Parser)) -} diff --git a/node_modules/acorn-node/lib/import-meta/index.js b/node_modules/acorn-node/lib/import-meta/index.js deleted file mode 100644 index bd4adf9..0000000 --- a/node_modules/acorn-node/lib/import-meta/index.js +++ /dev/null @@ -1,55 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -var tt = require("acorn").tokTypes - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g - -var nextTokenIsDot = function (parser) { - skipWhiteSpace.lastIndex = parser.pos - var skip = skipWhiteSpace.exec(parser.input) - var next = parser.pos + skip[0].length - return parser.input.slice(next, next + 1) === "." -} - -module.exports = function(Parser) { - return /*@__PURE__*/(function (Parser) { - function anonymous () { - Parser.apply(this, arguments); - } - - if ( Parser ) anonymous.__proto__ = Parser; - anonymous.prototype = Object.create( Parser && Parser.prototype ); - anonymous.prototype.constructor = anonymous; - - anonymous.prototype.parseExprAtom = function parseExprAtom (refDestructuringErrors) { - if (this.type !== tt._import || !nextTokenIsDot(this)) { return Parser.prototype.parseExprAtom.call(this, refDestructuringErrors) } - - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") - } - - var node = this.startNode() - node.meta = this.parseIdent(true) - this.expect(tt.dot) - node.property = this.parseIdent(true) - if (node.property.name !== "meta") { - this.raiseRecoverable(node.property.start, "The only valid meta property for import is import.meta") - } - return this.finishNode(node, "MetaProperty") - }; - - anonymous.prototype.parseStatement = function parseStatement (context, topLevel, exports) { - if (this.type !== tt._import || !nextTokenIsDot(this)) { - return Parser.prototype.parseStatement.call(this, context, topLevel, exports) - } - - var node = this.startNode() - var expr = this.parseExpression() - return this.parseExpressionStatement(node, expr) - }; - - return anonymous; - }(Parser)) -} diff --git a/node_modules/acorn-node/lib/numeric-separator/index.js b/node_modules/acorn-node/lib/numeric-separator/index.js deleted file mode 100644 index ec3cfc4..0000000 --- a/node_modules/acorn-node/lib/numeric-separator/index.js +++ /dev/null @@ -1,61 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -module.exports = function(Parser) { - return /*@__PURE__*/(function (Parser) { - function anonymous () { - Parser.apply(this, arguments); - } - - if ( Parser ) anonymous.__proto__ = Parser; - anonymous.prototype = Object.create( Parser && Parser.prototype ); - anonymous.prototype.constructor = anonymous; - - anonymous.prototype.readInt = function readInt (radix, len) { - // Hack: len is only != null for unicode escape sequences, - // where numeric separators are not allowed - if (len != null) { return Parser.prototype.readInt.call(this, radix, len) } - - var start = this.pos, total = 0, acceptUnderscore = false - for (;;) { - var code = this.input.charCodeAt(this.pos), val = (void 0) - if (code >= 97) { val = code - 97 + 10 } // a - else if (code == 95) { - if (!acceptUnderscore) { this.raise(this.pos, "Invalid numeric separator") } - ++this.pos - acceptUnderscore = false - continue - } else if (code >= 65) { val = code - 65 + 10 } // A - else if (code >= 48 && code <= 57) { val = code - 48 } // 0-9 - else { val = Infinity } - if (val >= radix) { break } - ++this.pos - total = total * radix + val - acceptUnderscore = true - } - if (this.pos === start) { return null } - if (!acceptUnderscore) { this.raise(this.pos - 1, "Invalid numeric separator") } - - return total - }; - - anonymous.prototype.readNumber = function readNumber (startsWithDot) { - var token = Parser.prototype.readNumber.call(this, startsWithDot) - var octal = this.end - this.start >= 2 && this.input.charCodeAt(this.start) === 48 - var stripped = this.getNumberInput(this.start, this.end) - if (stripped.length < this.end - this.start) { - if (octal) { this.raise(this.start, "Invalid number") } - this.value = parseFloat(stripped) - } - return token - }; - - // This is used by acorn-bigint - anonymous.prototype.getNumberInput = function getNumberInput (start, end) { - return this.input.slice(start, end).replace(/_/g, "") - }; - - return anonymous; - }(Parser)) -} diff --git a/node_modules/acorn-node/lib/private-class-elements/index.js b/node_modules/acorn-node/lib/private-class-elements/index.js deleted file mode 100644 index 364e1fc..0000000 --- a/node_modules/acorn-node/lib/private-class-elements/index.js +++ /dev/null @@ -1,135 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -var acorn = require("acorn") -if (false) { - throw new Error(("acorn-private-class-elements requires acorn@^6.1.0, not " + (acorn.version))) -} -var tt = acorn.tokTypes -var TokenType = acorn.TokenType - -module.exports = function(Parser) { - // Only load this plugin once. - if (Parser.prototype.parsePrivateName) { - return Parser - } - - // Make sure `Parser` comes from the same acorn as our `tt`, - // otherwise the comparisons fail. - var cur = Parser - while (cur && cur !== acorn.Parser) { - cur = cur.__proto__ - } - if (cur !== acorn.Parser) { - throw new Error("acorn-private-class-elements does not support mixing different acorn copies") - } - - Parser = /*@__PURE__*/(function (Parser) { - function Parser_ () { - Parser.apply(this, arguments); - } - - if ( Parser ) Parser_.__proto__ = Parser; - Parser_.prototype = Object.create( Parser && Parser.prototype ); - Parser_.prototype.constructor = Parser_; - - Parser_.prototype._branch = function _branch () { - this.__branch = this.__branch || new Parser({ecmaVersion: this.options.ecmaVersion}, this.input) - this.__branch.end = this.end - this.__branch.pos = this.pos - this.__branch.type = this.type - this.__branch.value = this.value - this.__branch.containsEsc = this.containsEsc - return this.__branch - }; - - Parser_.prototype.parsePrivateClassElementName = function parsePrivateClassElementName (element) { - element.computed = false - element.key = this.parsePrivateName() - if (element.key.name == "constructor") { this.raise(element.key.start, "Classes may not have a private element named constructor") } - var accept = {get: "set", set: "get"}[element.kind] - var privateBoundNames = this._privateBoundNamesStack[this._privateBoundNamesStack.length - 1] - if (Object.prototype.hasOwnProperty.call(privateBoundNames, element.key.name) && privateBoundNames[element.key.name] !== accept) { - this.raise(element.start, "Duplicate private element") - } - privateBoundNames[element.key.name] = element.kind || true - delete this._unresolvedPrivateNamesStack[this._unresolvedPrivateNamesStack.length - 1][element.key.name] - return element.key - }; - - Parser_.prototype.parsePrivateName = function parsePrivateName () { - var node = this.startNode() - node.name = this.value - this.next() - this.finishNode(node, "PrivateName") - if (this.options.allowReserved == "never") { this.checkUnreserved(node) } - return node - }; - - // Parse # token - Parser_.prototype.getTokenFromCode = function getTokenFromCode (code) { - if (code === 35) { - ++this.pos - var word = this.readWord1() - return this.finishToken(this.privateNameToken, word) - } - return Parser.prototype.getTokenFromCode.call(this, code) - }; - - // Manage stacks and check for undeclared private names - Parser_.prototype.parseClass = function parseClass (node, isStatement) { - this._privateBoundNamesStack = this._privateBoundNamesStack || [] - var privateBoundNames = Object.create(this._privateBoundNamesStack[this._privateBoundNamesStack.length - 1] || null) - this._privateBoundNamesStack.push(privateBoundNames) - this._unresolvedPrivateNamesStack = this._unresolvedPrivateNamesStack || [] - var unresolvedPrivateNames = Object.create(null) - this._unresolvedPrivateNamesStack.push(unresolvedPrivateNames) - var _return = Parser.prototype.parseClass.call(this, node, isStatement) - this._privateBoundNamesStack.pop() - this._unresolvedPrivateNamesStack.pop() - if (!this._unresolvedPrivateNamesStack.length) { - var names = Object.keys(unresolvedPrivateNames) - if (names.length) { - names.sort(function (n1, n2) { return unresolvedPrivateNames[n1] - unresolvedPrivateNames[n2]; }) - this.raise(unresolvedPrivateNames[names[0]], "Usage of undeclared private name") - } - } else { Object.assign(this._unresolvedPrivateNamesStack[this._unresolvedPrivateNamesStack.length - 1], unresolvedPrivateNames) } - return _return - }; - - // Parse private element access - Parser_.prototype.parseSubscript = function parseSubscript (base, startPos, startLoc, noCalls, maybeAsyncArrow) { - if (!this.eat(tt.dot)) { - return Parser.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, maybeAsyncArrow) - } - var node = this.startNodeAt(startPos, startLoc) - node.object = base - node.computed = false - if (this.type == this.privateNameToken) { - node.property = this.parsePrivateName() - if (!this._privateBoundNamesStack.length || !this._privateBoundNamesStack[this._privateBoundNamesStack.length - 1][node.property.name]) { - this._unresolvedPrivateNamesStack[this._unresolvedPrivateNamesStack.length - 1][node.property.name] = node.property.start - } - } else { - node.property = this.parseIdent(true) - } - return this.finishNode(node, "MemberExpression") - }; - - // Prohibit delete of private class elements - Parser_.prototype.parseMaybeUnary = function parseMaybeUnary (refDestructuringErrors, sawUnary) { - var _return = Parser.prototype.parseMaybeUnary.call(this, refDestructuringErrors, sawUnary) - if (_return.operator == "delete") { - if (_return.argument.type == "MemberExpression" && _return.argument.property.type == "PrivateName") { - this.raise(_return.start, "Private elements may not be deleted") - } - } - return _return - }; - - return Parser_; - }(Parser)) - Parser.prototype.privateNameToken = new TokenType("privateName") - return Parser -} diff --git a/node_modules/acorn-node/lib/static-class-features/index.js b/node_modules/acorn-node/lib/static-class-features/index.js deleted file mode 100644 index 3894491..0000000 --- a/node_modules/acorn-node/lib/static-class-features/index.js +++ /dev/null @@ -1,139 +0,0 @@ -/* Generated by `npm run build`, do not edit! */ - -"use strict" - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g - -var acorn = require("acorn") -var tt = acorn.tokTypes - -function maybeParseFieldValue(field) { - if (this.eat(tt.eq)) { - var oldInFieldValue = this._inStaticFieldValue - this._inStaticFieldValue = true - field.value = this.parseExpression() - this._inStaticFieldValue = oldInFieldValue - } else { field.value = null } -} - -var privateClassElements = require("../private-class-elements") - -module.exports = function(Parser) { - var ExtendedParser = privateClassElements(Parser) - - return /*@__PURE__*/(function (ExtendedParser) { - function anonymous () { - ExtendedParser.apply(this, arguments); - } - - if ( ExtendedParser ) anonymous.__proto__ = ExtendedParser; - anonymous.prototype = Object.create( ExtendedParser && ExtendedParser.prototype ); - anonymous.prototype.constructor = anonymous; - - anonymous.prototype.parseClassElement = function parseClassElement (_constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(tt.semi)) { return null } - - var node = this.startNode() - - var tryContextual = function (k, noLineBreak) { - if (typeof noLineBreak == "undefined") { noLineBreak = false } - var start = this$1.start, startLoc = this$1.startLoc - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== tt.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (node.key) { this$1.unexpected() } - node.computed = false - node.key = this$1.startNodeAt(start, startLoc) - node.key.name = k - this$1.finishNode(node.key, "Identifier") - return false - } - - node.static = tryContextual("static") - if (!node.static) { return ExtendedParser.prototype.parseClassElement.apply(this, arguments) } - - var isGenerator = this.eat(tt.star) - var isAsync = false - if (!isGenerator) { - // Special-case for `async`, since `parseClassMember` currently looks - // for `(` to determine whether `async` is a method name - if (this.options.ecmaVersion >= 8 && this.isContextual("async")) { - skipWhiteSpace.lastIndex = this.pos - var skip = skipWhiteSpace.exec(this.input) - var next = this.input.charAt(this.pos + skip[0].length) - if (next === ";" || next === "=") { - node.key = this.parseIdent(true) - node.computed = false - maybeParseFieldValue.call(this, node) - this.finishNode(node, "FieldDefinition") - this.semicolon() - return node - } else if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true - isGenerator = this.options.ecmaVersion >= 9 && this.eat(tt.star) - } - } else if (tryContextual("get")) { - node.kind = "get" - } else if (tryContextual("set")) { - node.kind = "set" - } - } - if (this.type === this.privateNameToken) { - this.parsePrivateClassElementName(node) - if (this.type !== tt.parenL) { - if (node.key.name === "prototype") { - this.raise(node.key.start, "Classes may not have a private static property named prototype") - } - maybeParseFieldValue.call(this, node) - this.finishNode(node, "FieldDefinition") - this.semicolon() - return node - } - } else if (!node.key) { - this.parsePropertyName(node) - if ((node.key.name || node.key.value) === "prototype" && !node.computed) { - this.raise(node.key.start, "Classes may not have a static property named prototype") - } - } - if (!node.kind) { node.kind = "method" } - this.parseClassMethod(node, isGenerator, isAsync) - if (!node.kind && (node.key.name || node.key.value) === "constructor" && !node.computed) { - this.raise(node.key.start, "Classes may not have a static field named constructor") - } - if (node.kind === "get" && node.value.params.length !== 0) { - this.raiseRecoverable(node.value.start, "getter should have no params") - } - if (node.kind === "set" && node.value.params.length !== 1) { - this.raiseRecoverable(node.value.start, "setter should have exactly one param") - } - if (node.kind === "set" && node.value.params[0].type === "RestElement") { - this.raiseRecoverable(node.value.params[0].start, "Setter cannot use rest params") - } - - return node - - }; - - // Parse public static fields - anonymous.prototype.parseClassMethod = function parseClassMethod (method, isGenerator, isAsync, _allowsDirectSuper) { - if (isGenerator || isAsync || method.kind != "method" || !method.static || this.options.ecmaVersion < 8 || this.type == tt.parenL) { - return ExtendedParser.prototype.parseClassMethod.apply(this, arguments) - } - maybeParseFieldValue.call(this, method) - delete method.kind - method = this.finishNode(method, "FieldDefinition") - this.semicolon() - return method - }; - - // Prohibit arguments in class field initializers - anonymous.prototype.parseIdent = function parseIdent (liberal, isBinding) { - var ident = ExtendedParser.prototype.parseIdent.call(this, liberal, isBinding) - if (this._inStaticFieldValue && ident.name == "arguments") { this.raise(ident.start, "A static class field initializer may not contain arguments") } - return ident - }; - - return anonymous; - }(ExtendedParser)) -} diff --git a/node_modules/acorn-node/package.json b/node_modules/acorn-node/package.json deleted file mode 100644 index ed88258..0000000 --- a/node_modules/acorn-node/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "acorn-node@^1.5.2", - "_id": "acorn-node@1.8.2", - "_inBundle": false, - "_integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "_location": "/acorn-node", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "acorn-node@^1.5.2", - "name": "acorn-node", - "escapedName": "acorn-node", - "rawSpec": "^1.5.2", - "saveSpec": null, - "fetchSpec": "^1.5.2" - }, - "_requiredBy": [ - "/detective", - "/insert-module-globals", - "/syntax-error", - "/undeclared-identifiers" - ], - "_resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "_shasum": "114c95d64539e53dede23de8b9d96df7c7ae2af8", - "_spec": "acorn-node@^1.5.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/insert-module-globals", - "author": { - "name": "Renée Kooi", - "email": "renee@kooi.me" - }, - "bugs": { - "url": "https://github.com/browserify/acorn-node/issues" - }, - "bundleDependencies": false, - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - }, - "deprecated": false, - "description": "the acorn javascript parser, preloaded with plugins for syntax parity with recent node versions", - "devDependencies": { - "acorn-bigint": "^0.4.0", - "acorn-class-fields": "^0.3.1", - "acorn-dynamic-import": "^4.0.0", - "acorn-export-ns-from": "^0.1.0", - "acorn-import-meta": "^0.3.0", - "acorn-numeric-separator": "^0.3.0", - "acorn-private-class-elements": "^0.1.1", - "acorn-static-class-features": "^0.2.0", - "buble": "^0.19.8", - "mkdirp": "^0.5.1", - "standard": "^13.1.0", - "tape": "^4.11.0" - }, - "homepage": "https://github.com/browserify/acorn-node", - "keywords": [ - "acorn", - "browserify", - "javascript", - "parser" - ], - "license": "Apache-2.0", - "main": "index.js", - "name": "acorn-node", - "repository": { - "type": "git", - "url": "git+https://github.com/browserify/acorn-node.git" - }, - "scripts": { - "build": "node build.js", - "prepublishOnly": "npm run build", - "test": "standard && node test/index.js" - }, - "standard": { - "ignore": [ - "lib/*/*.js" - ] - }, - "version": "1.8.2" -} diff --git a/node_modules/acorn-node/test/index.js b/node_modules/acorn-node/test/index.js deleted file mode 100644 index 59832db..0000000 --- a/node_modules/acorn-node/test/index.js +++ /dev/null @@ -1,154 +0,0 @@ -var test = require('tape') -var acorn = require('../') -var walk = require('../walk') -var baseAcorn = require('acorn') - -test('parses object spread syntax', function (t) { - var ast = acorn.parse('var a = { ...b }') - t.equal(ast.body[0].declarations[0].init.type, 'ObjectExpression') - t.equal(ast.body[0].declarations[0].init.properties[0].type, 'SpreadElement') - - ast = acorn.parse('function a ({ ...b }) {}') - t.equal(ast.body[0].params[0].type, 'ObjectPattern') - t.equal(ast.body[0].params[0].properties[0].type, 'RestElement') - - t.end() -}) - -test('does not change main acorn module', function (t) { - t.throws(function () { - baseAcorn.parse('var a = 10n') - }) - t.end() -}) - -test('tokenizes object spread syntax', function (t) { - var tokenizer = acorn.tokenizer('var a = { ...b }') - - t.doesNotThrow(function (t) { - while (tokenizer.getToken().type !== acorn.tokTypes.eof) {} - }) - t.end() -}) - -test('allows hashbangs by default', function (t) { - t.doesNotThrow(function () { - acorn.parse('#!/usr/bin/env node\nconsole.log("ok")') - }) - t.end() -}) - -test('allows top level return by default', function (t) { - t.doesNotThrow(function () { - acorn.parse('console.log("ok"); return; console.log("not ok")') - }) - t.end() -}) - -test('supports async generators', function (t) { - t.doesNotThrow(function () { - acorn.parse('async function* a () { await x; yield 1 }') - }) - t.end() -}) - -test('supports async iteration', function (t) { - t.doesNotThrow(function () { - acorn.parse('async function l (y) { for await (const x of y) {} }') - }) - t.end() -}) - -test('supports optional catch', function (t) { - t.doesNotThrow(function () { - acorn.parse('try { throw null } catch {}') - }) - t.end() -}) - -test('supports bigint', function (t) { - t.doesNotThrow(function () { - acorn.parse('50n ** 50n') - }) - t.end() -}) - -test('supports numeric separators', function (t) { - t.doesNotThrow(function () { - acorn.parse('50_000_000n ** 1n') - }) - t.end() -}) - -test('supports import.meta with sourceType: module', function (t) { - t.doesNotThrow(function () { - acorn.parse('console.log(import.meta.url)', { sourceType: 'module' }) - }) - t.end() -}) - -test('supports dynamic import() with sourceType: module', function (t) { - t.doesNotThrow(function () { - acorn.parse('import("./whatever.mjs")', { sourceType: 'module' }) - }) - t.end() -}) - -test('supports dynamic import() with sourceType: script', function (t) { - t.doesNotThrow(function () { - acorn.parse('import("./whatever.mjs")', { sourceType: 'script' }) - }) - t.end() -}) - -test('supports class instance properties', function (t) { - t.doesNotThrow(function () { - acorn.parse('class X { x = y }', { sourceType: 'script' }) - }) - t.end() -}) - -test('supports private class instance properties', function (t) { - t.doesNotThrow(function () { - acorn.parse('class X { #x = y }', { sourceType: 'script' }) - }) - t.end() -}) - -test('supports class static properties', function (t) { - t.doesNotThrow(function () { - acorn.parse('class X { static x = y }', { sourceType: 'script' }) - }) - t.end() -}) - -test('supports private class static properties', function (t) { - t.doesNotThrow(function () { - acorn.parse('class X { static #x = y }', { sourceType: 'script' }) - }) - t.end() -}) - -test('supports namespace export syntax with sourceType: module', function (t) { - t.doesNotThrow(function () { - acorn.parse('export * as x from "./x.mjs";', { sourceType: 'module' }) - }) - t.end() -}) - -test('walk supports plugin syntax', function (t) { - var ast = acorn.parse( - 'async function* a() { try { await import(xyz); } catch { for await (x of null) {} } yield import.meta.url }', - { sourceType: 'module' } - ) - t.plan(2) - walk.simple(ast, { - Import: function () { - t.pass('import()') - }, - MetaProperty: function () { - t.pass('import.meta') - } - }) - t.end() -}) diff --git a/node_modules/acorn-node/walk.js b/node_modules/acorn-node/walk.js deleted file mode 100644 index 273a30c..0000000 --- a/node_modules/acorn-node/walk.js +++ /dev/null @@ -1,57 +0,0 @@ -var xtend = require('xtend') -var walk = require('acorn-walk') - -var base = xtend(walk.base) -base.Import = function () {} - -function simple (node, visitors, baseVisitor, state, override) { - return walk.simple(node, visitors, baseVisitor || base, state, override) -} - -function ancestor (node, visitors, baseVisitor, state) { - return walk.ancestor(node, visitors, baseVisitor || base, state) -} - -function recursive (node, state, funcs, baseVisitor, override) { - return walk.recursive(node, state, funcs, baseVisitor || base, override) -} - -function full (node, callback, baseVisitor, state, override) { - return walk.full(node, callback, baseVisitor || base, state, override) -} - -function fullAncestor (node, callback, baseVisitor, state) { - return walk.fullAncestor(node, callback, baseVisitor || base, state) -} - -function findNodeAt (node, start, end, test, baseVisitor, state) { - return walk.findNodeAt(node, start, end, test, baseVisitor || base, state) -} - -function findNodeAround (node, pos, test, baseVisitor, state) { - return walk.findNodeAround(node, pos, test, baseVisitor || base, state) -} - -function findNodeAfter (node, pos, test, baseVisitor, state) { - return walk.findNodeAfter(node, pos, test, baseVisitor || base, state) -} - -function findNodeBefore (node, pos, test, baseVisitor, state) { - return walk.findNodeBefore(node, pos, test, baseVisitor || base, state) -} - -function make (funcs, baseVisitor) { - return walk.make(funcs, baseVisitor || base) -} - -exports.simple = simple -exports.ancestor = ancestor -exports.recursive = recursive -exports.full = full -exports.fullAncestor = fullAncestor -exports.findNodeAt = findNodeAt -exports.findNodeAround = findNodeAround -exports.findNodeAfter = findNodeAfter -exports.findNodeBefore = findNodeBefore -exports.make = make -exports.base = base diff --git a/node_modules/acorn-walk/CHANGELOG.md b/node_modules/acorn-walk/CHANGELOG.md deleted file mode 100644 index 82d4399..0000000 --- a/node_modules/acorn-walk/CHANGELOG.md +++ /dev/null @@ -1,109 +0,0 @@ -## 7.0.0 (2017-08-12) - -### New features - -Support walking `ImportExpression` nodes. - -## 6.2.0 (2017-07-04) - -### New features - -Add support for `Import` nodes. - -## 6.1.0 (2018-09-28) - -### New features - -The walker now walks `TemplateElement` nodes. - -## 6.0.1 (2018-09-14) - -### Bug fixes - -Fix bad "main" field in package.json. - -## 6.0.0 (2018-09-14) - -### Breaking changes - -This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package. - -The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported. - -## 5.7.1 (2018-06-15) - -### Bug fixes - -Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions). - -## 5.7.0 (2018-06-15) - -### Bug fixes - -Fix crash in walker when walking a binding-less catch node. - -## 5.6.2 (2018-06-05) - -### Bug fixes - -In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere. - -## 5.6.1 (2018-06-01) - -### Bug fixes - -Fix regression when passing `null` as fourth argument to `walk.recursive`. - -## 5.6.0 (2018-05-31) - -### Bug fixes - -Fix a bug in the walker that caused a crash when walking an object pattern spread. - -## 5.5.1 (2018-03-06) - -### Bug fixes - -Fix regression in walker causing property values in object patterns to be walked as expressions. - -## 5.5.0 (2018-02-27) - -### Bug fixes - -Support object spread in the AST walker. - -## 5.4.1 (2018-02-02) - -### Bug fixes - -5.4.0 somehow accidentally included an old version of walk.js. - -## 5.2.0 (2017-10-30) - -### Bug fixes - -The `full` and `fullAncestor` walkers no longer visit nodes multiple times. - -## 5.1.0 (2017-07-05) - -### New features - -New walker functions `full` and `fullAncestor`. - -## 3.2.0 (2016-06-07) - -### New features - -Make it possible to use `visit.ancestor` with a walk state. - -## 3.1.0 (2016-04-18) - -### New features - -The walker now allows defining handlers for `CatchClause` nodes. - -## 2.5.2 (2015-10-27) - -### Fixes - -Fix bug where the walker walked an exported `let` statement as an expression. diff --git a/node_modules/acorn-walk/LICENSE b/node_modules/acorn-walk/LICENSE deleted file mode 100644 index 2c0632b..0000000 --- a/node_modules/acorn-walk/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2018 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/acorn-walk/README.md b/node_modules/acorn-walk/README.md deleted file mode 100644 index e192bac..0000000 --- a/node_modules/acorn-walk/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# Acorn AST walker - -An abstract syntax tree walker for the -[ESTree](https://github.com/estree/estree) format. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE). - -You are welcome to -[report bugs](https://github.com/acornjs/acorn/issues) or create pull -requests on [github](https://github.com/acornjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): - -```sh -npm install acorn-walk -``` - -Alternately, you can download the source and build acorn yourself: - -```sh -git clone https://github.com/acornjs/acorn.git -cd acorn -npm install -``` - -## Interface - -An algorithm for recursing through a syntax tree is stored as an -object, with a property for each tree node type holding a function -that will recurse through such a node. There are several ways to run -such a walker. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over a -tree. `node` should be the AST node to walk, and `visitors` an object -with properties whose names correspond to node types in the [ESTree -spec](https://github.com/estree/estree). The properties should contain -functions that will be called with the node object and, if applicable -the state at that point. The last two arguments are optional. `base` -is a walker algorithm, and `state` is a start state. The default -walker will simply visit all statements and expressions and not -produce a meaningful state. (An example of a use of state is to track -scope at each point in the tree.) - -```js -const acorn = require("acorn") -const walk = require("acorn-walk") - -walk.simple(acorn.parse("let x = 10"), { - Literal(node) { - console.log(`Found a literal: ${node.value}`) - } -}) -``` - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to the callbacks as a third parameter. - -```js -const acorn = require("acorn") -const walk = require("acorn-walk") - -walk.ancestor(acorn.parse("foo('hi')"), { - Literal(_, ancestors) { - console.log("This literal's ancestors are:", ancestors.map(n => n.type)) - } -}) -``` - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**full**`(node, callback, base, state)` does a 'full' walk over a -tree, calling the callback with the arguments (node, state, type) for -each node - -**fullAncestor**`(node, callback, base, state)` does a 'full' walk -over a tree, building up an array of ancestor nodes (including the -current node) and passing the array to the callbacks as a third -parameter. - -```js -const acorn = require("acorn") -const walk = require("acorn-walk") - -walk.full(acorn.parse("1 + 1"), node => { - console.log(`There's a ${node.type} node at ${node.ch}`) -}) -``` - -**findNodeAt**`(node, start, end, test, base, state)` tries to locate -a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` and `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). diff --git a/node_modules/acorn-walk/dist/walk.js b/node_modules/acorn-walk/dist/walk.js deleted file mode 100644 index 387b337..0000000 --- a/node_modules/acorn-walk/dist/walk.js +++ /dev/null @@ -1,461 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); -}(this, function (exports) { 'use strict'; - - // AST walker module for Mozilla Parser API compatible trees - - // A simple walk is one where you simply specify callbacks to be - // called on specific nodes. The last two arguments are optional. A - // simple use would be - // - // walk.simple(myTree, { - // Expression: function(node) { ... } - // }); - // - // to do something with all expressions. All Parser API node types - // can be used to identify node types, as well as Expression and - // Statement, which denote categories of nodes. - // - // The base argument can be used to pass a custom (recursive) - // walker, and state can be used to give this walked an initial - // state. - - function simple(node, visitors, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - baseVisitor[type](node, st, c); - if (found) { found(node, st); } - })(node, state, override); - } - - // An ancestor walk keeps an array of ancestor nodes (including the - // current node) and passes them to the callback as third parameter - // (and also as state parameter when no other state is present). - function ancestor(node, visitors, baseVisitor, state) { - var ancestors = []; - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (found) { found(node, st || ancestors, ancestors); } - if (isNew) { ancestors.pop(); } - })(node, state); - } - - // A recursive walk is one where your functions override the default - // walkers. They can modify and replace the state parameter that's - // threaded through the walk, and can opt how and whether to walk - // their child nodes (by calling their third argument on these - // nodes). - function recursive(node, state, funcs, baseVisitor, override) { - var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor - ;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); - } - - function makeTest(test) { - if (typeof test === "string") - { return function (type) { return type === test; } } - else if (!test) - { return function () { return true; } } - else - { return test } - } - - var Found = function Found(node, state) { this.node = node; this.state = state; }; - - // A full walk triggers the callback on each node - function full(node, callback, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type; - baseVisitor[type](node, st, c); - if (!override) { callback(node, st, type); } - })(node, state, override); - } - - // An fullAncestor walk is like an ancestor walk, but triggers - // the callback on each node - function fullAncestor(node, callback, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - var ancestors = [] - ;(function c(node, st, override) { - var type = override || node.type; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (!override) { callback(node, st || ancestors, ancestors, type); } - if (isNew) { ancestors.pop(); } - })(node, state); - } - - // Find a node with a given start, end, and type (all are optional, - // null can be used as wildcard). Returns a {node, state} object, or - // undefined when it doesn't find a matching node. - function findNodeAt(node, start, end, test, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - test = makeTest(test); - try { - (function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && - (end == null || node.end >= end)) - { baseVisitor[type](node, st, c); } - if ((start == null || node.start === start) && - (end == null || node.end === end) && - test(type, node)) - { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } - } - - // Find the innermost node of a given type that contains the given - // position. Interface similar to findNodeAt. - function findNodeAround(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - var type = override || node.type; - if (node.start > pos || node.end < pos) { return } - baseVisitor[type](node, st, c); - if (test(type, node)) { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } - } - - // Find the outermost matching node after a given position. - function findNodeAfter(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - if (node.end < pos) { return } - var type = override || node.type; - if (node.start >= pos && test(type, node)) { throw new Found(node, st) } - baseVisitor[type](node, st, c); - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } - } - - // Find the outermost matching node before a given position. - function findNodeBefore(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - var max - ;(function c(node, st, override) { - if (node.start > pos) { return } - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) - { max = new Found(node, st); } - baseVisitor[type](node, st, c); - })(node, state); - return max - } - - // Fallback to an Object.create polyfill for older environments. - var create = Object.create || function(proto) { - function Ctor() {} - Ctor.prototype = proto; - return new Ctor - }; - - // Used to create a custom walker. Will fill in all missing node - // type properties with the defaults. - function make(funcs, baseVisitor) { - var visitor = create(baseVisitor || base); - for (var type in funcs) { visitor[type] = funcs[type]; } - return visitor - } - - function skipThrough(node, st, c) { c(node, st); } - function ignore(_node, _st, _c) {} - - // Node walkers. - - var base = {}; - - base.Program = base.BlockStatement = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var stmt = list[i]; - - c(stmt, st, "Statement"); - } - }; - base.Statement = skipThrough; - base.EmptyStatement = ignore; - base.ExpressionStatement = base.ParenthesizedExpression = - function (node, st, c) { return c(node.expression, st, "Expression"); }; - base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) { c(node.alternate, st, "Statement"); } - }; - base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; - base.BreakStatement = base.ContinueStatement = ignore; - base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); - }; - base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { - var cs = list$1[i$1]; - - if (cs.test) { c(cs.test, st, "Expression"); } - for (var i = 0, list = cs.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } - } - }; - base.SwitchCase = function (node, st, c) { - if (node.test) { c(node.test, st, "Expression"); } - for (var i = 0, list = node.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } - }; - base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { - if (node.argument) { c(node.argument, st, "Expression"); } - }; - base.ThrowStatement = base.SpreadElement = - function (node, st, c) { return c(node.argument, st, "Expression"); }; - base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) { c(node.handler, st); } - if (node.finalizer) { c(node.finalizer, st, "Statement"); } - }; - base.CatchClause = function (node, st, c) { - if (node.param) { c(node.param, st, "Pattern"); } - c(node.body, st, "Statement"); - }; - base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); - }; - base.ForStatement = function (node, st, c) { - if (node.init) { c(node.init, st, "ForInit"); } - if (node.test) { c(node.test, st, "Expression"); } - if (node.update) { c(node.update, st, "Expression"); } - c(node.body, st, "Statement"); - }; - base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); - }; - base.ForInit = function (node, st, c) { - if (node.type === "VariableDeclaration") { c(node, st); } - else { c(node, st, "Expression"); } - }; - base.DebuggerStatement = ignore; - - base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; - base.VariableDeclaration = function (node, st, c) { - for (var i = 0, list = node.declarations; i < list.length; i += 1) - { - var decl = list[i]; - - c(decl, st); - } - }; - base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) { c(node.init, st, "Expression"); } - }; - - base.Function = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - c(param, st, "Pattern"); - } - c(node.body, st, node.expression ? "Expression" : "Statement"); - }; - - base.Pattern = function (node, st, c) { - if (node.type === "Identifier") - { c(node, st, "VariablePattern"); } - else if (node.type === "MemberExpression") - { c(node, st, "MemberPattern"); } - else - { c(node, st); } - }; - base.VariablePattern = ignore; - base.MemberPattern = skipThrough; - base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; - base.ArrayPattern = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Pattern"); } - } - }; - base.ObjectPattern = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - if (prop.type === "Property") { - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); - } else if (prop.type === "RestElement") { - c(prop.argument, st, "Pattern"); - } - } - }; - - base.Expression = skipThrough; - base.ThisExpression = base.Super = base.MetaProperty = ignore; - base.ArrayExpression = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Expression"); } - } - }; - base.ObjectExpression = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) - { - var prop = list[i]; - - c(prop, st); - } - }; - base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; - base.SequenceExpression = function (node, st, c) { - for (var i = 0, list = node.expressions; i < list.length; i += 1) - { - var expr = list[i]; - - c(expr, st, "Expression"); - } - }; - base.TemplateLiteral = function (node, st, c) { - for (var i = 0, list = node.quasis; i < list.length; i += 1) - { - var quasi = list[i]; - - c(quasi, st); - } - - for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) - { - var expr = list$1[i$1]; - - c(expr, st, "Expression"); - } - }; - base.TemplateElement = ignore; - base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); - }; - base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); - }; - base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); - }; - base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); - }; - base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) - { for (var i = 0, list = node.arguments; i < list.length; i += 1) - { - var arg = list[i]; - - c(arg, st, "Expression"); - } } - }; - base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) { c(node.property, st, "Expression"); } - }; - base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) - { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } - if (node.source) { c(node.source, st, "Expression"); } - }; - base.ExportAllDeclaration = function (node, st, c) { - c(node.source, st, "Expression"); - }; - base.ImportDeclaration = function (node, st, c) { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) - { - var spec = list[i]; - - c(spec, st); - } - c(node.source, st, "Expression"); - }; - base.ImportExpression = function (node, st, c) { - c(node.source, st, "Expression"); - }; - base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; - - base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st, "Expression"); - }; - base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; - base.Class = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - if (node.superClass) { c(node.superClass, st, "Expression"); } - c(node.body, st); - }; - base.ClassBody = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var elt = list[i]; - - c(elt, st); - } - }; - base.MethodDefinition = base.Property = function (node, st, c) { - if (node.computed) { c(node.key, st, "Expression"); } - c(node.value, st, "Expression"); - }; - - exports.ancestor = ancestor; - exports.base = base; - exports.findNodeAfter = findNodeAfter; - exports.findNodeAround = findNodeAround; - exports.findNodeAt = findNodeAt; - exports.findNodeBefore = findNodeBefore; - exports.full = full; - exports.fullAncestor = fullAncestor; - exports.make = make; - exports.recursive = recursive; - exports.simple = simple; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/acorn-walk/dist/walk.js.map b/node_modules/acorn-walk/dist/walk.js.map deleted file mode 100644 index 5590a29..0000000 --- a/node_modules/acorn-walk/dist/walk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walk.js","sources":["../src/index.js"],"sourcesContent":["// AST walker module for Mozilla Parser API compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\n\nexport function simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n baseVisitor[type](node, st, c)\n if (found) found(node, st)\n })(node, state, override)\n}\n\n// An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\nexport function ancestor(node, visitors, baseVisitor, state) {\n let ancestors = []\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (found) found(node, st || ancestors, ancestors)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\nexport function recursive(node, state, funcs, baseVisitor, override) {\n let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor\n ;(function c(node, st, override) {\n visitor[override || node.type](node, st, c)\n })(node, state, override)\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\")\n return type => type === test\n else if (!test)\n return () => true\n else\n return test\n}\n\nclass Found {\n constructor(node, state) { this.node = node; this.state = state }\n}\n\n// A full walk triggers the callback on each node\nexport function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st, type)\n })(node, state, override)\n}\n\n// An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\nexport function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n let ancestors = []\n ;(function c(node, st, override) {\n let type = override || node.type\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st || ancestors, ancestors, type)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\nexport function findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n test = makeTest(test)\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if ((start == null || node.start <= start) &&\n (end == null || node.end >= end))\n baseVisitor[type](node, st, c)\n if ((start == null || node.start === start) &&\n (end == null || node.end === end) &&\n test(type, node))\n throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\nexport function findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if (node.start > pos || node.end < pos) return\n baseVisitor[type](node, st, c)\n if (test(type, node)) throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node after a given position.\nexport function findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n if (node.end < pos) return\n let type = override || node.type\n if (node.start >= pos && test(type, node)) throw new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node before a given position.\nexport function findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n let max\n ;(function c(node, st, override) {\n if (node.start > pos) return\n let type = override || node.type\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n max = new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n return max\n}\n\n// Fallback to an Object.create polyfill for older environments.\nconst create = Object.create || function(proto) {\n function Ctor() {}\n Ctor.prototype = proto\n return new Ctor\n}\n\n// Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\nexport function make(funcs, baseVisitor) {\n let visitor = create(baseVisitor || base)\n for (let type in funcs) visitor[type] = funcs[type]\n return visitor\n}\n\nfunction skipThrough(node, st, c) { c(node, st) }\nfunction ignore(_node, _st, _c) {}\n\n// Node walkers.\n\nexport const base = {}\n\nbase.Program = base.BlockStatement = (node, st, c) => {\n for (let stmt of node.body)\n c(stmt, st, \"Statement\")\n}\nbase.Statement = skipThrough\nbase.EmptyStatement = ignore\nbase.ExpressionStatement = base.ParenthesizedExpression =\n (node, st, c) => c(node.expression, st, \"Expression\")\nbase.IfStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Statement\")\n if (node.alternate) c(node.alternate, st, \"Statement\")\n}\nbase.LabeledStatement = (node, st, c) => c(node.body, st, \"Statement\")\nbase.BreakStatement = base.ContinueStatement = ignore\nbase.WithStatement = (node, st, c) => {\n c(node.object, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.SwitchStatement = (node, st, c) => {\n c(node.discriminant, st, \"Expression\")\n for (let cs of node.cases) {\n if (cs.test) c(cs.test, st, \"Expression\")\n for (let cons of cs.consequent)\n c(cons, st, \"Statement\")\n }\n}\nbase.SwitchCase = (node, st, c) => {\n if (node.test) c(node.test, st, \"Expression\")\n for (let cons of node.consequent)\n c(cons, st, \"Statement\")\n}\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {\n if (node.argument) c(node.argument, st, \"Expression\")\n}\nbase.ThrowStatement = base.SpreadElement =\n (node, st, c) => c(node.argument, st, \"Expression\")\nbase.TryStatement = (node, st, c) => {\n c(node.block, st, \"Statement\")\n if (node.handler) c(node.handler, st)\n if (node.finalizer) c(node.finalizer, st, \"Statement\")\n}\nbase.CatchClause = (node, st, c) => {\n if (node.param) c(node.param, st, \"Pattern\")\n c(node.body, st, \"Statement\")\n}\nbase.WhileStatement = base.DoWhileStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForStatement = (node, st, c) => {\n if (node.init) c(node.init, st, \"ForInit\")\n if (node.test) c(node.test, st, \"Expression\")\n if (node.update) c(node.update, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInStatement = base.ForOfStatement = (node, st, c) => {\n c(node.left, st, \"ForInit\")\n c(node.right, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInit = (node, st, c) => {\n if (node.type === \"VariableDeclaration\") c(node, st)\n else c(node, st, \"Expression\")\n}\nbase.DebuggerStatement = ignore\n\nbase.FunctionDeclaration = (node, st, c) => c(node, st, \"Function\")\nbase.VariableDeclaration = (node, st, c) => {\n for (let decl of node.declarations)\n c(decl, st)\n}\nbase.VariableDeclarator = (node, st, c) => {\n c(node.id, st, \"Pattern\")\n if (node.init) c(node.init, st, \"Expression\")\n}\n\nbase.Function = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n for (let param of node.params)\n c(param, st, \"Pattern\")\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\")\n}\n\nbase.Pattern = (node, st, c) => {\n if (node.type === \"Identifier\")\n c(node, st, \"VariablePattern\")\n else if (node.type === \"MemberExpression\")\n c(node, st, \"MemberPattern\")\n else\n c(node, st)\n}\nbase.VariablePattern = ignore\nbase.MemberPattern = skipThrough\nbase.RestElement = (node, st, c) => c(node.argument, st, \"Pattern\")\nbase.ArrayPattern = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Pattern\")\n }\n}\nbase.ObjectPattern = (node, st, c) => {\n for (let prop of node.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) c(prop.key, st, \"Expression\")\n c(prop.value, st, \"Pattern\")\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\")\n }\n }\n}\n\nbase.Expression = skipThrough\nbase.ThisExpression = base.Super = base.MetaProperty = ignore\nbase.ArrayExpression = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Expression\")\n }\n}\nbase.ObjectExpression = (node, st, c) => {\n for (let prop of node.properties)\n c(prop, st)\n}\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration\nbase.SequenceExpression = (node, st, c) => {\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateLiteral = (node, st, c) => {\n for (let quasi of node.quasis)\n c(quasi, st)\n\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateElement = ignore\nbase.UnaryExpression = base.UpdateExpression = (node, st, c) => {\n c(node.argument, st, \"Expression\")\n}\nbase.BinaryExpression = base.LogicalExpression = (node, st, c) => {\n c(node.left, st, \"Expression\")\n c(node.right, st, \"Expression\")\n}\nbase.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {\n c(node.left, st, \"Pattern\")\n c(node.right, st, \"Expression\")\n}\nbase.ConditionalExpression = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Expression\")\n c(node.alternate, st, \"Expression\")\n}\nbase.NewExpression = base.CallExpression = (node, st, c) => {\n c(node.callee, st, \"Expression\")\n if (node.arguments)\n for (let arg of node.arguments)\n c(arg, st, \"Expression\")\n}\nbase.MemberExpression = (node, st, c) => {\n c(node.object, st, \"Expression\")\n if (node.computed) c(node.property, st, \"Expression\")\n}\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {\n if (node.declaration)\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\")\n if (node.source) c(node.source, st, \"Expression\")\n}\nbase.ExportAllDeclaration = (node, st, c) => {\n c(node.source, st, \"Expression\")\n}\nbase.ImportDeclaration = (node, st, c) => {\n for (let spec of node.specifiers)\n c(spec, st)\n c(node.source, st, \"Expression\")\n}\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore\n\nbase.TaggedTemplateExpression = (node, st, c) => {\n c(node.tag, st, \"Expression\")\n c(node.quasi, st, \"Expression\")\n}\nbase.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, \"Class\")\nbase.Class = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n if (node.superClass) c(node.superClass, st, \"Expression\")\n c(node.body, st)\n}\nbase.ClassBody = (node, st, c) => {\n for (let elt of node.body)\n c(elt, st)\n}\nbase.MethodDefinition = base.Property = (node, st, c) => {\n if (node.computed) c(node.key, st, \"Expression\")\n c(node.value, st, \"Expression\")\n}\n"],"names":["let","const"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBA,AAAO,SAAS,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACnE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;;AAKD,AAAO,SAAS,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC3DA,IAAI,SAAS,GAAG,GAAE;EAClB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxDA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAC,EAAA;IAClD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;;;AAOD,AAAO,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE;EACnEA,IAAI,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,SAAS,CAAC,GAAG,WAAW,CACxE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC5C,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;AAED,SAAS,QAAQ,CAAC,IAAI,EAAE;EACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;IAC1B,EAAA,OAAO,UAAA,IAAI,EAAC,SAAG,IAAI,KAAK,IAAI,GAAA,EAAA;OACzB,IAAI,CAAC,IAAI;IACZ,EAAA,OAAO,YAAG,SAAG,IAAI,GAAA,EAAA;;IAEjB,EAAA,OAAO,IAAI,EAAA;CACd;;AAED,IAAM,KAAK,GAAC,cACC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAK,EAAE,CAAA;;;AAInE,AAAO,SAAS,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACjE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,EAAA;GACxC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;AAID,AAAO,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC/D,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,SAAS,GAAG,EAAE,CACjB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChCA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,EAAA;IAC/D,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;AAKD,AAAO,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACrE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK;WACpC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAClC,EAAA,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC,EAAA;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;WACrC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;UACjC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;QAClB,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAC5B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;;AAID,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC9C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;MAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAChD,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACjE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9B,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC1BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;MACpE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;KAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,GAAG,CACN,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;IAC5BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;MAC1E,EAAA,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;IAC3B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;EACf,OAAO,GAAG;CACX;;;AAGDC,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,KAAK,EAAE;EAC9C,SAAS,IAAI,GAAG,EAAE;EAClB,IAAI,CAAC,SAAS,GAAG,MAAK;EACtB,OAAO,IAAI,IAAI;EAChB;;;;AAID,AAAO,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;EACvCD,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAC;EACzC,KAAKA,IAAI,IAAI,IAAI,KAAK,EAAE,EAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAC,EAAA;EACnD,OAAO,OAAO;CACf;;AAED,SAAS,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAE;AACjD,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;;;;AAIlC,AAAOC,IAAM,IAAI,GAAG,GAAE;;AAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjD,KAAa,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAArB;IAAAD,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,SAAS,GAAG,YAAW;AAC5B,IAAI,CAAC,cAAc,GAAG,OAAM;AAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,uBAAuB;EACrD,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACvD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAC;EACnC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,IAAA;AACtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,GAAG,OAAM;AACrD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,YAAY,EAAC;EACtC,KAAW,kBAAI,IAAI,CAAC,KAAK,yBAAA,EAAE;IAAtBA,IAAI,EAAE;;IACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;IACzC,KAAa,sBAAI,EAAE,CAAC,UAAU,+BAAA;MAAzB;MAAAA,IAAI,IAAI;;MACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;KAAA;GAC3B;EACF;AACD,IAAI,CAAC,UAAU,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjF,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa;EACtC,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACrD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAC,EAAA;EACrC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACjD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;OAC/C,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC/B;AACD,IAAI,CAAC,iBAAiB,GAAG,OAAM;;AAE/B,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,IAAA;AACnE,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvC,KAAa,kBAAI,IAAI,CAAC,YAAY,yBAAA;IAA7B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC;EACzB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC9C;;AAED,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5B,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;GAAA;EACzB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,WAAW,EAAC;EAC/D;;AAED,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;IAC5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAC,EAAA;OAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;IACvC,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAA;;IAE5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;EACd;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,aAAa,GAAG,YAAW;AAChC,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,IAAA;AACnE,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;GAC/B;EACF;AACD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA,EAAE;IAA7BA,IAAI,IAAI;;IACX,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;MAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;KAC7B,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;MACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC;KAChC;GACF;EACF;;AAED,IAAI,CAAC,UAAU,GAAG,YAAW;AAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,OAAM;AAC7D,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;GAClC;EACF;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,oBAAmB;AACjF,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,KAAa,kBAAI,IAAI,CAAC,WAAW,yBAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAC;GAAA;;EAEd,KAAa,sBAAI,IAAI,CAAC,WAAW,+BAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3D,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC;EACnC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,qBAAqB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC;AACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvD,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,SAAS;IAChB,EAAA,KAAY,kBAAI,IAAI,CAAC,SAAS,yBAAA;MAAzB;QAAAA,IAAI,GAAG;;QACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;OAAA,EAAA;EAC7B;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1E,IAAI,IAAI,CAAC,WAAW;IAClB,EAAA,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,YAAY,EAAC,EAAA;EACrH,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAClD;AACD,IAAI,CAAC,oBAAoB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACrC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACb,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,OAAM;;AAE5H,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;EAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,IAAA;AACpF,IAAI,CAAC,KAAK,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzB,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACzD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAC;EACjB;AACD,IAAI,CAAC,SAAS,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7B,KAAY,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAApB;IAAAA,IAAI,GAAG;;IACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC;GAAA;EACb;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpD,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;CAChC;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/acorn-walk/dist/walk.mjs b/node_modules/acorn-walk/dist/walk.mjs deleted file mode 100644 index 65b23ed..0000000 --- a/node_modules/acorn-walk/dist/walk.mjs +++ /dev/null @@ -1,441 +0,0 @@ -// AST walker module for Mozilla Parser API compatible trees - -// A simple walk is one where you simply specify callbacks to be -// called on specific nodes. The last two arguments are optional. A -// simple use would be -// -// walk.simple(myTree, { -// Expression: function(node) { ... } -// }); -// -// to do something with all expressions. All Parser API node types -// can be used to identify node types, as well as Expression and -// Statement, which denote categories of nodes. -// -// The base argument can be used to pass a custom (recursive) -// walker, and state can be used to give this walked an initial -// state. - -function simple(node, visitors, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - baseVisitor[type](node, st, c); - if (found) { found(node, st); } - })(node, state, override); -} - -// An ancestor walk keeps an array of ancestor nodes (including the -// current node) and passes them to the callback as third parameter -// (and also as state parameter when no other state is present). -function ancestor(node, visitors, baseVisitor, state) { - var ancestors = []; - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (found) { found(node, st || ancestors, ancestors); } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// A recursive walk is one where your functions override the default -// walkers. They can modify and replace the state parameter that's -// threaded through the walk, and can opt how and whether to walk -// their child nodes (by calling their third argument on these -// nodes). -function recursive(node, state, funcs, baseVisitor, override) { - var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor - ;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); -} - -function makeTest(test) { - if (typeof test === "string") - { return function (type) { return type === test; } } - else if (!test) - { return function () { return true; } } - else - { return test } -} - -var Found = function Found(node, state) { this.node = node; this.state = state; }; - -// A full walk triggers the callback on each node -function full(node, callback, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type; - baseVisitor[type](node, st, c); - if (!override) { callback(node, st, type); } - })(node, state, override); -} - -// An fullAncestor walk is like an ancestor walk, but triggers -// the callback on each node -function fullAncestor(node, callback, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - var ancestors = [] - ;(function c(node, st, override) { - var type = override || node.type; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (!override) { callback(node, st || ancestors, ancestors, type); } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// Find a node with a given start, end, and type (all are optional, -// null can be used as wildcard). Returns a {node, state} object, or -// undefined when it doesn't find a matching node. -function findNodeAt(node, start, end, test, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - test = makeTest(test); - try { - (function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && - (end == null || node.end >= end)) - { baseVisitor[type](node, st, c); } - if ((start == null || node.start === start) && - (end == null || node.end === end) && - test(type, node)) - { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } -} - -// Find the innermost node of a given type that contains the given -// position. Interface similar to findNodeAt. -function findNodeAround(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - var type = override || node.type; - if (node.start > pos || node.end < pos) { return } - baseVisitor[type](node, st, c); - if (test(type, node)) { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } -} - -// Find the outermost matching node after a given position. -function findNodeAfter(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - if (node.end < pos) { return } - var type = override || node.type; - if (node.start >= pos && test(type, node)) { throw new Found(node, st) } - baseVisitor[type](node, st, c); - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e - } -} - -// Find the outermost matching node before a given position. -function findNodeBefore(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - var max - ;(function c(node, st, override) { - if (node.start > pos) { return } - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) - { max = new Found(node, st); } - baseVisitor[type](node, st, c); - })(node, state); - return max -} - -// Fallback to an Object.create polyfill for older environments. -var create = Object.create || function(proto) { - function Ctor() {} - Ctor.prototype = proto; - return new Ctor -}; - -// Used to create a custom walker. Will fill in all missing node -// type properties with the defaults. -function make(funcs, baseVisitor) { - var visitor = create(baseVisitor || base); - for (var type in funcs) { visitor[type] = funcs[type]; } - return visitor -} - -function skipThrough(node, st, c) { c(node, st); } -function ignore(_node, _st, _c) {} - -// Node walkers. - -var base = {}; - -base.Program = base.BlockStatement = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var stmt = list[i]; - - c(stmt, st, "Statement"); - } -}; -base.Statement = skipThrough; -base.EmptyStatement = ignore; -base.ExpressionStatement = base.ParenthesizedExpression = - function (node, st, c) { return c(node.expression, st, "Expression"); }; -base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) { c(node.alternate, st, "Statement"); } -}; -base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; -base.BreakStatement = base.ContinueStatement = ignore; -base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { - var cs = list$1[i$1]; - - if (cs.test) { c(cs.test, st, "Expression"); } - for (var i = 0, list = cs.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } - } -}; -base.SwitchCase = function (node, st, c) { - if (node.test) { c(node.test, st, "Expression"); } - for (var i = 0, list = node.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); - } -}; -base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { - if (node.argument) { c(node.argument, st, "Expression"); } -}; -base.ThrowStatement = base.SpreadElement = - function (node, st, c) { return c(node.argument, st, "Expression"); }; -base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) { c(node.handler, st); } - if (node.finalizer) { c(node.finalizer, st, "Statement"); } -}; -base.CatchClause = function (node, st, c) { - if (node.param) { c(node.param, st, "Pattern"); } - c(node.body, st, "Statement"); -}; -base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForStatement = function (node, st, c) { - if (node.init) { c(node.init, st, "ForInit"); } - if (node.test) { c(node.test, st, "Expression"); } - if (node.update) { c(node.update, st, "Expression"); } - c(node.body, st, "Statement"); -}; -base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForInit = function (node, st, c) { - if (node.type === "VariableDeclaration") { c(node, st); } - else { c(node, st, "Expression"); } -}; -base.DebuggerStatement = ignore; - -base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; -base.VariableDeclaration = function (node, st, c) { - for (var i = 0, list = node.declarations; i < list.length; i += 1) - { - var decl = list[i]; - - c(decl, st); - } -}; -base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) { c(node.init, st, "Expression"); } -}; - -base.Function = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - c(param, st, "Pattern"); - } - c(node.body, st, node.expression ? "Expression" : "Statement"); -}; - -base.Pattern = function (node, st, c) { - if (node.type === "Identifier") - { c(node, st, "VariablePattern"); } - else if (node.type === "MemberExpression") - { c(node, st, "MemberPattern"); } - else - { c(node, st); } -}; -base.VariablePattern = ignore; -base.MemberPattern = skipThrough; -base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; -base.ArrayPattern = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Pattern"); } - } -}; -base.ObjectPattern = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - if (prop.type === "Property") { - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); - } else if (prop.type === "RestElement") { - c(prop.argument, st, "Pattern"); - } - } -}; - -base.Expression = skipThrough; -base.ThisExpression = base.Super = base.MetaProperty = ignore; -base.ArrayExpression = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Expression"); } - } -}; -base.ObjectExpression = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) - { - var prop = list[i]; - - c(prop, st); - } -}; -base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; -base.SequenceExpression = function (node, st, c) { - for (var i = 0, list = node.expressions; i < list.length; i += 1) - { - var expr = list[i]; - - c(expr, st, "Expression"); - } -}; -base.TemplateLiteral = function (node, st, c) { - for (var i = 0, list = node.quasis; i < list.length; i += 1) - { - var quasi = list[i]; - - c(quasi, st); - } - - for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) - { - var expr = list$1[i$1]; - - c(expr, st, "Expression"); - } -}; -base.TemplateElement = ignore; -base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); -}; -base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); -}; -base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); -}; -base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); -}; -base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) - { for (var i = 0, list = node.arguments; i < list.length; i += 1) - { - var arg = list[i]; - - c(arg, st, "Expression"); - } } -}; -base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) { c(node.property, st, "Expression"); } -}; -base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) - { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } - if (node.source) { c(node.source, st, "Expression"); } -}; -base.ExportAllDeclaration = function (node, st, c) { - c(node.source, st, "Expression"); -}; -base.ImportDeclaration = function (node, st, c) { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) - { - var spec = list[i]; - - c(spec, st); - } - c(node.source, st, "Expression"); -}; -base.ImportExpression = function (node, st, c) { - c(node.source, st, "Expression"); -}; -base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; - -base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st, "Expression"); -}; -base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; -base.Class = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - if (node.superClass) { c(node.superClass, st, "Expression"); } - c(node.body, st); -}; -base.ClassBody = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var elt = list[i]; - - c(elt, st); - } -}; -base.MethodDefinition = base.Property = function (node, st, c) { - if (node.computed) { c(node.key, st, "Expression"); } - c(node.value, st, "Expression"); -}; - -export { ancestor, base, findNodeAfter, findNodeAround, findNodeAt, findNodeBefore, full, fullAncestor, make, recursive, simple }; diff --git a/node_modules/acorn-walk/dist/walk.mjs.map b/node_modules/acorn-walk/dist/walk.mjs.map deleted file mode 100644 index 2a94219..0000000 --- a/node_modules/acorn-walk/dist/walk.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walk.mjs","sources":["../src/index.js"],"sourcesContent":["// AST walker module for Mozilla Parser API compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\n\nexport function simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n baseVisitor[type](node, st, c)\n if (found) found(node, st)\n })(node, state, override)\n}\n\n// An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\nexport function ancestor(node, visitors, baseVisitor, state) {\n let ancestors = []\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (found) found(node, st || ancestors, ancestors)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\nexport function recursive(node, state, funcs, baseVisitor, override) {\n let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor\n ;(function c(node, st, override) {\n visitor[override || node.type](node, st, c)\n })(node, state, override)\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\")\n return type => type === test\n else if (!test)\n return () => true\n else\n return test\n}\n\nclass Found {\n constructor(node, state) { this.node = node; this.state = state }\n}\n\n// A full walk triggers the callback on each node\nexport function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st, type)\n })(node, state, override)\n}\n\n// An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\nexport function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n let ancestors = []\n ;(function c(node, st, override) {\n let type = override || node.type\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st || ancestors, ancestors, type)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\nexport function findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n test = makeTest(test)\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if ((start == null || node.start <= start) &&\n (end == null || node.end >= end))\n baseVisitor[type](node, st, c)\n if ((start == null || node.start === start) &&\n (end == null || node.end === end) &&\n test(type, node))\n throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\nexport function findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if (node.start > pos || node.end < pos) return\n baseVisitor[type](node, st, c)\n if (test(type, node)) throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node after a given position.\nexport function findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n if (node.end < pos) return\n let type = override || node.type\n if (node.start >= pos && test(type, node)) throw new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node before a given position.\nexport function findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n let max\n ;(function c(node, st, override) {\n if (node.start > pos) return\n let type = override || node.type\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n max = new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n return max\n}\n\n// Fallback to an Object.create polyfill for older environments.\nconst create = Object.create || function(proto) {\n function Ctor() {}\n Ctor.prototype = proto\n return new Ctor\n}\n\n// Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\nexport function make(funcs, baseVisitor) {\n let visitor = create(baseVisitor || base)\n for (let type in funcs) visitor[type] = funcs[type]\n return visitor\n}\n\nfunction skipThrough(node, st, c) { c(node, st) }\nfunction ignore(_node, _st, _c) {}\n\n// Node walkers.\n\nexport const base = {}\n\nbase.Program = base.BlockStatement = (node, st, c) => {\n for (let stmt of node.body)\n c(stmt, st, \"Statement\")\n}\nbase.Statement = skipThrough\nbase.EmptyStatement = ignore\nbase.ExpressionStatement = base.ParenthesizedExpression =\n (node, st, c) => c(node.expression, st, \"Expression\")\nbase.IfStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Statement\")\n if (node.alternate) c(node.alternate, st, \"Statement\")\n}\nbase.LabeledStatement = (node, st, c) => c(node.body, st, \"Statement\")\nbase.BreakStatement = base.ContinueStatement = ignore\nbase.WithStatement = (node, st, c) => {\n c(node.object, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.SwitchStatement = (node, st, c) => {\n c(node.discriminant, st, \"Expression\")\n for (let cs of node.cases) {\n if (cs.test) c(cs.test, st, \"Expression\")\n for (let cons of cs.consequent)\n c(cons, st, \"Statement\")\n }\n}\nbase.SwitchCase = (node, st, c) => {\n if (node.test) c(node.test, st, \"Expression\")\n for (let cons of node.consequent)\n c(cons, st, \"Statement\")\n}\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {\n if (node.argument) c(node.argument, st, \"Expression\")\n}\nbase.ThrowStatement = base.SpreadElement =\n (node, st, c) => c(node.argument, st, \"Expression\")\nbase.TryStatement = (node, st, c) => {\n c(node.block, st, \"Statement\")\n if (node.handler) c(node.handler, st)\n if (node.finalizer) c(node.finalizer, st, \"Statement\")\n}\nbase.CatchClause = (node, st, c) => {\n if (node.param) c(node.param, st, \"Pattern\")\n c(node.body, st, \"Statement\")\n}\nbase.WhileStatement = base.DoWhileStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForStatement = (node, st, c) => {\n if (node.init) c(node.init, st, \"ForInit\")\n if (node.test) c(node.test, st, \"Expression\")\n if (node.update) c(node.update, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInStatement = base.ForOfStatement = (node, st, c) => {\n c(node.left, st, \"ForInit\")\n c(node.right, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInit = (node, st, c) => {\n if (node.type === \"VariableDeclaration\") c(node, st)\n else c(node, st, \"Expression\")\n}\nbase.DebuggerStatement = ignore\n\nbase.FunctionDeclaration = (node, st, c) => c(node, st, \"Function\")\nbase.VariableDeclaration = (node, st, c) => {\n for (let decl of node.declarations)\n c(decl, st)\n}\nbase.VariableDeclarator = (node, st, c) => {\n c(node.id, st, \"Pattern\")\n if (node.init) c(node.init, st, \"Expression\")\n}\n\nbase.Function = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n for (let param of node.params)\n c(param, st, \"Pattern\")\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\")\n}\n\nbase.Pattern = (node, st, c) => {\n if (node.type === \"Identifier\")\n c(node, st, \"VariablePattern\")\n else if (node.type === \"MemberExpression\")\n c(node, st, \"MemberPattern\")\n else\n c(node, st)\n}\nbase.VariablePattern = ignore\nbase.MemberPattern = skipThrough\nbase.RestElement = (node, st, c) => c(node.argument, st, \"Pattern\")\nbase.ArrayPattern = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Pattern\")\n }\n}\nbase.ObjectPattern = (node, st, c) => {\n for (let prop of node.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) c(prop.key, st, \"Expression\")\n c(prop.value, st, \"Pattern\")\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\")\n }\n }\n}\n\nbase.Expression = skipThrough\nbase.ThisExpression = base.Super = base.MetaProperty = ignore\nbase.ArrayExpression = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Expression\")\n }\n}\nbase.ObjectExpression = (node, st, c) => {\n for (let prop of node.properties)\n c(prop, st)\n}\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration\nbase.SequenceExpression = (node, st, c) => {\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateLiteral = (node, st, c) => {\n for (let quasi of node.quasis)\n c(quasi, st)\n\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateElement = ignore\nbase.UnaryExpression = base.UpdateExpression = (node, st, c) => {\n c(node.argument, st, \"Expression\")\n}\nbase.BinaryExpression = base.LogicalExpression = (node, st, c) => {\n c(node.left, st, \"Expression\")\n c(node.right, st, \"Expression\")\n}\nbase.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {\n c(node.left, st, \"Pattern\")\n c(node.right, st, \"Expression\")\n}\nbase.ConditionalExpression = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Expression\")\n c(node.alternate, st, \"Expression\")\n}\nbase.NewExpression = base.CallExpression = (node, st, c) => {\n c(node.callee, st, \"Expression\")\n if (node.arguments)\n for (let arg of node.arguments)\n c(arg, st, \"Expression\")\n}\nbase.MemberExpression = (node, st, c) => {\n c(node.object, st, \"Expression\")\n if (node.computed) c(node.property, st, \"Expression\")\n}\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {\n if (node.declaration)\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\")\n if (node.source) c(node.source, st, \"Expression\")\n}\nbase.ExportAllDeclaration = (node, st, c) => {\n c(node.source, st, \"Expression\")\n}\nbase.ImportDeclaration = (node, st, c) => {\n for (let spec of node.specifiers)\n c(spec, st)\n c(node.source, st, \"Expression\")\n}\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore\n\nbase.TaggedTemplateExpression = (node, st, c) => {\n c(node.tag, st, \"Expression\")\n c(node.quasi, st, \"Expression\")\n}\nbase.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, \"Class\")\nbase.Class = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n if (node.superClass) c(node.superClass, st, \"Expression\")\n c(node.body, st)\n}\nbase.ClassBody = (node, st, c) => {\n for (let elt of node.body)\n c(elt, st)\n}\nbase.MethodDefinition = base.Property = (node, st, c) => {\n if (node.computed) c(node.key, st, \"Expression\")\n c(node.value, st, \"Expression\")\n}\n"],"names":["let","const"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBA,AAAO,SAAS,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACnE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;;AAKD,AAAO,SAAS,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC3DA,IAAI,SAAS,GAAG,GAAE;EAClB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxDA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAC,EAAA;IAClD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;;;AAOD,AAAO,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE;EACnEA,IAAI,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,SAAS,CAAC,GAAG,WAAW,CACxE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC5C,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;AAED,SAAS,QAAQ,CAAC,IAAI,EAAE;EACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;IAC1B,EAAA,OAAO,UAAA,IAAI,EAAC,SAAG,IAAI,KAAK,IAAI,GAAA,EAAA;OACzB,IAAI,CAAC,IAAI;IACZ,EAAA,OAAO,YAAG,SAAG,IAAI,GAAA,EAAA;;IAEjB,EAAA,OAAO,IAAI,EAAA;CACd;;AAED,IAAM,KAAK,GAAC,cACC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAK,EAAE,CAAA;;;AAInE,AAAO,SAAS,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACjE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,EAAA;GACxC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;AAID,AAAO,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC/D,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,SAAS,GAAG,EAAE,CACjB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChCA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,EAAA;IAC/D,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;AAKD,AAAO,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACrE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK;WACpC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAClC,EAAA,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC,EAAA;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;WACrC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;UACjC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;QAClB,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAC5B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;;AAID,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC9C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;MAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAChD,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACjE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9B,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC1BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;MACpE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;KAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,GAAG,CACN,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;IAC5BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;MAC1E,EAAA,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;IAC3B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;EACf,OAAO,GAAG;CACX;;;AAGDC,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,KAAK,EAAE;EAC9C,SAAS,IAAI,GAAG,EAAE;EAClB,IAAI,CAAC,SAAS,GAAG,MAAK;EACtB,OAAO,IAAI,IAAI;EAChB;;;;AAID,AAAO,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;EACvCD,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAC;EACzC,KAAKA,IAAI,IAAI,IAAI,KAAK,EAAE,EAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAC,EAAA;EACnD,OAAO,OAAO;CACf;;AAED,SAAS,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAE;AACjD,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;;;;AAIlC,AAAOC,IAAM,IAAI,GAAG,GAAE;;AAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjD,KAAa,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAArB;IAAAD,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,SAAS,GAAG,YAAW;AAC5B,IAAI,CAAC,cAAc,GAAG,OAAM;AAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,uBAAuB;EACrD,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACvD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAC;EACnC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,IAAA;AACtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,GAAG,OAAM;AACrD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,YAAY,EAAC;EACtC,KAAW,kBAAI,IAAI,CAAC,KAAK,yBAAA,EAAE;IAAtBA,IAAI,EAAE;;IACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;IACzC,KAAa,sBAAI,EAAE,CAAC,UAAU,+BAAA;MAAzB;MAAAA,IAAI,IAAI;;MACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;KAAA;GAC3B;EACF;AACD,IAAI,CAAC,UAAU,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjF,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa;EACtC,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACrD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAC,EAAA;EACrC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACjD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;OAC/C,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC/B;AACD,IAAI,CAAC,iBAAiB,GAAG,OAAM;;AAE/B,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,IAAA;AACnE,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvC,KAAa,kBAAI,IAAI,CAAC,YAAY,yBAAA;IAA7B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC;EACzB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC9C;;AAED,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5B,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;GAAA;EACzB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,WAAW,EAAC;EAC/D;;AAED,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;IAC5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAC,EAAA;OAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;IACvC,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAA;;IAE5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;EACd;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,aAAa,GAAG,YAAW;AAChC,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,IAAA;AACnE,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;GAC/B;EACF;AACD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA,EAAE;IAA7BA,IAAI,IAAI;;IACX,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;MAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;KAC7B,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;MACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC;KAChC;GACF;EACF;;AAED,IAAI,CAAC,UAAU,GAAG,YAAW;AAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,OAAM;AAC7D,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;GAClC;EACF;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,oBAAmB;AACjF,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,KAAa,kBAAI,IAAI,CAAC,WAAW,yBAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAC;GAAA;;EAEd,KAAa,sBAAI,IAAI,CAAC,WAAW,+BAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3D,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC;EACnC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,qBAAqB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC;AACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvD,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,SAAS;IAChB,EAAA,KAAY,kBAAI,IAAI,CAAC,SAAS,yBAAA;MAAzB;QAAAA,IAAI,GAAG;;QACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;OAAA,EAAA;EAC7B;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1E,IAAI,IAAI,CAAC,WAAW;IAClB,EAAA,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,YAAY,EAAC,EAAA;EACrH,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAClD;AACD,IAAI,CAAC,oBAAoB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACrC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACb,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,OAAM;;AAE5H,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;EAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,IAAA;AACpF,IAAI,CAAC,KAAK,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzB,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACzD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAC;EACjB;AACD,IAAI,CAAC,SAAS,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7B,KAAY,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAApB;IAAAA,IAAI,GAAG;;IACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC;GAAA;EACb;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpD,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;CAChC;;;;"} \ No newline at end of file diff --git a/node_modules/acorn-walk/package.json b/node_modules/acorn-walk/package.json deleted file mode 100644 index b898a28..0000000 --- a/node_modules/acorn-walk/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "acorn-walk@^7.0.0", - "_id": "acorn-walk@7.0.0", - "_inBundle": false, - "_integrity": "sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==", - "_location": "/acorn-walk", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "acorn-walk@^7.0.0", - "name": "acorn-walk", - "escapedName": "acorn-walk", - "rawSpec": "^7.0.0", - "saveSpec": null, - "fetchSpec": "^7.0.0" - }, - "_requiredBy": [ - "/acorn-node" - ], - "_resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.0.0.tgz", - "_shasum": "c8ba6f0f1aac4b0a9e32d1f0af12be769528f36b", - "_spec": "acorn-walk@^7.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/acorn-node", - "bugs": { - "url": "https://github.com/acornjs/acorn/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "ECMAScript (ESTree) AST walker", - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/acornjs/acorn", - "license": "MIT", - "main": "dist/walk.js", - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijnh@gmail.com", - "url": "https://marijnhaverbeke.nl" - }, - { - "name": "Ingvar Stepanyan", - "email": "me@rreverser.com", - "url": "https://rreverser.com/" - }, - { - "name": "Adrian Heine", - "url": "http://adrianheine.de" - } - ], - "module": "dist/walk.mjs", - "name": "acorn-walk", - "repository": { - "type": "git", - "url": "git+https://github.com/acornjs/acorn.git" - }, - "scripts": { - "prepare": "cd ..; npm run build:walk" - }, - "version": "7.0.0" -} diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md deleted file mode 100644 index e893c22..0000000 --- a/node_modules/acorn/CHANGELOG.md +++ /dev/null @@ -1,562 +0,0 @@ -## 7.1.0 (2019-09-24) - -### Bug fixes - -Disallow trailing object literal commas when ecmaVersion is less than 5. - -### New features - -Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on. - -## 7.0.0 (2019-08-13) - -### Breaking changes - -Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression). - -Makes 10 (ES2019) the default value for the `ecmaVersion` option. - -## 6.3.0 (2019-08-12) - -### New features - -`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. - -## 6.2.1 (2019-07-21) - -### Bug fixes - -Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. - -Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. - -## 6.2.0 (2019-07-04) - -### Bug fixes - -Improve valid assignment checking in `for`/`in` and `for`/`of` loops. - -Disallow binding `let` in patterns. - -### New features - -Support bigint syntax with `ecmaVersion` >= 11. - -Support dynamic `import` syntax with `ecmaVersion` >= 11. - -Upgrade to Unicode version 12. - -## 6.1.1 (2019-02-27) - -### Bug fixes - -Fix bug that caused parsing default exports of with names to fail. - -## 6.1.0 (2019-02-08) - -### Bug fixes - -Fix scope checking when redefining a `var` as a lexical binding. - -### New features - -Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. - -## 6.0.7 (2019-02-04) - -### Bug fixes - -Check that exported bindings are defined. - -Don't treat `\u180e` as a whitespace character. - -Check for duplicate parameter names in methods. - -Don't allow shorthand properties when they are generators or async methods. - -Forbid binding `await` in async arrow function's parameter list. - -## 6.0.6 (2019-01-30) - -### Bug fixes - -The content of class declarations and expressions is now always parsed in strict mode. - -Don't allow `let` or `const` to bind the variable name `let`. - -Treat class declarations as lexical. - -Don't allow a generator function declaration as the sole body of an `if` or `else`. - -Ignore `"use strict"` when after an empty statement. - -Allow string line continuations with special line terminator characters. - -Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. - -Fix bug with parsing `yield` in a `for` loop initializer. - -Implement special cases around scope checking for functions. - -## 6.0.5 (2019-01-02) - -### Bug fixes - -Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. - -Don't treat `let` as a keyword when the next token is `{` on the next line. - -Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. - -## 6.0.4 (2018-11-05) - -### Bug fixes - -Further improvements to tokenizing regular expressions in corner cases. - -## 6.0.3 (2018-11-04) - -### Bug fixes - -Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. - -Remove stray symlink in the package tarball. - -## 6.0.2 (2018-09-26) - -### Bug fixes - -Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. - -## 6.0.1 (2018-09-14) - -### Bug fixes - -Fix wrong value in `version` export. - -## 6.0.0 (2018-09-14) - -### Bug fixes - -Better handle variable-redefinition checks for catch bindings and functions directly under if statements. - -Forbid `new.target` in top-level arrow functions. - -Fix issue with parsing a regexp after `yield` in some contexts. - -### New features - -The package now comes with TypeScript definitions. - -### Breaking changes - -The default value of the `ecmaVersion` option is now 9 (2018). - -Plugins work differently, and will have to be rewritten to work with this version. - -The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). - -## 5.7.3 (2018-09-10) - -### Bug fixes - -Fix failure to tokenize regexps after expressions like `x.of`. - -Better error message for unterminated template literals. - -## 5.7.2 (2018-08-24) - -### Bug fixes - -Properly handle `allowAwaitOutsideFunction` in for statements. - -Treat function declarations at the top level of modules like let bindings. - -Don't allow async function declarations as the only statement under a label. - -## 5.7.0 (2018-06-15) - -### New features - -Upgraded to Unicode 11. - -## 5.6.0 (2018-05-31) - -### New features - -Allow U+2028 and U+2029 in string when ECMAVersion >= 10. - -Allow binding-less catch statements when ECMAVersion >= 10. - -Add `allowAwaitOutsideFunction` option for parsing top-level `await`. - -## 5.5.3 (2018-03-08) - -### Bug fixes - -A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. - -## 5.5.2 (2018-03-08) - -### Bug fixes - -A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. - -## 5.5.1 (2018-03-06) - -### Bug fixes - -Fix misleading error message for octal escapes in template strings. - -## 5.5.0 (2018-02-27) - -### New features - -The identifier character categorization is now based on Unicode version 10. - -Acorn will now validate the content of regular expressions, including new ES9 features. - -## 5.4.0 (2018-02-01) - -### Bug fixes - -Disallow duplicate or escaped flags on regular expressions. - -Disallow octal escapes in strings in strict mode. - -### New features - -Add support for async iteration. - -Add support for object spread and rest. - -## 5.3.0 (2017-12-28) - -### Bug fixes - -Fix parsing of floating point literals with leading zeroes in loose mode. - -Allow duplicate property names in object patterns. - -Don't allow static class methods named `prototype`. - -Disallow async functions directly under `if` or `else`. - -Parse right-hand-side of `for`/`of` as an assignment expression. - -Stricter parsing of `for`/`in`. - -Don't allow unicode escapes in contextual keywords. - -### New features - -Parsing class members was factored into smaller methods to allow plugins to hook into it. - -## 5.2.1 (2017-10-30) - -### Bug fixes - -Fix a token context corruption bug. - -## 5.2.0 (2017-10-30) - -### Bug fixes - -Fix token context tracking for `class` and `function` in property-name position. - -Make sure `%*` isn't parsed as a valid operator. - -Allow shorthand properties `get` and `set` to be followed by default values. - -Disallow `super` when not in callee or object position. - -### New features - -Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. - -## 5.1.2 (2017-09-04) - -### Bug fixes - -Disable parsing of legacy HTML-style comments in modules. - -Fix parsing of async methods whose names are keywords. - -## 5.1.1 (2017-07-06) - -### Bug fixes - -Fix problem with disambiguating regexp and division after a class. - -## 5.1.0 (2017-07-05) - -### Bug fixes - -Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. - -Parse zero-prefixed numbers with non-octal digits as decimal. - -Allow object/array patterns in rest parameters. - -Don't error when `yield` is used as a property name. - -Allow `async` as a shorthand object property. - -### New features - -Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. - -## 5.0.3 (2017-04-01) - -### Bug fixes - -Fix spurious duplicate variable definition errors for named functions. - -## 5.0.2 (2017-03-30) - -### Bug fixes - -A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. - -## 5.0.0 (2017-03-28) - -### Bug fixes - -Raise an error for duplicated lexical bindings. - -Fix spurious error when an assignement expression occurred after a spread expression. - -Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. - -Allow labels in front or `var` declarations, even in strict mode. - -### Breaking changes - -Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. - -## 4.0.11 (2017-02-07) - -### Bug fixes - -Allow all forms of member expressions to be parenthesized as lvalue. - -## 4.0.10 (2017-02-07) - -### Bug fixes - -Don't expect semicolons after default-exported functions or classes, even when they are expressions. - -Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. - -## 4.0.9 (2017-02-06) - -### Bug fixes - -Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. - -## 4.0.8 (2017-02-03) - -### Bug fixes - -Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. - -## 4.0.7 (2017-02-02) - -### Bug fixes - -Accept invalidly rejected code like `(x).y = 2` again. - -Don't raise an error when a function _inside_ strict code has a non-simple parameter list. - -## 4.0.6 (2017-02-02) - -### Bug fixes - -Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. - -## 4.0.5 (2017-02-02) - -### Bug fixes - -Disallow parenthesized pattern expressions. - -Allow keywords as export names. - -Don't allow the `async` keyword to be parenthesized. - -Properly raise an error when a keyword contains a character escape. - -Allow `"use strict"` to appear after other string literal expressions. - -Disallow labeled declarations. - -## 4.0.4 (2016-12-19) - -### Bug fixes - -Fix crash when `export` was followed by a keyword that can't be -exported. - -## 4.0.3 (2016-08-16) - -### Bug fixes - -Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. - -Properly parse properties named `async` in ES2017 mode. - -Fix bug where reserved words were broken in ES2017 mode. - -## 4.0.2 (2016-08-11) - -### Bug fixes - -Don't ignore period or 'e' characters after octal numbers. - -Fix broken parsing for call expressions in default parameter values of arrow functions. - -## 4.0.1 (2016-08-08) - -### Bug fixes - -Fix false positives in duplicated export name errors. - -## 4.0.0 (2016-08-07) - -### Breaking changes - -The default `ecmaVersion` option value is now 7. - -A number of internal method signatures changed, so plugins might need to be updated. - -### Bug fixes - -The parser now raises errors on duplicated export names. - -`arguments` and `eval` can now be used in shorthand properties. - -Duplicate parameter names in non-simple argument lists now always produce an error. - -### New features - -The `ecmaVersion` option now also accepts year-style version numbers -(2015, etc). - -Support for `async`/`await` syntax when `ecmaVersion` is >= 8. - -Support for trailing commas in call expressions when `ecmaVersion` is >= 8. - -## 3.3.0 (2016-07-25) - -### Bug fixes - -Fix bug in tokenizing of regexp operator after a function declaration. - -Fix parser crash when parsing an array pattern with a hole. - -### New features - -Implement check against complex argument lists in functions that enable strict mode in ES7. - -## 3.2.0 (2016-06-07) - -### Bug fixes - -Improve handling of lack of unicode regexp support in host -environment. - -Properly reject shorthand properties whose name is a keyword. - -### New features - -Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. - -## 3.1.0 (2016-04-18) - -### Bug fixes - -Properly tokenize the division operator directly after a function expression. - -Allow trailing comma in destructuring arrays. - -## 3.0.4 (2016-02-25) - -### Fixes - -Allow update expressions as left-hand-side of the ES7 exponential operator. - -## 3.0.2 (2016-02-10) - -### Fixes - -Fix bug that accidentally made `undefined` a reserved word when parsing ES7. - -## 3.0.0 (2016-02-10) - -### Breaking changes - -The default value of the `ecmaVersion` option is now 6 (used to be 5). - -Support for comprehension syntax (which was dropped from the draft spec) has been removed. - -### Fixes - -`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. - -A parenthesized class or function expression after `export default` is now parsed correctly. - -### New features - -When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). - -The identifier character ranges are now based on Unicode 8.0.0. - -Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. - -## 2.7.0 (2016-01-04) - -### Fixes - -Stop allowing rest parameters in setters. - -Disallow `y` rexexp flag in ES5. - -Disallow `\00` and `\000` escapes in strict mode. - -Raise an error when an import name is a reserved word. - -## 2.6.2 (2015-11-10) - -### Fixes - -Don't crash when no options object is passed. - -## 2.6.0 (2015-11-09) - -### Fixes - -Add `await` as a reserved word in module sources. - -Disallow `yield` in a parameter default value for a generator. - -Forbid using a comma after a rest pattern in an array destructuring. - -### New features - -Support parsing stdin in command-line tool. - -## 2.5.0 (2015-10-27) - -### Fixes - -Fix tokenizer support in the command-line tool. - -Stop allowing `new.target` outside of functions. - -Remove legacy `guard` and `guardedHandler` properties from try nodes. - -Stop allowing multiple `__proto__` properties on an object literal in strict mode. - -Don't allow rest parameters to be non-identifier patterns. - -Check for duplicate paramter names in arrow functions. diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE deleted file mode 100644 index 2c0632b..0000000 --- a/node_modules/acorn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2018 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md deleted file mode 100644 index 585f273..0000000 --- a/node_modules/acorn/README.md +++ /dev/null @@ -1,270 +0,0 @@ -# Acorn - -A tiny, fast JavaScript parser written in JavaScript. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). - -You are welcome to -[report bugs](https://github.com/acornjs/acorn/issues) or create pull -requests on [github](https://github.com/acornjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): - -```sh -npm install acorn -``` - -Alternately, you can download the source and build acorn yourself: - -```sh -git clone https://github.com/acornjs/acorn.git -cd acorn -npm install -``` - -## Interface - -**parse**`(input, options)` is the main interface to the library. The -`input` parameter is a string, `options` can be undefined or an object -setting some of the options listed below. The return value will be an -abstract syntax tree object as specified by the [ESTree -spec](https://github.com/estree/estree). - -```javascript -let acorn = require("acorn"); -console.log(acorn.parse("1 + 1")); -``` - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the string offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -Options can be provided by passing a second argument, which should be -an object containing any of these fields: - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019) or 11 - (2020, partial support). This influences support for strict mode, - the set of reserved words, and support for new syntax features. - Default is 10. - - **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being - implemented by Acorn. Other proposed new features can be implemented - through plugins. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. This influences global strict mode - and parsing of `import` and `export` declarations. - - **NOTE**: If set to `"module"`, then static `import` / `export` syntax - will be valid, even if `ecmaVersion` is less than 6. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher - versions. When given the value `"never"`, reserved words and - keywords can also not be used as property names (as in Internet - Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowAwaitOutsideFunction**: By default, `await` expressions can - only appear inside `async` functions. Setting this option to - `true` allows to have top-level `await` expressions. They are - still not allowed in non-`async` functions, though. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as tokens returned from - `tokenizer().getToken()`. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "start": Number, - "end": Number, - // If `locations` option is on: - "loc": { - "start": {line: Number, column: Number} - "end": {line: Number, column: Number} - }, - // If `ranges` option is on: - "range": [Number, Number] - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a - [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) - `range` property holding a `[start, end]` array with the same - numbers, set the `ranges` option to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added (regardless of the `location` option) directly to the - nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenizer(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenizer(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and offset. - -### The `Parser` class - -Instances of the **`Parser`** class contain all the state and logic -that drives a parse. It has static methods `parse`, -`parseExpressionAt`, and `tokenizer` that match the top-level -functions by the same name. - -When extending the parser with plugins, you need to call these methods -on the extended version of the class. To extend a parser with plugins, -you can use its static `extend` method. - -```javascript -var acorn = require("acorn"); -var jsx = require("acorn-jsx"); -var JSXParser = acorn.Parser.extend(jsx()); -JSXParser.parse("foo()"); -``` - -The `extend` method takes any number of plugin values, and returns a -new `Parser` class that includes the extra parser logic provided by -the plugins. - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version - to parse. Default is version 9. - -- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as - in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Existing plugins - - - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) - -Plugins for ECMAScript proposals: - - - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn deleted file mode 100755 index cf7df46..0000000 --- a/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -require('../dist/bin.js'); diff --git a/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn/dist/acorn.d.ts deleted file mode 100644 index bda5f80..0000000 --- a/node_modules/acorn/dist/acorn.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -export as namespace acorn -export = acorn - -declare namespace acorn { - function parse(input: string, options?: Options): Node - - function parseExpressionAt(input: string, pos?: number, options?: Options): Node - - function tokenizer(input: string, options?: Options): { - getToken(): Token - [Symbol.iterator](): Iterator - } - - interface Options { - ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 - sourceType?: 'script' | 'module' - onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void - onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void - allowReserved?: boolean | 'never' - allowReturnOutsideFunction?: boolean - allowImportExportEverywhere?: boolean - allowAwaitOutsideFunction?: boolean - allowHashBang?: boolean - locations?: boolean - onToken?: ((token: Token) => any) | Token[] - onComment?: (( - isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, - endLoc?: Position - ) => void) | Comment[] - ranges?: boolean - program?: Node - sourceFile?: string - directSourceFile?: string - preserveParens?: boolean - } - - class Parser { - constructor(options: Options, input: string, startPos?: number) - parse(this: Parser): Node - static parse(this: typeof Parser, input: string, options?: Options): Node - static parseExpressionAt(this: typeof Parser, input: string, pos: number, options?: Options): Node - static tokenizer(this: typeof Parser, input: string, options?: Options): { - getToken(): Token - [Symbol.iterator](): Iterator - } - static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser - } - - interface Position { line: number; column: number; offset: number } - - const defaultOptions: Options - - function getLineInfo(input: string, offset: number): Position - - class SourceLocation { - start: Position - end: Position - source?: string | null - constructor(p: Parser, start: Position, end: Position) - } - - class Node { - type: string - start: number - end: number - loc?: SourceLocation - sourceFile?: string - range?: [number, number] - constructor(parser: Parser, pos: number, loc?: SourceLocation) - } - - class TokenType { - label: string - keyword: string - beforeExpr: boolean - startsExpr: boolean - isLoop: boolean - isAssign: boolean - prefix: boolean - postfix: boolean - binop: number - updateContext?: (prevType: TokenType) => void - constructor(label: string, conf?: any) - } - - const tokTypes: { - num: TokenType - regexp: TokenType - string: TokenType - name: TokenType - eof: TokenType - bracketL: TokenType - bracketR: TokenType - braceL: TokenType - braceR: TokenType - parenL: TokenType - parenR: TokenType - comma: TokenType - semi: TokenType - colon: TokenType - dot: TokenType - question: TokenType - arrow: TokenType - template: TokenType - ellipsis: TokenType - backQuote: TokenType - dollarBraceL: TokenType - eq: TokenType - assign: TokenType - incDec: TokenType - prefix: TokenType - logicalOR: TokenType - logicalAND: TokenType - bitwiseOR: TokenType - bitwiseXOR: TokenType - bitwiseAND: TokenType - equality: TokenType - relational: TokenType - bitShift: TokenType - plusMin: TokenType - modulo: TokenType - star: TokenType - slash: TokenType - starstar: TokenType - _break: TokenType - _case: TokenType - _catch: TokenType - _continue: TokenType - _debugger: TokenType - _default: TokenType - _do: TokenType - _else: TokenType - _finally: TokenType - _for: TokenType - _function: TokenType - _if: TokenType - _return: TokenType - _switch: TokenType - _throw: TokenType - _try: TokenType - _var: TokenType - _const: TokenType - _while: TokenType - _with: TokenType - _new: TokenType - _this: TokenType - _super: TokenType - _class: TokenType - _extends: TokenType - _export: TokenType - _import: TokenType - _null: TokenType - _true: TokenType - _false: TokenType - _in: TokenType - _instanceof: TokenType - _typeof: TokenType - _void: TokenType - _delete: TokenType - } - - class TokContext { - constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void) - } - - const tokContexts: { - b_stat: TokContext - b_expr: TokContext - b_tmpl: TokContext - p_stat: TokContext - p_expr: TokContext - q_tmpl: TokContext - f_expr: TokContext - } - - function isIdentifierStart(code: number, astral?: boolean): boolean - - function isIdentifierChar(code: number, astral?: boolean): boolean - - interface AbstractToken { - } - - interface Comment extends AbstractToken { - type: string - value: string - start: number - end: number - loc?: SourceLocation - range?: [number, number] - } - - class Token { - type: TokenType - value: any - start: number - end: number - loc?: SourceLocation - range?: [number, number] - constructor(p: Parser) - } - - function isNewLine(code: number): boolean - - const lineBreak: RegExp - - const lineBreakG: RegExp - - const version: string -} diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js deleted file mode 100644 index c9209c0..0000000 --- a/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,5001 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.acorn = {})); -}(this, function (exports) { 'use strict'; - - // Reserved word lists for various dialects of the language - - var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" - }; - - // And the keywords - - var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - - var keywords = { - 5: ecma5AndLessKeywords, - "5module": ecma5AndLessKeywords + " export import", - 6: ecma5AndLessKeywords + " const class extends export import super" - }; - - var keywordRelationalOperator = /^in(stanceof)?$/; - - // ## Character categories - - // Big ugly regular expressions that match characters in the - // whitespace, identifier, and identifier-start categories. These - // are only applied when a character is found to actually have a - // code point above 128. - // Generated by `bin/generate-identifier-regex.js`. - var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; - var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - - nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - - // These are a run-length and offset encoded representation of the - // >0xffff code points that are a valid part of identifiers. The - // offset starts at 0x10000, and each pair of numbers represents an - // offset to the next range, and then a size of the range. They were - // generated by bin/generate-identifier-regex.js - - // eslint-disable-next-line comma-spacing - var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - - // eslint-disable-next-line comma-spacing - var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; - - // This has a complexity linear to the value of the code. The - // assumption is that looking up astral identifier characters is - // rare. - function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } - } - - // Test whether a given character code starts an identifier. - - function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) - } - - // Test whether a given character is part of an identifier. - - function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) - } - - // ## Token types - - // The assignment of fine-grained, information-carrying type objects - // allows the tokenizer to store the information it has about a - // token in a way that is very cheap for the parser to look up. - - // All token type variables start with an underscore, to make them - // easy to recognize. - - // The `beforeExpr` property is used to disambiguate between regular - // expressions and divisions. It is set on all token types that can - // be followed by an expression (thus, a slash after them would be a - // regular expression). - // - // The `startsExpr` property is used to check if the token ends a - // `yield` expression. It is set on all token types that either can - // directly start an expression (like a quotation mark) or can - // continue an expression (like the body of a string). - // - // `isLoop` marks a keyword as starting a loop, which is important - // to know when parsing a label, in order to allow or disallow - // continue jumps to that label. - - var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; - }; - - function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) - } - var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; - - // Map keyword names to token types. - - var keywords$1 = {}; - - // Succinct definitions of keyword token types - function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) - } - - var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import", startsExpr), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) - }; - - // Matches a whole line break (where CRLF is considered a single - // line break). Used to count lines. - - var lineBreak = /\r\n?|\n|\u2028|\u2029/; - var lineBreakG = new RegExp(lineBreak.source, "g"); - - function isNewLine(code, ecma2019String) { - return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) - } - - var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - - var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - - var ref = Object.prototype; - var hasOwnProperty = ref.hasOwnProperty; - var toString = ref.toString; - - // Checks if an object has a property. - - function has(obj, propName) { - return hasOwnProperty.call(obj, propName) - } - - var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" - ); }); - - function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") - } - - // These are used when `options.locations` is on, for the - // `startLoc` and `endLoc` properties. - - var Position = function Position(line, col) { - this.line = line; - this.column = col; - }; - - Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) - }; - - var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } - }; - - // The `getLineInfo` function is mostly useful when the - // `locations` option is off (for performance reasons) and you - // want to find the line/column position for a given character - // offset. `input` should be the code string that the offset refers - // into. - - function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) - } - } - } - - // A second optional argument can be given to further configure - // the parser process. These options are recognized: - - var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 10. - ecmaVersion: 10, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false - }; - - // Interpret and default an options object - - function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options - } - - function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } - } - - // Each scope gets a bitset that may contain these flags - var - SCOPE_TOP = 1, - SCOPE_FUNCTION = 2, - SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, - SCOPE_ASYNC = 4, - SCOPE_GENERATOR = 8, - SCOPE_ARROW = 16, - SCOPE_SIMPLE_CATCH = 32, - SCOPE_SUPER = 64, - SCOPE_DIRECT_SUPER = 128; - - function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) - } - - // Used in checkLVal and declareName to determine the type of a binding - var - BIND_NONE = 0, // Not a binding - BIND_VAR = 1, // Var-style binding - BIND_LEXICAL = 2, // Let- or const-style binding - BIND_FUNCTION = 3, // Function declaration - BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding - BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - - var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); - var reserved = ""; - if (options.allowReserved !== true) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = {}; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; - }; - - var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - - Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) - }; - - prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; - prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; - prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; - prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; - prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; - prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - - // Switch to a getter for 7.0.0. - Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - - Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls - }; - - Parser.parse = function parse (input, options) { - return new this(options, input).parse() - }; - - Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() - }; - - Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) - }; - - Object.defineProperties( Parser.prototype, prototypeAccessors ); - - var pp = Parser.prototype; - - // ## Parser utilities - - var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; - pp.strictDirective = function(start) { - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - var match = literal.exec(this.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - if (this.input[start] === ";") - { start++; } - } - }; - - // Predicate that tests whether the next token is of the given - // type, and if yes, consumes it as a side effect. - - pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false - } - }; - - // Tests whether parsed token is a contextual keyword. - - pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc - }; - - // Consumes contextual keyword if possible. - - pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true - }; - - // Asserts that following token is given contextual keyword. - - pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } - }; - - // Test whether a semicolon can be inserted at the current position. - - pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - }; - - pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true - } - }; - - // Consume a semicolon, or, failing that, see if we are allowed to - // pretend that there is a semicolon at this position. - - pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } - }; - - pp.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } - }; - - // Expect a token of a given type. If found, consume it, otherwise, - // raise an unexpected token error. - - pp.expect = function(type) { - this.eat(type) || this.unexpected(); - }; - - // Raise an unexpected token error. - - pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); - }; - - function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; - } - - pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } - }; - - pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } - }; - - pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } - }; - - pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" - }; - - var pp$1 = Parser.prototype; - - // ### Statement parsing - - // Parse a program. Initializes the parser, reads any number of - // statements, and wraps them in a Program node. Optionally takes a - // `program` argument. If present, the statements will be appended - // to its body instead of creating a new node. - - pp$1.parseTopLevel = function(node) { - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this.parseStatement(null, true, exports); - node.body.push(stmt); - } - if (this.inModule) - { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; - - this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - node.sourceType = this.options.sourceType; - return this.finishNode(node, "Program") - }; - - var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; - - pp$1.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91) { return true } // '[' - if (context) { return false } - - if (nextCh === 123) { return true } // '{' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false - }; - - // check 'async [no LineTerminator here] function' - // - 'async /*foo*/ function' is OK. - // - 'async /*\n*/ function' is invalid. - pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) - }; - - // Parse a single statement. - // - // If expecting a statement and finding a slash operator, parse a - // regular expression literal. This is to handle cases like - // `if (foo) /blah/.exec(foo)`, where looking at the previous token - // does not help. - - pp$1.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; - } - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock(true, node) - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (this.options.ecmaVersion > 10 && starttype === types._import) { - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 40) // '(' - { return this.parseExpressionStatement(node, this.parseExpression()) } - } - - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } - - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } - } - }; - - pp$1.parseBreakContinueStatement = function(node, keyword) { - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") - }; - - pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") - }; - - pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") - }; - - // Disambiguating between a `for` and a `for`/`in` or `for`/`of` - // loop is non-trivial. Basically, we have to parse the init `var` - // statement or expression, disallowing the `in` operator (see - // the second parameter to `parseExpression`), and then check - // whether the next token is `in` or `of`. When there is no init - // part (semicolon immediately after the opening parenthesis), it - // is a regular `for` loop. - - pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) - }; - - pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) - }; - - pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") - }; - - pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") - }; - - pp$1.parseSwitchStatement = function(node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types.braceR;) { - if (this.type === types._case || this.type === types._default) { - var isCase = this.type === types._case; - if (cur) { this.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this.expect(types.colon); - } else { - if (!cur) { this.unexpected(); } - cur.consequent.push(this.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") - }; - - pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") - }; - - // Reused empty array added for node fields that are always empty. - - var empty = []; - - pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") - }; - - pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") - }; - - pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") - }; - - pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") - }; - - pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") - }; - - pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { - for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") - }; - - pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") - }; - - // Parse a semicolon-enclosed block of statements, handling `"use - // strict"` declarations when `allowStrict` is true (used for - // function bodies). - - pp$1.parseBlock = function(createNewLexicalScope, node) { - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { - var stmt = this.parseStatement(null); - node.body.push(stmt); - } - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") - }; - - // Parse a regular `for` loop. The disambiguation code in - // `parseStatement` will already have parsed the init statement or - // expression. - - pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") - }; - - // Parse a `for`/`in` and `for`/`of` loop, which are almost - // same from parser's perspective. - - pp$1.parseForIn = function(node, init) { - var isForIn = this.type === types._in; - this.next(); - - if ( - init.type === "VariableDeclaration" && - init.declarations[0].init != null && - ( - !isForIn || - this.options.ecmaVersion < 8 || - this.strict || - init.kind !== "var" || - init.declarations[0].id.type !== "Identifier" - ) - ) { - this.raise( - init.start, - ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") - ); - } else if (init.type === "AssignmentPattern") { - this.raise(init.start, "Invalid left-hand side in for-loop"); - } - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") - }; - - // Parse a list of variable declarations. - - pp$1.parseVar = function(node, isFor, kind) { - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl, kind); - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { - this.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) { break } - } - return node - }; - - pp$1.parseVarId = function(decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); - }; - - var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; - - // Parse a function declaration or literal (depending on the - // `statement & FUNC_STATEMENT`). - - // Remove `allowExpressionBody` for 7.0.0, as it is only called with false - pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } - - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") - }; - - pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - }; - - // Parse a class declaration or literal (depending on the - // `isStatement` parameter). - - pp$1.parseClass = function(node, isStatement) { - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var element = this.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; - } - } - } - node.body = this.finishNode(classBody, "ClassBody"); - this.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") - }; - - pp$1.parseClassElement = function(constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false - }; - - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - var allowsDirectSuper = false; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - allowsDirectSuper = constructorAllowsSuper; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method - }; - - pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - return this.finishNode(method, "MethodDefinition") - }; - - pp$1.parseClassId = function(node, isStatement) { - if (this.type === types.name) { - node.id = this.parseIdent(); - if (isStatement) - { this.checkLVal(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } - }; - - pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - }; - - // Parses module export declaration. - - pp$1.parseExport = function(node, exports) { - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; - - this.checkUnreserved(spec.local); - // check if export is defined - this.checkLocalExport(spec.local); - } - - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration") - }; - - pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; - }; - - pp$1.checkPatternExport = function(exports, pat) { - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - - if (elt) { this.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } - }; - - pp$1.checkVariableExport = function(exports, decls) { - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this.checkPatternExport(exports, decl.id); - } - }; - - pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() - }; - - // Parses a comma-separated list of module exports. - - pp$1.parseExportSpecifiers = function(exports) { - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this.expect(types.comma); - if (this.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this.startNode(); - node.local = this.parseIdent(true); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - this.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes - }; - - // Parses import declaration. - - pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") - }; - - // Parses a comma-separated list of module imports. - - pp$1.parseImportSpecifiers = function() { - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this.expect(types.comma); - if (this.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this.startNode(); - node$2.imported = this.parseIdent(true); - if (this.eatContextual("as")) { - node$2.local = this.parseIdent(); - } else { - this.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; - } - this.checkLVal(node$2.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$2, "ImportSpecifier")); - } - return nodes - }; - - // Set `ExpressionStatement#directive` property for directive prologues. - pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } - }; - pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) - }; - - var pp$2 = Parser.prototype; - - // Convert existing expression atom to assignable pattern - // if possible. - - pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break - - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break - - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this.raise(prop.argument.start, "Unexpected token"); - } - } - break - - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break - - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break - - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break - - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern - - case "AssignmentPattern": - break - - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break - - case "MemberExpression": - if (!isBinding) { break } - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node - }; - - // Convert list of expression atoms to binding list. - - pp$2.toAssignableList = function(exprList, isBinding) { - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList - }; - - // Parses spread element. - - pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") - }; - - pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); - - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } - - node.argument = this.parseBindingAtom(); - - return this.finishNode(node, "RestElement") - }; - - // Parses lvalue (assignable) atom. - - pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") - - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() - }; - - pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this.expect(types.comma); } - if (allowEmpty && this.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break - } else if (this.type === types.ellipsis) { - var rest = this.parseRestBinding(); - this.parseBindingListItem(rest); - elts.push(rest); - if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } - this.expect(close); - break - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts - }; - - pp$2.parseBindingListItem = function(param) { - return param - }; - - // Parses assignment pattern around given atom if possible. - - pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") - }; - - // Verify that a node is an lval — something that can be assigned - // to. - // bindingType can be either: - // 'var' indicating that the lval creates a 'var' binding - // 'let' indicating that the lval creates a lexical ('let' or 'const') binding - // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - - pp$2.checkLVal = function(expr, bindingType, checkClashes) { - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (bindingType === BIND_LEXICAL && expr.name === "let") - { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this.checkLVal(prop, bindingType, checkClashes); - } - break - - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break - - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; - - if (elem) { this.checkLVal(elem, bindingType, checkClashes); } - } - break - - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break - - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break - - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } - }; - - // A recursive descent parser operates by defining functions for all - - var pp$3 = Parser.prototype; - - // Check if property name clashes with already added. - // Object/class getters and setters are not allowed to clash — - // either with each other or with an init property — and in - // strict mode, init properties are also not allowed to be repeated. - - pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; - } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; - }; - - // ### Expression parsing - - // These nest, from the most general expression type at the top to - // 'atomic', nondivisible expression types at the bottom. Most of - // the functions will simply let the function(s) below them parse, - // and, *if* the syntactic construct they handle is present, wrap - // the AST node that the inner parser gave them in another node. - - // Parse a full expression. The optional arguments are used to - // forbid the `in` operator (in for loops initalization expressions) - // and provide reference for storing '=' operator inside shorthand - // property assignment in contexts where both object expression - // and object pattern might appear (so it's possible to raise - // delayed syntax error at correct position). - - pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr - }; - - // Parse an assignment expression. This includes applications of - // operators like `+=`. - - pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(noIn) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } - - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldShorthandAssign = refDestructuringErrors.shorthandAssign; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } - - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types.parenL || this.type === types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } - return left - }; - - // Parse a ternary conditional (`?:`) operator. - - pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr - }; - - // Start the precedence parser. - - pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) - }; - - // Parse binary operators with the operator precedence parsing - // algorithm. `left` is the left-hand side of the operator. - // `minPrec` provides context that allows the function to stop and - // defer further parser to one of its callers when it encounters an - // operator that has a lower precedence than the set it is parsing. - - pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left - }; - - pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") - }; - - // Parse unary operators, both prefix and postfix. - - pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.operator = this.value; - node$1.prefix = false; - node$1.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node$1, "UpdateExpression"); - } - } - - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } - }; - - // Parse call, dot, and `[]`-subscript expressions. - - pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result - }; - - pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - while (true) { - var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } - base = element; - } - }; - - pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { - var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"); - node.computed = !!computed; - if (computed) { this.expect(types.bracketR); } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types.backQuote) { - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base - }; - - // Parse an atomic expression — either a single token that is an - // expression, an expression started by a keyword like `function` or - // `new`, or an expression wrapped in punctuation like `()`, `[]`, - // or `{}`. - - pp$3.parseExprAtom = function(refDestructuringErrors) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super ( Arguments ) - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } - } - return id - - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node - - case types.num: case types.string: - return this.parseLiteral(this.value) - - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") - - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } - } - return expr - - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") - - case types.braceL: - return this.parseObj(false, refDestructuringErrors) - - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) - - case types._class: - return this.parseClass(this.startNode(), false) - - case types._new: - return this.parseNew() - - case types.backQuote: - return this.parseTemplate() - - case types._import: - if (this.options.ecmaVersion >= 11) { - return this.parseExprImport() - } else { - return this.unexpected() - } - - default: - this.unexpected(); - } - }; - - pp$3.parseExprImport = function() { - var node = this.startNode(); - this.next(); // skip `import` - switch (this.type) { - case types.parenL: - return this.parseDynamicImport(node) - default: - this.unexpected(); - } - }; - - pp$3.parseDynamicImport = function(node) { - this.next(); // skip `(` - - // Parse node.source. - node.source = this.parseMaybeAssign(); - - // Verify ending. - if (!this.eat(types.parenR)) { - var errorPos = this.start; - if (this.eat(types.comma) && this.eat(types.parenR)) { - this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); - } else { - this.unexpected(errorPos); - } - } - - return this.finishNode(node, "ImportExpression") - }; - - pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } - this.next(); - return this.finishNode(node, "Literal") - }; - - pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val - }; - - pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); - - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types.parenR) { - first ? first = false : this.expect(types.comma); - if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this.type === types.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRestBinding())); - if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); - } - } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) - } - - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } - }; - - pp$3.parseParenItem = function(item) { - return item - }; - - pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) - }; - - // New's precedence is slightly tricky. It must allow its argument to - // be a `[]` or dot subscript expression, but not a call — at least, - // not without wrapping it in parentheses. Thus, it uses the noCalls - // argument to parseSubscripts to prevent it from consuming the - // argument list. - - var empty$1 = []; - - pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types._import; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (isImport && node.callee.type === "ImportExpression") { - this.raise(startPos, "Cannot use new with import()"); - } - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") - }; - - // Parse template expression. - - pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value - }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") - }; - - pp$3.parseTemplate = function(ref) { - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") - }; - - pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - }; - - // Parse an object literal or binding pattern. - - pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this.expect(types.comma); - if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") - }; - - pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); - } - return this.finishNode(prop, "RestElement") - } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; - } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; - } - } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; - } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") - }; - - pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } - }; - - pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; - } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") - }; - - // Initialize empty function node. - - pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } - }; - - // Parse object or class method. - - pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") - }; - - // Parse arrow function expression with given parameters. - - pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") - }; - - // Parse function body and check parameters. - - pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; - }; - - pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; - - if (param.type !== "Identifier") { return false - } } - return true - }; - - // Checks function params for various disallowed patterns such as using "eval" - // or "arguments" and duplicate parameters. - - pp$3.checkParams = function(node, allowDuplicates) { - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); - } - }; - - // Parses a comma-separated list of expressions, and returns them as - // an array. `close` is the token type that ends the list, and - // `allowEmpty` can be turned on to allow subsequent commas with - // nothing in between them to be parsed as `null` (which is needed - // for array literals). - - pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(types.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this.type === types.comma) - { elt = null; } - else if (this.type === types.ellipsis) { - elt = this.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this.start; } - } else { - elt = this.parseMaybeAssign(false, refDestructuringErrors); - } - elts.push(elt); - } - return elts - }; - - pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } - }; - - // Parse the next token as an identifier. If `liberal` is true (used - // when parsing properties), it will also convert keywords into - // identifiers. - - pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node - }; - - // Parses yield expression inside generator. - - pp$3.parseYield = function(noIn) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - return this.finishNode(node, "YieldExpression") - }; - - pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") - }; - - var pp$4 = Parser.prototype; - - // This function is used to raise exceptions on parse errors. It - // takes an offset integer (into the current `input`) to indicate - // the location of the error, attaches the position to the end - // of the error message, and then raises a `SyntaxError` with that - // message. - - pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err - }; - - pp$4.raiseRecoverable = pp$4.raise; - - pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } - }; - - var pp$5 = Parser.prototype; - - var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; - }; - - // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - - pp$5.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); - }; - - pp$5.exitScope = function() { - this.scopeStack.pop(); - }; - - // The spec says: - // > At the top level of a function, or script, function declarations are - // > treated like var declarations rather than like lexical declarations. - pp$5.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) - }; - - pp$5.declareName = function(name, bindingType, pos) { - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break - } - scope$3.var.push(name); - if (this.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } - } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } - }; - - pp$5.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } - }; - - pp$5.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] - }; - - pp$5.currentVarScope = function() { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } - }; - - // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. - pp$5.currentThisScope = function() { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } - }; - - var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } - }; - - // Start an AST node, attaching a start offset. - - var pp$6 = Parser.prototype; - - pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) - }; - - pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) - }; - - // Finish an AST node, adding `type` and `end` properties. - - function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node - } - - pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) - }; - - // Finish node at given position - - pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) - }; - - // The algorithm used to determine whether a regexp can appear at a - - var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; - }; - - var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) - }; - - var pp$7 = Parser.prototype; - - pp$7.initialContext = function() { - return [types$1.b_stat] - }; - - pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType === types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) - { return true } - if (prevType === types.braceL) - { return parent === types$1.b_stat } - if (prevType === types._var || prevType === types._const || prevType === types.name) - { return false } - return !this.exprAllowed - }; - - pp$7.inGeneratorContext = function() { - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this.context[i]; - if (context.token === "function") - { return context.generator } - } - return false - }; - - pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } - }; - - // Token-specific context update code - - types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; - }; - - types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; - }; - - types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; - }; - - types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; - }; - - types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged - }; - - types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; - }; - - types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; - }; - - types.star.updateContext = function(prevType) { - if (prevType === types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; - }; - - types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; - }; - - // This file contains Unicode properties extracted from the ECMAScript - // specification. The lists are extracted like so: - // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - - // #table-binary-unicode-properties - var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; - var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; - var ecma11BinaryProperties = ecma10BinaryProperties; - var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma10BinaryProperties, - 11: ecma11BinaryProperties - }; - - // #table-unicode-general-category-values - var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - - // #table-unicode-script-values - var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; - var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; - var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; - var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma10ScriptValues, - 11: ecma11ScriptValues - }; - - var data = {}; - function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; - } - buildUnicodeData(9); - buildUnicodeData(10); - buildUnicodeData(11); - - var pp$8 = Parser.prototype; - - var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; - }; - - RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; - }; - - RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); - }; - - // If u flag is given, this returns the code point at the index (it combines a surrogate pair). - // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). - RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 - }; - - RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 - }; - - RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) - }; - - RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) - }; - - RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); - }; - - RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false - }; - - function codePointToString(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) - } - - /** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ - pp$8.validateRegExpFlags = function(state) { - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this.raise(state.start, "Duplicate regular expression flag"); - } - } - }; - - /** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ - pp$8.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern - pp$8.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); - } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; - - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); - } - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction - pp$8.regexp_disjunction = function(state) { - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this.regexp_alternative(state); - } - - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative - pp$8.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term - pp$8.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); - } - } - return true - } - - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion - pp$8.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; - - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true - } - - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { - return true - } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); - } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); - } - state.lastAssertionIsQuantifiable = !lookbehind; - return true - } - } - - state.pos = start; - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier - pp$8.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix - pp$8.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) - }; - pp$8.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; - } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } - return true - } - } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); - } - state.pos = start; - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom - pp$8.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) - }; - pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { - return true - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); - } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; - return true - } - state.raise("Unterminated group"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom - pp$8.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier - pp$8.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter - pp$8.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false - }; - function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter - // But eat eager. - pp$8.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter - pp$8.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false - }; - - // GroupSpecifier[U] :: - // [empty] - // `?` GroupName[?U] - pp$8.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return - } - state.raise("Invalid group"); - } - }; - - // GroupName[U] :: - // `<` RegExpIdentifierName[?U] `>` - // Note: this updates `state.lastStringValue` property with the eaten name. - pp$8.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { - return true - } - state.raise("Invalid capture group name"); - } - return false - }; - - // RegExpIdentifierName[U] :: - // RegExpIdentifierStart[?U] - // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] - // Note: this updates `state.lastStringValue` property with the eaten name. - pp$8.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - } - return true - } - return false - }; - - // RegExpIdentifierStart[U] :: - // UnicodeIDStart - // `$` - // `_` - // `\` RegExpUnicodeEscapeSequence[?U] - pp$8.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false - }; - function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ - } - - // RegExpIdentifierPart[U] :: - // UnicodeIDContinue - // `$` - // `_` - // `\` RegExpUnicodeEscapeSequence[?U] - // - // - pp$8.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false - }; - function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape - pp$8.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false - }; - pp$8.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; - if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; - } - return true - } - if (n <= state.numCapturingParens) { - return true - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); - return true - } - state.raise("Invalid named reference"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape - pp$8.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) - }; - pp$8.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { - return true - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape - pp$8.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter - pp$8.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false - }; - function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence - pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } - return true - } - if ( - state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) - ) { - return true - } - if (state.switchU) { - state.raise("Invalid unicode escape"); - } - state.pos = start; - } - - return false - }; - function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape - pp$8.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ - return true - } - return false - } - - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape - pp$8.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape - pp$8.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } - - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true - } - state.raise("Invalid property name"); - } - - return false - }; - function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) - } - - // UnicodePropertyValueExpression :: - // UnicodePropertyName `=` UnicodePropertyValue - // LoneUnicodePropertyNameOrValue - pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true - } - } - state.pos = start; - - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false - }; - pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!has(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } - }; - pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } - }; - - // UnicodePropertyName :: - // UnicodePropertyNameCharacters - pp$8.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== "" - }; - function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ - } - - // UnicodePropertyValue :: - // UnicodePropertyValueCharacters - pp$8.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== "" - }; - function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) - } - - // LoneUnicodePropertyNameOrValue :: - // UnicodePropertyValueCharacters - pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass - pp$8.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges - // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges - // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash - pp$8.regexp_classRanges = function(state) { - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); - } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); - } - } - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash - pp$8.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { - return true - } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); - } - state.pos = start; - } - - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape - pp$8.regexp_eatClassEscape = function(state) { - var start = state.pos; - - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } - - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } - - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true - } - state.pos = start; - } - - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter - pp$8.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence - pp$8.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true - } - if (state.switchU) { - state.raise("Invalid escape"); - } - state.pos = start; - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits - pp$8.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start - }; - function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits - pp$8.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start - }; - function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) - } - function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) - } - return ch - 0x30 /* 0 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence - // Allows only 0-377(octal) i.e. 0-255(decimal). - pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; - if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; - } else { - state.lastIntValue = n1 * 8 + n2; - } - } else { - state.lastIntValue = n1; - } - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit - pp$8.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false - }; - function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit - // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence - pp$8.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { - var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false - } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return true - }; - - // Object type used to represent tokens. Note that normally, tokens - // simply exist as properties on the parser object. This is only - // used for the onToken callback and the external tokenizer. - - var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } - }; - - // ## Tokenizer - - var pp$9 = Parser.prototype; - - // Move to the next token - - pp$9.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); - }; - - pp$9.getToken = function() { - this.next(); - return new Token(this) - }; - - // If we're in an ES6 environment, make parsers iterable - if (typeof Symbol !== "undefined") - { pp$9[Symbol.iterator] = function() { - var this$1 = this; - - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } - } - } - }; } - - // Toggle strict mode. Re-reads the next number or string to please - // pedantic tests (`"use strict"; 010;` should fail). - - pp$9.curContext = function() { - return this.context[this.context.length - 1] - }; - - // Read a single token, updating the parser object's token-related - // properties. - - pp$9.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } - - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } - }; - - pp$9.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } - - return this.getTokenFromCode(code) - }; - - pp$9.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 - }; - - pp$9.skipBlockComment = function() { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } - }; - - pp$9.skipLineComment = function(startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this.input.charCodeAt(++this.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } - }; - - // Called at the start of the parse and after every token. Skips - // whitespace and comments, and. - - pp$9.skipSpace = function() { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this.pos; - break - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10: case 8232: case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break - case 47: // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: // '*' - this.skipBlockComment(); - break - case 47: - this.skipLineComment(2); - break - default: - break loop - } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop - } - } - } - }; - - // Called at the end of every token. Sets `end`, `val`, and - // maintains `context` and `exprAllowed`, and skips the space after - // the token, so that the next one's `start` will point at the - // right position. - - pp$9.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); - }; - - // ### Token reading - - // This is the function that is called to fetch the next token. It - // is somewhat obscure, because it works in character codes rather - // than characters, and because operator parsing has been inlined - // into it. - // - // All in the name of speed. - // - pp$9.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } - }; - - pp$9.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) - }; - - pp$9.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } - - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) - }; - - pp$9.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) - }; - - pp$9.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) - }; - - pp$9.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) - }; - - pp$9.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) -}; - -pp$9.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // ` - -

License

- -Unless stated otherwise all works are: - -
- -and licensed under: - - - -

MIT License

- -
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- - diff --git a/node_modules/domain-browser/README.md b/node_modules/domain-browser/README.md deleted file mode 100644 index 68c936b..0000000 --- a/node_modules/domain-browser/README.md +++ /dev/null @@ -1,121 +0,0 @@ - - -

domain-browser

- - - - - - -Travis CI Build Status -NPM version -NPM downloads -Dependency Status -Dev Dependency Status -
-Patreon donate button -Open Collective donate button -Gratipay donate button -Flattr donate button -PayPal donate button -Bitcoin donate button -Wishlist browse button -
-Slack community badge - - - - - - -Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more. - - - - - - -

Install

- -

NPM

    -
  • Install: npm install --save domain-browser
  • -
  • Module: require('domain-browser')
- -

Browserify

    -
  • Install: npm install --save domain-browser
  • -
  • Module: require('domain-browser')
  • -
  • CDN URL: //wzrd.in/bundle/domain-browser@1.2.0
- -

Ender

    -
  • Install: ender add domain-browser
  • -
  • Module: require('domain-browser')
- -

Editions

- -

This package is published with the following editions:

- -
  • domain-browser aliases domain-browser/source/index.js
  • -
  • domain-browser/source/index.js is Source + ES5 + Require
- - - - - - -

History

- -Discover the release history by heading on over to the HISTORY.md file. - - - - - - -

Backers

- -

Maintainers

- -These amazing people are maintaining this project: - - - -

Sponsors

- -No sponsors yet! Will you be the first? - -Patreon donate button -Open Collective donate button -Gratipay donate button -Flattr donate button -PayPal donate button -Bitcoin donate button -Wishlist browse button - -

Contributors

- -These amazing people have contributed code to this project: - - - -Discover how you can contribute by heading on over to the CONTRIBUTING.md file. - - - - - - -

License

- -Unless stated otherwise all works are: - - - -and licensed under: - - - - diff --git a/node_modules/domain-browser/package.json b/node_modules/domain-browser/package.json deleted file mode 100644 index 8e665ae..0000000 --- a/node_modules/domain-browser/package.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "_from": "domain-browser@^1.2.0", - "_id": "domain-browser@1.2.0", - "_inBundle": false, - "_integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "_location": "/domain-browser", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "domain-browser@^1.2.0", - "name": "domain-browser", - "escapedName": "domain-browser", - "rawSpec": "^1.2.0", - "saveSpec": null, - "fetchSpec": "^1.2.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "_shasum": "3d31f50191a6749dd1375a7f522e823d42e54eda", - "_spec": "domain-browser@^1.2.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "2013+ Bevry Pty Ltd", - "email": "us@bevry.me", - "url": "http://bevry.me" - }, - "badges": { - "list": [ - "travisci", - "npmversion", - "npmdownloads", - "daviddm", - "daviddmdev", - "---", - "patreon", - "opencollective", - "gratipay", - "flattr", - "paypal", - "bitcoin", - "wishlist", - "---", - "slackin" - ], - "config": { - "patreonUsername": "bevry", - "opencollectiveUsername": "bevry", - "gratipayUsername": "bevry", - "flattrUsername": "balupton", - "paypalURL": "https://bevry.me/paypal", - "bitcoinURL": "https://bevry.me/bitcoin", - "wishlistURL": "https://bevry.me/wishlist", - "slackinURL": "https://slack.bevry.me" - } - }, - "browser": "source/index.js", - "bugs": { - "url": "https://github.com/bevry/domain-browser/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Benjamin Lupton", - "email": "b@lupton.cc", - "url": "http://balupton.com" - }, - { - "name": "Evan Solomon", - "url": "http://evansolomon.me" - }, - { - "name": "James Halliday", - "email": "substack@gmail.com", - "url": "http://substack.neocities.org/" - }, - { - "name": "Guy Bedford", - "email": "guybedford@gmail.com", - "url": "twitter.com/guybedford" - }, - { - "name": "Bogdan Chadkin", - "email": "trysound@yandex.ru", - "url": "https://github.com/TrySound" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more.", - "devDependencies": { - "assert-helpers": "^4.5.0", - "eslint": "^4.16.0", - "joe": "^2.0.2", - "joe-reporter-console": "^2.0.1", - "projectz": "^1.4.0" - }, - "editions": [ - { - "description": "Source + ES5 + Require", - "directory": "source", - "entry": "index.js", - "syntaxes": [ - "javascript", - "es5", - "require" - ] - } - ], - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - }, - "homepage": "https://github.com/bevry/domain-browser", - "jspm": { - "map": { - "source/index.js": { - "node": "@node/domain" - } - } - }, - "keywords": [ - "domain", - "trycatch", - "try", - "catch", - "node-compat", - "ender.js", - "component", - "component.io", - "umd", - "amd", - "require.js", - "browser" - ], - "license": "MIT", - "main": "source/index.js", - "maintainers": [ - { - "name": "Benjamin Lupton", - "email": "b@lupton.cc", - "url": "http://balupton.com" - } - ], - "name": "domain-browser", - "repository": { - "type": "git", - "url": "git+https://github.com/bevry/domain-browser.git" - }, - "scripts": { - "our:clean": "rm -Rf ./docs ./es2015 ./es5 ./out", - "our:compile": "echo no need for this project", - "our:meta": "npm run our:meta:projectz", - "our:meta:projectz": "projectz compile", - "our:release": "npm run our:release:prepare && npm run our:release:check && npm run our:release:tag && npm run our:release:push", - "our:release:check": "npm run our:release:check:changelog && npm run our:release:check:dirty", - "our:release:check:changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)", - "our:release:check:dirty": "git diff --exit-code", - "our:release:prepare": "npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta", - "our:release:push": "git push origin master && git push origin --tags", - "our:release:tag": "export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"", - "our:setup": "npm run our:setup:npm", - "our:setup:npm": "npm install", - "our:test": "npm run our:verify && npm test", - "our:verify": "npm run our:verify:eslint", - "our:verify:eslint": "eslint --fix ./source", - "test": "node --harmony source/test.js --joe-reporter=console" - }, - "version": "1.2.0" -} diff --git a/node_modules/domain-browser/source/index.js b/node_modules/domain-browser/source/index.js deleted file mode 100644 index e06b3a1..0000000 --- a/node_modules/domain-browser/source/index.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file should be ES5 compatible -/* eslint prefer-spread:0, no-var:0, prefer-reflect:0, no-magic-numbers:0 */ -'use strict' - -module.exports = (function () { - // Import Events - var events = require('events') - - // Export Domain - var domain = {} - domain.createDomain = domain.create = function () { - var d = new events.EventEmitter() - - function emitError (e) { - d.emit('error', e) - } - - d.add = function (emitter) { - emitter.on('error', emitError) - } - d.remove = function (emitter) { - emitter.removeListener('error', emitError) - } - d.bind = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments) - try { - fn.apply(null, args) - } - catch (err) { - emitError(err) - } - } - } - d.intercept = function (fn) { - return function (err) { - if ( err ) { - emitError(err) - } - else { - var args = Array.prototype.slice.call(arguments, 1) - try { - fn.apply(null, args) - } - catch (err) { - emitError(err) - } - } - } - } - d.run = function (fn) { - try { - fn() - } - catch (err) { - emitError(err) - } - return this - } - d.dispose = function () { - this.removeAllListeners() - return this - } - d.enter = d.exit = function () { - return this - } - return d - } - return domain -}).call(this) diff --git a/node_modules/duplexer2/LICENSE.md b/node_modules/duplexer2/LICENSE.md deleted file mode 100644 index 547189a..0000000 --- a/node_modules/duplexer2/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/duplexer2/README.md b/node_modules/duplexer2/README.md deleted file mode 100644 index f4a6957..0000000 --- a/node_modules/duplexer2/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# duplexer2 [![Build Status](https://travis-ci.org/deoxxa/duplexer2.svg?branch=master)](https://travis-ci.org/deoxxa/duplexer2) [![Coverage Status](https://coveralls.io/repos/deoxxa/duplexer2/badge.svg?branch=master&service=github)](https://coveralls.io/github/deoxxa/duplexer2?branch=master) - -Like [duplexer](https://github.com/Raynos/duplexer) but using Streams3 - -```javascript -var stream = require("stream"); - -var duplexer2 = require("duplexer2"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -## Overview - -This is a reimplementation of [duplexer](https://www.npmjs.com/package/duplexer) using the -Streams3 API which is standard in Node as of v4. Everything largely -works the same. - - - -## Installation - -[Available via `npm`](https://docs.npmjs.com/cli/install): - -``` -$ npm i duplexer2 -``` - -## API - -### duplexer2 - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer2([options], writable, readable) -``` - -```javascript -const duplex = duplexer2(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - - -## License - -3-clause BSD. [A copy](./LICENSE) is included with the source. - -## Contact - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/node_modules/duplexer2/index.js b/node_modules/duplexer2/index.js deleted file mode 100644 index a40ece9..0000000 --- a/node_modules/duplexer2/index.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; - -var stream = require("readable-stream"); - -function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - stream.Duplex.call(this, options); - - if (typeof readable.read !== "function") { - readable = (new stream.Readable(options)).wrap(readable); - } - - this._writable = writable; - this._readable = readable; - this._waiting = false; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("readable", function() { - if (self._waiting) { - self._waiting = false; - self._read(); - } - }); - - readable.once("end", function() { - self.push(null); - }); - - if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) { - writable.on("error", function(err) { - self.emit("error", err); - }); - - readable.on("error", function(err) { - self.emit("error", err); - }); - } -} - -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read() { - var buf; - var reads = 0; - while ((buf = this._readable.read()) !== null) { - this.push(buf); - reads++; - } - if (reads === 0) { - this._waiting = true; - } -}; - -module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -module.exports.DuplexWrapper = DuplexWrapper; diff --git a/node_modules/duplexer2/package.json b/node_modules/duplexer2/package.json deleted file mode 100644 index 3008632..0000000 --- a/node_modules/duplexer2/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "duplexer2@~0.1.2", - "_id": "duplexer2@0.1.4", - "_inBundle": false, - "_integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "_location": "/duplexer2", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "duplexer2@~0.1.2", - "name": "duplexer2", - "escapedName": "duplexer2", - "rawSpec": "~0.1.2", - "saveSpec": null, - "fetchSpec": "~0.1.2" - }, - "_requiredBy": [ - "/browserify", - "/module-deps", - "/stream-combiner2" - ], - "_resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "_shasum": "8b12dab878c0d69e3e7891051662a32fc6bddcc1", - "_spec": "duplexer2@~0.1.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Conrad Pankoff", - "email": "deoxxa@fknsrs.biz", - "url": "http://www.fknsrs.biz/" - }, - "bugs": { - "url": "https://github.com/deoxxa/duplexer2/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "^2.0.2" - }, - "deprecated": false, - "description": "Like duplexer but using streams3", - "devDependencies": { - "mocha": "^2.2.5" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/deoxxa/duplexer2#readme", - "keywords": [ - "duplex", - "duplexer", - "stream", - "stream3", - "join", - "combine" - ], - "license": "BSD-3-Clause", - "name": "duplexer2", - "repository": { - "type": "git", - "url": "git+https://github.com/deoxxa/duplexer2.git" - }, - "scripts": { - "test": "mocha -R tap" - }, - "version": "0.1.4" -} diff --git a/node_modules/elliptic/README.md b/node_modules/elliptic/README.md deleted file mode 100644 index 96219e5..0000000 --- a/node_modules/elliptic/README.md +++ /dev/null @@ -1,238 +0,0 @@ -# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master) [![Code Climate](https://codeclimate.com/github/indutny/elliptic/badges/gpa.svg)](https://codeclimate.com/github/indutny/elliptic) - -[![Saucelabs Test Status](https://saucelabs.com/browser-matrix/gh-indutny-elliptic.svg)](https://saucelabs.com/u/gh-indutny-elliptic) - -Fast elliptic-curve cryptography in a plain javascript implementation. - -NOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve -for your cryptography operations. - -## Incentive - -ECC is much slower than regular RSA cryptography, the JS implementations are -even more slower. - -## Benchmarks - -```bash -$ node benchmarks/index.js -Benchmarking: sign -elliptic#sign x 262 ops/sec ±0.51% (177 runs sampled) -eccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled) ------------------------- -Fastest is elliptic#sign -======================== -Benchmarking: verify -elliptic#verify x 113 ops/sec ±0.50% (166 runs sampled) -eccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled) ------------------------- -Fastest is elliptic#verify -======================== -Benchmarking: gen -elliptic#gen x 294 ops/sec ±0.43% (176 runs sampled) -eccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled) ------------------------- -Fastest is elliptic#gen -======================== -Benchmarking: ecdh -elliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled) ------------------------- -Fastest is elliptic#ecdh -======================== -``` - -## API - -### ECDSA - -```javascript -var EC = require('elliptic').ec; - -// Create and initialize EC context -// (better do it once and reuse it) -var ec = new EC('secp256k1'); - -// Generate keys -var key = ec.genKeyPair(); - -// Sign the message's hash (input must be an array, or a hex-string) -var msgHash = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; -var signature = key.sign(msgHash); - -// Export DER encoded signature in Array -var derSign = signature.toDER(); - -// Verify signature -console.log(key.verify(msgHash, derSign)); - -// CHECK WITH NO PRIVATE KEY - -var pubPoint = key.getPublic(); -var x = pubPoint.getX(); -var y = pubPoint.getY(); - -// Public Key MUST be either: -// 1) '04' + hex string of x + hex string of y; or -// 2) object with two hex string properties (x and y); or -// 3) object with two buffer properties (x and y) -var pub = pubPoint.encode('hex'); // case 1 -var pub = { x: x.toString('hex'), y: y.toString('hex') }; // case 2 -var pub = { x: x.toBuffer(), y: y.toBuffer() }; // case 3 -var pub = { x: x.toArrayLike(Buffer), y: y.toArrayLike(Buffer) }; // case 3 - -// Import public key -var key = ec.keyFromPublic(pub, 'hex'); - -// Signature MUST be either: -// 1) DER-encoded signature as hex-string; or -// 2) DER-encoded signature as buffer; or -// 3) object with two hex-string properties (r and s); or -// 4) object with two buffer properties (r and s) - -var signature = '3046022100...'; // case 1 -var signature = new Buffer('...'); // case 2 -var signature = { r: 'b1fc...', s: '9c42...' }; // case 3 - -// Verify signature -console.log(key.verify(msgHash, signature)); -``` - -### EdDSA - -```javascript -var EdDSA = require('elliptic').eddsa; - -// Create and initialize EdDSA context -// (better do it once and reuse it) -var ec = new EdDSA('ed25519'); - -// Create key pair from secret -var key = ec.keyFromSecret('693e3c...'); // hex string, array or Buffer - -// Sign the message's hash (input must be an array, or a hex-string) -var msgHash = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; -var signature = key.sign(msgHash).toHex(); - -// Verify signature -console.log(key.verify(msgHash, signature)); - -// CHECK WITH NO PRIVATE KEY - -// Import public key -var pub = '0a1af638...'; -var key = ec.keyFromPublic(pub, 'hex'); - -// Verify signature -var signature = '70bed1...'; -console.log(key.verify(msgHash, signature)); -``` - -### ECDH - -```javascript -var EC = require('elliptic').ec; -var ec = new EC('curve25519'); - -// Generate keys -var key1 = ec.genKeyPair(); -var key2 = ec.genKeyPair(); - -var shared1 = key1.derive(key2.getPublic()); -var shared2 = key2.derive(key1.getPublic()); - -console.log('Both shared secrets are BN instances'); -console.log(shared1.toString(16)); -console.log(shared2.toString(16)); -``` - -three and more members: -```javascript -var EC = require('elliptic').ec; -var ec = new EC('curve25519'); - -var A = ec.genKeyPair(); -var B = ec.genKeyPair(); -var C = ec.genKeyPair(); - -var AB = A.getPublic().mul(B.getPrivate()) -var BC = B.getPublic().mul(C.getPrivate()) -var CA = C.getPublic().mul(A.getPrivate()) - -var ABC = AB.mul(C.getPrivate()) -var BCA = BC.mul(A.getPrivate()) -var CAB = CA.mul(B.getPrivate()) - -console.log(ABC.getX().toString(16)) -console.log(BCA.getX().toString(16)) -console.log(CAB.getX().toString(16)) -``` - -NOTE: `.derive()` returns a [BN][1] instance. - -## Supported curves - -Elliptic.js support following curve types: - -* Short Weierstrass -* Montgomery -* Edwards -* Twisted Edwards - -Following curve 'presets' are embedded into the library: - -* `secp256k1` -* `p192` -* `p224` -* `p256` -* `p384` -* `p521` -* `curve25519` -* `ed25519` - -NOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead. - -### Implementation details - -ECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of -the curve operations are performed on non-affine coordinates (either projective -or extended), various windowing techniques are used for different cases. - -All operations are performed in reduction context using [bn.js][1], hashing is -provided by [hash.js][2] - -### Related projects - -* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both - browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for - node) - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2014. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -[0]: http://tools.ietf.org/html/rfc6979 -[1]: https://github.com/indutny/bn.js -[2]: https://github.com/indutny/hash.js -[3]: https://github.com/bitchan/eccrypto -[4]: https://github.com/wanderer/secp256k1-node diff --git a/node_modules/elliptic/lib/elliptic.js b/node_modules/elliptic/lib/elliptic.js deleted file mode 100644 index dfe2fe7..0000000 --- a/node_modules/elliptic/lib/elliptic.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var elliptic = exports; - -elliptic.version = require('../package.json').version; -elliptic.utils = require('./elliptic/utils'); -elliptic.rand = require('brorand'); -elliptic.curve = require('./elliptic/curve'); -elliptic.curves = require('./elliptic/curves'); - -// Protocols -elliptic.ec = require('./elliptic/ec'); -elliptic.eddsa = require('./elliptic/eddsa'); diff --git a/node_modules/elliptic/lib/elliptic/curve/base.js b/node_modules/elliptic/lib/elliptic/curve/base.js deleted file mode 100644 index 83ffe9f..0000000 --- a/node_modules/elliptic/lib/elliptic/curve/base.js +++ /dev/null @@ -1,376 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var utils = require('../utils'); -var getNAF = utils.getNAF; -var getJSF = utils.getJSF; -var assert = utils.assert; - -function BaseCurve(type, conf) { - this.type = type; - this.p = new BN(conf.p, 16); - - // Use Montgomery, when there is no fast reduction for the prime - this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); - - // Useful for many curves - this.zero = new BN(0).toRed(this.red); - this.one = new BN(1).toRed(this.red); - this.two = new BN(2).toRed(this.red); - - // Curve configuration, optional - this.n = conf.n && new BN(conf.n, 16); - this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); - - // Temporary arrays - this._wnafT1 = new Array(4); - this._wnafT2 = new Array(4); - this._wnafT3 = new Array(4); - this._wnafT4 = new Array(4); - - this._bitLength = this.n ? this.n.bitLength() : 0; - - // Generalized Greg Maxwell's trick - var adjustCount = this.n && this.p.div(this.n); - if (!adjustCount || adjustCount.cmpn(100) > 0) { - this.redN = null; - } else { - this._maxwellTrick = true; - this.redN = this.n.toRed(this.red); - } -} -module.exports = BaseCurve; - -BaseCurve.prototype.point = function point() { - throw new Error('Not implemented'); -}; - -BaseCurve.prototype.validate = function validate() { - throw new Error('Not implemented'); -}; - -BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { - assert(p.precomputed); - var doubles = p._getDoubles(); - - var naf = getNAF(k, 1, this._bitLength); - var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); - I /= 3; - - // Translate into more windowed form - var repr = []; - for (var j = 0; j < naf.length; j += doubles.step) { - var nafW = 0; - for (var k = j + doubles.step - 1; k >= j; k--) - nafW = (nafW << 1) + naf[k]; - repr.push(nafW); - } - - var a = this.jpoint(null, null, null); - var b = this.jpoint(null, null, null); - for (var i = I; i > 0; i--) { - for (var j = 0; j < repr.length; j++) { - var nafW = repr[j]; - if (nafW === i) - b = b.mixedAdd(doubles.points[j]); - else if (nafW === -i) - b = b.mixedAdd(doubles.points[j].neg()); - } - a = a.add(b); - } - return a.toP(); -}; - -BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { - var w = 4; - - // Precompute window - var nafPoints = p._getNAFPoints(w); - w = nafPoints.wnd; - var wnd = nafPoints.points; - - // Get NAF form - var naf = getNAF(k, w, this._bitLength); - - // Add `this`*(N+1) for every w-NAF index - var acc = this.jpoint(null, null, null); - for (var i = naf.length - 1; i >= 0; i--) { - // Count zeroes - for (var k = 0; i >= 0 && naf[i] === 0; i--) - k++; - if (i >= 0) - k++; - acc = acc.dblp(k); - - if (i < 0) - break; - var z = naf[i]; - assert(z !== 0); - if (p.type === 'affine') { - // J +- P - if (z > 0) - acc = acc.mixedAdd(wnd[(z - 1) >> 1]); - else - acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); - } else { - // J +- J - if (z > 0) - acc = acc.add(wnd[(z - 1) >> 1]); - else - acc = acc.add(wnd[(-z - 1) >> 1].neg()); - } - } - return p.type === 'affine' ? acc.toP() : acc; -}; - -BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, - points, - coeffs, - len, - jacobianResult) { - var wndWidth = this._wnafT1; - var wnd = this._wnafT2; - var naf = this._wnafT3; - - // Fill all arrays - var max = 0; - for (var i = 0; i < len; i++) { - var p = points[i]; - var nafPoints = p._getNAFPoints(defW); - wndWidth[i] = nafPoints.wnd; - wnd[i] = nafPoints.points; - } - - // Comb small window NAFs - for (var i = len - 1; i >= 1; i -= 2) { - var a = i - 1; - var b = i; - if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { - naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength); - naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength); - max = Math.max(naf[a].length, max); - max = Math.max(naf[b].length, max); - continue; - } - - var comb = [ - points[a], /* 1 */ - null, /* 3 */ - null, /* 5 */ - points[b] /* 7 */ - ]; - - // Try to avoid Projective points, if possible - if (points[a].y.cmp(points[b].y) === 0) { - comb[1] = points[a].add(points[b]); - comb[2] = points[a].toJ().mixedAdd(points[b].neg()); - } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { - comb[1] = points[a].toJ().mixedAdd(points[b]); - comb[2] = points[a].add(points[b].neg()); - } else { - comb[1] = points[a].toJ().mixedAdd(points[b]); - comb[2] = points[a].toJ().mixedAdd(points[b].neg()); - } - - var index = [ - -3, /* -1 -1 */ - -1, /* -1 0 */ - -5, /* -1 1 */ - -7, /* 0 -1 */ - 0, /* 0 0 */ - 7, /* 0 1 */ - 5, /* 1 -1 */ - 1, /* 1 0 */ - 3 /* 1 1 */ - ]; - - var jsf = getJSF(coeffs[a], coeffs[b]); - max = Math.max(jsf[0].length, max); - naf[a] = new Array(max); - naf[b] = new Array(max); - for (var j = 0; j < max; j++) { - var ja = jsf[0][j] | 0; - var jb = jsf[1][j] | 0; - - naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; - naf[b][j] = 0; - wnd[a] = comb; - } - } - - var acc = this.jpoint(null, null, null); - var tmp = this._wnafT4; - for (var i = max; i >= 0; i--) { - var k = 0; - - while (i >= 0) { - var zero = true; - for (var j = 0; j < len; j++) { - tmp[j] = naf[j][i] | 0; - if (tmp[j] !== 0) - zero = false; - } - if (!zero) - break; - k++; - i--; - } - if (i >= 0) - k++; - acc = acc.dblp(k); - if (i < 0) - break; - - for (var j = 0; j < len; j++) { - var z = tmp[j]; - var p; - if (z === 0) - continue; - else if (z > 0) - p = wnd[j][(z - 1) >> 1]; - else if (z < 0) - p = wnd[j][(-z - 1) >> 1].neg(); - - if (p.type === 'affine') - acc = acc.mixedAdd(p); - else - acc = acc.add(p); - } - } - // Zeroify references - for (var i = 0; i < len; i++) - wnd[i] = null; - - if (jacobianResult) - return acc; - else - return acc.toP(); -}; - -function BasePoint(curve, type) { - this.curve = curve; - this.type = type; - this.precomputed = null; -} -BaseCurve.BasePoint = BasePoint; - -BasePoint.prototype.eq = function eq(/*other*/) { - throw new Error('Not implemented'); -}; - -BasePoint.prototype.validate = function validate() { - return this.curve.validate(this); -}; - -BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - bytes = utils.toArray(bytes, enc); - - var len = this.p.byteLength(); - - // uncompressed, hybrid-odd, hybrid-even - if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && - bytes.length - 1 === 2 * len) { - if (bytes[0] === 0x06) - assert(bytes[bytes.length - 1] % 2 === 0); - else if (bytes[0] === 0x07) - assert(bytes[bytes.length - 1] % 2 === 1); - - var res = this.point(bytes.slice(1, 1 + len), - bytes.slice(1 + len, 1 + 2 * len)); - - return res; - } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && - bytes.length - 1 === len) { - return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); - } - throw new Error('Unknown point format'); -}; - -BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { - return this.encode(enc, true); -}; - -BasePoint.prototype._encode = function _encode(compact) { - var len = this.curve.p.byteLength(); - var x = this.getX().toArray('be', len); - - if (compact) - return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); - - return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ; -}; - -BasePoint.prototype.encode = function encode(enc, compact) { - return utils.encode(this._encode(compact), enc); -}; - -BasePoint.prototype.precompute = function precompute(power) { - if (this.precomputed) - return this; - - var precomputed = { - doubles: null, - naf: null, - beta: null - }; - precomputed.naf = this._getNAFPoints(8); - precomputed.doubles = this._getDoubles(4, power); - precomputed.beta = this._getBeta(); - this.precomputed = precomputed; - - return this; -}; - -BasePoint.prototype._hasDoubles = function _hasDoubles(k) { - if (!this.precomputed) - return false; - - var doubles = this.precomputed.doubles; - if (!doubles) - return false; - - return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); -}; - -BasePoint.prototype._getDoubles = function _getDoubles(step, power) { - if (this.precomputed && this.precomputed.doubles) - return this.precomputed.doubles; - - var doubles = [ this ]; - var acc = this; - for (var i = 0; i < power; i += step) { - for (var j = 0; j < step; j++) - acc = acc.dbl(); - doubles.push(acc); - } - return { - step: step, - points: doubles - }; -}; - -BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { - if (this.precomputed && this.precomputed.naf) - return this.precomputed.naf; - - var res = [ this ]; - var max = (1 << wnd) - 1; - var dbl = max === 1 ? null : this.dbl(); - for (var i = 1; i < max; i++) - res[i] = res[i - 1].add(dbl); - return { - wnd: wnd, - points: res - }; -}; - -BasePoint.prototype._getBeta = function _getBeta() { - return null; -}; - -BasePoint.prototype.dblp = function dblp(k) { - var r = this; - for (var i = 0; i < k; i++) - r = r.dbl(); - return r; -}; diff --git a/node_modules/elliptic/lib/elliptic/curve/edwards.js b/node_modules/elliptic/lib/elliptic/curve/edwards.js deleted file mode 100644 index 1c53fe9..0000000 --- a/node_modules/elliptic/lib/elliptic/curve/edwards.js +++ /dev/null @@ -1,432 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = require('./base'); - -var assert = utils.assert; - -function EdwardsCurve(conf) { - // NOTE: Important as we are creating point in Base.call() - this.twisted = (conf.a | 0) !== 1; - this.mOneA = this.twisted && (conf.a | 0) === -1; - this.extended = this.mOneA; - - Base.call(this, 'edwards', conf); - - this.a = new BN(conf.a, 16).umod(this.red.m); - this.a = this.a.toRed(this.red); - this.c = new BN(conf.c, 16).toRed(this.red); - this.c2 = this.c.redSqr(); - this.d = new BN(conf.d, 16).toRed(this.red); - this.dd = this.d.redAdd(this.d); - - assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); - this.oneC = (conf.c | 0) === 1; -} -inherits(EdwardsCurve, Base); -module.exports = EdwardsCurve; - -EdwardsCurve.prototype._mulA = function _mulA(num) { - if (this.mOneA) - return num.redNeg(); - else - return this.a.redMul(num); -}; - -EdwardsCurve.prototype._mulC = function _mulC(num) { - if (this.oneC) - return num; - else - return this.c.redMul(num); -}; - -// Just for compatibility with Short curve -EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { - return this.point(x, y, z, t); -}; - -EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - - var x2 = x.redSqr(); - var rhs = this.c2.redSub(this.a.redMul(x2)); - var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); - - var y2 = rhs.redMul(lhs.redInvm()); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - - return this.point(x, y); -}; - -EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { - y = new BN(y, 16); - if (!y.red) - y = y.toRed(this.red); - - // x^2 = (y^2 - c^2) / (c^2 d y^2 - a) - var y2 = y.redSqr(); - var lhs = y2.redSub(this.c2); - var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a); - var x2 = lhs.redMul(rhs.redInvm()); - - if (x2.cmp(this.zero) === 0) { - if (odd) - throw new Error('invalid point'); - else - return this.point(this.zero, y); - } - - var x = x2.redSqrt(); - if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - if (x.fromRed().isOdd() !== odd) - x = x.redNeg(); - - return this.point(x, y); -}; - -EdwardsCurve.prototype.validate = function validate(point) { - if (point.isInfinity()) - return true; - - // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) - point.normalize(); - - var x2 = point.x.redSqr(); - var y2 = point.y.redSqr(); - var lhs = x2.redMul(this.a).redAdd(y2); - var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); - - return lhs.cmp(rhs) === 0; -}; - -function Point(curve, x, y, z, t) { - Base.BasePoint.call(this, curve, 'projective'); - if (x === null && y === null && z === null) { - this.x = this.curve.zero; - this.y = this.curve.one; - this.z = this.curve.one; - this.t = this.curve.zero; - this.zOne = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = z ? new BN(z, 16) : this.curve.one; - this.t = t && new BN(t, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - if (this.t && !this.t.red) - this.t = this.t.toRed(this.curve.red); - this.zOne = this.z === this.curve.one; - - // Use extended coordinates - if (this.curve.extended && !this.t) { - this.t = this.x.redMul(this.y); - if (!this.zOne) - this.t = this.t.redMul(this.z.redInvm()); - } - } -} -inherits(Point, Base.BasePoint); - -EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { - return Point.fromJSON(this, obj); -}; - -EdwardsCurve.prototype.point = function point(x, y, z, t) { - return new Point(this, x, y, z, t); -}; - -Point.fromJSON = function fromJSON(curve, obj) { - return new Point(curve, obj[0], obj[1], obj[2]); -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.x.cmpn(0) === 0 && - (this.y.cmp(this.z) === 0 || - (this.zOne && this.y.cmp(this.curve.c) === 0)); -}; - -Point.prototype._extDbl = function _extDbl() { - // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html - // #doubling-dbl-2008-hwcd - // 4M + 4S - - // A = X1^2 - var a = this.x.redSqr(); - // B = Y1^2 - var b = this.y.redSqr(); - // C = 2 * Z1^2 - var c = this.z.redSqr(); - c = c.redIAdd(c); - // D = a * A - var d = this.curve._mulA(a); - // E = (X1 + Y1)^2 - A - B - var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); - // G = D + B - var g = d.redAdd(b); - // F = G - C - var f = g.redSub(c); - // H = D - B - var h = d.redSub(b); - // X3 = E * F - var nx = e.redMul(f); - // Y3 = G * H - var ny = g.redMul(h); - // T3 = E * H - var nt = e.redMul(h); - // Z3 = F * G - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); -}; - -Point.prototype._projDbl = function _projDbl() { - // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html - // #doubling-dbl-2008-bbjlp - // #doubling-dbl-2007-bl - // and others - // Generally 3M + 4S or 2M + 4S - - // B = (X1 + Y1)^2 - var b = this.x.redAdd(this.y).redSqr(); - // C = X1^2 - var c = this.x.redSqr(); - // D = Y1^2 - var d = this.y.redSqr(); - - var nx; - var ny; - var nz; - if (this.curve.twisted) { - // E = a * C - var e = this.curve._mulA(c); - // F = E + D - var f = e.redAdd(d); - if (this.zOne) { - // X3 = (B - C - D) * (F - 2) - nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); - // Y3 = F * (E - D) - ny = f.redMul(e.redSub(d)); - // Z3 = F^2 - 2 * F - nz = f.redSqr().redSub(f).redSub(f); - } else { - // H = Z1^2 - var h = this.z.redSqr(); - // J = F - 2 * H - var j = f.redSub(h).redISub(h); - // X3 = (B-C-D)*J - nx = b.redSub(c).redISub(d).redMul(j); - // Y3 = F * (E - D) - ny = f.redMul(e.redSub(d)); - // Z3 = F * J - nz = f.redMul(j); - } - } else { - // E = C + D - var e = c.redAdd(d); - // H = (c * Z1)^2 - var h = this.curve._mulC(this.z).redSqr(); - // J = E - 2 * H - var j = e.redSub(h).redSub(h); - // X3 = c * (B - E) * J - nx = this.curve._mulC(b.redISub(e)).redMul(j); - // Y3 = c * E * (C - D) - ny = this.curve._mulC(e).redMul(c.redISub(d)); - // Z3 = E * J - nz = e.redMul(j); - } - return this.curve.point(nx, ny, nz); -}; - -Point.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - - // Double in extended coordinates - if (this.curve.extended) - return this._extDbl(); - else - return this._projDbl(); -}; - -Point.prototype._extAdd = function _extAdd(p) { - // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html - // #addition-add-2008-hwcd-3 - // 8M - - // A = (Y1 - X1) * (Y2 - X2) - var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); - // B = (Y1 + X1) * (Y2 + X2) - var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); - // C = T1 * k * T2 - var c = this.t.redMul(this.curve.dd).redMul(p.t); - // D = Z1 * 2 * Z2 - var d = this.z.redMul(p.z.redAdd(p.z)); - // E = B - A - var e = b.redSub(a); - // F = D - C - var f = d.redSub(c); - // G = D + C - var g = d.redAdd(c); - // H = B + A - var h = b.redAdd(a); - // X3 = E * F - var nx = e.redMul(f); - // Y3 = G * H - var ny = g.redMul(h); - // T3 = E * H - var nt = e.redMul(h); - // Z3 = F * G - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); -}; - -Point.prototype._projAdd = function _projAdd(p) { - // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html - // #addition-add-2008-bbjlp - // #addition-add-2007-bl - // 10M + 1S - - // A = Z1 * Z2 - var a = this.z.redMul(p.z); - // B = A^2 - var b = a.redSqr(); - // C = X1 * X2 - var c = this.x.redMul(p.x); - // D = Y1 * Y2 - var d = this.y.redMul(p.y); - // E = d * C * D - var e = this.curve.d.redMul(c).redMul(d); - // F = B - E - var f = b.redSub(e); - // G = B + E - var g = b.redAdd(e); - // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) - var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); - var nx = a.redMul(f).redMul(tmp); - var ny; - var nz; - if (this.curve.twisted) { - // Y3 = A * G * (D - a * C) - ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); - // Z3 = F * G - nz = f.redMul(g); - } else { - // Y3 = A * G * (D - C) - ny = a.redMul(g).redMul(d.redSub(c)); - // Z3 = c * F * G - nz = this.curve._mulC(f).redMul(g); - } - return this.curve.point(nx, ny, nz); -}; - -Point.prototype.add = function add(p) { - if (this.isInfinity()) - return p; - if (p.isInfinity()) - return this; - - if (this.curve.extended) - return this._extAdd(p); - else - return this._projAdd(p); -}; - -Point.prototype.mul = function mul(k) { - if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); - else - return this.curve._wnafMul(this, k); -}; - -Point.prototype.mulAdd = function mulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); -}; - -Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); -}; - -Point.prototype.normalize = function normalize() { - if (this.zOne) - return this; - - // Normalize coordinates - var zi = this.z.redInvm(); - this.x = this.x.redMul(zi); - this.y = this.y.redMul(zi); - if (this.t) - this.t = this.t.redMul(zi); - this.z = this.curve.one; - this.zOne = true; - return this; -}; - -Point.prototype.neg = function neg() { - return this.curve.point(this.x.redNeg(), - this.y, - this.z, - this.t && this.t.redNeg()); -}; - -Point.prototype.getX = function getX() { - this.normalize(); - return this.x.fromRed(); -}; - -Point.prototype.getY = function getY() { - this.normalize(); - return this.y.fromRed(); -}; - -Point.prototype.eq = function eq(other) { - return this === other || - this.getX().cmp(other.getX()) === 0 && - this.getY().cmp(other.getY()) === 0; -}; - -Point.prototype.eqXToP = function eqXToP(x) { - var rx = x.toRed(this.curve.red).redMul(this.z); - if (this.x.cmp(rx) === 0) - return true; - - var xc = x.clone(); - var t = this.curve.redN.redMul(this.z); - for (;;) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } -}; - -// Compatibility with BaseCurve -Point.prototype.toP = Point.prototype.normalize; -Point.prototype.mixedAdd = Point.prototype.add; diff --git a/node_modules/elliptic/lib/elliptic/curve/index.js b/node_modules/elliptic/lib/elliptic/curve/index.js deleted file mode 100644 index c589281..0000000 --- a/node_modules/elliptic/lib/elliptic/curve/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var curve = exports; - -curve.base = require('./base'); -curve.short = require('./short'); -curve.mont = require('./mont'); -curve.edwards = require('./edwards'); diff --git a/node_modules/elliptic/lib/elliptic/curve/mont.js b/node_modules/elliptic/lib/elliptic/curve/mont.js deleted file mode 100644 index 4b9f80f..0000000 --- a/node_modules/elliptic/lib/elliptic/curve/mont.js +++ /dev/null @@ -1,178 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = require('./base'); - -var utils = require('../utils'); - -function MontCurve(conf) { - Base.call(this, 'mont', conf); - - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.i4 = new BN(4).toRed(this.red).redInvm(); - this.two = new BN(2).toRed(this.red); - this.a24 = this.i4.redMul(this.a.redAdd(this.two)); -} -inherits(MontCurve, Base); -module.exports = MontCurve; - -MontCurve.prototype.validate = function validate(point) { - var x = point.normalize().x; - var x2 = x.redSqr(); - var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); - var y = rhs.redSqrt(); - - return y.redSqr().cmp(rhs) === 0; -}; - -function Point(curve, x, z) { - Base.BasePoint.call(this, curve, 'projective'); - if (x === null && z === null) { - this.x = this.curve.one; - this.z = this.curve.zero; - } else { - this.x = new BN(x, 16); - this.z = new BN(z, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - } -} -inherits(Point, Base.BasePoint); - -MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - return this.point(utils.toArray(bytes, enc), 1); -}; - -MontCurve.prototype.point = function point(x, z) { - return new Point(this, x, z); -}; - -MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { - return Point.fromJSON(this, obj); -}; - -Point.prototype.precompute = function precompute() { - // No-op -}; - -Point.prototype._encode = function _encode() { - return this.getX().toArray('be', this.curve.p.byteLength()); -}; - -Point.fromJSON = function fromJSON(curve, obj) { - return new Point(curve, obj[0], obj[1] || curve.one); -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.z.cmpn(0) === 0; -}; - -Point.prototype.dbl = function dbl() { - // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 - // 2M + 2S + 4A - - // A = X1 + Z1 - var a = this.x.redAdd(this.z); - // AA = A^2 - var aa = a.redSqr(); - // B = X1 - Z1 - var b = this.x.redSub(this.z); - // BB = B^2 - var bb = b.redSqr(); - // C = AA - BB - var c = aa.redSub(bb); - // X3 = AA * BB - var nx = aa.redMul(bb); - // Z3 = C * (BB + A24 * C) - var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); - return this.curve.point(nx, nz); -}; - -Point.prototype.add = function add() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.diffAdd = function diffAdd(p, diff) { - // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 - // 4M + 2S + 6A - - // A = X2 + Z2 - var a = this.x.redAdd(this.z); - // B = X2 - Z2 - var b = this.x.redSub(this.z); - // C = X3 + Z3 - var c = p.x.redAdd(p.z); - // D = X3 - Z3 - var d = p.x.redSub(p.z); - // DA = D * A - var da = d.redMul(a); - // CB = C * B - var cb = c.redMul(b); - // X5 = Z1 * (DA + CB)^2 - var nx = diff.z.redMul(da.redAdd(cb).redSqr()); - // Z5 = X1 * (DA - CB)^2 - var nz = diff.x.redMul(da.redISub(cb).redSqr()); - return this.curve.point(nx, nz); -}; - -Point.prototype.mul = function mul(k) { - var t = k.clone(); - var a = this; // (N / 2) * Q + Q - var b = this.curve.point(null, null); // (N / 2) * Q - var c = this; // Q - - for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) - bits.push(t.andln(1)); - - for (var i = bits.length - 1; i >= 0; i--) { - if (bits[i] === 0) { - // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q - a = a.diffAdd(b, c); - // N * Q = 2 * ((N / 2) * Q + Q)) - b = b.dbl(); - } else { - // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) - b = a.diffAdd(b, c); - // N * Q + Q = 2 * ((N / 2) * Q + Q) - a = a.dbl(); - } - } - return b; -}; - -Point.prototype.mulAdd = function mulAdd() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.jumlAdd = function jumlAdd() { - throw new Error('Not supported on Montgomery curve'); -}; - -Point.prototype.eq = function eq(other) { - return this.getX().cmp(other.getX()) === 0; -}; - -Point.prototype.normalize = function normalize() { - this.x = this.x.redMul(this.z.redInvm()); - this.z = this.curve.one; - return this; -}; - -Point.prototype.getX = function getX() { - // Normalize coordinates - this.normalize(); - - return this.x.fromRed(); -}; diff --git a/node_modules/elliptic/lib/elliptic/curve/short.js b/node_modules/elliptic/lib/elliptic/curve/short.js deleted file mode 100644 index b263ecf..0000000 --- a/node_modules/elliptic/lib/elliptic/curve/short.js +++ /dev/null @@ -1,937 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var BN = require('bn.js'); -var inherits = require('inherits'); -var Base = require('./base'); - -var assert = utils.assert; - -function ShortCurve(conf) { - Base.call(this, 'short', conf); - - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.tinv = this.two.redInvm(); - - this.zeroA = this.a.fromRed().cmpn(0) === 0; - this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; - - // If the curve is endomorphic, precalculate beta and lambda - this.endo = this._getEndomorphism(conf); - this._endoWnafT1 = new Array(4); - this._endoWnafT2 = new Array(4); -} -inherits(ShortCurve, Base); -module.exports = ShortCurve; - -ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { - // No efficient endomorphism - if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) - return; - - // Compute beta and lambda, that lambda * P = (beta * Px; Py) - var beta; - var lambda; - if (conf.beta) { - beta = new BN(conf.beta, 16).toRed(this.red); - } else { - var betas = this._getEndoRoots(this.p); - // Choose the smallest beta - beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; - beta = beta.toRed(this.red); - } - if (conf.lambda) { - lambda = new BN(conf.lambda, 16); - } else { - // Choose the lambda that is matching selected beta - var lambdas = this._getEndoRoots(this.n); - if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { - lambda = lambdas[0]; - } else { - lambda = lambdas[1]; - assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); - } - } - - // Get basis vectors, used for balanced length-two representation - var basis; - if (conf.basis) { - basis = conf.basis.map(function(vec) { - return { - a: new BN(vec.a, 16), - b: new BN(vec.b, 16) - }; - }); - } else { - basis = this._getEndoBasis(lambda); - } - - return { - beta: beta, - lambda: lambda, - basis: basis - }; -}; - -ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { - // Find roots of for x^2 + x + 1 in F - // Root = (-1 +- Sqrt(-3)) / 2 - // - var red = num === this.p ? this.red : BN.mont(num); - var tinv = new BN(2).toRed(red).redInvm(); - var ntinv = tinv.redNeg(); - - var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); - - var l1 = ntinv.redAdd(s).fromRed(); - var l2 = ntinv.redSub(s).fromRed(); - return [ l1, l2 ]; -}; - -ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { - // aprxSqrt >= sqrt(this.n) - var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); - - // 3.74 - // Run EGCD, until r(L + 1) < aprxSqrt - var u = lambda; - var v = this.n.clone(); - var x1 = new BN(1); - var y1 = new BN(0); - var x2 = new BN(0); - var y2 = new BN(1); - - // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) - var a0; - var b0; - // First vector - var a1; - var b1; - // Second vector - var a2; - var b2; - - var prevR; - var i = 0; - var r; - var x; - while (u.cmpn(0) !== 0) { - var q = v.div(u); - r = v.sub(q.mul(u)); - x = x2.sub(q.mul(x1)); - var y = y2.sub(q.mul(y1)); - - if (!a1 && r.cmp(aprxSqrt) < 0) { - a0 = prevR.neg(); - b0 = x1; - a1 = r.neg(); - b1 = x; - } else if (a1 && ++i === 2) { - break; - } - prevR = r; - - v = u; - u = r; - x2 = x1; - x1 = x; - y2 = y1; - y1 = y; - } - a2 = r.neg(); - b2 = x; - - var len1 = a1.sqr().add(b1.sqr()); - var len2 = a2.sqr().add(b2.sqr()); - if (len2.cmp(len1) >= 0) { - a2 = a0; - b2 = b0; - } - - // Normalize signs - if (a1.negative) { - a1 = a1.neg(); - b1 = b1.neg(); - } - if (a2.negative) { - a2 = a2.neg(); - b2 = b2.neg(); - } - - return [ - { a: a1, b: b1 }, - { a: a2, b: b2 } - ]; -}; - -ShortCurve.prototype._endoSplit = function _endoSplit(k) { - var basis = this.endo.basis; - var v1 = basis[0]; - var v2 = basis[1]; - - var c1 = v2.b.mul(k).divRound(this.n); - var c2 = v1.b.neg().mul(k).divRound(this.n); - - var p1 = c1.mul(v1.a); - var p2 = c2.mul(v2.a); - var q1 = c1.mul(v1.b); - var q2 = c2.mul(v2.b); - - // Calculate answer - var k1 = k.sub(p1).sub(p2); - var k2 = q1.add(q2).neg(); - return { k1: k1, k2: k2 }; -}; - -ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - - var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error('invalid point'); - - // XXX Is there any way to tell if the number is odd without converting it - // to non-red form? - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - - return this.point(x, y); -}; - -ShortCurve.prototype.validate = function validate(point) { - if (point.inf) - return true; - - var x = point.x; - var y = point.y; - - var ax = this.a.redMul(x); - var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); - return y.redSqr().redISub(rhs).cmpn(0) === 0; -}; - -ShortCurve.prototype._endoWnafMulAdd = - function _endoWnafMulAdd(points, coeffs, jacobianResult) { - var npoints = this._endoWnafT1; - var ncoeffs = this._endoWnafT2; - for (var i = 0; i < points.length; i++) { - var split = this._endoSplit(coeffs[i]); - var p = points[i]; - var beta = p._getBeta(); - - if (split.k1.negative) { - split.k1.ineg(); - p = p.neg(true); - } - if (split.k2.negative) { - split.k2.ineg(); - beta = beta.neg(true); - } - - npoints[i * 2] = p; - npoints[i * 2 + 1] = beta; - ncoeffs[i * 2] = split.k1; - ncoeffs[i * 2 + 1] = split.k2; - } - var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); - - // Clean-up references to points and coefficients - for (var j = 0; j < i * 2; j++) { - npoints[j] = null; - ncoeffs[j] = null; - } - return res; -}; - -function Point(curve, x, y, isRed) { - Base.BasePoint.call(this, curve, 'affine'); - if (x === null && y === null) { - this.x = null; - this.y = null; - this.inf = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - // Force redgomery representation when loading from JSON - if (isRed) { - this.x.forceRed(this.curve.red); - this.y.forceRed(this.curve.red); - } - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - this.inf = false; - } -} -inherits(Point, Base.BasePoint); - -ShortCurve.prototype.point = function point(x, y, isRed) { - return new Point(this, x, y, isRed); -}; - -ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { - return Point.fromJSON(this, obj, red); -}; - -Point.prototype._getBeta = function _getBeta() { - if (!this.curve.endo) - return; - - var pre = this.precomputed; - if (pre && pre.beta) - return pre.beta; - - var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); - if (pre) { - var curve = this.curve; - var endoMul = function(p) { - return curve.point(p.x.redMul(curve.endo.beta), p.y); - }; - pre.beta = beta; - beta.precomputed = { - beta: null, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(endoMul) - }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(endoMul) - } - }; - } - return beta; -}; - -Point.prototype.toJSON = function toJSON() { - if (!this.precomputed) - return [ this.x, this.y ]; - - return [ this.x, this.y, this.precomputed && { - doubles: this.precomputed.doubles && { - step: this.precomputed.doubles.step, - points: this.precomputed.doubles.points.slice(1) - }, - naf: this.precomputed.naf && { - wnd: this.precomputed.naf.wnd, - points: this.precomputed.naf.points.slice(1) - } - } ]; -}; - -Point.fromJSON = function fromJSON(curve, obj, red) { - if (typeof obj === 'string') - obj = JSON.parse(obj); - var res = curve.point(obj[0], obj[1], red); - if (!obj[2]) - return res; - - function obj2point(obj) { - return curve.point(obj[0], obj[1], red); - } - - var pre = obj[2]; - res.precomputed = { - beta: null, - doubles: pre.doubles && { - step: pre.doubles.step, - points: [ res ].concat(pre.doubles.points.map(obj2point)) - }, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: [ res ].concat(pre.naf.points.map(obj2point)) - } - }; - return res; -}; - -Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -Point.prototype.isInfinity = function isInfinity() { - return this.inf; -}; - -Point.prototype.add = function add(p) { - // O + P = P - if (this.inf) - return p; - - // P + O = P - if (p.inf) - return this; - - // P + P = 2P - if (this.eq(p)) - return this.dbl(); - - // P + (-P) = O - if (this.neg().eq(p)) - return this.curve.point(null, null); - - // P + Q = O - if (this.x.cmp(p.x) === 0) - return this.curve.point(null, null); - - var c = this.y.redSub(p.y); - if (c.cmpn(0) !== 0) - c = c.redMul(this.x.redSub(p.x).redInvm()); - var nx = c.redSqr().redISub(this.x).redISub(p.x); - var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); -}; - -Point.prototype.dbl = function dbl() { - if (this.inf) - return this; - - // 2P = O - var ys1 = this.y.redAdd(this.y); - if (ys1.cmpn(0) === 0) - return this.curve.point(null, null); - - var a = this.curve.a; - - var x2 = this.x.redSqr(); - var dyinv = ys1.redInvm(); - var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); - - var nx = c.redSqr().redISub(this.x.redAdd(this.x)); - var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); -}; - -Point.prototype.getX = function getX() { - return this.x.fromRed(); -}; - -Point.prototype.getY = function getY() { - return this.y.fromRed(); -}; - -Point.prototype.mul = function mul(k) { - k = new BN(k, 16); - if (this.isInfinity()) - return this; - else if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); - else if (this.curve.endo) - return this.curve._endoWnafMulAdd([ this ], [ k ]); - else - return this.curve._wnafMul(this, k); -}; - -Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { - var points = [ this, p2 ]; - var coeffs = [ k1, k2 ]; - if (this.curve.endo) - return this.curve._endoWnafMulAdd(points, coeffs); - else - return this.curve._wnafMulAdd(1, points, coeffs, 2); -}; - -Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { - var points = [ this, p2 ]; - var coeffs = [ k1, k2 ]; - if (this.curve.endo) - return this.curve._endoWnafMulAdd(points, coeffs, true); - else - return this.curve._wnafMulAdd(1, points, coeffs, 2, true); -}; - -Point.prototype.eq = function eq(p) { - return this === p || - this.inf === p.inf && - (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); -}; - -Point.prototype.neg = function neg(_precompute) { - if (this.inf) - return this; - - var res = this.curve.point(this.x, this.y.redNeg()); - if (_precompute && this.precomputed) { - var pre = this.precomputed; - var negate = function(p) { - return p.neg(); - }; - res.precomputed = { - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(negate) - }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(negate) - } - }; - } - return res; -}; - -Point.prototype.toJ = function toJ() { - if (this.inf) - return this.curve.jpoint(null, null, null); - - var res = this.curve.jpoint(this.x, this.y, this.curve.one); - return res; -}; - -function JPoint(curve, x, y, z) { - Base.BasePoint.call(this, curve, 'jacobian'); - if (x === null && y === null && z === null) { - this.x = this.curve.one; - this.y = this.curve.one; - this.z = new BN(0); - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = new BN(z, 16); - } - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - - this.zOne = this.z === this.curve.one; -} -inherits(JPoint, Base.BasePoint); - -ShortCurve.prototype.jpoint = function jpoint(x, y, z) { - return new JPoint(this, x, y, z); -}; - -JPoint.prototype.toP = function toP() { - if (this.isInfinity()) - return this.curve.point(null, null); - - var zinv = this.z.redInvm(); - var zinv2 = zinv.redSqr(); - var ax = this.x.redMul(zinv2); - var ay = this.y.redMul(zinv2).redMul(zinv); - - return this.curve.point(ax, ay); -}; - -JPoint.prototype.neg = function neg() { - return this.curve.jpoint(this.x, this.y.redNeg(), this.z); -}; - -JPoint.prototype.add = function add(p) { - // O + P = P - if (this.isInfinity()) - return p; - - // P + O = P - if (p.isInfinity()) - return this; - - // 12M + 4S + 7A - var pz2 = p.z.redSqr(); - var z2 = this.z.redSqr(); - var u1 = this.x.redMul(pz2); - var u2 = p.x.redMul(z2); - var s1 = this.y.redMul(pz2.redMul(p.z)); - var s2 = p.y.redMul(z2.redMul(this.z)); - - var h = u1.redSub(u2); - var r = s1.redSub(s2); - if (h.cmpn(0) === 0) { - if (r.cmpn(0) !== 0) - return this.curve.jpoint(null, null, null); - else - return this.dbl(); - } - - var h2 = h.redSqr(); - var h3 = h2.redMul(h); - var v = u1.redMul(h2); - - var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); - var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); - var nz = this.z.redMul(p.z).redMul(h); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.mixedAdd = function mixedAdd(p) { - // O + P = P - if (this.isInfinity()) - return p.toJ(); - - // P + O = P - if (p.isInfinity()) - return this; - - // 8M + 3S + 7A - var z2 = this.z.redSqr(); - var u1 = this.x; - var u2 = p.x.redMul(z2); - var s1 = this.y; - var s2 = p.y.redMul(z2).redMul(this.z); - - var h = u1.redSub(u2); - var r = s1.redSub(s2); - if (h.cmpn(0) === 0) { - if (r.cmpn(0) !== 0) - return this.curve.jpoint(null, null, null); - else - return this.dbl(); - } - - var h2 = h.redSqr(); - var h3 = h2.redMul(h); - var v = u1.redMul(h2); - - var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); - var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); - var nz = this.z.redMul(h); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.dblp = function dblp(pow) { - if (pow === 0) - return this; - if (this.isInfinity()) - return this; - if (!pow) - return this.dbl(); - - if (this.curve.zeroA || this.curve.threeA) { - var r = this; - for (var i = 0; i < pow; i++) - r = r.dbl(); - return r; - } - - // 1M + 2S + 1A + N * (4S + 5M + 8A) - // N = 1 => 6M + 6S + 9A - var a = this.curve.a; - var tinv = this.curve.tinv; - - var jx = this.x; - var jy = this.y; - var jz = this.z; - var jz4 = jz.redSqr().redSqr(); - - // Reuse results - var jyd = jy.redAdd(jy); - for (var i = 0; i < pow; i++) { - var jx2 = jx.redSqr(); - var jyd2 = jyd.redSqr(); - var jyd4 = jyd2.redSqr(); - var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); - - var t1 = jx.redMul(jyd2); - var nx = c.redSqr().redISub(t1.redAdd(t1)); - var t2 = t1.redISub(nx); - var dny = c.redMul(t2); - dny = dny.redIAdd(dny).redISub(jyd4); - var nz = jyd.redMul(jz); - if (i + 1 < pow) - jz4 = jz4.redMul(jyd4); - - jx = nx; - jz = nz; - jyd = dny; - } - - return this.curve.jpoint(jx, jyd.redMul(tinv), jz); -}; - -JPoint.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - - if (this.curve.zeroA) - return this._zeroDbl(); - else if (this.curve.threeA) - return this._threeDbl(); - else - return this._dbl(); -}; - -JPoint.prototype._zeroDbl = function _zeroDbl() { - var nx; - var ny; - var nz; - // Z = 1 - if (this.zOne) { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html - // #doubling-mdbl-2007-bl - // 1M + 5S + 14A - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // S = 2 * ((X1 + YY)^2 - XX - YYYY) - var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - // M = 3 * XX + a; a = 0 - var m = xx.redAdd(xx).redIAdd(xx); - // T = M ^ 2 - 2*S - var t = m.redSqr().redISub(s).redISub(s); - - // 8 * YYYY - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = yyyy8.redIAdd(yyyy8); - yyyy8 = yyyy8.redIAdd(yyyy8); - - // X3 = T - nx = t; - // Y3 = M * (S - T) - 8 * YYYY - ny = m.redMul(s.redISub(t)).redISub(yyyy8); - // Z3 = 2*Y1 - nz = this.y.redAdd(this.y); - } else { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html - // #doubling-dbl-2009-l - // 2M + 5S + 13A - - // A = X1^2 - var a = this.x.redSqr(); - // B = Y1^2 - var b = this.y.redSqr(); - // C = B^2 - var c = b.redSqr(); - // D = 2 * ((X1 + B)^2 - A - C) - var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); - d = d.redIAdd(d); - // E = 3 * A - var e = a.redAdd(a).redIAdd(a); - // F = E^2 - var f = e.redSqr(); - - // 8 * C - var c8 = c.redIAdd(c); - c8 = c8.redIAdd(c8); - c8 = c8.redIAdd(c8); - - // X3 = F - 2 * D - nx = f.redISub(d).redISub(d); - // Y3 = E * (D - X3) - 8 * C - ny = e.redMul(d.redISub(nx)).redISub(c8); - // Z3 = 2 * Y1 * Z1 - nz = this.y.redMul(this.z); - nz = nz.redIAdd(nz); - } - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype._threeDbl = function _threeDbl() { - var nx; - var ny; - var nz; - // Z = 1 - if (this.zOne) { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html - // #doubling-mdbl-2007-bl - // 1M + 5S + 15A - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // S = 2 * ((X1 + YY)^2 - XX - YYYY) - var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - // M = 3 * XX + a - var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); - // T = M^2 - 2 * S - var t = m.redSqr().redISub(s).redISub(s); - // X3 = T - nx = t; - // Y3 = M * (S - T) - 8 * YYYY - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = yyyy8.redIAdd(yyyy8); - yyyy8 = yyyy8.redIAdd(yyyy8); - ny = m.redMul(s.redISub(t)).redISub(yyyy8); - // Z3 = 2 * Y1 - nz = this.y.redAdd(this.y); - } else { - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b - // 3M + 5S - - // delta = Z1^2 - var delta = this.z.redSqr(); - // gamma = Y1^2 - var gamma = this.y.redSqr(); - // beta = X1 * gamma - var beta = this.x.redMul(gamma); - // alpha = 3 * (X1 - delta) * (X1 + delta) - var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); - alpha = alpha.redAdd(alpha).redIAdd(alpha); - // X3 = alpha^2 - 8 * beta - var beta4 = beta.redIAdd(beta); - beta4 = beta4.redIAdd(beta4); - var beta8 = beta4.redAdd(beta4); - nx = alpha.redSqr().redISub(beta8); - // Z3 = (Y1 + Z1)^2 - gamma - delta - nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); - // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 - var ggamma8 = gamma.redSqr(); - ggamma8 = ggamma8.redIAdd(ggamma8); - ggamma8 = ggamma8.redIAdd(ggamma8); - ggamma8 = ggamma8.redIAdd(ggamma8); - ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); - } - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype._dbl = function _dbl() { - var a = this.curve.a; - - // 4M + 6S + 10A - var jx = this.x; - var jy = this.y; - var jz = this.z; - var jz4 = jz.redSqr().redSqr(); - - var jx2 = jx.redSqr(); - var jy2 = jy.redSqr(); - - var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); - - var jxd4 = jx.redAdd(jx); - jxd4 = jxd4.redIAdd(jxd4); - var t1 = jxd4.redMul(jy2); - var nx = c.redSqr().redISub(t1.redAdd(t1)); - var t2 = t1.redISub(nx); - - var jyd8 = jy2.redSqr(); - jyd8 = jyd8.redIAdd(jyd8); - jyd8 = jyd8.redIAdd(jyd8); - jyd8 = jyd8.redIAdd(jyd8); - var ny = c.redMul(t2).redISub(jyd8); - var nz = jy.redAdd(jy).redMul(jz); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.trpl = function trpl() { - if (!this.curve.zeroA) - return this.dbl().add(this); - - // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl - // 5M + 10S + ... - - // XX = X1^2 - var xx = this.x.redSqr(); - // YY = Y1^2 - var yy = this.y.redSqr(); - // ZZ = Z1^2 - var zz = this.z.redSqr(); - // YYYY = YY^2 - var yyyy = yy.redSqr(); - // M = 3 * XX + a * ZZ2; a = 0 - var m = xx.redAdd(xx).redIAdd(xx); - // MM = M^2 - var mm = m.redSqr(); - // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM - var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - e = e.redIAdd(e); - e = e.redAdd(e).redIAdd(e); - e = e.redISub(mm); - // EE = E^2 - var ee = e.redSqr(); - // T = 16*YYYY - var t = yyyy.redIAdd(yyyy); - t = t.redIAdd(t); - t = t.redIAdd(t); - t = t.redIAdd(t); - // U = (M + E)^2 - MM - EE - T - var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); - // X3 = 4 * (X1 * EE - 4 * YY * U) - var yyu4 = yy.redMul(u); - yyu4 = yyu4.redIAdd(yyu4); - yyu4 = yyu4.redIAdd(yyu4); - var nx = this.x.redMul(ee).redISub(yyu4); - nx = nx.redIAdd(nx); - nx = nx.redIAdd(nx); - // Y3 = 8 * Y1 * (U * (T - U) - E * EE) - var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); - ny = ny.redIAdd(ny); - ny = ny.redIAdd(ny); - ny = ny.redIAdd(ny); - // Z3 = (Z1 + E)^2 - ZZ - EE - var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); - - return this.curve.jpoint(nx, ny, nz); -}; - -JPoint.prototype.mul = function mul(k, kbase) { - k = new BN(k, kbase); - - return this.curve._wnafMul(this, k); -}; - -JPoint.prototype.eq = function eq(p) { - if (p.type === 'affine') - return this.eq(p.toJ()); - - if (this === p) - return true; - - // x1 * z2^2 == x2 * z1^2 - var z2 = this.z.redSqr(); - var pz2 = p.z.redSqr(); - if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) - return false; - - // y1 * z2^3 == y2 * z1^3 - var z3 = z2.redMul(this.z); - var pz3 = pz2.redMul(p.z); - return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; -}; - -JPoint.prototype.eqXToP = function eqXToP(x) { - var zs = this.z.redSqr(); - var rx = x.toRed(this.curve.red).redMul(zs); - if (this.x.cmp(rx) === 0) - return true; - - var xc = x.clone(); - var t = this.curve.redN.redMul(zs); - for (;;) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } -}; - -JPoint.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ''; - return ''; -}; - -JPoint.prototype.isInfinity = function isInfinity() { - // XXX This code assumes that zero is always zero in red - return this.z.cmpn(0) === 0; -}; diff --git a/node_modules/elliptic/lib/elliptic/curves.js b/node_modules/elliptic/lib/elliptic/curves.js deleted file mode 100644 index 63d8655..0000000 --- a/node_modules/elliptic/lib/elliptic/curves.js +++ /dev/null @@ -1,206 +0,0 @@ -'use strict'; - -var curves = exports; - -var hash = require('hash.js'); -var curve = require('./curve'); -var utils = require('./utils'); - -var assert = utils.assert; - -function PresetCurve(options) { - if (options.type === 'short') - this.curve = new curve.short(options); - else if (options.type === 'edwards') - this.curve = new curve.edwards(options); - else - this.curve = new curve.mont(options); - this.g = this.curve.g; - this.n = this.curve.n; - this.hash = options.hash; - - assert(this.g.validate(), 'Invalid curve'); - assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); -} -curves.PresetCurve = PresetCurve; - -function defineCurve(name, options) { - Object.defineProperty(curves, name, { - configurable: true, - enumerable: true, - get: function() { - var curve = new PresetCurve(options); - Object.defineProperty(curves, name, { - configurable: true, - enumerable: true, - value: curve - }); - return curve; - } - }); -} - -defineCurve('p192', { - type: 'short', - prime: 'p192', - p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', - b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', - n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', - hash: hash.sha256, - gRed: false, - g: [ - '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', - '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' - ] -}); - -defineCurve('p224', { - type: 'short', - prime: 'p224', - p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', - b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', - n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', - hash: hash.sha256, - gRed: false, - g: [ - 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', - 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' - ] -}); - -defineCurve('p256', { - type: 'short', - prime: null, - p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', - a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', - b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', - n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', - hash: hash.sha256, - gRed: false, - g: [ - '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' - ] -}); - -defineCurve('p384', { - type: 'short', - prime: null, - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'fffffffe ffffffff 00000000 00000000 ffffffff', - a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'fffffffe ffffffff 00000000 00000000 fffffffc', - b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + - '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', - n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + - 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', - hash: hash.sha384, - gRed: false, - g: [ - 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + - '5502f25d bf55296c 3a545e38 72760ab7', - '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f' - ] -}); - -defineCurve('p521', { - type: 'short', - prime: null, - p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff', - a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff ffffffff ffffffff fffffffc', - b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + - '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + - '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', - n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + - 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + - 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', - hash: hash.sha512, - gRed: false, - g: [ - '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + - '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + - 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', - '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + - '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + - '3fad0761 353c7086 a272c240 88be9476 9fd16650' - ] -}); - -defineCurve('curve25519', { - type: 'mont', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '76d06', - b: '1', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, - gRed: false, - g: [ - '9' - ] -}); - -defineCurve('ed25519', { - type: 'edwards', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '-1', - c: '1', - // -121665 * (121666^(-1)) (mod P) - d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, - gRed: false, - g: [ - '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', - - // 4/5 - '6666666666666666666666666666666666666666666666666666666666666658' - ] -}); - -var pre; -try { - pre = require('./precomputed/secp256k1'); -} catch (e) { - pre = undefined; -} - -defineCurve('secp256k1', { - type: 'short', - prime: 'k256', - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', - a: '0', - b: '7', - n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', - h: '1', - hash: hash.sha256, - - // Precomputed endomorphism - beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', - lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', - basis: [ - { - a: '3086d221a7d46bcde86c90e49284eb15', - b: '-e4437ed6010e88286f547fa90abfe4c3' - }, - { - a: '114ca50f7a8e2f3f657c1108d9d44cfd8', - b: '3086d221a7d46bcde86c90e49284eb15' - } - ], - - gRed: false, - g: [ - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', - pre - ] -}); diff --git a/node_modules/elliptic/lib/elliptic/ec/index.js b/node_modules/elliptic/lib/elliptic/ec/index.js deleted file mode 100644 index 0f1d8ce..0000000 --- a/node_modules/elliptic/lib/elliptic/ec/index.js +++ /dev/null @@ -1,241 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var HmacDRBG = require('hmac-drbg'); -var utils = require('../utils'); -var curves = require('../curves'); -var rand = require('brorand'); -var assert = utils.assert; - -var KeyPair = require('./key'); -var Signature = require('./signature'); - -function EC(options) { - if (!(this instanceof EC)) - return new EC(options); - - // Shortcut `elliptic.ec(curve-name)` - if (typeof options === 'string') { - assert(curves.hasOwnProperty(options), 'Unknown curve ' + options); - - options = curves[options]; - } - - // Shortcut for `elliptic.ec(elliptic.curves.curveName)` - if (options instanceof curves.PresetCurve) - options = { curve: options }; - - this.curve = options.curve.curve; - this.n = this.curve.n; - this.nh = this.n.ushrn(1); - this.g = this.curve.g; - - // Point on curve - this.g = options.curve.g; - this.g.precompute(options.curve.n.bitLength() + 1); - - // Hash for function for DRBG - this.hash = options.hash || options.curve.hash; -} -module.exports = EC; - -EC.prototype.keyPair = function keyPair(options) { - return new KeyPair(this, options); -}; - -EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { - return KeyPair.fromPrivate(this, priv, enc); -}; - -EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { - return KeyPair.fromPublic(this, pub, enc); -}; - -EC.prototype.genKeyPair = function genKeyPair(options) { - if (!options) - options = {}; - - // Instantiate Hmac_DRBG - var drbg = new HmacDRBG({ - hash: this.hash, - pers: options.pers, - persEnc: options.persEnc || 'utf8', - entropy: options.entropy || rand(this.hash.hmacStrength), - entropyEnc: options.entropy && options.entropyEnc || 'utf8', - nonce: this.n.toArray() - }); - - var bytes = this.n.byteLength(); - var ns2 = this.n.sub(new BN(2)); - do { - var priv = new BN(drbg.generate(bytes)); - if (priv.cmp(ns2) > 0) - continue; - - priv.iaddn(1); - return this.keyFromPrivate(priv); - } while (true); -}; - -EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { - var delta = msg.byteLength() * 8 - this.n.bitLength(); - if (delta > 0) - msg = msg.ushrn(delta); - if (!truncOnly && msg.cmp(this.n) >= 0) - return msg.sub(this.n); - else - return msg; -}; - -EC.prototype.sign = function sign(msg, key, enc, options) { - if (typeof enc === 'object') { - options = enc; - enc = null; - } - if (!options) - options = {}; - - key = this.keyFromPrivate(key, enc); - msg = this._truncateToN(new BN(msg, 16)); - - // Zero-extend key to provide enough entropy - var bytes = this.n.byteLength(); - var bkey = key.getPrivate().toArray('be', bytes); - - // Zero-extend nonce to have the same byte size as N - var nonce = msg.toArray('be', bytes); - - // Instantiate Hmac_DRBG - var drbg = new HmacDRBG({ - hash: this.hash, - entropy: bkey, - nonce: nonce, - pers: options.pers, - persEnc: options.persEnc || 'utf8' - }); - - // Number of bytes to generate - var ns1 = this.n.sub(new BN(1)); - - for (var iter = 0; true; iter++) { - var k = options.k ? - options.k(iter) : - new BN(drbg.generate(this.n.byteLength())); - k = this._truncateToN(k, true); - if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) - continue; - - var kp = this.g.mul(k); - if (kp.isInfinity()) - continue; - - var kpX = kp.getX(); - var r = kpX.umod(this.n); - if (r.cmpn(0) === 0) - continue; - - var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); - s = s.umod(this.n); - if (s.cmpn(0) === 0) - continue; - - var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | - (kpX.cmp(r) !== 0 ? 2 : 0); - - // Use complement of `s`, if it is > `n / 2` - if (options.canonical && s.cmp(this.nh) > 0) { - s = this.n.sub(s); - recoveryParam ^= 1; - } - - return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); - } -}; - -EC.prototype.verify = function verify(msg, signature, key, enc) { - msg = this._truncateToN(new BN(msg, 16)); - key = this.keyFromPublic(key, enc); - signature = new Signature(signature, 'hex'); - - // Perform primitive values validation - var r = signature.r; - var s = signature.s; - if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) - return false; - if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) - return false; - - // Validate signature - var sinv = s.invm(this.n); - var u1 = sinv.mul(msg).umod(this.n); - var u2 = sinv.mul(r).umod(this.n); - - if (!this.curve._maxwellTrick) { - var p = this.g.mulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - - return p.getX().umod(this.n).cmp(r) === 0; - } - - // NOTE: Greg Maxwell's trick, inspired by: - // https://git.io/vad3K - - var p = this.g.jmulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - - // Compare `p.x` of Jacobian point with `r`, - // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the - // inverse of `p.z^2` - return p.eqXToP(r); -}; - -EC.prototype.recoverPubKey = function(msg, signature, j, enc) { - assert((3 & j) === j, 'The recovery param is more than two bits'); - signature = new Signature(signature, enc); - - var n = this.n; - var e = new BN(msg); - var r = signature.r; - var s = signature.s; - - // A set LSB signifies that the y-coordinate is odd - var isYOdd = j & 1; - var isSecondKey = j >> 1; - if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) - throw new Error('Unable to find sencond key candinate'); - - // 1.1. Let x = r + jn. - if (isSecondKey) - r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); - else - r = this.curve.pointFromX(r, isYOdd); - - var rInv = signature.r.invm(n); - var s1 = n.sub(e).mul(rInv).umod(n); - var s2 = s.mul(rInv).umod(n); - - // 1.6.1 Compute Q = r^-1 (sR - eG) - // Q = r^-1 (sR + -eG) - return this.g.mulAdd(s1, r, s2); -}; - -EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { - signature = new Signature(signature, enc); - if (signature.recoveryParam !== null) - return signature.recoveryParam; - - for (var i = 0; i < 4; i++) { - var Qprime; - try { - Qprime = this.recoverPubKey(e, signature, i); - } catch (e) { - continue; - } - - if (Qprime.eq(Q)) - return i; - } - throw new Error('Unable to find valid recovery factor'); -}; diff --git a/node_modules/elliptic/lib/elliptic/ec/key.js b/node_modules/elliptic/lib/elliptic/ec/key.js deleted file mode 100644 index 4a56d69..0000000 --- a/node_modules/elliptic/lib/elliptic/ec/key.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var utils = require('../utils'); -var assert = utils.assert; - -function KeyPair(ec, options) { - this.ec = ec; - this.priv = null; - this.pub = null; - - // KeyPair(ec, { priv: ..., pub: ... }) - if (options.priv) - this._importPrivate(options.priv, options.privEnc); - if (options.pub) - this._importPublic(options.pub, options.pubEnc); -} -module.exports = KeyPair; - -KeyPair.fromPublic = function fromPublic(ec, pub, enc) { - if (pub instanceof KeyPair) - return pub; - - return new KeyPair(ec, { - pub: pub, - pubEnc: enc - }); -}; - -KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { - if (priv instanceof KeyPair) - return priv; - - return new KeyPair(ec, { - priv: priv, - privEnc: enc - }); -}; - -KeyPair.prototype.validate = function validate() { - var pub = this.getPublic(); - - if (pub.isInfinity()) - return { result: false, reason: 'Invalid public key' }; - if (!pub.validate()) - return { result: false, reason: 'Public key is not a point' }; - if (!pub.mul(this.ec.curve.n).isInfinity()) - return { result: false, reason: 'Public key * N != O' }; - - return { result: true, reason: null }; -}; - -KeyPair.prototype.getPublic = function getPublic(compact, enc) { - // compact is optional argument - if (typeof compact === 'string') { - enc = compact; - compact = null; - } - - if (!this.pub) - this.pub = this.ec.g.mul(this.priv); - - if (!enc) - return this.pub; - - return this.pub.encode(enc, compact); -}; - -KeyPair.prototype.getPrivate = function getPrivate(enc) { - if (enc === 'hex') - return this.priv.toString(16, 2); - else - return this.priv; -}; - -KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { - this.priv = new BN(key, enc || 16); - - // Ensure that the priv won't be bigger than n, otherwise we may fail - // in fixed multiplication method - this.priv = this.priv.umod(this.ec.curve.n); -}; - -KeyPair.prototype._importPublic = function _importPublic(key, enc) { - if (key.x || key.y) { - // Montgomery points only have an `x` coordinate. - // Weierstrass/Edwards points on the other hand have both `x` and - // `y` coordinates. - if (this.ec.curve.type === 'mont') { - assert(key.x, 'Need x coordinate'); - } else if (this.ec.curve.type === 'short' || - this.ec.curve.type === 'edwards') { - assert(key.x && key.y, 'Need both x and y coordinate'); - } - this.pub = this.ec.curve.point(key.x, key.y); - return; - } - this.pub = this.ec.curve.decodePoint(key, enc); -}; - -// ECDH -KeyPair.prototype.derive = function derive(pub) { - return pub.mul(this.priv).getX(); -}; - -// ECDSA -KeyPair.prototype.sign = function sign(msg, enc, options) { - return this.ec.sign(msg, this, enc, options); -}; - -KeyPair.prototype.verify = function verify(msg, signature) { - return this.ec.verify(msg, signature, this); -}; - -KeyPair.prototype.inspect = function inspect() { - return ''; -}; diff --git a/node_modules/elliptic/lib/elliptic/ec/signature.js b/node_modules/elliptic/lib/elliptic/ec/signature.js deleted file mode 100644 index 2cb6b49..0000000 --- a/node_modules/elliptic/lib/elliptic/ec/signature.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); - -var utils = require('../utils'); -var assert = utils.assert; - -function Signature(options, enc) { - if (options instanceof Signature) - return options; - - if (this._importDER(options, enc)) - return; - - assert(options.r && options.s, 'Signature without r or s'); - this.r = new BN(options.r, 16); - this.s = new BN(options.s, 16); - if (options.recoveryParam === undefined) - this.recoveryParam = null; - else - this.recoveryParam = options.recoveryParam; -} -module.exports = Signature; - -function Position() { - this.place = 0; -} - -function getLength(buf, p) { - var initial = buf[p.place++]; - if (!(initial & 0x80)) { - return initial; - } - var octetLen = initial & 0xf; - var val = 0; - for (var i = 0, off = p.place; i < octetLen; i++, off++) { - val <<= 8; - val |= buf[off]; - } - p.place = off; - return val; -} - -function rmPadding(buf) { - var i = 0; - var len = buf.length - 1; - while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { - i++; - } - if (i === 0) { - return buf; - } - return buf.slice(i); -} - -Signature.prototype._importDER = function _importDER(data, enc) { - data = utils.toArray(data, enc); - var p = new Position(); - if (data[p.place++] !== 0x30) { - return false; - } - var len = getLength(data, p); - if ((len + p.place) !== data.length) { - return false; - } - if (data[p.place++] !== 0x02) { - return false; - } - var rlen = getLength(data, p); - var r = data.slice(p.place, rlen + p.place); - p.place += rlen; - if (data[p.place++] !== 0x02) { - return false; - } - var slen = getLength(data, p); - if (data.length !== slen + p.place) { - return false; - } - var s = data.slice(p.place, slen + p.place); - if (r[0] === 0 && (r[1] & 0x80)) { - r = r.slice(1); - } - if (s[0] === 0 && (s[1] & 0x80)) { - s = s.slice(1); - } - - this.r = new BN(r); - this.s = new BN(s); - this.recoveryParam = null; - - return true; -}; - -function constructLength(arr, len) { - if (len < 0x80) { - arr.push(len); - return; - } - var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); - arr.push(octets | 0x80); - while (--octets) { - arr.push((len >>> (octets << 3)) & 0xff); - } - arr.push(len); -} - -Signature.prototype.toDER = function toDER(enc) { - var r = this.r.toArray(); - var s = this.s.toArray(); - - // Pad values - if (r[0] & 0x80) - r = [ 0 ].concat(r); - // Pad values - if (s[0] & 0x80) - s = [ 0 ].concat(s); - - r = rmPadding(r); - s = rmPadding(s); - - while (!s[0] && !(s[1] & 0x80)) { - s = s.slice(1); - } - var arr = [ 0x02 ]; - constructLength(arr, r.length); - arr = arr.concat(r); - arr.push(0x02); - constructLength(arr, s.length); - var backHalf = arr.concat(s); - var res = [ 0x30 ]; - constructLength(res, backHalf.length); - res = res.concat(backHalf); - return utils.encode(res, enc); -}; diff --git a/node_modules/elliptic/lib/elliptic/eddsa/index.js b/node_modules/elliptic/lib/elliptic/eddsa/index.js deleted file mode 100644 index f82fa35..0000000 --- a/node_modules/elliptic/lib/elliptic/eddsa/index.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var hash = require('hash.js'); -var curves = require('../curves'); -var utils = require('../utils'); -var assert = utils.assert; -var parseBytes = utils.parseBytes; -var KeyPair = require('./key'); -var Signature = require('./signature'); - -function EDDSA(curve) { - assert(curve === 'ed25519', 'only tested with ed25519 so far'); - - if (!(this instanceof EDDSA)) - return new EDDSA(curve); - - var curve = curves[curve].curve; - this.curve = curve; - this.g = curve.g; - this.g.precompute(curve.n.bitLength() + 1); - - this.pointClass = curve.point().constructor; - this.encodingLength = Math.ceil(curve.n.bitLength() / 8); - this.hash = hash.sha512; -} - -module.exports = EDDSA; - -/** -* @param {Array|String} message - message bytes -* @param {Array|String|KeyPair} secret - secret bytes or a keypair -* @returns {Signature} - signature -*/ -EDDSA.prototype.sign = function sign(message, secret) { - message = parseBytes(message); - var key = this.keyFromSecret(secret); - var r = this.hashInt(key.messagePrefix(), message); - var R = this.g.mul(r); - var Rencoded = this.encodePoint(R); - var s_ = this.hashInt(Rencoded, key.pubBytes(), message) - .mul(key.priv()); - var S = r.add(s_).umod(this.curve.n); - return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); -}; - -/** -* @param {Array} message - message bytes -* @param {Array|String|Signature} sig - sig bytes -* @param {Array|String|Point|KeyPair} pub - public key -* @returns {Boolean} - true if public key matches sig of message -*/ -EDDSA.prototype.verify = function verify(message, sig, pub) { - message = parseBytes(message); - sig = this.makeSignature(sig); - var key = this.keyFromPublic(pub); - var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); - var SG = this.g.mul(sig.S()); - var RplusAh = sig.R().add(key.pub().mul(h)); - return RplusAh.eq(SG); -}; - -EDDSA.prototype.hashInt = function hashInt() { - var hash = this.hash(); - for (var i = 0; i < arguments.length; i++) - hash.update(arguments[i]); - return utils.intFromLE(hash.digest()).umod(this.curve.n); -}; - -EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { - return KeyPair.fromPublic(this, pub); -}; - -EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { - return KeyPair.fromSecret(this, secret); -}; - -EDDSA.prototype.makeSignature = function makeSignature(sig) { - if (sig instanceof Signature) - return sig; - return new Signature(this, sig); -}; - -/** -* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 -* -* EDDSA defines methods for encoding and decoding points and integers. These are -* helper convenience methods, that pass along to utility functions implied -* parameters. -* -*/ -EDDSA.prototype.encodePoint = function encodePoint(point) { - var enc = point.getY().toArray('le', this.encodingLength); - enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; - return enc; -}; - -EDDSA.prototype.decodePoint = function decodePoint(bytes) { - bytes = utils.parseBytes(bytes); - - var lastIx = bytes.length - 1; - var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); - var xIsOdd = (bytes[lastIx] & 0x80) !== 0; - - var y = utils.intFromLE(normed); - return this.curve.pointFromY(y, xIsOdd); -}; - -EDDSA.prototype.encodeInt = function encodeInt(num) { - return num.toArray('le', this.encodingLength); -}; - -EDDSA.prototype.decodeInt = function decodeInt(bytes) { - return utils.intFromLE(bytes); -}; - -EDDSA.prototype.isPoint = function isPoint(val) { - return val instanceof this.pointClass; -}; diff --git a/node_modules/elliptic/lib/elliptic/eddsa/key.js b/node_modules/elliptic/lib/elliptic/eddsa/key.js deleted file mode 100644 index a00028f..0000000 --- a/node_modules/elliptic/lib/elliptic/eddsa/key.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var assert = utils.assert; -var parseBytes = utils.parseBytes; -var cachedProperty = utils.cachedProperty; - -/** -* @param {EDDSA} eddsa - instance -* @param {Object} params - public/private key parameters -* -* @param {Array} [params.secret] - secret seed bytes -* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) -* @param {Array} [params.pub] - public key point encoded as bytes -* -*/ -function KeyPair(eddsa, params) { - this.eddsa = eddsa; - this._secret = parseBytes(params.secret); - if (eddsa.isPoint(params.pub)) - this._pub = params.pub; - else - this._pubBytes = parseBytes(params.pub); -} - -KeyPair.fromPublic = function fromPublic(eddsa, pub) { - if (pub instanceof KeyPair) - return pub; - return new KeyPair(eddsa, { pub: pub }); -}; - -KeyPair.fromSecret = function fromSecret(eddsa, secret) { - if (secret instanceof KeyPair) - return secret; - return new KeyPair(eddsa, { secret: secret }); -}; - -KeyPair.prototype.secret = function secret() { - return this._secret; -}; - -cachedProperty(KeyPair, 'pubBytes', function pubBytes() { - return this.eddsa.encodePoint(this.pub()); -}); - -cachedProperty(KeyPair, 'pub', function pub() { - if (this._pubBytes) - return this.eddsa.decodePoint(this._pubBytes); - return this.eddsa.g.mul(this.priv()); -}); - -cachedProperty(KeyPair, 'privBytes', function privBytes() { - var eddsa = this.eddsa; - var hash = this.hash(); - var lastIx = eddsa.encodingLength - 1; - - var a = hash.slice(0, eddsa.encodingLength); - a[0] &= 248; - a[lastIx] &= 127; - a[lastIx] |= 64; - - return a; -}); - -cachedProperty(KeyPair, 'priv', function priv() { - return this.eddsa.decodeInt(this.privBytes()); -}); - -cachedProperty(KeyPair, 'hash', function hash() { - return this.eddsa.hash().update(this.secret()).digest(); -}); - -cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { - return this.hash().slice(this.eddsa.encodingLength); -}); - -KeyPair.prototype.sign = function sign(message) { - assert(this._secret, 'KeyPair can only verify'); - return this.eddsa.sign(message, this); -}; - -KeyPair.prototype.verify = function verify(message, sig) { - return this.eddsa.verify(message, sig, this); -}; - -KeyPair.prototype.getSecret = function getSecret(enc) { - assert(this._secret, 'KeyPair is public only'); - return utils.encode(this.secret(), enc); -}; - -KeyPair.prototype.getPublic = function getPublic(enc) { - return utils.encode(this.pubBytes(), enc); -}; - -module.exports = KeyPair; diff --git a/node_modules/elliptic/lib/elliptic/eddsa/signature.js b/node_modules/elliptic/lib/elliptic/eddsa/signature.js deleted file mode 100644 index 17b96d7..0000000 --- a/node_modules/elliptic/lib/elliptic/eddsa/signature.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -var BN = require('bn.js'); -var utils = require('../utils'); -var assert = utils.assert; -var cachedProperty = utils.cachedProperty; -var parseBytes = utils.parseBytes; - -/** -* @param {EDDSA} eddsa - eddsa instance -* @param {Array|Object} sig - -* @param {Array|Point} [sig.R] - R point as Point or bytes -* @param {Array|bn} [sig.S] - S scalar as bn or bytes -* @param {Array} [sig.Rencoded] - R point encoded -* @param {Array} [sig.Sencoded] - S scalar encoded -*/ -function Signature(eddsa, sig) { - this.eddsa = eddsa; - - if (typeof sig !== 'object') - sig = parseBytes(sig); - - if (Array.isArray(sig)) { - sig = { - R: sig.slice(0, eddsa.encodingLength), - S: sig.slice(eddsa.encodingLength) - }; - } - - assert(sig.R && sig.S, 'Signature without R or S'); - - if (eddsa.isPoint(sig.R)) - this._R = sig.R; - if (sig.S instanceof BN) - this._S = sig.S; - - this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; - this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; -} - -cachedProperty(Signature, 'S', function S() { - return this.eddsa.decodeInt(this.Sencoded()); -}); - -cachedProperty(Signature, 'R', function R() { - return this.eddsa.decodePoint(this.Rencoded()); -}); - -cachedProperty(Signature, 'Rencoded', function Rencoded() { - return this.eddsa.encodePoint(this.R()); -}); - -cachedProperty(Signature, 'Sencoded', function Sencoded() { - return this.eddsa.encodeInt(this.S()); -}); - -Signature.prototype.toBytes = function toBytes() { - return this.Rencoded().concat(this.Sencoded()); -}; - -Signature.prototype.toHex = function toHex() { - return utils.encode(this.toBytes(), 'hex').toUpperCase(); -}; - -module.exports = Signature; diff --git a/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js b/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js deleted file mode 100644 index e4c91e5..0000000 --- a/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js +++ /dev/null @@ -1,780 +0,0 @@ -module.exports = { - doubles: { - step: 4, - points: [ - [ - 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', - 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821' - ], - [ - '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', - '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf' - ], - [ - '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', - 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695' - ], - [ - '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', - '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9' - ], - [ - '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', - '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36' - ], - [ - '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', - '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f' - ], - [ - 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', - '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999' - ], - [ - '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', - 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09' - ], - [ - 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', - '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d' - ], - [ - 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', - 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088' - ], - [ - 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', - '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d' - ], - [ - '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', - '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8' - ], - [ - '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', - '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a' - ], - [ - '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', - '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453' - ], - [ - '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', - '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160' - ], - [ - '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', - '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0' - ], - [ - '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', - '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6' - ], - [ - '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', - '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589' - ], - [ - '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', - 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17' - ], - [ - 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', - '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda' - ], - [ - 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', - '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd' - ], - [ - '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', - '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2' - ], - [ - '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', - '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6' - ], - [ - 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', - '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f' - ], - [ - '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', - 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01' - ], - [ - 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', - '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3' - ], - [ - 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', - 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f' - ], - [ - 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', - '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7' - ], - [ - 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', - 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78' - ], - [ - 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', - '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1' - ], - [ - '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', - 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150' - ], - [ - '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', - '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82' - ], - [ - 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', - '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc' - ], - [ - '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', - 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b' - ], - [ - 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', - '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51' - ], - [ - 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', - '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45' - ], - [ - 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', - 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120' - ], - [ - '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', - '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84' - ], - [ - '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', - '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d' - ], - [ - '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', - 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d' - ], - [ - '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', - '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8' - ], - [ - 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', - '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8' - ], - [ - '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', - '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac' - ], - [ - '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', - 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f' - ], - [ - '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', - '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962' - ], - [ - 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', - '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907' - ], - [ - '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', - 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec' - ], - [ - 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', - 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d' - ], - [ - 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', - '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414' - ], - [ - '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', - 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd' - ], - [ - '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', - 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0' - ], - [ - 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', - '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811' - ], - [ - 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', - '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1' - ], - [ - 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', - '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c' - ], - [ - '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', - 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73' - ], - [ - '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', - '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd' - ], - [ - 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', - 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405' - ], - [ - '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', - 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589' - ], - [ - '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', - '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e' - ], - [ - '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', - '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27' - ], - [ - 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', - 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1' - ], - [ - '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', - '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482' - ], - [ - '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', - '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945' - ], - [ - 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', - '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573' - ], - [ - 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', - 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82' - ] - ] - }, - naf: { - wnd: 7, - points: [ - [ - 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', - '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672' - ], - [ - '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', - 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6' - ], - [ - '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', - '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da' - ], - [ - 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', - 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37' - ], - [ - '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', - 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b' - ], - [ - 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', - 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81' - ], - [ - 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', - '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58' - ], - [ - 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', - '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77' - ], - [ - '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', - '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a' - ], - [ - '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', - '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c' - ], - [ - '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', - '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67' - ], - [ - '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', - '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402' - ], - [ - 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', - 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55' - ], - [ - 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', - '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482' - ], - [ - '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', - 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82' - ], - [ - '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', - 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396' - ], - [ - '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', - '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49' - ], - [ - '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', - '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf' - ], - [ - '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', - '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a' - ], - [ - '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', - 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7' - ], - [ - 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', - 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933' - ], - [ - '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', - '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a' - ], - [ - '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', - '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6' - ], - [ - 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', - 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37' - ], - [ - '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', - '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e' - ], - [ - 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', - 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6' - ], - [ - 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', - 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476' - ], - [ - '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', - '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40' - ], - [ - '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', - '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61' - ], - [ - '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', - '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683' - ], - [ - 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', - '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5' - ], - [ - '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', - '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b' - ], - [ - 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', - '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417' - ], - [ - '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', - 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868' - ], - [ - '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', - 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a' - ], - [ - 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', - 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6' - ], - [ - '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', - '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996' - ], - [ - '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', - 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e' - ], - [ - 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', - 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d' - ], - [ - '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', - '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2' - ], - [ - '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', - 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e' - ], - [ - '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', - '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437' - ], - [ - '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', - 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311' - ], - [ - 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', - '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4' - ], - [ - '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', - '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575' - ], - [ - '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', - 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d' - ], - [ - '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', - 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d' - ], - [ - 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', - 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629' - ], - [ - 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', - 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06' - ], - [ - '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', - '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374' - ], - [ - '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', - '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee' - ], - [ - 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', - '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1' - ], - [ - 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', - 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b' - ], - [ - '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', - '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661' - ], - [ - '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', - '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6' - ], - [ - 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', - '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e' - ], - [ - '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', - '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d' - ], - [ - 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', - 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc' - ], - [ - '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', - 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4' - ], - [ - '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', - '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c' - ], - [ - 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', - '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b' - ], - [ - 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', - '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913' - ], - [ - '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', - '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154' - ], - [ - '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', - '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865' - ], - [ - '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', - 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc' - ], - [ - '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', - 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224' - ], - [ - '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', - '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e' - ], - [ - '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', - '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6' - ], - [ - '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', - '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511' - ], - [ - '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', - 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b' - ], - [ - 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', - 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2' - ], - [ - '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', - 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c' - ], - [ - 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', - '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3' - ], - [ - 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', - '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d' - ], - [ - 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', - '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700' - ], - [ - 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', - '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4' - ], - [ - '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', - 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196' - ], - [ - '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', - '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4' - ], - [ - '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', - 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257' - ], - [ - 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', - 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13' - ], - [ - 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', - '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096' - ], - [ - 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', - 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38' - ], - [ - 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', - '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f' - ], - [ - '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', - '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448' - ], - [ - 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', - '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a' - ], - [ - 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', - '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4' - ], - [ - '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', - '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437' - ], - [ - '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', - 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7' - ], - [ - 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', - '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d' - ], - [ - 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', - '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a' - ], - [ - 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', - '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54' - ], - [ - '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', - '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77' - ], - [ - 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', - 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517' - ], - [ - '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', - 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10' - ], - [ - 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', - 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125' - ], - [ - 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', - '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e' - ], - [ - '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', - 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1' - ], - [ - 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', - '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2' - ], - [ - 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', - '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423' - ], - [ - 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', - '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8' - ], - [ - '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', - 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758' - ], - [ - '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', - 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375' - ], - [ - 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', - '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d' - ], - [ - '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', - 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec' - ], - [ - '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', - '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0' - ], - [ - '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', - 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c' - ], - [ - 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', - 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4' - ], - [ - '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', - 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f' - ], - [ - '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', - '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649' - ], - [ - '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', - 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826' - ], - [ - '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', - '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5' - ], - [ - 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', - 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87' - ], - [ - '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', - '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b' - ], - [ - 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', - '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc' - ], - [ - '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', - '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c' - ], - [ - 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', - 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f' - ], - [ - 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', - '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a' - ], - [ - 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', - 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46' - ], - [ - '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', - 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f' - ], - [ - '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', - '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03' - ], - [ - '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', - 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08' - ], - [ - '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', - '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8' - ], - [ - '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', - '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373' - ], - [ - '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', - 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3' - ], - [ - '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', - '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8' - ], - [ - '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', - '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1' - ], - [ - '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', - '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9' - ] - ] - } -}; diff --git a/node_modules/elliptic/lib/elliptic/utils.js b/node_modules/elliptic/lib/elliptic/utils.js deleted file mode 100644 index f6d5616..0000000 --- a/node_modules/elliptic/lib/elliptic/utils.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -var utils = exports; -var BN = require('bn.js'); -var minAssert = require('minimalistic-assert'); -var minUtils = require('minimalistic-crypto-utils'); - -utils.assert = minAssert; -utils.toArray = minUtils.toArray; -utils.zero2 = minUtils.zero2; -utils.toHex = minUtils.toHex; -utils.encode = minUtils.encode; - -// Represent num in a w-NAF form -function getNAF(num, w, bits) { - var naf = new Array(Math.max(num.bitLength(), bits) + 1); - naf.fill(0); - - var ws = 1 << (w + 1); - var k = num.clone(); - - for (var i = 0; i < naf.length; i++) { - var z; - var mod = k.andln(ws - 1); - if (k.isOdd()) { - if (mod > (ws >> 1) - 1) - z = (ws >> 1) - mod; - else - z = mod; - k.isubn(z); - } else { - z = 0; - } - - naf[i] = z; - k.iushrn(1); - } - - return naf; -} -utils.getNAF = getNAF; - -// Represent k1, k2 in a Joint Sparse Form -function getJSF(k1, k2) { - var jsf = [ - [], - [] - ]; - - k1 = k1.clone(); - k2 = k2.clone(); - var d1 = 0; - var d2 = 0; - while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { - - // First phase - var m14 = (k1.andln(3) + d1) & 3; - var m24 = (k2.andln(3) + d2) & 3; - if (m14 === 3) - m14 = -1; - if (m24 === 3) - m24 = -1; - var u1; - if ((m14 & 1) === 0) { - u1 = 0; - } else { - var m8 = (k1.andln(7) + d1) & 7; - if ((m8 === 3 || m8 === 5) && m24 === 2) - u1 = -m14; - else - u1 = m14; - } - jsf[0].push(u1); - - var u2; - if ((m24 & 1) === 0) { - u2 = 0; - } else { - var m8 = (k2.andln(7) + d2) & 7; - if ((m8 === 3 || m8 === 5) && m14 === 2) - u2 = -m24; - else - u2 = m24; - } - jsf[1].push(u2); - - // Second phase - if (2 * d1 === u1 + 1) - d1 = 1 - d1; - if (2 * d2 === u2 + 1) - d2 = 1 - d2; - k1.iushrn(1); - k2.iushrn(1); - } - - return jsf; -} -utils.getJSF = getJSF; - -function cachedProperty(obj, name, computer) { - var key = '_' + name; - obj.prototype[name] = function cachedProperty() { - return this[key] !== undefined ? this[key] : - this[key] = computer.call(this); - }; -} -utils.cachedProperty = cachedProperty; - -function parseBytes(bytes) { - return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : - bytes; -} -utils.parseBytes = parseBytes; - -function intFromLE(bytes) { - return new BN(bytes, 'hex', 'le'); -} -utils.intFromLE = intFromLE; - diff --git a/node_modules/elliptic/package.json b/node_modules/elliptic/package.json deleted file mode 100644 index d8dee9e..0000000 --- a/node_modules/elliptic/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "elliptic@^6.0.0", - "_id": "elliptic@6.5.2", - "_inBundle": false, - "_integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "_location": "/elliptic", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "elliptic@^6.0.0", - "name": "elliptic", - "escapedName": "elliptic", - "rawSpec": "^6.0.0", - "saveSpec": null, - "fetchSpec": "^6.0.0" - }, - "_requiredBy": [ - "/browserify-sign", - "/create-ecdh" - ], - "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "_shasum": "05c5678d7173c049d8ca433552224a495d0e3762", - "_spec": "elliptic@^6.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify-sign", - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "bugs": { - "url": "https://github.com/indutny/elliptic/issues" - }, - "bundleDependencies": false, - "dependencies": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - }, - "deprecated": false, - "description": "EC cryptography", - "devDependencies": { - "brfs": "^1.4.3", - "coveralls": "^3.0.8", - "grunt": "^1.0.4", - "grunt-browserify": "^5.0.0", - "grunt-cli": "^1.2.0", - "grunt-contrib-connect": "^1.0.0", - "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-uglify": "^1.0.1", - "grunt-mocha-istanbul": "^3.0.1", - "grunt-saucelabs": "^9.0.1", - "istanbul": "^0.4.2", - "jscs": "^3.0.7", - "jshint": "^2.10.3", - "mocha": "^6.2.2" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/indutny/elliptic", - "keywords": [ - "EC", - "Elliptic", - "curve", - "Cryptography" - ], - "license": "MIT", - "main": "lib/elliptic.js", - "name": "elliptic", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/elliptic.git" - }, - "scripts": { - "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", - "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", - "lint": "npm run jscs && npm run jshint", - "test": "npm run lint && npm run unit", - "unit": "istanbul test _mocha --reporter=spec test/index.js", - "version": "grunt dist && git add dist/" - }, - "version": "6.5.2" -} diff --git a/node_modules/es-abstract/.editorconfig b/node_modules/es-abstract/.editorconfig deleted file mode 100644 index eaa2141..0000000 --- a/node_modules/es-abstract/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/es-abstract/.eslintrc b/node_modules/es-abstract/.eslintrc deleted file mode 100644 index 2ec92dd..0000000 --- a/node_modules/es-abstract/.eslintrc +++ /dev/null @@ -1,82 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "env": { - "es6": true, - }, - - "rules": { - "arrow-parens": [2, "always"], - "array-bracket-newline": 0, - "array-element-newline": 0, - "complexity": 0, - "eqeqeq": [2, "allow-null"], - "func-name-matching": 0, - "id-length": [2, { "min": 1, "max": 30 }], - "max-params": [2, 4], - "max-statements": [2, 24], - "max-statements-per-line": [2, { "max": 2 }], - "multiline-comment-style": 0, - "no-magic-numbers": 0, - "new-cap": 0, - "no-extra-parens": 1, - "operator-linebreak": [2, "before"], - "sort-keys": 0, - }, - - "overrides": [ - { - "files": "./es5.js", - "rules": { - "max-lines": [2, 600], - "max-statements": [2, 30], - }, - }, - { - "files": "./es2015.js", - "rules": { - "max-lines": [2, 1500], - }, - }, - { - "files": "operations/*", - "rules": { - "max-lines": 0, - }, - }, - { - "files": "operations/*.js", - "parserOptions": { - "ecmaVersion": "2018", - }, - "rules": { - "no-console": 0, - "no-multi-str": 0, - }, - }, - { - "files": "operations/getOps.js", - "rules": { - "no-console": 0, - "no-process-exit": 0, - }, - }, - { - "files": "test/**", - "rules": { - "id-length": 0, - "max-lines": 0, - "max-lines-per-function": 0, - "max-statements-per-line": [2, { "max": 3 }], - "max-nested-callbacks": [2, 4], - "max-statements": 0, - "no-implicit-coercion": 0, - "no-invalid-this": 1, - "object-curly-newline": 0, - "prefer-regex-literals": 0, - }, - }, - ], -} diff --git a/node_modules/es-abstract/.github/FUNDING.yml b/node_modules/es-abstract/.github/FUNDING.yml deleted file mode 100644 index beeb7a2..0000000 --- a/node_modules/es-abstract/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-abstract -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-abstract/.github/workflows/rebase.yml b/node_modules/es-abstract/.github/workflows/rebase.yml deleted file mode 100644 index 436cb79..0000000 --- a/node_modules/es-abstract/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/es-abstract/.nycrc b/node_modules/es-abstract/.nycrc deleted file mode 100644 index d316b4d..0000000 --- a/node_modules/es-abstract/.nycrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "operations", - "test" - ] -} diff --git a/node_modules/es-abstract/.travis.yml b/node_modules/es-abstract/.travis.yml deleted file mode 100644 index 5c34024..0000000 --- a/node_modules/es-abstract/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -cache: - directories: - - "$HOME/.npm" - - "$(nvm cache dir)" - - "$(nvm_version_path $(nvm_version_remote 0.4))" - - "$(nvm_version_path $(nvm_version_remote 0.6))" - - "$(nvm_version_path $(nvm_version_remote 0.10))" -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml -script: - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage && bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi' -matrix: - include: - - node_js: "8" - env: COVERAGE=true - - node_js: "4" - env: COVERAGE=true - - node_js: "0.12" - env: COVERAGE=true - - node_js: "0.8" - env: COVERAGE=true - exclude: - - node_js: "0.12" - env: TEST=true - - node_js: "0.8" - env: TEST=true diff --git a/node_modules/es-abstract/CHANGELOG.md b/node_modules/es-abstract/CHANGELOG.md deleted file mode 100644 index a3a62b0..0000000 --- a/node_modules/es-abstract/CHANGELOG.md +++ /dev/null @@ -1,285 +0,0 @@ -1.16.3 / 2019-12-04 -================= - * [Fix] `GetIntrinsic`: when given a path to a getter, return the actual getter - * [Dev Deps] update `eslint` - -1.16.2 / 2019-11-24 -================= - * [Fix] IE 6-7 lack JSON - * [Fix] IE 6-8 strings can’t use array slice, they need string slice - * [Dev Deps] update `eslint` - -1.16.1 / 2019-11-24 -================= - * [Fix] `GetIntrinsics`: turns out IE 8 throws when `Object.getOwnPropertyDescriptor(arguments);`, and does not throw on `callee` anyways - * [Deps] update `es-to-primitive`, `has-symbols`, `object-inspect` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` - * [meta] re-include year files inside `operations` - * [meta] add `funding` field - * [actions] add Automatic Rebase github action - * [Tests] use shared travis-ci config - * [Tests] disable `check-coverage`, and let codecov do it - -1.16.0 / 2019-10-18 -================= - * [New] `ES2015+`: add `SetFunctionName` - * [New] `ES2015+`: add `GetPrototypeFromConstructor`, with caveats - * [New] `ES2015+`: add `CreateListFromArrayLike` - * [New] `ES2016+`: add `OrdinarySetPrototypeOf` - * [New] `ES2016+`: add `OrdinaryGetPrototypeOf` - * [New] add `getSymbolDescription` and `getInferredName` helpers - * [Fix] `GetIterator`: add fallback for pre-Symbol environments, tests - * [Dev Deps] update `object.fromentries` - * [Tests] add `node` `v12.2` - -1.15.0 / 2019-10-02 -================= - * [New] `ES2018`+: add `DateString`, `TimeString` - * [New] `ES2015`+: add `ToDateString` - * [New] `ES5`+: add `msFromTime`, `SecFromTime`, `MinFromTime`, `HourFromTime`, `TimeWithinDay`, `Day`, `DayFromYear`, `TimeFromYear`, `YearFromTime`, `WeekDay`, `DaysInYear`, `InLeapYear`, `DayWithinYear`, `MonthFromTime`, `DateFromTime`, `MakeDay`, `MakeDate`, `MakeTime`, `TimeClip`, `modulo` - * [New] add `regexTester` helper - * [New] add `callBound` helper - * [New] add ES2020’s intrinsic dot notation - * [New] add `isPrefixOf` helper - * [New] add `maxSafeInteger` helper - * [Deps] update `string.prototype.trimleft`, `string.prototype.trimright` - * [Dev Deps] update `eslint` - * [Tests] on `node` `v12.11` - * [meta] npmignore operations scripts; add "deltas" - -1.14.2 / 2019-09-08 -================= - * [Fix] `ES2016`: `IterableToArrayLike`: add proper fallback for strings, pre-Symbols - * [Tests] on `node` `v12.10` - -1.14.1 / 2019-09-03 -================= - * [meta] republish with some extra files removed - -1.14.0 / 2019-09-02 -================= - * [New] add ES2019 - * [New] `ES2017+`: add `IterableToList` - * [New] `ES2016`: add `IterableToArrayLike` - * [New] `ES2015+`: add `ArrayCreate`, `ArraySetLength`, `OrdinaryDefineOwnProperty`, `OrdinaryGetOwnProperty`, `OrdinaryHasProperty`, `CreateHTML`, `GetOwnPropertyKeys`, `InstanceofOperator`, `SymbolDescriptiveString`, `GetSubstitution`, `ValidateAndApplyPropertyDescriptor`, `IsPromise`, `OrdinaryHasInstance`, `TestIntegrityLevel`, `SetIntegrityLevel` - * [New] add `callBind` helper, and use it - * [New] add helpers: `isPropertyDescriptor`, `every` - * [New] ES5+: add `Abstract Relational Comparison` - * [New] ES5+: add `Abstract Equality Comparison`, `Strict Equality Comparison` - * [Fix] `ES2015+`: `GetIterator`: only require native Symbols when `method` is omitted - * [Fix] `ES2015`: `Call`: error message now properly displays Symbols using `object-inspect` - * [Fix] `ES2015+`: `ValidateAndApplyPropertyDescriptor`: use ES2017 logic to bypass spec bugs - * [Fix] `ES2015+`: `CreateDataProperty`, `DefinePropertyOrThrow`, `ValidateAndApplyPropertyDescriptor`: add fallbacks for ES3 - * [Fix] `ES2015+`: `FromPropertyDescriptor`: no longer requires a fully complete Property Descriptor - * [Fix] `ES5`: `IsPropertyDescriptor`: call into `IsDataDescriptor` and `IsAccessorDescriptor` - * [Refactor] use `has-symbols` for Symbol detection - * [Fix] `helpers/assertRecord`: remove `console.log` - * [Deps] update `object-keys` - * [readme] add security note - * [meta] change http URLs to https - * [meta] linter cleanup - * [meta] fix getOps script - * [meta] add FUNDING.yml - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `replace`, `cheerio`, `tape` - * [Tests] up to `node` `v12.9`, `v11.15`, `v10.16`, `v8.16`, `v6.17` - * [Tests] temporarily allow node 0.6 to fail; segfaulting in travis - * [Tests] use the values helper more in es5 tests - * [Tests] fix linting to apply to all files - * [Tests] run `npx aud` only on prod deps - * [Tests] add v.descriptors helpers - * [Tests] use `npx aud` instead of `npm audit` with hoops - * [Tests] use `eclint` instead of `editorconfig-tools` - * [Tests] some intrinsic cleanup - * [Tests] migrate es5 tests to use values helper - * [Tests] add some missing ES2015 ops - -1.13.0 / 2019-01-02 -================= - * [New] add ES2018 - * [New] add ES2015/ES2016: EnumerableOwnNames; ES2017: EnumerableOwnProperties - * [New] `ES2015+`: add `thisBooleanValue`, `thisNumberValue`, `thisStringValue`, `thisTimeValue` - * [New] `ES2015+`: add `DefinePropertyOrThrow`, `DeletePropertyOrThrow`, `CreateMethodProperty` - * [New] add `assertRecord` helper - * [Deps] update `is-callable`, `has`, `object-keys`, `es-to-primitive` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `semver`, `safe-publish-latest`, `replace` - * [Tests] use `npm audit` instead of `nsp` - * [Tests] remove `jscs` - * [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` - * [Tests] move descriptor factories to `values` helper - * [Tests] add `getOps` to programmatically fetch abstract operation names - -1.12.0 / 2018-05-31 -================= - * [New] add `GetIntrinsic` entry point - * [New] `ES2015`+: add `ObjectCreate` - * [Robustness]: `ES2015+`: ensure `Math.{abs,floor}` and `Function.call` are cached - -1.11.0 / 2018-03-21 -================= - * [New] `ES2015+`: add iterator abstract ops - * [Dev Deps] update `eslint`, `nsp`, `object.assign`, `semver`, `tape` - * [Tests] up to `node` `v9.8`, `v8.10`, `v6.13` - -1.10.0 / 2017-11-24 -================= - * [New] ES2015+: `AdvanceStringIndex` - * [Dev Deps] update `eslint`, `nsp` - * [Tests] require node 0.6 to pass again - * [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS - -1.9.0 / 2017-09-30 -================= - * [New] `es2015+`: add `ArraySpeciesCreate` - * [New] ES2015+: add `CreateDataProperty` and `CreateDataPropertyOrThrow` - * [Tests] consolidate duplicated tests - * [Tests] increase coverage - * [Dev Deps] update `nsp`, `eslint` - -1.8.2 / 2017-09-03 -================= - * [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27) - * [Dev Deps] update `eslint` - -1.8.1 / 2017-08-30 -================= - * [Fix] ES2015+: `ToPropertyKey`: should return a symbol for Symbols (#26) - * [Deps] update `function-bind` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config` - * [Docs] github broke markdown parsing - -1.8.0 / 2017-08-04 -================= - * [New] add ES2017 - * [New] move es6+ to es2015+; leave es6/es7 as aliases - * [New] ES5+: add `IsPropertyDescriptor`, `IsAccessorDescriptor`, `IsDataDescriptor`, `IsGenericDescriptor`, `FromPropertyDescriptor`, `ToPropertyDescriptor` - * [New] ES2015+: add `CompletePropertyDescriptor`, `Set`, `HasOwnProperty`, `HasProperty`, `IsConcatSpreadable`, `Invoke`, `CreateIterResultObject`, `RegExpExec` - * [Fix] es7/es2016: do not mutate ES6 - * [Fix] assign helper only supports one source - * [Deps] update `is-regex` - * [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` - * [Tests] add tests for missing and excess operations - * [Tests] add codecov for coverage - * [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v4.8`; newer npm breaks on older node - * [Tests] use same lists of value types across tests; ensure tests are the same when ops are the same - * [Tests] ES2015: add ToNumber symbol tests - * [Tests] switch to `nyc` for code coverage - * [Tests] make IsRegExp tests consistent across editions - -1.7.0 / 2017-01-22 -================= - * [New] ES6: Add `GetMethod` (#16) - * [New] ES6: Add `GetV` (#16) - * [New] ES6: Add `Get` (#17) - * [Tests] up to `node` `v7.4`, `v6.9`, `v4.6`; improve test matrix - * [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` - -1.6.1 / 2016-08-21 -================= - * [Fix] ES6: IsConstructor should return true for `class` constructors. - -1.6.0 / 2016-08-20 -================= - * [New] ES5 / ES6: add `Type` - * [New] ES6: `SpeciesConstructor` - * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`; add `safe-publish-latest` - * [Tests] up to `node` `v6.4`, `v5.12`, `v4.5` - -1.5.1 / 2016-05-30 -================= - * [Fix] `ES.IsRegExp`: actually look up `Symbol.match` on the argument - * [Refactor] create `isNaN` helper - * [Deps] update `is-callable`, `function-bind` - * [Deps] update `es-to-primitive`, fix ES5 tests - * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`, `nsp` - * [Tests] up to `node` `v6.2`, `v5.11`, `v4.4` - * [Tests] use pretest/posttest for linting/security - -1.5.0 / 2015-12-27 -================= - * [New] adds `Symbol.toPrimitive` support via `es-to-primitive` - * [Deps] update `is-callable`, `es-to-primitive` - * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape` - * [Tests] up to `node` `v5.3` - -1.4.3 / 2015-11-04 -================= - * [Fix] `ES6.ToNumber`: should give `NaN` for explicitly signed hex strings (#4) - * [Refactor] `ES6.ToNumber`: No need to double-trim - * [Refactor] group tests better - * [Tests] should still pass on `node` `v0.8` - -1.4.2 / 2015-11-02 -================= - * [Fix] ensure `ES.ToNumber` trims whitespace, and does not trim non-whitespace (#3) - -1.4.1 / 2015-10-31 -================= - * [Fix] ensure only 0-1 are valid binary and 0-7 are valid octal digits (#2) - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Tests] on `node` `v5.0` - * [Tests] fix npm upgrades for older node versions - * package.json: use object form of "authors", add "contributors" - -1.4.0 / 2015-09-26 -================= - * [Deps] update `is-callable` - * [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` - * [Tests] on `node` `v4.2` - * [New] Add `SameValueNonNumber` to ES7 - -1.3.2 / 2015-09-26 -================= - * [Fix] Fix `ES6.IsRegExp` to properly handle `Symbol.match`, per spec. - * [Tests] up to `io.js` `v3.3`, `node` `v4.1` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` - -1.3.1 / 2015-08-15 -================= - * [Fix] Ensure that objects that `toString` to a binary or octal literal also convert properly - -1.3.0 / 2015-08-15 -================= - * [New] ES6’s ToNumber now supports binary and octal literals. - * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Tests] up to `io.js` `v3.0` - -1.2.2 / 2015-07-28 -================= - * [Fix] Both `ES5.CheckObjectCoercible` and `ES6.RequireObjectCoercible` return the value if they don't throw. - * [Tests] Test on latest `io.js` versions. - * [Dev Deps] Update `eslint`, `jscs`, `tape`, `semver`, `covert`, `nsp` - -1.2.1 / 2015-03-20 -================= - * Fix `isFinite` helper. - -1.2.0 / 2015-03-19 -================= - * Use `es-to-primitive` for ToPrimitive methods. - * Test on latest `io.js` versions; allow failures on all but 2 latest `node`/`io.js` versions. - -1.1.2 / 2015-03-20 -================= - * Fix isFinite helper. - -1.1.1 / 2015-03-19 -================= - * Fix isPrimitive check for functions - * Update `eslint`, `editorconfig-tools`, `semver`, `nsp` - -1.1.0 / 2015-02-17 -================= - * Add ES7 export (non-default). - * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. - * Test on `iojs-v1.2`. - -1.0.1 / 2015-01-30 -================= - * Use `is-callable` instead of an internal function. - * Update `tape`, `jscs`, `nsp`, `eslint` - -1.0.0 / 2015-01-10 -================= - * v1.0.0 diff --git a/node_modules/es-abstract/GetIntrinsic.js b/node_modules/es-abstract/GetIntrinsic.js deleted file mode 100644 index a868b9f..0000000 --- a/node_modules/es-abstract/GetIntrinsic.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict'; - -/* globals - Atomics, - SharedArrayBuffer, -*/ - -var undefined; - -var $TypeError = TypeError; - -var $gOPD = Object.getOwnPropertyDescriptor; - -var throwTypeError = function () { throw new $TypeError(); }; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = require('has-symbols')(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var generator; // = function * () {}; -var generatorFunction = generator ? getProto(generator) : undefined; -var asyncFn; // async function() {}; -var asyncFunction = asyncFn ? asyncFn.constructor : undefined; -var asyncGen; // async function * () {}; -var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; -var asyncGenIterator = asyncGen ? asyncGen() : undefined; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '$ %Array%': Array, - '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, - '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '$ %ArrayPrototype%': Array.prototype, - '$ %ArrayProto_entries%': Array.prototype.entries, - '$ %ArrayProto_forEach%': Array.prototype.forEach, - '$ %ArrayProto_keys%': Array.prototype.keys, - '$ %ArrayProto_values%': Array.prototype.values, - '$ %AsyncFromSyncIteratorPrototype%': undefined, - '$ %AsyncFunction%': asyncFunction, - '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, - '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, - '$ %AsyncGeneratorFunction%': asyncGenFunction, - '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, - '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, - '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '$ %Boolean%': Boolean, - '$ %BooleanPrototype%': Boolean.prototype, - '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, - '$ %Date%': Date, - '$ %DatePrototype%': Date.prototype, - '$ %decodeURI%': decodeURI, - '$ %decodeURIComponent%': decodeURIComponent, - '$ %encodeURI%': encodeURI, - '$ %encodeURIComponent%': encodeURIComponent, - '$ %Error%': Error, - '$ %ErrorPrototype%': Error.prototype, - '$ %eval%': eval, // eslint-disable-line no-eval - '$ %EvalError%': EvalError, - '$ %EvalErrorPrototype%': EvalError.prototype, - '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, - '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, - '$ %Function%': Function, - '$ %FunctionPrototype%': Function.prototype, - '$ %Generator%': generator ? getProto(generator()) : undefined, - '$ %GeneratorFunction%': generatorFunction, - '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, - '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, - '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, - '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, - '$ %isFinite%': isFinite, - '$ %isNaN%': isNaN, - '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '$ %JSON%': typeof JSON === 'object' ? JSON : undefined, - '$ %JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined, - '$ %Map%': typeof Map === 'undefined' ? undefined : Map, - '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, - '$ %Math%': Math, - '$ %Number%': Number, - '$ %NumberPrototype%': Number.prototype, - '$ %Object%': Object, - '$ %ObjectPrototype%': Object.prototype, - '$ %ObjProto_toString%': Object.prototype.toString, - '$ %ObjProto_valueOf%': Object.prototype.valueOf, - '$ %parseFloat%': parseFloat, - '$ %parseInt%': parseInt, - '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, - '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, - '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, - '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, - '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, - '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '$ %RangeError%': RangeError, - '$ %RangeErrorPrototype%': RangeError.prototype, - '$ %ReferenceError%': ReferenceError, - '$ %ReferenceErrorPrototype%': ReferenceError.prototype, - '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '$ %RegExp%': RegExp, - '$ %RegExpPrototype%': RegExp.prototype, - '$ %Set%': typeof Set === 'undefined' ? undefined : Set, - '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, - '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, - '$ %String%': String, - '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '$ %StringPrototype%': String.prototype, - '$ %Symbol%': hasSymbols ? Symbol : undefined, - '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, - '$ %SyntaxError%': SyntaxError, - '$ %SyntaxErrorPrototype%': SyntaxError.prototype, - '$ %ThrowTypeError%': ThrowTypeError, - '$ %TypedArray%': TypedArray, - '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, - '$ %TypeError%': $TypeError, - '$ %TypeErrorPrototype%': $TypeError.prototype, - '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, - '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, - '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, - '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, - '$ %URIError%': URIError, - '$ %URIErrorPrototype%': URIError.prototype, - '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, - '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype -}; - -var bind = require('function-bind'); -var $replace = bind.call(Function.call, String.prototype.replace); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match); - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var key = '$ ' + name; - if (!(key in INTRINSICS)) { - throw new SyntaxError('intrinsic ' + name + ' does not exist!'); - } - - // istanbul ignore if // hopefully this is impossible to test :-) - if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return INTRINSICS[key]; -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new TypeError('"allowMissing" argument must be a boolean'); - } - - var parts = stringToPath(name); - - if (parts.length === 0) { - return getBaseIntrinsic(name, allowMissing); - } - - var value = getBaseIntrinsic('%' + parts[0] + '%', allowMissing); - for (var i = 1; i < parts.length; i += 1) { - if (value != null) { - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, parts[i]); - value = desc ? (desc.get || desc.value) : value[parts[i]]; - } else { - value = value[parts[i]]; - } - } - } - return value; -}; diff --git a/node_modules/es-abstract/LICENSE b/node_modules/es-abstract/LICENSE deleted file mode 100644 index 8c271c1..0000000 --- a/node_modules/es-abstract/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/es-abstract/Makefile b/node_modules/es-abstract/Makefile deleted file mode 100644 index 959bbd4..0000000 --- a/node_modules/es-abstract/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js */*.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/es-abstract/README.md b/node_modules/es-abstract/README.md deleted file mode 100644 index 20342d1..0000000 --- a/node_modules/es-abstract/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# es-abstract [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -ECMAScript spec abstract operations. -When different versions of the spec conflict, the default export will be the latest version of the abstract operation. -All abstract operations will also be available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018`/`es2019` entry point, and exported property, if you require a specific version. - -## Example - -```js -var ES = require('es-abstract'); -var assert = require('assert'); - -assert(ES.isCallable(function () {})); -assert(!ES.isCallable(/a/g)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-abstract -[npm-version-svg]: http://versionbadg.es/ljharb/es-abstract.svg -[travis-svg]: https://travis-ci.org/ljharb/es-abstract.svg -[travis-url]: https://travis-ci.org/ljharb/es-abstract -[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg -[deps-url]: https://david-dm.org/ljharb/es-abstract -[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/es-abstract.png -[testling-url]: https://ci.testling.com/ljharb/es-abstract -[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-abstract.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract diff --git a/node_modules/es-abstract/es2015.js b/node_modules/es-abstract/es2015.js deleted file mode 100644 index 89d3e0b..0000000 --- a/node_modules/es-abstract/es2015.js +++ /dev/null @@ -1,1463 +0,0 @@ -'use strict'; - -var has = require('has'); -var toPrimitive = require('es-to-primitive/es6'); -var keys = require('object-keys'); -var inspect = require('object-inspect'); - -var GetIntrinsic = require('./GetIntrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $RangeError = GetIntrinsic('%RangeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $Array = GetIntrinsic('%Array%'); -var $ArrayPrototype = $Array.prototype; -var $String = GetIntrinsic('%String%'); -var $Object = GetIntrinsic('%Object%'); -var $Number = GetIntrinsic('%Number%'); -var $Symbol = GetIntrinsic('%Symbol%', true); -var $RegExp = GetIntrinsic('%RegExp%'); -var $Date = GetIntrinsic('%Date%'); -var $Function = GetIntrinsic('%Function%'); -var $preventExtensions = $Object.preventExtensions; - -var hasSymbols = require('has-symbols')(); - -var assertRecord = require('./helpers/assertRecord'); -var $isNaN = require('./helpers/isNaN'); -var $isFinite = require('./helpers/isFinite'); -var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; -var MAX_SAFE_INTEGER = require('./helpers/maxSafeInteger'); - -var assign = require('./helpers/assign'); -var sign = require('./helpers/sign'); -var mod = require('./helpers/mod'); -var isPrimitive = require('./helpers/isPrimitive'); -var forEach = require('./helpers/forEach'); -var every = require('./helpers/every'); -var isSamePropertyDescriptor = require('./helpers/isSamePropertyDescriptor'); -var isPropertyDescriptor = require('./helpers/isPropertyDescriptor'); -var parseInteger = parseInt; -var callBound = require('./helpers/callBound'); -var regexTester = require('./helpers/regexTester'); -var getIteratorMethod = require('./helpers/getIteratorMethod'); -var getSymbolDescription = require('./helpers/getSymbolDescription'); - -var $PromiseThen = callBound('Promise.prototype.then', true); -var arraySlice = callBound('Array.prototype.slice'); -var strSlice = callBound('String.prototype.slice'); -var $indexOf = callBound('Array.prototype.indexOf'); -var $push = callBound('Array.prototype.push'); - -var isBinary = regexTester(/^0b[01]+$/i); -var isOctal = regexTester(/^0o[0-7]+$/i); -var isDigit = regexTester(/^[0-9]$/); -var regexExec = callBound('RegExp.prototype.exec'); -var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); -var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); -var hasNonWS = regexTester(nonWSregex); -var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); -var $charCodeAt = callBound('String.prototype.charCodeAt'); -var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); - -var toStr = callBound('Object.prototype.toString'); - -var $NumberValueOf = callBound('Number.prototype.valueOf'); -var $BooleanValueOf = callBound('Boolean.prototype.valueOf'); -var $StringValueOf = callBound('String.prototype.valueOf'); -var $DateValueOf = callBound('Date.prototype.valueOf'); -var $SymbolToString = callBound('Symbol.prototype.toString', true); - -var $floor = Math.floor; -var $abs = Math.abs; - -var $ObjectCreate = $Object.create; -var $gOPD = $Object.getOwnPropertyDescriptor; -var $gOPN = $Object.getOwnPropertyNames; -var $gOPS = $Object.getOwnPropertySymbols; -var $isExtensible = $Object.isExtensible; -var $defineProperty = $Object.defineProperty; -var $setProto = require('./helpers/setProto'); - -var DefineOwnProperty = function DefineOwnProperty(ES, O, P, desc) { - if (!$defineProperty) { - if (!ES.IsDataDescriptor(desc)) { - // ES3 does not support getters/setters - return false; - } - if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) { - return false; - } - - // fallback for ES3 - if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) { - // a non-enumerable existing property - return false; - } - - // property does not exist at all, or exists but is enumerable - var V = desc['[[Value]]']; - O[P] = V; // will use [[Define]] - return ES.SameValue(O[P], V); - } - $defineProperty(O, P, ES.FromPropertyDescriptor(desc)); - return true; -}; - -// whitespace from: https://es5.github.io/#x15.5.4.20 -// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 -var ws = [ - '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', - '\u2029\uFEFF' -].join(''); -var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); -var $replace = callBound('String.prototype.replace'); -var trim = function (value) { - return $replace(value, trimRegex, ''); -}; - -var ES5 = require('./es5'); - -var hasRegExpMatcher = require('is-regex'); - -// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations -var ES6 = assign(assign({}, ES5), { - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args - Call: function Call(F, V) { - var args = arguments.length > 2 ? arguments[2] : []; - if (!this.IsCallable(F)) { - throw new $TypeError(inspect(F) + ' is not a function'); - } - return F.apply(V, args); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive - ToPrimitive: toPrimitive, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean - // ToBoolean: ES5.ToBoolean, - - // https://ecma-international.org/ecma-262/6.0/#sec-tonumber - ToNumber: function ToNumber(argument) { - var value = isPrimitive(argument) ? argument : toPrimitive(argument, $Number); - if (typeof value === 'symbol') { - throw new $TypeError('Cannot convert a Symbol value to a number'); - } - if (typeof value === 'string') { - if (isBinary(value)) { - return this.ToNumber(parseInteger(strSlice(value, 2), 2)); - } else if (isOctal(value)) { - return this.ToNumber(parseInteger(strSlice(value, 2), 8)); - } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { - return NaN; - } else { - var trimmed = trim(value); - if (trimmed !== value) { - return this.ToNumber(trimmed); - } - } - } - return $Number(value); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger - // ToInteger: ES5.ToNumber, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32 - // ToInt32: ES5.ToInt32, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32 - // ToUint32: ES5.ToUint32, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16 - ToInt16: function ToInt16(argument) { - var int16bit = this.ToUint16(argument); - return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16 - // ToUint16: ES5.ToUint16, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8 - ToInt8: function ToInt8(argument) { - var int8bit = this.ToUint8(argument); - return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8 - ToUint8: function ToUint8(argument) { - var number = this.ToNumber(argument); - if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } - var posInt = sign(number) * $floor($abs(number)); - return mod(posInt, 0x100); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp - ToUint8Clamp: function ToUint8Clamp(argument) { - var number = this.ToNumber(argument); - if ($isNaN(number) || number <= 0) { return 0; } - if (number >= 0xFF) { return 0xFF; } - var f = $floor(argument); - if (f + 0.5 < number) { return f + 1; } - if (number < f + 0.5) { return f; } - if (f % 2 !== 0) { return f + 1; } - return f; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring - ToString: function ToString(argument) { - if (typeof argument === 'symbol') { - throw new $TypeError('Cannot convert a Symbol value to a string'); - } - return $String(argument); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject - ToObject: function ToObject(value) { - this.RequireObjectCoercible(value); - return $Object(value); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey - ToPropertyKey: function ToPropertyKey(argument) { - var key = this.ToPrimitive(argument, $String); - return typeof key === 'symbol' ? key : this.ToString(key); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength - ToLength: function ToLength(argument) { - var len = this.ToInteger(argument); - if (len <= 0) { return 0; } // includes converting -0 to +0 - if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } - return len; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring - CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) { - if (toStr(argument) !== '[object String]') { - throw new $TypeError('must be a string'); - } - if (argument === '-0') { return -0; } - var n = this.ToNumber(argument); - if (this.SameValue(this.ToString(n), argument)) { return n; } - return void 0; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible - RequireObjectCoercible: ES5.CheckObjectCoercible, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray - IsArray: $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable - // IsCallable: ES5.IsCallable, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor - IsConstructor: function IsConstructor(argument) { - return typeof argument === 'function' && !!argument.prototype; // unfortunately there's no way to truly check this without try/catch `new argument` or Proxy - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o - IsExtensible: $preventExtensions - ? function IsExtensible(obj) { - if (isPrimitive(obj)) { - return false; - } - return $isExtensible(obj); - } - : function isExtensible(obj) { return true; }, // eslint-disable-line no-unused-vars - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger - IsInteger: function IsInteger(argument) { - if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { - return false; - } - var abs = $abs(argument); - return $floor(abs) === abs; - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey - IsPropertyKey: function IsPropertyKey(argument) { - return typeof argument === 'string' || typeof argument === 'symbol'; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-isregexp - IsRegExp: function IsRegExp(argument) { - if (!argument || typeof argument !== 'object') { - return false; - } - if (hasSymbols) { - var isRegExp = argument[$Symbol.match]; - if (typeof isRegExp !== 'undefined') { - return ES5.ToBoolean(isRegExp); - } - } - return hasRegExpMatcher(argument); - }, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue - // SameValue: ES5.SameValue, - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero - SameValueZero: function SameValueZero(x, y) { - return (x === y) || ($isNaN(x) && $isNaN(y)); - }, - - /** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ - GetV: function GetV(V, P) { - // 7.3.2.1 - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - // 7.3.2.2-3 - var O = this.ToObject(V); - - // 7.3.2.4 - return O[P]; - }, - - /** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ - GetMethod: function GetMethod(O, P) { - // 7.3.9.1 - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - // 7.3.9.2 - var func = this.GetV(O, P); - - // 7.3.9.4 - if (func == null) { - return void 0; - } - - // 7.3.9.5 - if (!this.IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); - } - - // 7.3.9.6 - return func; - }, - - /** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ - Get: function Get(O, P) { - // 7.3.1.1 - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - // 7.3.1.2 - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); - } - // 7.3.1.3 - return O[P]; - }, - - Type: function Type(x) { - if (typeof x === 'symbol') { - return 'Symbol'; - } - return ES5.Type(x); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor - SpeciesConstructor: function SpeciesConstructor(O, defaultConstructor) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - var C = O.constructor; - if (typeof C === 'undefined') { - return defaultConstructor; - } - if (this.Type(C) !== 'Object') { - throw new $TypeError('O.constructor is not an Object'); - } - var S = hasSymbols && $Symbol.species ? C[$Symbol.species] : void 0; - if (S == null) { - return defaultConstructor; - } - if (this.IsConstructor(S)) { - return S; - } - throw new $TypeError('no constructor found'); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor - FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor - CompletePropertyDescriptor: function CompletePropertyDescriptor(Desc) { - /* eslint no-param-reassign: 0 */ - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) { - if (!has(Desc, '[[Value]]')) { - Desc['[[Value]]'] = void 0; - } - if (!has(Desc, '[[Writable]]')) { - Desc['[[Writable]]'] = false; - } - } else { - if (!has(Desc, '[[Get]]')) { - Desc['[[Get]]'] = void 0; - } - if (!has(Desc, '[[Set]]')) { - Desc['[[Set]]'] = void 0; - } - } - if (!has(Desc, '[[Enumerable]]')) { - Desc['[[Enumerable]]'] = false; - } - if (!has(Desc, '[[Configurable]]')) { - Desc['[[Configurable]]'] = false; - } - return Desc; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw - Set: function Set(O, P, V, Throw) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - if (this.Type(Throw) !== 'Boolean') { - throw new $TypeError('Throw must be a Boolean'); - } - if (Throw) { - O[P] = V; - return true; - } else { - try { - O[P] = V; - } catch (e) { - return false; - } - } - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty - HasOwnProperty: function HasOwnProperty(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - return has(O, P); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-hasproperty - HasProperty: function HasProperty(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - return P in O; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable - IsConcatSpreadable: function IsConcatSpreadable(O) { - if (this.Type(O) !== 'Object') { - return false; - } - if (hasSymbols && typeof $Symbol.isConcatSpreadable === 'symbol') { - var spreadable = this.Get(O, Symbol.isConcatSpreadable); - if (typeof spreadable !== 'undefined') { - return this.ToBoolean(spreadable); - } - } - return this.IsArray(O); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-invoke - Invoke: function Invoke(O, P) { - if (!this.IsPropertyKey(P)) { - throw new $TypeError('P must be a Property Key'); - } - var argumentsList = arraySlice(arguments, 2); - var func = this.GetV(O, P); - return this.Call(func, O, argumentsList); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-getiterator - GetIterator: function GetIterator(obj, method) { - var actualMethod = method; - if (arguments.length < 2) { - actualMethod = getIteratorMethod(this, obj); - } - var iterator = this.Call(actualMethod, obj); - if (this.Type(iterator) !== 'Object') { - throw new $TypeError('iterator must return an object'); - } - - return iterator; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext - IteratorNext: function IteratorNext(iterator, value) { - var result = this.Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); - if (this.Type(result) !== 'Object') { - throw new $TypeError('iterator next must return an object'); - } - return result; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete - IteratorComplete: function IteratorComplete(iterResult) { - if (this.Type(iterResult) !== 'Object') { - throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); - } - return this.ToBoolean(this.Get(iterResult, 'done')); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue - IteratorValue: function IteratorValue(iterResult) { - if (this.Type(iterResult) !== 'Object') { - throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); - } - return this.Get(iterResult, 'value'); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep - IteratorStep: function IteratorStep(iterator) { - var result = this.IteratorNext(iterator); - var done = this.IteratorComplete(result); - return done === true ? false : result; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose - IteratorClose: function IteratorClose(iterator, completion) { - if (this.Type(iterator) !== 'Object') { - throw new $TypeError('Assertion failed: Type(iterator) is not Object'); - } - if (!this.IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); - } - var completionThunk = completion; - - var iteratorReturn = this.GetMethod(iterator, 'return'); - - if (typeof iteratorReturn === 'undefined') { - return completionThunk(); - } - - var completionRecord; - try { - var innerResult = this.Call(iteratorReturn, iterator, []); - } catch (e) { - // if we hit here, then "e" is the innerResult completion that needs re-throwing - - // if the completion is of type "throw", this will throw. - completionRecord = completionThunk(); - completionThunk = null; // ensure it's not called twice. - - // if not, then return the innerResult completion - throw e; - } - completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does - completionThunk = null; // ensure it's not called twice. - - if (this.Type(innerResult) !== 'Object') { - throw new $TypeError('iterator .return must return an object'); - } - - return completionRecord; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject - CreateIterResultObject: function CreateIterResultObject(value, done) { - if (this.Type(done) !== 'Boolean') { - throw new $TypeError('Assertion failed: Type(done) is not Boolean'); - } - return { - value: value, - done: done - }; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-regexpexec - RegExpExec: function RegExpExec(R, S) { - if (this.Type(R) !== 'Object') { - throw new $TypeError('R must be an Object'); - } - if (this.Type(S) !== 'String') { - throw new $TypeError('S must be a String'); - } - var exec = this.Get(R, 'exec'); - if (this.IsCallable(exec)) { - var result = this.Call(exec, R, [S]); - if (result === null || this.Type(result) === 'Object') { - return result; - } - throw new $TypeError('"exec" method must return `null` or an Object'); - } - return regexExec(R, S); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate - ArraySpeciesCreate: function ArraySpeciesCreate(originalArray, length) { - if (!this.IsInteger(length) || length < 0) { - throw new $TypeError('Assertion failed: length must be an integer >= 0'); - } - var len = length === 0 ? 0 : length; - var C; - var isArray = this.IsArray(originalArray); - if (isArray) { - C = this.Get(originalArray, 'constructor'); - // TODO: figure out how to make a cross-realm normal Array, a same-realm Array - // if (this.IsConstructor(C)) { - // if C is another realm's Array, C = undefined - // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? - // } - if (this.Type(C) === 'Object' && hasSymbols && $Symbol.species) { - C = this.Get(C, $Symbol.species); - if (C === null) { - C = void 0; - } - } - } - if (typeof C === 'undefined') { - return $Array(len); - } - if (!this.IsConstructor(C)) { - throw new $TypeError('C must be a constructor'); - } - return new C(len); // this.Construct(C, len); - }, - - CreateDataProperty: function CreateDataProperty(O, P, V) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - var oldDesc = $gOPD(O, P); - var extensible = oldDesc || this.IsExtensible(O); - var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable); - if (immutable || !extensible) { - return false; - } - return DefineOwnProperty(this, O, P, { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Value]]': V, - '[[Writable]]': true - }); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow - CreateDataPropertyOrThrow: function CreateDataPropertyOrThrow(O, P, V) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - var success = this.CreateDataProperty(O, P, V); - if (!success) { - throw new $TypeError('unable to create data property'); - } - return success; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate - ObjectCreate: function ObjectCreate(proto, internalSlotsList) { - if (proto !== null && this.Type(proto) !== 'Object') { - throw new $TypeError('Assertion failed: proto must be null or an object'); - } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); - } - - if (proto === null && !$ObjectCreate) { - throw new $SyntaxError('native Object.create support is required to create null objects'); - } - - return $ObjectCreate(proto); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex - AdvanceStringIndex: function AdvanceStringIndex(S, index, unicode) { - if (this.Type(S) !== 'String') { - throw new $TypeError('S must be a String'); - } - if (!this.IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { - throw new $TypeError('Assertion failed: length must be an integer >= 0 and <= 2**53'); - } - if (this.Type(unicode) !== 'Boolean') { - throw new $TypeError('Assertion failed: unicode must be a Boolean'); - } - if (!unicode) { - return index + 1; - } - var length = S.length; - if ((index + 1) >= length) { - return index + 1; - } - - var first = $charCodeAt(S, index); - if (first < 0xD800 || first > 0xDBFF) { - return index + 1; - } - - var second = $charCodeAt(S, index + 1); - if (second < 0xDC00 || second > 0xDFFF) { - return index + 1; - } - - return index + 2; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-createmethodproperty - CreateMethodProperty: function CreateMethodProperty(O, P, V) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - var newDesc = { - '[[Configurable]]': true, - '[[Enumerable]]': false, - '[[Value]]': V, - '[[Writable]]': true - }; - return DefineOwnProperty(this, O, P, newDesc); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow - DefinePropertyOrThrow: function DefinePropertyOrThrow(O, P, desc) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - var Desc = isPropertyDescriptor(this, desc) ? desc : this.ToPropertyDescriptor(desc); - if (!isPropertyDescriptor(this, Desc)) { - throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); - } - - return DefineOwnProperty(this, O, P, Desc); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow - DeletePropertyOrThrow: function DeletePropertyOrThrow(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - var success = delete O[P]; - if (!success) { - throw new TypeError('Attempt to delete property failed.'); - } - return success; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-enumerableownnames - EnumerableOwnNames: function EnumerableOwnNames(O) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - return keys(O); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object - thisNumberValue: function thisNumberValue(value) { - if (this.Type(value) === 'Number') { - return value; - } - - return $NumberValueOf(value); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object - thisBooleanValue: function thisBooleanValue(value) { - if (this.Type(value) === 'Boolean') { - return value; - } - - return $BooleanValueOf(value); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object - thisStringValue: function thisStringValue(value) { - if (this.Type(value) === 'String') { - return value; - } - - return $StringValueOf(value); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object - thisTimeValue: function thisTimeValue(value) { - return $DateValueOf(value); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-setintegritylevel - SetIntegrityLevel: function SetIntegrityLevel(O, level) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (level !== 'sealed' && level !== 'frozen') { - throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); - } - if (!$preventExtensions) { - throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); - } - var status = $preventExtensions(O); - if (!status) { - return false; - } - if (!$gOPN) { - throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); - } - var theKeys = $gOPN(O); - var ES = this; - if (level === 'sealed') { - forEach(theKeys, function (k) { - ES.DefinePropertyOrThrow(O, k, { configurable: false }); - }); - } else if (level === 'frozen') { - forEach(theKeys, function (k) { - var currentDesc = $gOPD(O, k); - if (typeof currentDesc !== 'undefined') { - var desc; - if (ES.IsAccessorDescriptor(ES.ToPropertyDescriptor(currentDesc))) { - desc = { configurable: false }; - } else { - desc = { configurable: false, writable: false }; - } - ES.DefinePropertyOrThrow(O, k, desc); - } - }); - } - return true; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-testintegritylevel - TestIntegrityLevel: function TestIntegrityLevel(O, level) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (level !== 'sealed' && level !== 'frozen') { - throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); - } - var status = this.IsExtensible(O); - if (status) { - return false; - } - var theKeys = $gOPN(O); - var ES = this; - return theKeys.length === 0 || every(theKeys, function (k) { - var currentDesc = $gOPD(O, k); - if (typeof currentDesc !== 'undefined') { - if (currentDesc.configurable) { - return false; - } - if (level === 'frozen' && ES.IsDataDescriptor(ES.ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { - return false; - } - } - return true; - }); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance - OrdinaryHasInstance: function OrdinaryHasInstance(C, O) { - if (this.IsCallable(C) === false) { - return false; - } - if (this.Type(O) !== 'Object') { - return false; - } - var P = this.Get(C, 'prototype'); - if (this.Type(P) !== 'Object') { - throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); - } - return O instanceof C; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinaryhasproperty - OrdinaryHasProperty: function OrdinaryHasProperty(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: P must be a Property Key'); - } - return P in O; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-instanceofoperator - InstanceofOperator: function InstanceofOperator(O, C) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - var instOfHandler = hasSymbols && $Symbol.hasInstance ? this.GetMethod(C, $Symbol.hasInstance) : void 0; - if (typeof instOfHandler !== 'undefined') { - return this.ToBoolean(this.Call(instOfHandler, C, [O])); - } - if (!this.IsCallable(C)) { - throw new $TypeError('`C` is not Callable'); - } - return this.OrdinaryHasInstance(C, O); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-ispromise - IsPromise: function IsPromise(x) { - if (this.Type(x) !== 'Object') { - return false; - } - if (!$PromiseThen) { // Promises are not supported - return false; - } - try { - $PromiseThen(x); // throws if not a promise - } catch (e) { - return false; - } - return true; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-abstract-equality-comparison - 'Abstract Equality Comparison': function AbstractEqualityComparison(x, y) { - var xType = this.Type(x); - var yType = this.Type(y); - if (xType === yType) { - return x === y; // ES6+ specified this shortcut anyways. - } - if (x == null && y == null) { - return true; - } - if (xType === 'Number' && yType === 'String') { - return this['Abstract Equality Comparison'](x, this.ToNumber(y)); - } - if (xType === 'String' && yType === 'Number') { - return this['Abstract Equality Comparison'](this.ToNumber(x), y); - } - if (xType === 'Boolean') { - return this['Abstract Equality Comparison'](this.ToNumber(x), y); - } - if (yType === 'Boolean') { - return this['Abstract Equality Comparison'](x, this.ToNumber(y)); - } - if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { - return this['Abstract Equality Comparison'](x, this.ToPrimitive(y)); - } - if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { - return this['Abstract Equality Comparison'](this.ToPrimitive(x), y); - } - return false; - }, - - // eslint-disable-next-line max-lines-per-function, max-statements, id-length, max-params - ValidateAndApplyPropertyDescriptor: function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { - // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. - var oType = this.Type(O); - if (oType !== 'Undefined' && oType !== 'Object') { - throw new $TypeError('Assertion failed: O must be undefined or an Object'); - } - if (this.Type(extensible) !== 'Boolean') { - throw new $TypeError('Assertion failed: extensible must be a Boolean'); - } - if (!isPropertyDescriptor(this, Desc)) { - throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); - } - if (this.Type(current) !== 'Undefined' && !isPropertyDescriptor(this, current)) { - throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); - } - if (oType !== 'Undefined' && !this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); - } - if (this.Type(current) === 'Undefined') { - if (!extensible) { - return false; - } - if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) { - if (oType !== 'Undefined') { - DefineOwnProperty(this, O, P, { - '[[Configurable]]': Desc['[[Configurable]]'], - '[[Enumerable]]': Desc['[[Enumerable]]'], - '[[Value]]': Desc['[[Value]]'], - '[[Writable]]': Desc['[[Writable]]'] - }); - } - } else { - if (!this.IsAccessorDescriptor(Desc)) { - throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); - } - if (oType !== 'Undefined') { - return DefineOwnProperty(this, O, P, Desc); - } - } - return true; - } - if (this.IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { - return true; - } - if (isSamePropertyDescriptor(this, Desc, current)) { - return true; // removed by ES2017, but should still be correct - } - // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor - if (!current['[[Configurable]]']) { - if (Desc['[[Configurable]]']) { - return false; - } - if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { - return false; - } - } - if (this.IsGenericDescriptor(Desc)) { - // no further validation is required. - } else if (this.IsDataDescriptor(current) !== this.IsDataDescriptor(Desc)) { - if (!current['[[Configurable]]']) { - return false; - } - if (this.IsDataDescriptor(current)) { - if (oType !== 'Undefined') { - DefineOwnProperty(this, O, P, { - '[[Configurable]]': current['[[Configurable]]'], - '[[Enumerable]]': current['[[Enumerable]]'], - '[[Get]]': undefined - }); - } - } else if (oType !== 'Undefined') { - DefineOwnProperty(this, O, P, { - '[[Configurable]]': current['[[Configurable]]'], - '[[Enumerable]]': current['[[Enumerable]]'], - '[[Value]]': undefined - }); - } - } else if (this.IsDataDescriptor(current) && this.IsDataDescriptor(Desc)) { - if (!current['[[Configurable]]'] && !current['[[Writable]]']) { - if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { - return false; - } - if ('[[Value]]' in Desc && !this.SameValue(Desc['[[Value]]'], current['[[Value]]'])) { - return false; - } - return true; - } - } else if (this.IsAccessorDescriptor(current) && this.IsAccessorDescriptor(Desc)) { - if (!current['[[Configurable]]']) { - if ('[[Set]]' in Desc && !this.SameValue(Desc['[[Set]]'], current['[[Set]]'])) { - return false; - } - if ('[[Get]]' in Desc && !this.SameValue(Desc['[[Get]]'], current['[[Get]]'])) { - return false; - } - return true; - } - } else { - throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); - } - if (oType !== 'Undefined') { - return DefineOwnProperty(this, O, P, Desc); - } - return true; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarydefineownproperty - OrdinaryDefineOwnProperty: function OrdinaryDefineOwnProperty(O, P, Desc) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: P must be a Property Key'); - } - if (!isPropertyDescriptor(this, Desc)) { - throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); - } - var desc = $gOPD(O, P); - var current = desc && this.ToPropertyDescriptor(desc); - var extensible = this.IsExtensible(O); - return this.ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty - OrdinaryGetOwnProperty: function OrdinaryGetOwnProperty(O, P) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: O must be an Object'); - } - if (!this.IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: P must be a Property Key'); - } - if (!has(O, P)) { - return void 0; - } - if (!$gOPD) { - // ES3 fallback - var arrayLength = this.IsArray(O) && P === 'length'; - var regexLastIndex = this.IsRegExp(O) && P === 'lastIndex'; - return { - '[[Configurable]]': !(arrayLength || regexLastIndex), - '[[Enumerable]]': $isEnumerable(O, P), - '[[Value]]': O[P], - '[[Writable]]': true - }; - } - return this.ToPropertyDescriptor($gOPD(O, P)); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-arraycreate - ArrayCreate: function ArrayCreate(length) { - if (!this.IsInteger(length) || length < 0) { - throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); - } - if (length > MAX_ARRAY_LENGTH) { - throw new $RangeError('length is greater than (2**32 - 1)'); - } - var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; - var A = []; // steps 5 - 7, and 9 - if (proto !== $ArrayPrototype) { // step 8 - if (!$setProto) { - throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); - } - $setProto(A, proto); - } - if (length !== 0) { // bypasses the need for step 2 - A.length = length; - } - /* step 10, the above as a shortcut for the below - this.OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ - return A; - }, - - // eslint-disable-next-line max-statements, max-lines-per-function - ArraySetLength: function ArraySetLength(A, Desc) { - if (!this.IsArray(A)) { - throw new $TypeError('Assertion failed: A must be an Array'); - } - if (!isPropertyDescriptor(this, Desc)) { - throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); - } - if (!('[[Value]]' in Desc)) { - return this.OrdinaryDefineOwnProperty(A, 'length', Desc); - } - var newLenDesc = assign({}, Desc); - var newLen = this.ToUint32(Desc['[[Value]]']); - var numberLen = this.ToNumber(Desc['[[Value]]']); - if (newLen !== numberLen) { - throw new $RangeError('Invalid array length'); - } - newLenDesc['[[Value]]'] = newLen; - var oldLenDesc = this.OrdinaryGetOwnProperty(A, 'length'); - if (!this.IsDataDescriptor(oldLenDesc)) { - throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); - } - var oldLen = oldLenDesc['[[Value]]']; - if (newLen >= oldLen) { - return this.OrdinaryDefineOwnProperty(A, 'length', newLenDesc); - } - if (!oldLenDesc['[[Writable]]']) { - return false; - } - var newWritable; - if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { - newWritable = true; - } else { - newWritable = false; - newLenDesc['[[Writable]]'] = true; - } - var succeeded = this.OrdinaryDefineOwnProperty(A, 'length', newLenDesc); - if (!succeeded) { - return false; - } - while (newLen < oldLen) { - oldLen -= 1; - var deleteSucceeded = delete A[this.ToString(oldLen)]; - if (!deleteSucceeded) { - newLenDesc['[[Value]]'] = oldLen + 1; - if (!newWritable) { - newLenDesc['[[Writable]]'] = false; - this.OrdinaryDefineOwnProperty(A, 'length', newLenDesc); - return false; - } - } - } - if (!newWritable) { - return this.OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); - } - return true; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-createhtml - CreateHTML: function CreateHTML(string, tag, attribute, value) { - if (this.Type(tag) !== 'String' || this.Type(attribute) !== 'String') { - throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); - } - var str = this.RequireObjectCoercible(string); - var S = this.ToString(str); - var p1 = '<' + tag; - if (attribute !== '') { - var V = this.ToString(value); - var escapedV = $replace(V, /\x22/g, '"'); - p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; - } - return p1 + '>' + S + ''; - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-getownpropertykeys - GetOwnPropertyKeys: function GetOwnPropertyKeys(O, Type) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (Type === 'Symbol') { - return hasSymbols && $gOPS ? $gOPS(O) : []; - } - if (Type === 'String') { - if (!$gOPN) { - return keys(O); - } - return $gOPN(O); - } - throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-symboldescriptivestring - SymbolDescriptiveString: function SymbolDescriptiveString(sym) { - if (this.Type(sym) !== 'Symbol') { - throw new $TypeError('Assertion failed: `sym` must be a Symbol'); - } - return $SymbolToString(sym); - }, - - // https://www.ecma-international.org/ecma-262/6.0/#sec-getsubstitution - // eslint-disable-next-line max-statements, max-params, max-lines-per-function - GetSubstitution: function GetSubstitution(matched, str, position, captures, replacement) { - if (this.Type(matched) !== 'String') { - throw new $TypeError('Assertion failed: `matched` must be a String'); - } - var matchLength = matched.length; - - if (this.Type(str) !== 'String') { - throw new $TypeError('Assertion failed: `str` must be a String'); - } - var stringLength = str.length; - - if (!this.IsInteger(position) || position < 0 || position > stringLength) { - throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); - } - - var ES = this; - var isStringOrHole = function (capture, index, arr) { return ES.Type(capture) === 'String' || !(index in arr); }; - if (!this.IsArray(captures) || !every(captures, isStringOrHole)) { - throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures)); - } - - if (this.Type(replacement) !== 'String') { - throw new $TypeError('Assertion failed: `replacement` must be a String'); - } - - var tailPos = position + matchLength; - var m = captures.length; - - var result = ''; - for (var i = 0; i < replacement.length; i += 1) { - // if this is a $, and it's not the end of the replacement - var current = replacement[i]; - var isLast = (i + 1) >= replacement.length; - var nextIsLast = (i + 2) >= replacement.length; - if (current === '$' && !isLast) { - var next = replacement[i + 1]; - if (next === '$') { - result += '$'; - i += 1; - } else if (next === '&') { - result += matched; - i += 1; - } else if (next === '`') { - result += position === 0 ? '' : strSlice(str, 0, position - 1); - i += 1; - } else if (next === "'") { - result += tailPos >= stringLength ? '' : strSlice(str, tailPos); - i += 1; - } else { - var nextNext = nextIsLast ? null : replacement[i + 2]; - if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { - // $1 through $9, and not followed by a digit - var n = parseInteger(next, 10); - // if (n > m, impl-defined) - result += (n <= m && this.Type(captures[n - 1]) === 'Undefined') ? '' : captures[n - 1]; - i += 1; - } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { - // $00 through $99 - var nn = next + nextNext; - var nnI = parseInteger(nn, 10) - 1; - // if nn === '00' or nn > m, impl-defined - result += (nn <= m && this.Type(captures[nnI]) === 'Undefined') ? '' : captures[nnI]; - i += 2; - } else { - result += '$'; - } - } - } else { - // the final $, or else not a $ - result += replacement[i]; - } - } - return result; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-todatestring - ToDateString: function ToDateString(tv) { - if (this.Type(tv) !== 'Number') { - throw new $TypeError('Assertion failed: `tv` must be a Number'); - } - if ($isNaN(tv)) { - return 'Invalid Date'; - } - return $Date(tv); - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-createlistfromarraylike - CreateListFromArrayLike: function CreateListFromArrayLike(obj) { - var elementTypes = arguments.length > 1 - ? arguments[1] - : ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; - - if (this.Type(obj) !== 'Object') { - throw new $TypeError('Assertion failed: `obj` must be an Object'); - } - if (!this.IsArray(elementTypes)) { - throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); - } - var len = this.ToLength(this.Get(obj, 'length')); - var list = []; - var index = 0; - while (index < len) { - var indexName = this.ToString(index); - var next = this.Get(obj, indexName); - var nextType = this.Type(next); - if ($indexOf(elementTypes, nextType) < 0) { - throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); - } - $push(list, next); - index += 1; - } - return list; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-getprototypefromconstructor - GetPrototypeFromConstructor: function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { - var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic - if (!this.IsConstructor(constructor)) { - throw new $TypeError('Assertion failed: `constructor` must be a constructor'); - } - var proto = this.Get(constructor, 'prototype'); - if (this.Type(proto) !== 'Object') { - if (!(constructor instanceof $Function)) { - // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); - } - proto = intrinsic; - } - return proto; - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-setfunctionname - SetFunctionName: function SetFunctionName(F, name) { - if (typeof F !== 'function') { - throw new $TypeError('Assertion failed: `F` must be a function'); - } - if (!this.IsExtensible(F) || has(F, 'name')) { - throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); - } - var nameType = this.Type(name); - if (nameType !== 'Symbol' && nameType !== 'String') { - throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); - } - if (nameType === 'Symbol') { - var description = getSymbolDescription(name); - name = typeof description === 'undefined' ? '' : '[' + description + ']'; - } - if (arguments.length > 2) { - var prefix = arguments[2]; - name = prefix + ' ' + name; - } - return this.DefinePropertyOrThrow(F, 'name', { - '[[Value]]': name, - '[[Writable]]': false, - '[[Enumerable]]': false, - '[[Configurable]]': true - }); - } -}); - -delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible - -module.exports = ES6; diff --git a/node_modules/es-abstract/es2016.js b/node_modules/es-abstract/es2016.js deleted file mode 100644 index 9b5f9d4..0000000 --- a/node_modules/es-abstract/es2016.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var ES2015 = require('./es2015'); -var GetIntrinsic = require('./GetIntrinsic'); -var assign = require('./helpers/assign'); -var $setProto = require('./helpers/setProto'); - -var callBound = require('./helpers/callBound'); -var getIteratorMethod = require('./helpers/getIteratorMethod'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $arrayPush = callBound('Array.prototype.push'); -var $getProto = require('./helpers/getProto'); - -var ES2016 = assign(assign({}, ES2015), { - // https://www.ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber - SameValueNonNumber: function SameValueNonNumber(x, y) { - if (typeof x === 'number' || typeof x !== typeof y) { - throw new TypeError('SameValueNonNumber requires two non-number values of the same type.'); - } - return this.SameValue(x, y); - }, - - // https://www.ecma-international.org/ecma-262/7.0/#sec-iterabletoarraylike - IterableToArrayLike: function IterableToArrayLike(items) { - var usingIterator = getIteratorMethod(this, items); - if (typeof usingIterator !== 'undefined') { - var iterator = this.GetIterator(items, usingIterator); - var values = []; - var next = true; - while (next) { - next = this.IteratorStep(iterator); - if (next) { - var nextValue = this.IteratorValue(next); - $arrayPush(values, nextValue); - } - } - return values; - } - - return this.ToObject(items); - }, - - // https://ecma-international.org/ecma-262/7.0/#sec-ordinarygetprototypeof - OrdinaryGetPrototypeOf: function (O) { - if (this.Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: O must be an Object'); - } - if (!$getProto) { - throw new $TypeError('This environment does not support fetching prototypes.'); - } - return $getProto(O); - }, - - // https://ecma-international.org/ecma-262/7.0/#sec-ordinarysetprototypeof - OrdinarySetPrototypeOf: function (O, V) { - if (this.Type(V) !== 'Object' && this.Type(V) !== 'Null') { - throw new $TypeError('Assertion failed: V must be Object or Null'); - } - /* - var extensible = this.IsExtensible(O); - var current = this.OrdinaryGetPrototypeOf(O); - if (this.SameValue(V, current)) { - return true; - } - if (!extensible) { - return false; - } - */ - try { - $setProto(O, V); - } catch (e) { - return false; - } - return this.OrdinaryGetPrototypeOf(O) === V; - /* - var p = V; - var done = false; - while (!done) { - if (p === null) { - done = true; - } else if (this.SameValue(p, O)) { - return false; - } else { - if (wat) { - done = true; - } else { - p = p.[[Prototype]]; - } - } - } - O.[[Prototype]] = V; - return true; - */ - } -}); - -module.exports = ES2016; diff --git a/node_modules/es-abstract/es2017.js b/node_modules/es-abstract/es2017.js deleted file mode 100644 index 9803990..0000000 --- a/node_modules/es-abstract/es2017.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('./GetIntrinsic'); - -var ES2016 = require('./es2016'); -var assign = require('./helpers/assign'); -var forEach = require('./helpers/forEach'); -var callBind = require('./helpers/callBind'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var callBound = require('./helpers/callBound'); -var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); -var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); -var $arrayPush = callBound('Array.prototype.push'); - -var ES2017 = assign(assign({}, ES2016), { - ToIndex: function ToIndex(value) { - if (typeof value === 'undefined') { - return 0; - } - var integerIndex = this.ToInteger(value); - if (integerIndex < 0) { - throw new RangeError('index must be >= 0'); - } - var index = this.ToLength(integerIndex); - if (!this.SameValueZero(integerIndex, index)) { - throw new RangeError('index must be >= 0 and < 2 ** 53 - 1'); - } - return index; - }, - - // https://www.ecma-international.org/ecma-262/8.0/#sec-enumerableownproperties - EnumerableOwnProperties: function EnumerableOwnProperties(O, kind) { - var keys = ES2016.EnumerableOwnNames(O); - if (kind === 'key') { - return keys; - } - if (kind === 'value' || kind === 'key+value') { - var results = []; - forEach(keys, function (key) { - if ($isEnumerable(O, key)) { - $pushApply(results, [ - kind === 'value' ? O[key] : [key, O[key]] - ]); - } - }); - return results; - } - throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); - }, - - // https://www.ecma-international.org/ecma-262/8.0/#sec-iterabletolist - IterableToList: function IterableToList(items, method) { - var iterator = this.GetIterator(items, method); - var values = []; - var next = true; - while (next) { - next = this.IteratorStep(iterator); - if (next) { - var nextValue = this.IteratorValue(next); - $arrayPush(values, nextValue); - } - } - return values; - } -}); - -delete ES2017.EnumerableOwnNames; // replaced with EnumerableOwnProperties -delete ES2017.IterableToArrayLike; // replaced with IterableToList - -module.exports = ES2017; diff --git a/node_modules/es-abstract/es2018.js b/node_modules/es-abstract/es2018.js deleted file mode 100644 index 2de7fa7..0000000 --- a/node_modules/es-abstract/es2018.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('./GetIntrinsic'); - -var keys = require('object-keys'); -var inspect = require('object-inspect'); - -var ES2017 = require('./es2017'); -var assign = require('./helpers/assign'); -var forEach = require('./helpers/forEach'); -var callBind = require('./helpers/callBind'); -var every = require('./helpers/every'); -var isPrefixOf = require('./helpers/isPrefixOf'); - -var $String = GetIntrinsic('%String%'); -var $TypeError = GetIntrinsic('%TypeError%'); - -var callBound = require('./helpers/callBound'); -var regexTester = require('./helpers/regexTester'); -var $isNaN = require('./helpers/isNaN'); - -var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); -// var $charAt = callBound('String.prototype.charAt'); -var $strSlice = callBound('String.prototype.slice'); -var $indexOf = callBound('String.prototype.indexOf'); -var $parseInt = parseInt; - -var isDigit = regexTester(/^[0-9]$/); - -var $PromiseResolve = callBound('Promise.resolve', true); - -var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); -var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); -var $gOPS = $SymbolValueOf ? GetIntrinsic('%Object.getOwnPropertySymbols%') : null; - -var padTimeComponent = function padTimeComponent(c, count) { - return $strSlice('00' + c, -(count || 2)); -}; - -var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - -var OwnPropertyKeys = function OwnPropertyKeys(ES, source) { - var ownKeys = keys(source); - if ($gOPS) { - $pushApply(ownKeys, $gOPS(source)); - } - return ownKeys; -}; - -var ES2018 = assign(assign({}, ES2017), { - EnumerableOwnPropertyNames: ES2017.EnumerableOwnProperties, - - // https://ecma-international.org/ecma-262/9.0/#sec-thissymbolvalue - thisSymbolValue: function thisSymbolValue(value) { - if (!$SymbolValueOf) { - throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); - } - if (this.Type(value) === 'Symbol') { - return value; - } - return $SymbolValueOf(value); - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-isstringprefix - IsStringPrefix: function IsStringPrefix(p, q) { - if (this.Type(p) !== 'String') { - throw new TypeError('Assertion failed: "p" must be a String'); - } - - if (this.Type(q) !== 'String') { - throw new TypeError('Assertion failed: "q" must be a String'); - } - - return isPrefixOf(p, q); - /* - if (p === q || p === '') { - return true; - } - - var pLength = p.length; - var qLength = q.length; - if (pLength >= qLength) { - return false; - } - - // assert: pLength < qLength - - for (var i = 0; i < pLength; i += 1) { - if ($charAt(p, i) !== $charAt(q, i)) { - return false; - } - } - return true; - */ - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-tostring-applied-to-the-number-type - NumberToString: function NumberToString(m) { - if (this.Type(m) !== 'Number') { - throw new TypeError('Assertion failed: "m" must be a String'); - } - - return $String(m); - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-copydataproperties - CopyDataProperties: function CopyDataProperties(target, source, excludedItems) { - if (this.Type(target) !== 'Object') { - throw new TypeError('Assertion failed: "target" must be an Object'); - } - - if (!this.IsArray(excludedItems)) { - throw new TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); - } - for (var i = 0; i < excludedItems.length; i += 1) { - if (!this.IsPropertyKey(excludedItems[i])) { - throw new TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); - } - } - - if (typeof source === 'undefined' || source === null) { - return target; - } - - var ES = this; - - var fromObj = ES.ToObject(source); - - var sourceKeys = OwnPropertyKeys(ES, fromObj); - forEach(sourceKeys, function (nextKey) { - var excluded = false; - - forEach(excludedItems, function (e) { - if (ES.SameValue(e, nextKey) === true) { - excluded = true; - } - }); - - var enumerable = $isEnumerable(fromObj, nextKey) || ( - // this is to handle string keys being non-enumerable in older engines - typeof source === 'string' - && nextKey >= 0 - && ES.IsInteger(ES.ToNumber(nextKey)) - ); - if (excluded === false && enumerable) { - var propValue = ES.Get(fromObj, nextKey); - ES.CreateDataProperty(target, nextKey, propValue); - } - }); - - return target; - }, - - // https://ecma-international.org/ecma-262/9.0/#sec-promise-resolve - PromiseResolve: function PromiseResolve(C, x) { - if (!$PromiseResolve) { - throw new SyntaxError('This environment does not support Promises.'); - } - return $PromiseResolve(C, x); - }, - - // http://www.ecma-international.org/ecma-262/9.0/#sec-getsubstitution - // eslint-disable-next-line max-statements, max-params, max-lines-per-function - GetSubstitution: function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { - if (this.Type(matched) !== 'String') { - throw new $TypeError('Assertion failed: `matched` must be a String'); - } - var matchLength = matched.length; - - if (this.Type(str) !== 'String') { - throw new $TypeError('Assertion failed: `str` must be a String'); - } - var stringLength = str.length; - - if (!this.IsInteger(position) || position < 0 || position > stringLength) { - throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); - } - - var ES = this; - var isStringOrHole = function (capture, index, arr) { return ES.Type(capture) === 'String' || !(index in arr); }; - if (!this.IsArray(captures) || !every(captures, isStringOrHole)) { - throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures)); - } - - if (this.Type(replacement) !== 'String') { - throw new $TypeError('Assertion failed: `replacement` must be a String'); - } - - var tailPos = position + matchLength; - var m = captures.length; - if (this.Type(namedCaptures) !== 'Undefined') { - namedCaptures = this.ToObject(namedCaptures); // eslint-disable-line no-param-reassign - } - - var result = ''; - for (var i = 0; i < replacement.length; i += 1) { - // if this is a $, and it's not the end of the replacement - var current = replacement[i]; - var isLast = (i + 1) >= replacement.length; - var nextIsLast = (i + 2) >= replacement.length; - if (current === '$' && !isLast) { - var next = replacement[i + 1]; - if (next === '$') { - result += '$'; - i += 1; - } else if (next === '&') { - result += matched; - i += 1; - } else if (next === '`') { - result += position === 0 ? '' : $strSlice(str, 0, position - 1); - i += 1; - } else if (next === "'") { - result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); - i += 1; - } else { - var nextNext = nextIsLast ? null : replacement[i + 2]; - if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { - // $1 through $9, and not followed by a digit - var n = $parseInt(next, 10); - // if (n > m, impl-defined) - result += (n <= m && this.Type(captures[n - 1]) === 'Undefined') ? '' : captures[n - 1]; - i += 1; - } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { - // $00 through $99 - var nn = next + nextNext; - var nnI = $parseInt(nn, 10) - 1; - // if nn === '00' or nn > m, impl-defined - result += (nn <= m && this.Type(captures[nnI]) === 'Undefined') ? '' : captures[nnI]; - i += 2; - } else if (next === '<') { - // eslint-disable-next-line max-depth - if (this.Type(namedCaptures) === 'Undefined') { - result += '$<'; - i += 2; - } else { - var endIndex = $indexOf(replacement, '>', i); - // eslint-disable-next-line max-depth - if (endIndex > -1) { - var groupName = $strSlice(replacement, i, endIndex); - var capture = this.Get(namedCaptures, groupName); - // eslint-disable-next-line max-depth - if (this.Type(capture) !== 'Undefined') { - result += this.ToString(capture); - } - i += '$<' + groupName + '>'.length; - } - } - } else { - result += '$'; - } - } - } else { - // the final $, or else not a $ - result += replacement[i]; - } - } - return result; - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-datestring - DateString: function DateString(tv) { - if (this.Type(tv) !== 'Number' || $isNaN(tv)) { - throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); - } - var weekday = weekdays[this.WeekDay(tv)]; - var month = months[this.MonthFromTime(tv)]; - var day = padTimeComponent(this.DateFromTime(tv)); - var year = padTimeComponent(this.YearFromTime(tv), 4); - return weekday + '\x20' + month + '\x20' + day + '\x20' + year; - }, - - // https://www.ecma-international.org/ecma-262/9.0/#sec-timestring - TimeString: function TimeString(tv) { - if (this.Type(tv) !== 'Number' || $isNaN(tv)) { - throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); - } - var hour = this.HourFromTime(tv); - var minute = this.MinFromTime(tv); - var second = this.SecFromTime(tv); - return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; - } -}); - -delete ES2018.EnumerableOwnProperties; // replaced with EnumerableOwnPropertyNames - -delete ES2018.IsPropertyDescriptor; // not an actual abstract operation - -module.exports = ES2018; diff --git a/node_modules/es-abstract/es2019.js b/node_modules/es-abstract/es2019.js deleted file mode 100644 index 7feaf95..0000000 --- a/node_modules/es-abstract/es2019.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -var trimStart = require('string.prototype.trimleft'); -var trimEnd = require('string.prototype.trimright'); -var inspect = require('object-inspect'); - -var ES2018 = require('./es2018'); -var assign = require('./helpers/assign'); -var MAX_SAFE_INTEGER = require('./helpers/maxSafeInteger'); - -var GetIntrinsic = require('./GetIntrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var ES2019 = assign(assign({}, ES2018), { - // https://tc39.es/ecma262/#sec-add-entries-from-iterable - AddEntriesFromIterable: function AddEntriesFromIterable(target, iterable, adder) { - if (!this.IsCallable(adder)) { - throw new $TypeError('Assertion failed: `adder` is not callable'); - } - if (iterable == null) { - throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); - } - var iteratorRecord = this.GetIterator(iterable); - while (true) { // eslint-disable-line no-constant-condition - var next = this.IteratorStep(iteratorRecord); - if (!next) { - return target; - } - var nextItem = this.IteratorValue(next); - if (this.Type(nextItem) !== 'Object') { - var error = new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)); - return this.IteratorClose( - iteratorRecord, - function () { throw error; } // eslint-disable-line no-loop-func - ); - } - try { - var k = this.Get(nextItem, '0'); - var v = this.Get(nextItem, '1'); - this.Call(adder, target, [k, v]); - } catch (e) { - return this.IteratorClose( - iteratorRecord, - function () { throw e; } - ); - } - } - }, - - // https://ecma-international.org/ecma-262/10.0/#sec-flattenintoarray - // eslint-disable-next-line max-params, max-statements - FlattenIntoArray: function FlattenIntoArray(target, source, sourceLen, start, depth) { - var mapperFunction; - if (arguments.length > 5) { - mapperFunction = arguments[5]; - } - - var targetIndex = start; - var sourceIndex = 0; - while (sourceIndex < sourceLen) { - var P = this.ToString(sourceIndex); - var exists = this.HasProperty(source, P); - if (exists === true) { - var element = this.Get(source, P); - if (typeof mapperFunction !== 'undefined') { - if (arguments.length <= 6) { - throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); - } - element = this.Call(mapperFunction, arguments[6], [element, sourceIndex, source]); - } - var shouldFlatten = false; - if (depth > 0) { - shouldFlatten = this.IsArray(element); - } - if (shouldFlatten) { - var elementLen = this.ToLength(this.Get(element, 'length')); - targetIndex = this.FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); - } else { - if (targetIndex >= MAX_SAFE_INTEGER) { - throw new $TypeError('index too large'); - } - this.CreateDataPropertyOrThrow(target, this.ToString(targetIndex), element); - targetIndex += 1; - } - } - sourceIndex += 1; - } - - return targetIndex; - }, - - // https://ecma-international.org/ecma-262/10.0/#sec-trimstring - TrimString: function TrimString(string, where) { - var str = this.RequireObjectCoercible(string); - var S = this.ToString(str); - var T; - if (where === 'start') { - T = trimStart(S); - } else if (where === 'end') { - T = trimEnd(S); - } else if (where === 'start+end') { - T = trimStart(trimEnd(S)); - } else { - throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); - } - return T; - } -}); - -module.exports = ES2019; diff --git a/node_modules/es-abstract/es5.js b/node_modules/es-abstract/es5.js deleted file mode 100644 index 9a97ba3..0000000 --- a/node_modules/es-abstract/es5.js +++ /dev/null @@ -1,544 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('./GetIntrinsic'); - -var $Object = GetIntrinsic('%Object%'); -var $EvalError = GetIntrinsic('%EvalError%'); -var $TypeError = GetIntrinsic('%TypeError%'); -var $String = GetIntrinsic('%String%'); -var $Date = GetIntrinsic('%Date%'); -var $Number = GetIntrinsic('%Number%'); -var $floor = GetIntrinsic('%Math.floor%'); -var $DateUTC = GetIntrinsic('%Date.UTC%'); -var $abs = GetIntrinsic('%Math.abs%'); - -var assertRecord = require('./helpers/assertRecord'); -var isPropertyDescriptor = require('./helpers/isPropertyDescriptor'); -var $isNaN = require('./helpers/isNaN'); -var $isFinite = require('./helpers/isFinite'); -var sign = require('./helpers/sign'); -var mod = require('./helpers/mod'); -var isPrefixOf = require('./helpers/isPrefixOf'); -var callBound = require('./helpers/callBound'); - -var IsCallable = require('is-callable'); -var toPrimitive = require('es-to-primitive/es5'); - -var has = require('has'); - -var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); - -var HoursPerDay = 24; -var MinutesPerHour = 60; -var SecondsPerMinute = 60; -var msPerSecond = 1e3; -var msPerMinute = msPerSecond * SecondsPerMinute; -var msPerHour = msPerMinute * MinutesPerHour; -var msPerDay = 86400000; - -// https://es5.github.io/#x9 -var ES5 = { - ToPrimitive: toPrimitive, - - ToBoolean: function ToBoolean(value) { - return !!value; - }, - ToNumber: function ToNumber(value) { - return +value; // eslint-disable-line no-implicit-coercion - }, - ToInteger: function ToInteger(value) { - var number = this.ToNumber(value); - if ($isNaN(number)) { return 0; } - if (number === 0 || !$isFinite(number)) { return number; } - return sign(number) * Math.floor(Math.abs(number)); - }, - ToInt32: function ToInt32(x) { - return this.ToNumber(x) >> 0; - }, - ToUint32: function ToUint32(x) { - return this.ToNumber(x) >>> 0; - }, - ToUint16: function ToUint16(value) { - var number = this.ToNumber(value); - if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } - var posInt = sign(number) * Math.floor(Math.abs(number)); - return mod(posInt, 0x10000); - }, - ToString: function ToString(value) { - return $String(value); - }, - ToObject: function ToObject(value) { - this.CheckObjectCoercible(value); - return $Object(value); - }, - CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) { - /* jshint eqnull:true */ - if (value == null) { - throw new $TypeError(optMessage || 'Cannot call method on ' + value); - } - return value; - }, - IsCallable: IsCallable, - SameValue: function SameValue(x, y) { - if (x === y) { // 0 === -0, but they are not identical. - if (x === 0) { return 1 / x === 1 / y; } - return true; - } - return $isNaN(x) && $isNaN(y); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8 - Type: function Type(x) { - if (x === null) { - return 'Null'; - } - if (typeof x === 'undefined') { - return 'Undefined'; - } - if (typeof x === 'function' || typeof x === 'object') { - return 'Object'; - } - if (typeof x === 'number') { - return 'Number'; - } - if (typeof x === 'boolean') { - return 'Boolean'; - } - if (typeof x === 'string') { - return 'String'; - } - }, - - // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type - IsPropertyDescriptor: function IsPropertyDescriptor(Desc) { - return isPropertyDescriptor(this, Desc); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1 - IsAccessorDescriptor: function IsAccessorDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { - return false; - } - - return true; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2 - IsDataDescriptor: function IsDataDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { - return false; - } - - return true; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3 - IsGenericDescriptor: function IsGenericDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) { - return true; - } - - return false; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4 - FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; - } - - assertRecord(this, 'Property Descriptor', 'Desc', Desc); - - if (this.IsDataDescriptor(Desc)) { - return { - value: Desc['[[Value]]'], - writable: !!Desc['[[Writable]]'], - enumerable: !!Desc['[[Enumerable]]'], - configurable: !!Desc['[[Configurable]]'] - }; - } else if (this.IsAccessorDescriptor(Desc)) { - return { - get: Desc['[[Get]]'], - set: Desc['[[Set]]'], - enumerable: !!Desc['[[Enumerable]]'], - configurable: !!Desc['[[Configurable]]'] - }; - } else { - throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); - } - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5 - ToPropertyDescriptor: function ToPropertyDescriptor(Obj) { - if (this.Type(Obj) !== 'Object') { - throw new $TypeError('ToPropertyDescriptor requires an object'); - } - - var desc = {}; - if (has(Obj, 'enumerable')) { - desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable); - } - if (has(Obj, 'configurable')) { - desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable); - } - if (has(Obj, 'value')) { - desc['[[Value]]'] = Obj.value; - } - if (has(Obj, 'writable')) { - desc['[[Writable]]'] = this.ToBoolean(Obj.writable); - } - if (has(Obj, 'get')) { - var getter = Obj.get; - if (typeof getter !== 'undefined' && !this.IsCallable(getter)) { - throw new TypeError('getter must be a function'); - } - desc['[[Get]]'] = getter; - } - if (has(Obj, 'set')) { - var setter = Obj.set; - if (typeof setter !== 'undefined' && !this.IsCallable(setter)) { - throw new $TypeError('setter must be a function'); - } - desc['[[Set]]'] = setter; - } - - if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { - throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); - } - return desc; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-11.9.3 - 'Abstract Equality Comparison': function AbstractEqualityComparison(x, y) { - var xType = this.Type(x); - var yType = this.Type(y); - if (xType === yType) { - return x === y; // ES6+ specified this shortcut anyways. - } - if (x == null && y == null) { - return true; - } - if (xType === 'Number' && yType === 'String') { - return this['Abstract Equality Comparison'](x, this.ToNumber(y)); - } - if (xType === 'String' && yType === 'Number') { - return this['Abstract Equality Comparison'](this.ToNumber(x), y); - } - if (xType === 'Boolean') { - return this['Abstract Equality Comparison'](this.ToNumber(x), y); - } - if (yType === 'Boolean') { - return this['Abstract Equality Comparison'](x, this.ToNumber(y)); - } - if ((xType === 'String' || xType === 'Number') && yType === 'Object') { - return this['Abstract Equality Comparison'](x, this.ToPrimitive(y)); - } - if (xType === 'Object' && (yType === 'String' || yType === 'Number')) { - return this['Abstract Equality Comparison'](this.ToPrimitive(x), y); - } - return false; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-11.9.6 - 'Strict Equality Comparison': function StrictEqualityComparison(x, y) { - var xType = this.Type(x); - var yType = this.Type(y); - if (xType !== yType) { - return false; - } - if (xType === 'Undefined' || xType === 'Null') { - return true; - } - return x === y; // shortcut for steps 4-7 - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-11.8.5 - // eslint-disable-next-line max-statements - 'Abstract Relational Comparison': function AbstractRelationalComparison(x, y, LeftFirst) { - if (this.Type(LeftFirst) !== 'Boolean') { - throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); - } - var px; - var py; - if (LeftFirst) { - px = this.ToPrimitive(x, $Number); - py = this.ToPrimitive(y, $Number); - } else { - py = this.ToPrimitive(y, $Number); - px = this.ToPrimitive(x, $Number); - } - var bothStrings = this.Type(px) === 'String' && this.Type(py) === 'String'; - if (!bothStrings) { - var nx = this.ToNumber(px); - var ny = this.ToNumber(py); - if ($isNaN(nx) || $isNaN(ny)) { - return undefined; - } - if ($isFinite(nx) && $isFinite(ny) && nx === ny) { - return false; - } - if (nx === 0 && ny === 0) { - return false; - } - if (nx === Infinity) { - return false; - } - if (ny === Infinity) { - return true; - } - if (ny === -Infinity) { - return false; - } - if (nx === -Infinity) { - return true; - } - return nx < ny; // by now, these are both nonzero, finite, and not equal - } - if (isPrefixOf(py, px)) { - return false; - } - if (isPrefixOf(px, py)) { - return true; - } - return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10 - msFromTime: function msFromTime(t) { - return mod(t, msPerSecond); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10 - SecFromTime: function SecFromTime(t) { - return mod($floor(t / msPerSecond), SecondsPerMinute); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10 - MinFromTime: function MinFromTime(t) { - return mod($floor(t / msPerMinute), MinutesPerHour); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10 - HourFromTime: function HourFromTime(t) { - return mod($floor(t / msPerHour), HoursPerDay); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.2 - Day: function Day(t) { - return $floor(t / msPerDay); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.2 - TimeWithinDay: function TimeWithinDay(t) { - return mod(t, msPerDay); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3 - DayFromYear: function DayFromYear(y) { - return (365 * (y - 1970)) + $floor((y - 1969) / 4) - $floor((y - 1901) / 100) + $floor((y - 1601) / 400); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3 - TimeFromYear: function TimeFromYear(y) { - return msPerDay * this.DayFromYear(y); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3 - YearFromTime: function YearFromTime(t) { - // largest y such that this.TimeFromYear(y) <= t - return $getUTCFullYear(new $Date(t)); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.6 - WeekDay: function WeekDay(t) { - return mod(this.Day(t) + 4, 7); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3 - DaysInYear: function DaysInYear(y) { - if (mod(y, 4) !== 0) { - return 365; - } - if (mod(y, 100) !== 0) { - return 366; - } - if (mod(y, 400) !== 0) { - return 365; - } - return 366; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3 - InLeapYear: function InLeapYear(t) { - var days = this.DaysInYear(this.YearFromTime(t)); - if (days === 365) { - return 0; - } - if (days === 366) { - return 1; - } - throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.4 - DayWithinYear: function DayWithinYear(t) { - return this.Day(t) - this.DayFromYear(this.YearFromTime(t)); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.4 - MonthFromTime: function MonthFromTime(t) { - var day = this.DayWithinYear(t); - if (0 <= day && day < 31) { - return 0; - } - var leap = this.InLeapYear(t); - if (31 <= day && day < (59 + leap)) { - return 1; - } - if ((59 + leap) <= day && day < (90 + leap)) { - return 2; - } - if ((90 + leap) <= day && day < (120 + leap)) { - return 3; - } - if ((120 + leap) <= day && day < (151 + leap)) { - return 4; - } - if ((151 + leap) <= day && day < (181 + leap)) { - return 5; - } - if ((181 + leap) <= day && day < (212 + leap)) { - return 6; - } - if ((212 + leap) <= day && day < (243 + leap)) { - return 7; - } - if ((243 + leap) <= day && day < (273 + leap)) { - return 8; - } - if ((273 + leap) <= day && day < (304 + leap)) { - return 9; - } - if ((304 + leap) <= day && day < (334 + leap)) { - return 10; - } - if ((334 + leap) <= day && day < (365 + leap)) { - return 11; - } - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.5 - DateFromTime: function DateFromTime(t) { - var m = this.MonthFromTime(t); - var d = this.DayWithinYear(t); - if (m === 0) { - return d + 1; - } - if (m === 1) { - return d - 30; - } - var leap = this.InLeapYear(t); - if (m === 2) { - return d - 58 - leap; - } - if (m === 3) { - return d - 89 - leap; - } - if (m === 4) { - return d - 119 - leap; - } - if (m === 5) { - return d - 150 - leap; - } - if (m === 6) { - return d - 180 - leap; - } - if (m === 7) { - return d - 211 - leap; - } - if (m === 8) { - return d - 242 - leap; - } - if (m === 9) { - return d - 272 - leap; - } - if (m === 10) { - return d - 303 - leap; - } - if (m === 11) { - return d - 333 - leap; - } - throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.12 - MakeDay: function MakeDay(year, month, date) { - if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { - return NaN; - } - var y = this.ToInteger(year); - var m = this.ToInteger(month); - var dt = this.ToInteger(date); - var ym = y + $floor(m / 12); - var mn = mod(m, 12); - var t = $DateUTC(ym, mn, 1); - if (this.YearFromTime(t) !== ym || this.MonthFromTime(t) !== mn || this.DateFromTime(t) !== 1) { - return NaN; - } - return this.Day(t) + dt - 1; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.13 - MakeDate: function MakeDate(day, time) { - if (!$isFinite(day) || !$isFinite(time)) { - return NaN; - } - return (day * msPerDay) + time; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.11 - MakeTime: function MakeTime(hour, min, sec, ms) { - if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { - return NaN; - } - var h = this.ToInteger(hour); - var m = this.ToInteger(min); - var s = this.ToInteger(sec); - var milli = this.ToInteger(ms); - var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; - return t; - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.14 - TimeClip: function TimeClip(time) { - if (!$isFinite(time) || $abs(time) > 8.64e15) { - return NaN; - } - return $Number(new $Date(this.ToNumber(time))); - }, - - // https://ecma-international.org/ecma-262/5.1/#sec-5.2 - modulo: function modulo(x, y) { - return mod(x, y); - } -}; - -module.exports = ES5; diff --git a/node_modules/es-abstract/es6.js b/node_modules/es-abstract/es6.js deleted file mode 100644 index 2d1f4dc..0000000 --- a/node_modules/es-abstract/es6.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./es2015'); diff --git a/node_modules/es-abstract/es7.js b/node_modules/es-abstract/es7.js deleted file mode 100644 index f2f15c0..0000000 --- a/node_modules/es-abstract/es7.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./es2016'); diff --git a/node_modules/es-abstract/helpers/assertRecord.js b/node_modules/es-abstract/helpers/assertRecord.js deleted file mode 100644 index 72df771..0000000 --- a/node_modules/es-abstract/helpers/assertRecord.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); - -var has = require('has'); - -var predicates = { - // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type - 'Property Descriptor': function isPropertyDescriptor(ES, Desc) { - if (ES.Type(Desc) !== 'Object') { - return false; - } - var allowed = { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Get]]': true, - '[[Set]]': true, - '[[Value]]': true, - '[[Writable]]': true - }; - - for (var key in Desc) { // eslint-disable-line - if (has(Desc, key) && !allowed[key]) { - return false; - } - } - - var isData = has(Desc, '[[Value]]'); - var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); - if (isData && IsAccessor) { - throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); - } - return true; - } -}; - -module.exports = function assertRecord(ES, recordType, argumentName, value) { - var predicate = predicates[recordType]; - if (typeof predicate !== 'function') { - throw new $SyntaxError('unknown record type: ' + recordType); - } - if (!predicate(ES, value)) { - throw new $TypeError(argumentName + ' must be a ' + recordType); - } -}; diff --git a/node_modules/es-abstract/helpers/assign.js b/node_modules/es-abstract/helpers/assign.js deleted file mode 100644 index 7e6666e..0000000 --- a/node_modules/es-abstract/helpers/assign.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var has = require('has'); - -var $assign = GetIntrinsic('%Object%').assign; - -module.exports = function assign(target, source) { - if ($assign) { - return $assign(target, source); - } - - // eslint-disable-next-line no-restricted-syntax - for (var key in source) { - if (has(source, key)) { - // eslint-disable-next-line no-param-reassign - target[key] = source[key]; - } - } - return target; -}; diff --git a/node_modules/es-abstract/helpers/callBind.js b/node_modules/es-abstract/helpers/callBind.js deleted file mode 100644 index dd206ab..0000000 --- a/node_modules/es-abstract/helpers/callBind.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -var GetIntrinsic = require('../GetIntrinsic'); - -var $Function = GetIntrinsic('%Function%'); -var $apply = $Function.apply; -var $call = $Function.call; - -module.exports = function callBind() { - return bind.apply($call, arguments); -}; - -module.exports.apply = function applyBind() { - return bind.apply($apply, arguments); -}; diff --git a/node_modules/es-abstract/helpers/callBound.js b/node_modules/es-abstract/helpers/callBound.js deleted file mode 100644 index 9dc8fc5..0000000 --- a/node_modules/es-abstract/helpers/callBound.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var callBind = require('./callBind'); - -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) { - return callBind(intrinsic); - } - return intrinsic; -}; diff --git a/node_modules/es-abstract/helpers/every.js b/node_modules/es-abstract/helpers/every.js deleted file mode 100644 index 42a4582..0000000 --- a/node_modules/es-abstract/helpers/every.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = function every(array, predicate) { - for (var i = 0; i < array.length; i += 1) { - if (!predicate(array[i], i, array)) { - return false; - } - } - return true; -}; diff --git a/node_modules/es-abstract/helpers/forEach.js b/node_modules/es-abstract/helpers/forEach.js deleted file mode 100644 index 35915a6..0000000 --- a/node_modules/es-abstract/helpers/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = function forEach(array, callback) { - for (var i = 0; i < array.length; i += 1) { - callback(array[i], i, array); // eslint-disable-line callback-return - } -}; diff --git a/node_modules/es-abstract/helpers/getInferredName.js b/node_modules/es-abstract/helpers/getInferredName.js deleted file mode 100644 index 2dab6e7..0000000 --- a/node_modules/es-abstract/helpers/getInferredName.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var getInferredName; -try { - // eslint-disable-next-line no-new-func - getInferredName = Function('s', 'return { [s]() {} }[s].name;'); -} catch (e) {} - -var inferred = function () {}; -module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null; diff --git a/node_modules/es-abstract/helpers/getIteratorMethod.js b/node_modules/es-abstract/helpers/getIteratorMethod.js deleted file mode 100644 index 02f932c..0000000 --- a/node_modules/es-abstract/helpers/getIteratorMethod.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var hasSymbols = require('has-symbols')(); -var GetIntrinsic = require('../GetIntrinsic'); -var callBound = require('./callBound'); - -var $iterator = GetIntrinsic('%Symbol.iterator%', true); -var $stringSlice = callBound('String.prototype.slice'); - -module.exports = function getIteratorMethod(ES, iterable) { - var usingIterator; - if (hasSymbols) { - usingIterator = ES.GetMethod(iterable, $iterator); - } else if (ES.IsArray(iterable)) { - usingIterator = function () { - var i = -1; - var arr = this; // eslint-disable-line no-invalid-this - return { - next: function () { - i += 1; - return { - done: i >= arr.length, - value: arr[i] - }; - } - }; - }; - } else if (ES.Type(iterable) === 'String') { - usingIterator = function () { - var i = 0; - return { - next: function () { - var nextIndex = ES.AdvanceStringIndex(iterable, i, true); - var value = $stringSlice(iterable, i, nextIndex); - i = nextIndex; - return { - done: nextIndex > iterable.length, - value: value - }; - } - }; - }; - } - return usingIterator; -}; diff --git a/node_modules/es-abstract/helpers/getProto.js b/node_modules/es-abstract/helpers/getProto.js deleted file mode 100644 index af10fd8..0000000 --- a/node_modules/es-abstract/helpers/getProto.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var originalGetProto = GetIntrinsic('%Object.getPrototypeOf%', true); -var $ArrayProto = GetIntrinsic('%Array.prototype%'); - -module.exports = originalGetProto || ( - // eslint-disable-next-line no-proto - [].__proto__ === $ArrayProto - ? function (O) { - return O.__proto__; // eslint-disable-line no-proto - } - : null -); diff --git a/node_modules/es-abstract/helpers/getSymbolDescription.js b/node_modules/es-abstract/helpers/getSymbolDescription.js deleted file mode 100644 index dff8fcc..0000000 --- a/node_modules/es-abstract/helpers/getSymbolDescription.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var callBound = require('./callBound'); - -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var symToStr = callBound('Symbol.prototype.toString', true); - -var getInferredName = require('./getInferredName'); - -module.exports = function getSymbolDescription(symbol) { - if (!symToStr) { - throw new $SyntaxError('Symbols are not supported in this environment'); - } - var str = symToStr(symbol); // will throw if not a symbol - - if (getInferredName) { - var name = getInferredName(symbol); - if (name === '') { return; } - // eslint-disable-next-line consistent-return - return name.slice(1, -1); // name.slice('['.length, -']'.length); - } - - var desc = str.slice(7, -1); // str.slice('Symbol('.length, -')'.length); - if (desc) { - // eslint-disable-next-line consistent-return - return desc; - } -}; diff --git a/node_modules/es-abstract/helpers/isFinite.js b/node_modules/es-abstract/helpers/isFinite.js deleted file mode 100644 index 9e7cd4f..0000000 --- a/node_modules/es-abstract/helpers/isFinite.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var $isNaN = Number.isNaN || function (a) { return a !== a; }; - -module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; diff --git a/node_modules/es-abstract/helpers/isNaN.js b/node_modules/es-abstract/helpers/isNaN.js deleted file mode 100644 index cb8631d..0000000 --- a/node_modules/es-abstract/helpers/isNaN.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; diff --git a/node_modules/es-abstract/helpers/isPrefixOf.js b/node_modules/es-abstract/helpers/isPrefixOf.js deleted file mode 100644 index b67d640..0000000 --- a/node_modules/es-abstract/helpers/isPrefixOf.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var $strSlice = require('../helpers/callBound')('String.prototype.slice'); - -module.exports = function isPrefixOf(prefix, string) { - if (prefix === string) { - return true; - } - if (prefix.length > string.length) { - return false; - } - return $strSlice(string, 0, prefix.length) === prefix; -}; diff --git a/node_modules/es-abstract/helpers/isPrimitive.js b/node_modules/es-abstract/helpers/isPrimitive.js deleted file mode 100644 index 06f0bf0..0000000 --- a/node_modules/es-abstract/helpers/isPrimitive.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function isPrimitive(value) { - return value === null || (typeof value !== 'function' && typeof value !== 'object'); -}; diff --git a/node_modules/es-abstract/helpers/isPropertyDescriptor.js b/node_modules/es-abstract/helpers/isPropertyDescriptor.js deleted file mode 100644 index 23e8995..0000000 --- a/node_modules/es-abstract/helpers/isPropertyDescriptor.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var has = require('has'); -var $TypeError = GetIntrinsic('%TypeError%'); - -module.exports = function IsPropertyDescriptor(ES, Desc) { - if (ES.Type(Desc) !== 'Object') { - return false; - } - var allowed = { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Get]]': true, - '[[Set]]': true, - '[[Value]]': true, - '[[Writable]]': true - }; - - for (var key in Desc) { // eslint-disable-line - if (has(Desc, key) && !allowed[key]) { - return false; - } - } - - if (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) { - throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); - } - return true; -}; diff --git a/node_modules/es-abstract/helpers/isSamePropertyDescriptor.js b/node_modules/es-abstract/helpers/isSamePropertyDescriptor.js deleted file mode 100644 index a6162a1..0000000 --- a/node_modules/es-abstract/helpers/isSamePropertyDescriptor.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var every = require('./every'); - -module.exports = function isSamePropertyDescriptor(ES, D1, D2) { - var fields = [ - '[[Configurable]]', - '[[Enumerable]]', - '[[Get]]', - '[[Set]]', - '[[Value]]', - '[[Writable]]' - ]; - return every(fields, function (field) { - if ((field in D1) !== (field in D2)) { - return false; - } - return ES.SameValue(D1[field], D2[field]); - }); -}; diff --git a/node_modules/es-abstract/helpers/maxSafeInteger.js b/node_modules/es-abstract/helpers/maxSafeInteger.js deleted file mode 100644 index 2fe8f38..0000000 --- a/node_modules/es-abstract/helpers/maxSafeInteger.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var $Math = GetIntrinsic('%Math%'); -var $Number = GetIntrinsic('%Number%'); - -module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1; diff --git a/node_modules/es-abstract/helpers/mod.js b/node_modules/es-abstract/helpers/mod.js deleted file mode 100644 index 70f0eea..0000000 --- a/node_modules/es-abstract/helpers/mod.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = function mod(number, modulo) { - var remain = number % modulo; - return Math.floor(remain >= 0 ? remain : remain + modulo); -}; diff --git a/node_modules/es-abstract/helpers/regexTester.js b/node_modules/es-abstract/helpers/regexTester.js deleted file mode 100644 index 982cc9f..0000000 --- a/node_modules/es-abstract/helpers/regexTester.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var $test = GetIntrinsic('RegExp.prototype.test'); - -var callBind = require('./callBind'); - -module.exports = function regexTester(regex) { - return callBind($test, regex); -}; diff --git a/node_modules/es-abstract/helpers/setProto.js b/node_modules/es-abstract/helpers/setProto.js deleted file mode 100644 index 29ec991..0000000 --- a/node_modules/es-abstract/helpers/setProto.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true); -var $ArrayProto = GetIntrinsic('%Array.prototype%'); - -module.exports = originalSetProto || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayProto - ? null - : function (O, proto) { - O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign - return O; - } -); diff --git a/node_modules/es-abstract/helpers/sign.js b/node_modules/es-abstract/helpers/sign.js deleted file mode 100644 index 598ea7d..0000000 --- a/node_modules/es-abstract/helpers/sign.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function sign(number) { - return number >= 0 ? 1 : -1; -}; diff --git a/node_modules/es-abstract/index.js b/node_modules/es-abstract/index.js deleted file mode 100644 index 7cef039..0000000 --- a/node_modules/es-abstract/index.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var assign = require('./helpers/assign'); - -var ES5 = require('./es5'); -var ES2015 = require('./es2015'); -var ES2016 = require('./es2016'); -var ES2017 = require('./es2017'); -var ES2018 = require('./es2018'); -var ES2019 = require('./es2019'); - -var ES = { - ES5: ES5, - ES6: ES2015, - ES2015: ES2015, - ES7: ES2016, - ES2016: ES2016, - ES2017: ES2017, - ES2018: ES2018, - ES2019: ES2019 -}; -assign(ES, ES5); -delete ES.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible -assign(ES, ES2015); - -module.exports = ES; diff --git a/node_modules/es-abstract/node_modules/object-inspect/.eslintignore b/node_modules/es-abstract/node_modules/object-inspect/.eslintignore deleted file mode 100644 index 404abb2..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/es-abstract/node_modules/object-inspect/.eslintrc b/node_modules/es-abstract/node_modules/object-inspect/.eslintrc deleted file mode 100644 index c137b67..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/.eslintrc +++ /dev/null @@ -1,61 +0,0 @@ -{ - "root": true, - "extends": "@ljharb", - "rules": { - "complexity": 0, - "func-style": [2, 'declaration'], - "indent": [2, 4], - "max-lines-per-function": [2, 130], - "max-params": [2, 4], - "max-statements": [2, 90], - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "no-param-reassign": 1, - "strict": 0, // TODO - }, - "globals": { - "BigInt": false, - "WeakSet": false, - "WeakMap": false, - }, - "overrides": [ - { - "files": ["test/**", "test-*", "example/**"], - "rules": { - "array-bracket-newline": 0, - "max-params": 0, - "max-statements": 0, - "max-statements-per-line": 0, - "object-curly-newline": 0, - "sort-keys": 0, - }, - }, - { - "files": ["example/**"], - "rules": { - "no-console": 0, - }, - }, - { - "files": ["test/browser/**"], - "env": { - "browser": true, - }, - }, - { - "files": ["test/bigint*"], - "rules": { - "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], - }, - }, - { - "files": "index.js", - "globals": { - "HTMLElement": false, - }, - "rules": { - "no-use-before-define": 1, - }, - }, - ], -} diff --git a/node_modules/es-abstract/node_modules/object-inspect/.nycrc b/node_modules/es-abstract/node_modules/object-inspect/.nycrc deleted file mode 100644 index 7b95a1e..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/.nycrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "all": true, - "check-coverage": true, - "instrumentation": false, - "sourceMap": false, - "reporter": ["html", "text-summary"], - "lines": 93, - "statements": 93, - "functions": 96, - "branches": 89, - "exclude": [ - "coverage", - "example", - "test", - "test-core-js.js" - ] -} diff --git a/node_modules/es-abstract/node_modules/object-inspect/.travis.yml b/node_modules/es-abstract/node_modules/object-inspect/.travis.yml deleted file mode 100644 index 3a0cfc3..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml - - ljharb/travis-ci:node/coverage.yml diff --git a/node_modules/es-abstract/node_modules/object-inspect/LICENSE b/node_modules/es-abstract/node_modules/object-inspect/LICENSE deleted file mode 100644 index ca64cc1..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/es-abstract/node_modules/object-inspect/example/all.js b/node_modules/es-abstract/node_modules/object-inspect/example/all.js deleted file mode 100644 index 2f3355c..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/example/all.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var Buffer = require('safer-buffer').Buffer; - -var holes = ['a', 'b']; -holes[4] = 'e'; -holes[6] = 'g'; - -var obj = { - a: 1, - b: [3, 4, undefined, null], - c: undefined, - d: null, - e: { - regex: /^x/i, - buf: Buffer.from('abc'), - holes: holes - }, - now: new Date() -}; -obj.self = obj; -console.log(inspect(obj)); diff --git a/node_modules/es-abstract/node_modules/object-inspect/example/circular.js b/node_modules/es-abstract/node_modules/object-inspect/example/circular.js deleted file mode 100644 index 487a7c1..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/example/circular.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var obj = { a: 1, b: [3, 4] }; -obj.c = obj; -console.log(inspect(obj)); diff --git a/node_modules/es-abstract/node_modules/object-inspect/example/fn.js b/node_modules/es-abstract/node_modules/object-inspect/example/fn.js deleted file mode 100644 index 9b5db8d..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/example/fn.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var obj = [1, 2, function f(n) { return n + 5; }, 4]; -console.log(inspect(obj)); diff --git a/node_modules/es-abstract/node_modules/object-inspect/example/inspect.js b/node_modules/es-abstract/node_modules/object-inspect/example/inspect.js deleted file mode 100644 index e2df7c9..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/example/inspect.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -/* eslint-env browser */ -var inspect = require('../'); - -var d = document.createElement('div'); -d.setAttribute('id', 'beep'); -d.innerHTML = 'woooiiiii'; - -console.log(inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }])); diff --git a/node_modules/es-abstract/node_modules/object-inspect/index.js b/node_modules/es-abstract/node_modules/object-inspect/index.js deleted file mode 100644 index 1394e53..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/index.js +++ /dev/null @@ -1,307 +0,0 @@ -var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var match = String.prototype.match; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; - -var inspectCustom = require('./util.inspect').custom; -var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null; - -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - - if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - - if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; - } - - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; - } - return String(obj); - } - if (typeof obj === 'bigint') { // eslint-disable-line valid-typeof - return String(obj) + 'n'; - } - - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return '[Object]'; - } - - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } - - function inspect(value, from) { - if (from) { - seen = seen.slice(); - seen.push(from); - } - return inspect_(value, opts, depth + 1, seen); - } - - if (typeof obj === 'function') { - var name = nameOf(obj); - return '[Function' + (name ? ': ' + name : '') + ']'; - } - if (isSymbol(obj)) { - var symString = Symbol.prototype.toString.call(obj); - return typeof obj === 'object' ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + String(obj.nodeName).toLowerCase(); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; - return s; - } - if (isArray(obj)) { - if (obj.length === 0) { return '[]'; } - return '[ ' + arrObjKeys(obj, inspect).join(', ') + ' ]'; - } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }'; - } - if (typeof obj === 'object') { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { - return obj[inspectSymbol](); - } else if (typeof obj.inspect === 'function') { - return obj.inspect(); - } - } - if (isMap(obj)) { - var mapParts = []; - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj) + ' => ' + inspect(value, obj)); - }); - return collectionOf('Map', mapSize.call(obj), mapParts); - } - if (isSet(obj)) { - var setParts = []; - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - return collectionOf('Set', setSize.call(obj), setParts); - } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); - } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - if (!isDate(obj) && !isRegExp(obj)) { - var xs = arrObjKeys(obj, inspect); - if (xs.length === 0) { return '{}'; } - return '{ ' + xs.join(', ') + ' }'; - } - return String(obj); -}; - -function wrapQuotes(s, defaultStyle, opts) { - var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; - return quoteChar + s + quoteChar; -} - -function quote(s) { - return String(s).replace(/"/g, '"'); -} - -function isArray(obj) { return toStr(obj) === '[object Array]'; } -function isDate(obj) { return toStr(obj) === '[object Date]'; } -function isRegExp(obj) { return toStr(obj) === '[object RegExp]'; } -function isError(obj) { return toStr(obj) === '[object Error]'; } -function isSymbol(obj) { return toStr(obj) === '[object Symbol]'; } -function isString(obj) { return toStr(obj) === '[object String]'; } -function isNumber(obj) { return toStr(obj) === '[object Number]'; } -function isBigInt(obj) { return toStr(obj) === '[object BigInt]'; } -function isBoolean(obj) { return toStr(obj) === '[object Boolean]'; } - -var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; -function has(obj, key) { - return hasOwn.call(obj, key); -} - -function toStr(obj) { - return objectToString.call(obj); -} - -function nameOf(f) { - if (f.name) { return f.name; } - var m = match.call(f, /^function\s*([\w$]+)/); - if (m) { return m[1]; } - return null; -} - -function indexOf(xs, x) { - if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { return i; } - } - return -1; -} - -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; - } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; - } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; - } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; - } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; - } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; - } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isElement(x) { - if (!x || typeof x !== 'object') { return false; } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; - } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} - -function inspectString(str, opts) { - // eslint-disable-next-line no-control-regex - var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} - -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', 9: 't', 10: 'n', 12: 'f', 13: 'r' - }[n]; - if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16); -} - -function markBoxed(str) { - return 'Object(' + str + ')'; -} - -function weakCollectionOf(type) { - return type + ' { ? }'; -} - -function collectionOf(type, size, entries) { - return type + ' (' + size + ') {' + entries.join(', ') + '}'; -} - -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; - } - } - for (var key in obj) { // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if ((/[^\w$]/).test(key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); - } - } - return xs; -} diff --git a/node_modules/es-abstract/node_modules/object-inspect/package.json b/node_modules/es-abstract/node_modules/object-inspect/package.json deleted file mode 100644 index 2783d07..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_from": "object-inspect@^1.7.0", - "_id": "object-inspect@1.7.0", - "_inBundle": false, - "_integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "_location": "/es-abstract/object-inspect", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "object-inspect@^1.7.0", - "name": "object-inspect", - "escapedName": "object-inspect", - "rawSpec": "^1.7.0", - "saveSpec": null, - "fetchSpec": "^1.7.0" - }, - "_requiredBy": [ - "/es-abstract" - ], - "_resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "_shasum": "f4f6bd181ad77f006b5ece60bd0b6f398ff74a67", - "_spec": "object-inspect@^1.7.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/es-abstract", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "browser": { - "./util.inspect.js": false - }, - "bugs": { - "url": "https://github.com/substack/object-inspect/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "string representations of objects in node and the browser", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.1", - "core-js": "^2.6.10", - "eslint": "^6.6.0", - "nyc": "^10.3.2", - "tape": "^4.11.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "greenkeeper": { - "ignore": [ - "nyc", - "core-js" - ] - }, - "homepage": "https://github.com/substack/object-inspect", - "keywords": [ - "inspect", - "util.inspect", - "object", - "stringify", - "pretty" - ], - "license": "MIT", - "main": "index.js", - "name": "object-inspect", - "repository": { - "type": "git", - "url": "git://github.com/substack/object-inspect.git" - }, - "scripts": { - "coverage": "nyc npm run tests-only", - "lint": "eslint .", - "posttest": "npx aud --production", - "pretest": "npm run lint", - "pretests-only": "node test-core-js", - "test": "npm run tests-only", - "tests-only": "tape test/*.js" - }, - "testling": { - "files": [ - "test/*.js", - "test/browser/*.js" - ], - "browsers": [ - "ie/6..latest", - "chrome/latest", - "firefox/latest", - "safari/latest", - "opera/latest", - "iphone/latest", - "ipad/latest", - "android/latest" - ] - }, - "version": "1.7.0" -} diff --git a/node_modules/es-abstract/node_modules/object-inspect/readme.markdown b/node_modules/es-abstract/node_modules/object-inspect/readme.markdown deleted file mode 100644 index 744eeb5..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/readme.markdown +++ /dev/null @@ -1,61 +0,0 @@ -# object-inspect - -string representations of objects in node and the browser - -[![testling badge](https://ci.testling.com/substack/object-inspect.png)](https://ci.testling.com/substack/object-inspect) - -[![build status](https://secure.travis-ci.org/substack/object-inspect.png)](http://travis-ci.org/substack/object-inspect) - -# example - -## circular - -``` js -var inspect = require('object-inspect'); -var obj = { a: 1, b: [3,4] }; -obj.c = obj; -console.log(inspect(obj)); -``` - -## dom element - -``` js -var inspect = require('object-inspect'); - -var d = document.createElement('div'); -d.setAttribute('id', 'beep'); -d.innerHTML = 'woooiiiii'; - -console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); -``` - -output: - -``` -[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] -``` - -# methods - -``` js -var inspect = require('object-inspect') -``` - -## var s = inspect(obj, opts={}) - -Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`. - -Additional options: - - `quoteStyle`: must be "single" or "double", if present - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install object-inspect -``` - -# license - -MIT diff --git a/node_modules/es-abstract/node_modules/object-inspect/test-core-js.js b/node_modules/es-abstract/node_modules/object-inspect/test-core-js.js deleted file mode 100644 index 12c4e2a..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test-core-js.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -require('core-js'); - -var inspect = require('./'); -var test = require('tape'); - -test('Maps', function (t) { - t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}'); - t.end(); -}); - -test('Sets', function (t) { - t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}'); - t.end(); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/bigint.js b/node_modules/es-abstract/node_modules/object-inspect/test/bigint.js deleted file mode 100644 index 3259143..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/bigint.js +++ /dev/null @@ -1,31 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { - t.test('primitives', function (st) { - st.plan(3); - - st.equal(inspect(BigInt(-256)), '-256n'); - st.equal(inspect(BigInt(0)), '0n'); - st.equal(inspect(BigInt(256)), '256n'); - }); - - t.test('objects', function (st) { - st.plan(3); - - st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)'); - st.equal(inspect(Object(BigInt(0))), 'Object(0n)'); - st.equal(inspect(Object(BigInt(256))), 'Object(256n)'); - }); - - t.test('syntactic primitives', function (st) { - st.plan(3); - - /* eslint-disable no-new-func */ - st.equal(inspect(Function('return -256n')()), '-256n'); - st.equal(inspect(Function('return 0n')()), '0n'); - st.equal(inspect(Function('return 256n')()), '256n'); - }); - - t.end(); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/browser/dom.js b/node_modules/es-abstract/node_modules/object-inspect/test/browser/dom.js deleted file mode 100644 index 210c0b2..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/browser/dom.js +++ /dev/null @@ -1,15 +0,0 @@ -var inspect = require('../../'); -var test = require('tape'); - -test('dom element', function (t) { - t.plan(1); - - var d = document.createElement('div'); - d.setAttribute('id', 'beep'); - d.innerHTML = 'woooiiiii'; - - t.equal( - inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]), - '[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]' - ); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/circular.js b/node_modules/es-abstract/node_modules/object-inspect/test/circular.js deleted file mode 100644 index e864cfe..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/circular.js +++ /dev/null @@ -1,9 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('circular', function (t) { - t.plan(1); - var obj = { a: 1, b: [3, 4] }; - obj.c = obj; - t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/deep.js b/node_modules/es-abstract/node_modules/object-inspect/test/deep.js deleted file mode 100644 index 5c443f2..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/deep.js +++ /dev/null @@ -1,9 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('deep', function (t) { - t.plan(2); - var obj = [[[[[[500]]]]]]; - t.equal(inspect(obj), '[ [ [ [ [ [Object] ] ] ] ] ]'); - t.equal(inspect(obj, { depth: 2 }), '[ [ [Object] ] ]'); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/element.js b/node_modules/es-abstract/node_modules/object-inspect/test/element.js deleted file mode 100644 index 47fa9e2..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/element.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('element', function (t) { - t.plan(3); - var elem = { - nodeName: 'div', - attributes: [{ name: 'class', value: 'row' }], - getAttribute: function (key) { return key; }, - childNodes: [] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); - t.deepEqual(inspect(obj, { quoteStyle: 'single' }), "[ 1,
, 3 ]"); - t.deepEqual(inspect(obj, { quoteStyle: 'double' }), '[ 1,
, 3 ]'); -}); - -test('element no attr', function (t) { - t.plan(1); - var elem = { - nodeName: 'div', - getAttribute: function (key) { return key; }, - childNodes: [] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); -}); - -test('element with contents', function (t) { - t.plan(1); - var elem = { - nodeName: 'div', - getAttribute: function (key) { return key; }, - childNodes: [{ nodeName: 'b' }] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
...
, 3 ]'); -}); - -test('element instance', function (t) { - t.plan(1); - var h = global.HTMLElement; - global.HTMLElement = function (name, attr) { - this.nodeName = name; - this.attributes = attr; - }; - global.HTMLElement.prototype.getAttribute = function () {}; - - var elem = new global.HTMLElement('div', []); - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); - global.HTMLElement = h; -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/err.js b/node_modules/es-abstract/node_modules/object-inspect/test/err.js deleted file mode 100644 index db96338..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/err.js +++ /dev/null @@ -1,31 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('type error', function (t) { - t.plan(1); - var aerr = new TypeError(); - aerr.foo = 555; - aerr.bar = [1, 2, 3]; - - var berr = new TypeError('tuv'); - berr.baz = 555; - - var cerr = new SyntaxError(); - cerr.message = 'whoa'; - cerr['a-b'] = 5; - - var obj = [ - new TypeError(), - new TypeError('xxx'), - aerr, - berr, - cerr - ]; - t.equal(inspect(obj), '[ ' + [ - '[TypeError]', - '[TypeError: xxx]', - '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', - '{ [TypeError: tuv] baz: 555 }', - '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }' - ].join(', ') + ' ]'); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/fn.js b/node_modules/es-abstract/node_modules/object-inspect/test/fn.js deleted file mode 100644 index fd644be..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/fn.js +++ /dev/null @@ -1,28 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('function', function (t) { - t.plan(1); - var obj = [1, 2, function f(n) { return n; }, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); -}); - -test('function name', function (t) { - t.plan(1); - var f = (function () { - return function () {}; - }()); - f.toString = function () { return 'function xxx () {}'; }; - var obj = [1, 2, f, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function: xxx], 4 ]'); -}); - -test('anon function', function (t) { - var f = (function () { - return function () {}; - }()); - var obj = [1, 2, f, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function], 4 ]'); - - t.end(); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/has.js b/node_modules/es-abstract/node_modules/object-inspect/test/has.js deleted file mode 100644 index 026d6d5..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/has.js +++ /dev/null @@ -1,34 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -function withoutProperty(object, property, fn) { - var original; - if (Object.getOwnPropertyDescriptor) { - original = Object.getOwnPropertyDescriptor(object, property); - } else { - original = object[property]; - } - delete object[property]; - try { - fn(); - } finally { - if (Object.getOwnPropertyDescriptor) { - Object.defineProperty(object, property, original); - } else { - object[property] = original; - } - } -} - -test('when Object#hasOwnProperty is deleted', function (t) { - t.plan(1); - var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays - - // eslint-disable-next-line no-extend-native - Array.prototype[1] = 2; // this is needed to account for "in" vs "hasOwnProperty" - - withoutProperty(Object.prototype, 'hasOwnProperty', function () { - t.equal(inspect(arr), '[ 1, , 3 ]'); - }); - delete Array.prototype[1]; -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/holes.js b/node_modules/es-abstract/node_modules/object-inspect/test/holes.js deleted file mode 100644 index 87fc8c8..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/holes.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var xs = ['a', 'b']; -xs[5] = 'f'; -xs[7] = 'j'; -xs[8] = 'k'; - -test('holes', function (t) { - t.plan(1); - t.equal( - inspect(xs), - "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" - ); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/inspect.js b/node_modules/es-abstract/node_modules/object-inspect/test/inspect.js deleted file mode 100644 index 4f202c2..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/inspect.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var hasSymbols = require('has-symbols')(); -var utilInspect = require('../util.inspect'); - -var inspect = require('..'); - -test('inspect', function (t) { - t.plan(1); - var obj = [{ inspect: function () { return '!XYZ¡'; } }, []]; - t.equal(inspect(obj), '[ !XYZ¡, [] ]'); -}); - -test('inspect custom symbol', { skip: !hasSymbols || !utilInspect }, function (t) { - t.plan(1); - - var obj = { inspect: function () { return 'string'; } }; - obj[utilInspect.custom] = function () { return 'symbol'; }; - - t.equal(inspect([obj, []]), '[ ' + (utilInspect.custom ? 'symbol' : 'string') + ', [] ]'); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/lowbyte.js b/node_modules/es-abstract/node_modules/object-inspect/test/lowbyte.js deleted file mode 100644 index d234242..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/lowbyte.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var obj = { x: 'a\r\nb', y: '\x05! \x1f \x12' }; - -test('interpolate low bytes', function (t) { - t.plan(1); - t.equal( - inspect(obj), - "{ x: 'a\\r\\nb', y: '\\x05! \\x1f \\x12' }" - ); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/number.js b/node_modules/es-abstract/node_modules/object-inspect/test/number.js deleted file mode 100644 index 448304e..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/number.js +++ /dev/null @@ -1,12 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('negative zero', function (t) { - t.equal(inspect(0), '0', 'inspect(0) === "0"'); - t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"'); - - t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"'); - t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"'); - - t.end(); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/quoteStyle.js b/node_modules/es-abstract/node_modules/object-inspect/test/quoteStyle.js deleted file mode 100644 index ae4d734..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/quoteStyle.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); - -test('quoteStyle option', function (t) { - t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); - - t.end(); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/undef.js b/node_modules/es-abstract/node_modules/object-inspect/test/undef.js deleted file mode 100644 index e3f4961..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/undef.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null }; - -test('undef and null', function (t) { - t.plan(1); - t.equal( - inspect(obj), - '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' - ); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/test/values.js b/node_modules/es-abstract/node_modules/object-inspect/test/values.js deleted file mode 100644 index 20709d5..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/test/values.js +++ /dev/null @@ -1,156 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('values', function (t) { - t.plan(1); - var obj = [{}, [], { 'a-b': 5 }]; - t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]'); -}); - -test('arrays with properties', function (t) { - t.plan(1); - var arr = [3]; - arr.foo = 'bar'; - var obj = [1, 2, arr]; - obj.baz = 'quux'; - obj.index = -1; - t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]'); -}); - -test('has', function (t) { - t.plan(1); - var has = Object.prototype.hasOwnProperty; - delete Object.prototype.hasOwnProperty; - t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); - Object.prototype.hasOwnProperty = has; // eslint-disable-line no-extend-native -}); - -test('indexOf seen', function (t) { - t.plan(1); - var xs = [1, 2, 3, {}]; - xs.push(xs); - - var seen = []; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[ 1, 2, 3, {}, [Circular] ]' - ); -}); - -test('seen seen', function (t) { - t.plan(1); - var xs = [1, 2, 3]; - - var seen = [xs]; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[Circular]' - ); -}); - -test('seen seen seen', function (t) { - t.plan(1); - var xs = [1, 2, 3]; - - var seen = [5, xs]; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[Circular]' - ); -}); - -test('symbols', { skip: typeof Symbol !== 'function' }, function (t) { - var sym = Symbol('foo'); - t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"'); - t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); - t.end(); -}); - -test('Map', { skip: typeof Map !== 'function' }, function (t) { - var map = new Map(); - map.set({ a: 1 }, ['b']); - map.set(3, NaN); - var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}'; - t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents'); - t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty'); - - var nestedMap = new Map(); - nestedMap.set(nestedMap, map); - t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work'); - - t.end(); -}); - -test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) { - var map = new WeakMap(); - map.set({ a: 1 }, ['b']); - var expectedString = 'WeakMap { ? }'; - t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents'); - t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty'); - - t.end(); -}); - -test('Set', { skip: typeof Set !== 'function' }, function (t) { - var set = new Set(); - set.add({ a: 1 }); - set.add(['b']); - var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}'; - t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents'); - t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty'); - - var nestedSet = new Set(); - nestedSet.add(set); - nestedSet.add(nestedSet); - t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work'); - - t.end(); -}); - -test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) { - var map = new WeakSet(); - map.add({ a: 1 }); - var expectedString = 'WeakSet { ? }'; - t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents'); - t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty'); - - t.end(); -}); - -test('Strings', function (t) { - var str = 'abc'; - - t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such'); - t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted'); - t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted'); - t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such'); - t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted'); - t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted'); - - t.end(); -}); - -test('Numbers', function (t) { - var num = 42; - - t.equal(inspect(num), String(num), 'primitive number shows as such'); - t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such'); - - t.end(); -}); - -test('Booleans', function (t) { - t.equal(inspect(true), String(true), 'primitive true shows as such'); - t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such'); - - t.equal(inspect(false), String(false), 'primitive false shows as such'); - t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such'); - - t.end(); -}); diff --git a/node_modules/es-abstract/node_modules/object-inspect/util.inspect.js b/node_modules/es-abstract/node_modules/object-inspect/util.inspect.js deleted file mode 100644 index 7784fab..0000000 --- a/node_modules/es-abstract/node_modules/object-inspect/util.inspect.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inspect; diff --git a/node_modules/es-abstract/operations/.eslintrc b/node_modules/es-abstract/operations/.eslintrc deleted file mode 100644 index bcd76f7..0000000 --- a/node_modules/es-abstract/operations/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "id-length": 0, - }, -} diff --git a/node_modules/es-abstract/operations/2015.js b/node_modules/es-abstract/operations/2015.js deleted file mode 100644 index 3f6c358..0000000 --- a/node_modules/es-abstract/operations/2015.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -module.exports = { - IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/6.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/6.0/#sec-abstract-relational-comparison', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/6.0/#sec-strict-equality-comparison', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex', - ArrayCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/6.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate', - Call: 'https://ecma-international.org/ecma-262/6.0/#sec-call', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor', - Construct: 'https://ecma-international.org/ecma-262/6.0/#sec-construct', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/6.0/#sec-createarrayfromlist', - CreateDataProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow', - CreateHTML: 'https://ecma-international.org/ecma-262/6.0/#sec-createhtml', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistiterator', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createmethodproperty', - DateFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-date-number', - Day: 'https://ecma-international.org/ecma-262/6.0/#sec-day-number-and-time-within-day', - DayFromYear: 'https://ecma-international.org/ecma-262/6.0/#sec-year-number', - DaysInYear: 'https://ecma-international.org/ecma-262/6.0/#sec-year-number', - DayWithinYear: 'https://ecma-international.org/ecma-262/6.0/#sec-month-number', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow', - EnumerableOwnNames: 'https://ecma-international.org/ecma-262/6.0/#sec-enumerableownnames', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor', - Get: 'https://ecma-international.org/ecma-262/6.0/#sec-get-o-p', - GetIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/6.0/#sec-getmethod', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/6.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-getprototypefromconstructor', - GetSubstitution: 'https://ecma-international.org/ecma-262/6.0/#sec-getsubstitution', - GetV: 'https://ecma-international.org/ecma-262/6.0/#sec-getv', - HasOwnProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty', - HasProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasproperty', - HourFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-hours-minutes-second-and-milliseconds', - InLeapYear: 'https://ecma-international.org/ecma-262/6.0/#sec-year-number', - InstanceofOperator: 'https://ecma-international.org/ecma-262/6.0/#sec-instanceofoperator', - Invoke: 'https://ecma-international.org/ecma-262/6.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor', - IsArray: 'https://ecma-international.org/ecma-262/6.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/6.0/#sec-iscallable', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor', - IsExtensible: 'https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isgenericdescriptor', - IsInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-isinteger', - IsPromise: 'https://ecma-international.org/ecma-262/6.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey', - IsRegExp: 'https://ecma-international.org/ecma-262/6.0/#sec-isregexp', - IteratorClose: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue', - MakeDate: 'https://ecma-international.org/ecma-262/6.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/6.0/#sec-makeday', - MakeTime: 'https://ecma-international.org/ecma-262/6.0/#sec-maketime', - MinFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-hours-minutes-second-and-milliseconds', - modulo: 'https://ecma-international.org/ecma-262/6.0/#sec-algorithm-conventions', - MonthFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-month-number', - msFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-hours-minutes-second-and-milliseconds', - NormalCompletion: 'https://ecma-international.org/ecma-262/6.0/#sec-normalcompletion', - ObjectCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-objectcreate', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinarydefineownproperty', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasproperty', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpbuiltinexec', - RegExpExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpexec', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible', - SameValue: 'https://ecma-international.org/ecma-262/6.0/#sec-samevalue', - SameValueZero: 'https://ecma-international.org/ecma-262/6.0/#sec-samevaluezero', - SecFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-hours-minutes-second-and-milliseconds', - Set: 'https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw', - SetFunctionName: 'https://ecma-international.org/ecma-262/6.0/#sec-setfunctionname', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-setintegritylevel', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/6.0/#sec-symboldescriptivestring', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object', - thisNumberValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object', - thisStringValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object', - thisTimeValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object', - TimeClip: 'https://ecma-international.org/ecma-262/6.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/6.0/#sec-year-number', - TimeWithinDay: 'https://ecma-international.org/ecma-262/6.0/#sec-day-number-and-time-within-day', - ToBoolean: 'https://ecma-international.org/ecma-262/6.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/6.0/#sec-todatestring', - ToInt16: 'https://ecma-international.org/ecma-262/6.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/6.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/6.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/6.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/6.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/6.0/#sec-toobject', - ToPrimitive: 'https://ecma-international.org/ecma-262/6.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/6.0/#sec-tostring', - ToUint16: 'https://ecma-international.org/ecma-262/6.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/6.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8clamp', - Type: 'https://ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-validateandapplypropertydescriptor', - WeekDay: 'https://ecma-international.org/ecma-262/6.0/#sec-week-day', - YearFromTime: 'https://ecma-international.org/ecma-262/6.0/#sec-year-number' -}; diff --git a/node_modules/es-abstract/operations/2016.js b/node_modules/es-abstract/operations/2016.js deleted file mode 100644 index 6a58b9c..0000000 --- a/node_modules/es-abstract/operations/2016.js +++ /dev/null @@ -1,276 +0,0 @@ -'use strict'; - -module.exports = { - IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - - abs: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/7.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/7.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/7.0/#sec-addrestrictedfunctionproperties', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/7.0/#sec-advancestringindex', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-allocatearraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/7.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/7.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-arrayspeciescreate', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/7.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/7.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/7.0/#sec-completion-record-specification-type', - Construct: 'https://ecma-international.org/ecma-262/7.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/7.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/7.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/7.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/7.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/7.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/7.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/7.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistiterator', - CreateMapIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/7.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/7.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createsetiterator', - CreateStringIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-date-number', - Day: 'https://ecma-international.org/ecma-262/7.0/#sec-day-number-and-time-within-day', - DayFromYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - DaysInYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - DayWithinYear: 'https://ecma-international.org/ecma-262/7.0/#sec-month-number', - Decode: 'https://ecma-international.org/ecma-262/7.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/7.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/7.0/#sec-enqueuejob', - EnumerableOwnNames: 'https://ecma-international.org/ecma-262/7.0/#sec-enumerableownnames', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/7.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/7.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/7.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://ecma-international.org/ecma-262/7.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://ecma-international.org/ecma-262/7.0/#sec-evaluatenew', - floor: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/7.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/7.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/7.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/7.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/7.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/7.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/7.0/#sec-getactivescriptormodule', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/7.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://ecma-international.org/ecma-262/7.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/7.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/7.0/#sec-getmethod', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/7.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/7.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/7.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-getprototypefromconstructor', - GetSubstitution: 'https://ecma-international.org/ecma-262/7.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/7.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/7.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/7.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/7.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/7.0/#sec-getviewvalue', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/7.0/#sec-globaldeclarationinstantiation', - HasOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasownproperty', - HasProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasproperty', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/7.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/7.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/7.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/7.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/7.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/7.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/7.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - InstanceofOperator: 'https://ecma-international.org/ecma-262/7.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/7.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/7.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/7.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/7.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/7.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/7.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/7.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/7.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/7.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/7.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-ispropertykey', - IsRegExp: 'https://ecma-international.org/ecma-262/7.0/#sec-isregexp', - IsWordChar: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToArrayLike: 'https://ecma-international.org/ecma-262/7.0/#sec-iterabletoarraylike', - IteratorClose: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorvalue', - LocalTime: 'https://ecma-international.org/ecma-262/7.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/7.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/7.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/7.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/7.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/7.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/7.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/7.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/7.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - min: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - MinFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/7.0/#sec-algorithm-conventions', - MonthFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-month-number', - msFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/7.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/7.0/#sec-newpromisecapability', - NextJob: 'https://ecma-international.org/ecma-262/7.0/#sec-nextjob-result', - NormalCompletion: 'https://ecma-international.org/ecma-262/7.0/#sec-normalcompletion', - ObjectCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/7.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinarysetprototypeof', - ParseModule: 'https://ecma-international.org/ecma-262/7.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/7.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/7.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/7.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/7.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/7.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/7.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/7.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/7.0/#sec-promisereactionjob', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/7.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/7.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/7.0/#sec-quotejsonstring', - RegExpAlloc: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-rejectpromise', - RepeatMatcher: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/7.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/7.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/7.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/7.0/#sec-returnifabrupt', - SameValue: 'https://ecma-international.org/ecma-262/7.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/7.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/7.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-hours-minutes-second-and-milliseconds', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/7.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/7.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/7.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/7.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://ecma-international.org/ecma-262/7.0/#sec-setfunctionname', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/7.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/7.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/7.0/#sec-setviewvalue', - SortCompare: 'https://ecma-international.org/ecma-262/7.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/7.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/7.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-stringcreate', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/7.0/#sec-symboldescriptivestring', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/7.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-number-prototype-object', - thisStringValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-string-prototype-object', - thisTimeValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-date-prototype-object', - TimeClip: 'https://ecma-international.org/ecma-262/7.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number', - TimeWithinDay: 'https://ecma-international.org/ecma-262/7.0/#sec-day-number-and-time-within-day', - ToBoolean: 'https://ecma-international.org/ecma-262/7.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/7.0/#sec-todatestring', - ToInt16: 'https://ecma-international.org/ecma-262/7.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/7.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/7.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/7.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/7.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/7.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/7.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/7.0/#sec-tostring', - 'ToString Applied to the Number Type': 'https://ecma-international.org/ecma-262/7.0/#sec-tostring-applied-to-the-number-type', - ToUint16: 'https://ecma-international.org/ecma-262/7.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/7.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/7.0/#sec-triggerpromisereactions', - Type: 'https://ecma-international.org/ecma-262/7.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/7.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/7.0/#typedarray-species-create', - UpdateEmpty: 'https://ecma-international.org/ecma-262/7.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/7.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/7.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/7.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-validateandapplypropertydescriptor', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/7.0/#sec-validatetypedarray', - WeekDay: 'https://ecma-international.org/ecma-262/7.0/#sec-week-day', - YearFromTime: 'https://ecma-international.org/ecma-262/7.0/#sec-year-number' -}; diff --git a/node_modules/es-abstract/operations/2017.js b/node_modules/es-abstract/operations/2017.js deleted file mode 100644 index 896fcee..0000000 --- a/node_modules/es-abstract/operations/2017.js +++ /dev/null @@ -1,324 +0,0 @@ -'use strict'; - -module.exports = { - IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - - abs: 'https://ecma-international.org/ecma-262/8.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/8.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/8.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://ecma-international.org/ecma-262/8.0/#sec-addwaiter', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-advancestringindex', - 'agent-order': 'https://ecma-international.org/ecma-262/8.0/#sec-agent-order', - AgentCanSuspend: 'https://ecma-international.org/ecma-262/8.0/#sec-agentcansuspend', - AgentSignifier: 'https://ecma-international.org/ecma-262/8.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/8.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-arrayspeciescreate', - AsyncFunctionAwait: 'https://ecma-international.org/ecma-262/8.0/#sec-async-functions-abstract-operations-async-function-await', - AsyncFunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://ecma-international.org/ecma-262/8.0/#sec-async-functions-abstract-operations-async-function-start', - AtomicLoad: 'https://ecma-international.org/ecma-262/8.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://ecma-international.org/ecma-262/8.0/#sec-atomicreadmodifywrite', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/8.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/8.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/8.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://ecma-international.org/ecma-262/8.0/#sec-composewriteeventbytes', - Construct: 'https://ecma-international.org/ecma-262/8.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/8.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/8.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/8.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/8.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/8.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/8.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/8.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistiterator', - CreateMapIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/8.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/8.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://ecma-international.org/ecma-262/8.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/8.0/#sec-date-number', - Day: 'https://ecma-international.org/ecma-262/8.0/#eqn-Day', - DayFromYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-DaysFromYear', - DaysInYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-DaysInYear', - DayWithinYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-DayWithinYear', - Decode: 'https://ecma-international.org/ecma-262/8.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/8.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/8.0/#sec-enqueuejob', - EnterCriticalSection: 'https://ecma-international.org/ecma-262/8.0/#sec-entercriticalsection', - EnumerableOwnProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-enumerableownproperties', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/8.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/8.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://ecma-international.org/ecma-262/8.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://ecma-international.org/ecma-262/8.0/#sec-evaluatenew', - EventSet: 'https://ecma-international.org/ecma-262/8.0/#sec-event-set', - floor: 'https://ecma-international.org/ecma-262/8.0/#eqn-floor', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/8.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/8.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/8.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/8.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/8.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/8.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/8.0/#sec-getactivescriptormodule', - GetBase: 'https://ecma-international.org/ecma-262/8.0/#ao-getbase', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/8.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://ecma-international.org/ecma-262/8.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/8.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/8.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/8.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/8.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/8.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://ecma-international.org/ecma-262/8.0/#ao-getreferencedname', - GetSubstitution: 'https://ecma-international.org/ecma-262/8.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/8.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/8.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/8.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/8.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/8.0/#sec-getviewvalue', - GetWaiterList: 'https://ecma-international.org/ecma-262/8.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/8.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://ecma-international.org/ecma-262/8.0/#sec-happens-before', - HasOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://ecma-international.org/ecma-262/8.0/#ao-hasprimitivebase', - HasProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://ecma-international.org/ecma-262/8.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://ecma-international.org/ecma-262/8.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://ecma-international.org/ecma-262/8.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/8.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/8.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/8.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/8.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/8.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/8.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/8.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-InLeapYear', - InstanceofOperator: 'https://ecma-international.org/ecma-262/8.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/8.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/8.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/8.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/8.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/8.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/8.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/8.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/8.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/8.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/8.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-ispropertykey', - IsPropertyReference: 'https://ecma-international.org/ecma-262/8.0/#ao-ispropertyreference', - IsRegExp: 'https://ecma-international.org/ecma-262/8.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://ecma-international.org/ecma-262/8.0/#ao-isstrictreference', - IsSuperReference: 'https://ecma-international.org/ecma-262/8.0/#ao-issuperreference', - IsUnresolvableReference: 'https://ecma-international.org/ecma-262/8.0/#ao-isunresolvablereference', - IsWordChar: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://ecma-international.org/ecma-262/8.0/#sec-iterabletolist', - IteratorClose: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://ecma-international.org/ecma-262/8.0/#sec-leavecriticalsection', - LocalTime: 'https://ecma-international.org/ecma-262/8.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/8.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/8.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/8.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/8.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/8.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/8.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/8.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/8.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/8.0/#eqn-max', - 'memory-order': 'https://ecma-international.org/ecma-262/8.0/#sec-memory-order', - min: 'https://ecma-international.org/ecma-262/8.0/#eqn-min', - MinFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-MinFromTime', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/8.0/#eqn-modulo', - MonthFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-MonthFromTime', - msFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/8.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/8.0/#sec-newpromisecapability', - NormalCompletion: 'https://ecma-international.org/ecma-262/8.0/#sec-normalcompletion', - NumberToRawBytes: 'https://ecma-international.org/ecma-262/8.0/#sec-numbertorawbytes', - ObjectCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarysetprototypeof', - OrdinaryToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinarytoprimitive', - ParseModule: 'https://ecma-international.org/ecma-262/8.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/8.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/8.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/8.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/8.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/8.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/8.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/8.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/8.0/#sec-promisereactionjob', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/8.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/8.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/8.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://ecma-international.org/ecma-262/8.0/#sec-reads-bytes-from', - 'reads-from': 'https://ecma-international.org/ecma-262/8.0/#sec-reads-from', - RegExpAlloc: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-rejectpromise', - RemoveWaiter: 'https://ecma-international.org/ecma-262/8.0/#sec-removewaiter', - RemoveWaiters: 'https://ecma-international.org/ecma-262/8.0/#sec-removewaiters', - RepeatMatcher: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/8.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/8.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/8.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/8.0/#sec-returnifabrupt', - RunJobs: 'https://ecma-international.org/ecma-262/8.0/#sec-runjobs', - SameValue: 'https://ecma-international.org/ecma-262/8.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/8.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/8.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/8.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/8.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/8.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://ecma-international.org/ecma-262/8.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://ecma-international.org/ecma-262/8.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/8.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/8.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://ecma-international.org/ecma-262/8.0/#sec-sharedatablockeventset', - SortCompare: 'https://ecma-international.org/ecma-262/8.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/8.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/8.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-stringcreate', - StringGetOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-stringgetownproperty', - Suspend: 'https://ecma-international.org/ecma-262/8.0/#sec-suspend', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/8.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://ecma-international.org/ecma-262/8.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thisnumbervalue', - thisStringValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thisstringvalue', - thisTimeValue: 'https://ecma-international.org/ecma-262/8.0/#sec-thistimevalue', - TimeClip: 'https://ecma-international.org/ecma-262/8.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/8.0/#eqn-TimeFromYear', - TimeWithinDay: 'https://ecma-international.org/ecma-262/8.0/#eqn-TimeWithinDay', - ToBoolean: 'https://ecma-international.org/ecma-262/8.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/8.0/#sec-todatestring', - ToIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-toindex', - ToInt16: 'https://ecma-international.org/ecma-262/8.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/8.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/8.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/8.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/8.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/8.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/8.0/#sec-tostring', - 'ToString Applied to the Number Type': 'https://ecma-international.org/ecma-262/8.0/#sec-tostring-applied-to-the-number-type', - ToUint16: 'https://ecma-international.org/ecma-262/8.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/8.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/8.0/#sec-triggerpromisereactions', - Type: 'https://ecma-international.org/ecma-262/8.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/8.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/8.0/#typedarray-species-create', - UpdateEmpty: 'https://ecma-international.org/ecma-262/8.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/8.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/8.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/8.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://ecma-international.org/ecma-262/8.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://ecma-international.org/ecma-262/8.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/8.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://ecma-international.org/ecma-262/8.0/#sec-valueofreadevent', - WakeWaiter: 'https://ecma-international.org/ecma-262/8.0/#sec-wakewaiter', - WeekDay: 'https://ecma-international.org/ecma-262/8.0/#sec-week-day', - WordCharacters: 'https://ecma-international.org/ecma-262/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://ecma-international.org/ecma-262/8.0/#eqn-YearFromTime' -}; diff --git a/node_modules/es-abstract/operations/2018.js b/node_modules/es-abstract/operations/2018.js deleted file mode 100644 index c93b561..0000000 --- a/node_modules/es-abstract/operations/2018.js +++ /dev/null @@ -1,350 +0,0 @@ -'use strict'; - -module.exports = { - abs: 'https://ecma-international.org/ecma-262/9.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/9.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/9.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://ecma-international.org/ecma-262/9.0/#sec-addwaiter', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/9.0/#sec-advancestringindex', - 'agent-order': 'https://ecma-international.org/ecma-262/9.0/#sec-agent-order', - AgentCanSuspend: 'https://ecma-international.org/ecma-262/9.0/#sec-agentcansuspend', - AgentSignifier: 'https://ecma-international.org/ecma-262/9.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/9.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-arrayspeciescreate', - AsyncFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://ecma-international.org/ecma-262/9.0/#sec-async-functions-abstract-operations-async-function-start', - AsyncGeneratorEnqueue: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorenqueue', - AsyncGeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorfunctioncreate', - AsyncGeneratorReject: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorreject', - AsyncGeneratorResolve: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorresolve', - AsyncGeneratorResumeNext: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorresumenext', - AsyncGeneratorStart: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratorstart', - AsyncGeneratorYield: 'https://ecma-international.org/ecma-262/9.0/#sec-asyncgeneratoryield', - AsyncIteratorClose: 'https://ecma-international.org/ecma-262/9.0/#sec-asynciteratorclose', - AtomicLoad: 'https://ecma-international.org/ecma-262/9.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://ecma-international.org/ecma-262/9.0/#sec-atomicreadmodifywrite', - Await: 'https://ecma-international.org/ecma-262/9.0/#await', - BackreferenceMatcher: 'https://ecma-international.org/ecma-262/9.0/#sec-backreference-matcher', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/9.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/9.0/#sec-canonicalnumericindexstring', - CaseClauseIsSelected: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-caseclauseisselected', - CharacterRange: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/9.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://ecma-international.org/ecma-262/9.0/#sec-composewriteeventbytes', - Construct: 'https://ecma-international.org/ecma-262/9.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/9.0/#sec-copydatablockbytes', - CopyDataProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-copydataproperties', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/9.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createarrayiterator', - CreateAsyncFromSyncIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createasyncfromsynciterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/9.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/9.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/9.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/9.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/9.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/9.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/9.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/9.0/#sec-createlistfromarraylike', - CreateListIteratorRecord: 'https://ecma-international.org/ecma-262/9.0/#sec-createlistiteratorRecord', - CreateMapIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/9.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/9.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/9.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://ecma-international.org/ecma-262/9.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/9.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/9.0/#sec-date-number', - DateString: 'https://ecma-international.org/ecma-262/9.0/#sec-datestring', - Day: 'https://ecma-international.org/ecma-262/9.0/#eqn-Day', - DayFromYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-DaysFromYear', - DaysInYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-DaysInYear', - DayWithinYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-DayWithinYear', - Decode: 'https://ecma-international.org/ecma-262/9.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/9.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/9.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/9.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/9.0/#sec-enqueuejob', - EnterCriticalSection: 'https://ecma-international.org/ecma-262/9.0/#sec-entercriticalsection', - EnumerableOwnPropertyNames: 'https://ecma-international.org/ecma-262/9.0/#sec-enumerableownpropertynames', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/9.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/9.0/#sec-evaluatecall', - EvaluateNew: 'https://ecma-international.org/ecma-262/9.0/#sec-evaluatenew', - EventSet: 'https://ecma-international.org/ecma-262/9.0/#sec-event-set', - floor: 'https://ecma-international.org/ecma-262/9.0/#eqn-floor', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/9.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/9.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/9.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/9.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/9.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/9.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/9.0/#sec-getactivescriptormodule', - GetBase: 'https://ecma-international.org/ecma-262/9.0/#sec-getbase', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/9.0/#sec-getfunctionrealm', - GetGeneratorKind: 'https://ecma-international.org/ecma-262/9.0/#sec-getgeneratorkind', - GetGlobalObject: 'https://ecma-international.org/ecma-262/9.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/9.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/9.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/9.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/9.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/9.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/9.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://ecma-international.org/ecma-262/9.0/#sec-getreferencedname', - GetSubstitution: 'https://ecma-international.org/ecma-262/9.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/9.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/9.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/9.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/9.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/9.0/#sec-getviewvalue', - GetWaiterList: 'https://ecma-international.org/ecma-262/9.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://ecma-international.org/ecma-262/9.0/#sec-happens-before', - HasOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://ecma-international.org/ecma-262/9.0/#sec-hasprimitivebase', - HasProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://ecma-international.org/ecma-262/9.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://ecma-international.org/ecma-262/9.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://ecma-international.org/ecma-262/9.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/9.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/9.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/9.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/9.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/9.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/9.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/9.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-InLeapYear', - InnerModuleEvaluation: 'https://ecma-international.org/ecma-262/9.0/#sec-innermoduleevaluation', - InnerModuleInstantiation: 'https://ecma-international.org/ecma-262/9.0/#sec-innermoduleinstantiation', - InstanceofOperator: 'https://ecma-international.org/ecma-262/9.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/9.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/9.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/9.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/9.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/9.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/9.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/9.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/9.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/9.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/9.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/9.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/9.0/#sec-ispropertykey', - IsPropertyReference: 'https://ecma-international.org/ecma-262/9.0/#sec-ispropertyreference', - IsRegExp: 'https://ecma-international.org/ecma-262/9.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://ecma-international.org/ecma-262/9.0/#sec-isstrictreference', - IsStringPrefix: 'https://ecma-international.org/ecma-262/9.0/#sec-isstringprefix', - IsSuperReference: 'https://ecma-international.org/ecma-262/9.0/#sec-issuperreference', - IsUnresolvableReference: 'https://ecma-international.org/ecma-262/9.0/#sec-isunresolvablereference', - IsWordChar: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://ecma-international.org/ecma-262/9.0/#sec-iterabletolist', - IteratorClose: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/9.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://ecma-international.org/ecma-262/9.0/#sec-leavecriticalsection', - LocalTime: 'https://ecma-international.org/ecma-262/9.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/9.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/9.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/9.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/9.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/9.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/9.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/9.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/9.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/9.0/#eqn-max', - 'memory-order': 'https://ecma-international.org/ecma-262/9.0/#sec-memory-order', - min: 'https://ecma-international.org/ecma-262/9.0/#eqn-min', - MinFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-MinFromTime', - ModuleDeclarationEnvironmentSetup: 'https://ecma-international.org/ecma-262/9.0/#sec-moduledeclarationenvironmentsetup', - ModuleExecution: 'https://ecma-international.org/ecma-262/9.0/#sec-moduleexecution', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/9.0/#eqn-modulo', - MonthFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-MonthFromTime', - msFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/9.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/9.0/#sec-newpromisecapability', - NormalCompletion: 'https://ecma-international.org/ecma-262/9.0/#sec-normalcompletion', - NumberToRawBytes: 'https://ecma-international.org/ecma-262/9.0/#sec-numbertorawbytes', - NumberToString: 'https://ecma-international.org/ecma-262/9.0/#sec-tostring-applied-to-the-number-type', - ObjectCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/9.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarysetprototypeof', - OrdinarySetWithOwnDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarysetwithowndescriptor', - OrdinaryToPrimitive: 'https://ecma-international.org/ecma-262/9.0/#sec-ordinarytoprimitive', - ParseModule: 'https://ecma-international.org/ecma-262/9.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/9.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/9.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/9.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/9.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/9.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/9.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/9.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/9.0/#sec-promisereactionjob', - PromiseResolve: 'https://ecma-international.org/ecma-262/9.0/#sec-promise-resolve', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/9.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/9.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/9.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://ecma-international.org/ecma-262/9.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://ecma-international.org/ecma-262/9.0/#sec-reads-bytes-from', - 'reads-from': 'https://ecma-international.org/ecma-262/9.0/#sec-reads-from', - RegExpAlloc: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/9.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/9.0/#sec-rejectpromise', - RemoveWaiter: 'https://ecma-international.org/ecma-262/9.0/#sec-removewaiter', - RemoveWaiters: 'https://ecma-international.org/ecma-262/9.0/#sec-removewaiters', - RepeatMatcher: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/9.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/9.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/9.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/9.0/#sec-returnifabrupt', - RunJobs: 'https://ecma-international.org/ecma-262/9.0/#sec-runjobs', - SameValue: 'https://ecma-international.org/ecma-262/9.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/9.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/9.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/9.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/9.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/9.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/9.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/9.0/#sec-setdefaultglobalbindings', - SetFunctionLength: 'https://ecma-international.org/ecma-262/9.0/#sec-setfunctionlength', - SetFunctionName: 'https://ecma-international.org/ecma-262/9.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://ecma-international.org/ecma-262/9.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/9.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/9.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/9.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/9.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://ecma-international.org/ecma-262/9.0/#sec-sharedatablockeventset', - SortCompare: 'https://ecma-international.org/ecma-262/9.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/9.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/9.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/9.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/9.0/#sec-stringcreate', - StringGetOwnProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-stringgetownproperty', - Suspend: 'https://ecma-international.org/ecma-262/9.0/#sec-suspend', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/9.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://ecma-international.org/ecma-262/9.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/9.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thisnumbervalue', - thisStringValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thisstringvalue', - thisSymbolValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thissymbolvalue', - thisTimeValue: 'https://ecma-international.org/ecma-262/9.0/#sec-thistimevalue', - ThrowCompletion: 'https://ecma-international.org/ecma-262/9.0/#sec-throwcompletion', - TimeClip: 'https://ecma-international.org/ecma-262/9.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/9.0/#eqn-TimeFromYear', - TimeString: 'https://ecma-international.org/ecma-262/9.0/#sec-timestring', - TimeWithinDay: 'https://ecma-international.org/ecma-262/9.0/#eqn-TimeWithinDay', - TimeZoneString: 'https://ecma-international.org/ecma-262/9.0/#sec-timezoneestring', - ToBoolean: 'https://ecma-international.org/ecma-262/9.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/9.0/#sec-todatestring', - ToIndex: 'https://ecma-international.org/ecma-262/9.0/#sec-toindex', - ToInt16: 'https://ecma-international.org/ecma-262/9.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/9.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/9.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/9.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/9.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/9.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/9.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/9.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/9.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/9.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/9.0/#sec-tostring', - ToUint16: 'https://ecma-international.org/ecma-262/9.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/9.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/9.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/9.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/9.0/#sec-triggerpromisereactions', - Type: 'https://ecma-international.org/ecma-262/9.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/9.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/9.0/#typedarray-species-create', - UnicodeEscape: 'https://ecma-international.org/ecma-262/9.0/#sec-unicodeescape', - UnicodeMatchProperty: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-unicodematchproperty-p', - UnicodeMatchPropertyValue: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v', - UpdateEmpty: 'https://ecma-international.org/ecma-262/9.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/9.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/9.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/9.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/9.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://ecma-international.org/ecma-262/9.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://ecma-international.org/ecma-262/9.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/9.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://ecma-international.org/ecma-262/9.0/#sec-valueofreadevent', - WakeWaiter: 'https://ecma-international.org/ecma-262/9.0/#sec-wakewaiter', - WeekDay: 'https://ecma-international.org/ecma-262/9.0/#sec-week-day', - WordCharacters: 'https://ecma-international.org/ecma-262/9.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://ecma-international.org/ecma-262/9.0/#eqn-YearFromTime' -}; diff --git a/node_modules/es-abstract/operations/2019.js b/node_modules/es-abstract/operations/2019.js deleted file mode 100644 index 73f05e8..0000000 --- a/node_modules/es-abstract/operations/2019.js +++ /dev/null @@ -1,355 +0,0 @@ -'use strict'; - -module.exports = { - abs: 'https://ecma-international.org/ecma-262/10.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://ecma-international.org/ecma-262/10.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://ecma-international.org/ecma-262/10.0/#sec-abstract-relational-comparison', - AddEntriesFromIterable: 'https://ecma-international.org/ecma-262/10.0/#sec-add-entries-from-iterable', - AddRestrictedFunctionProperties: 'https://ecma-international.org/ecma-262/10.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://ecma-international.org/ecma-262/10.0/#sec-addwaiter', - AdvanceStringIndex: 'https://ecma-international.org/ecma-262/10.0/#sec-advancestringindex', - 'agent-order': 'https://ecma-international.org/ecma-262/10.0/#sec-agent-order', - AgentCanSuspend: 'https://ecma-international.org/ecma-262/10.0/#sec-agentcansuspend', - AgentSignifier: 'https://ecma-international.org/ecma-262/10.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://ecma-international.org/ecma-262/10.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-arraycreate', - ArraySetLength: 'https://ecma-international.org/ecma-262/10.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-arrayspeciescreate', - AsyncFromSyncIteratorContinuation: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncfromsynciteratorcontinuation', - AsyncFunctionCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://ecma-international.org/ecma-262/10.0/#sec-async-functions-abstract-operations-async-function-start', - AsyncGeneratorEnqueue: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratorenqueue', - AsyncGeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratorfunctioncreate', - AsyncGeneratorReject: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratorreject', - AsyncGeneratorResolve: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratorresolve', - AsyncGeneratorResumeNext: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratorresumenext', - AsyncGeneratorStart: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratorstart', - AsyncGeneratorYield: 'https://ecma-international.org/ecma-262/10.0/#sec-asyncgeneratoryield', - AsyncIteratorClose: 'https://ecma-international.org/ecma-262/10.0/#sec-asynciteratorclose', - AtomicLoad: 'https://ecma-international.org/ecma-262/10.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://ecma-international.org/ecma-262/10.0/#sec-atomicreadmodifywrite', - Await: 'https://ecma-international.org/ecma-262/10.0/#await', - BackreferenceMatcher: 'https://ecma-international.org/ecma-262/10.0/#sec-backreference-matcher', - BlockDeclarationInstantiation: 'https://ecma-international.org/ecma-262/10.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-boundfunctioncreate', - Call: 'https://ecma-international.org/ecma-262/10.0/#sec-call', - Canonicalize: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/10.0/#sec-canonicalnumericindexstring', - CaseClauseIsSelected: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-caseclauseisselected', - CharacterRange: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-completepropertydescriptor', - Completion: 'https://ecma-international.org/ecma-262/10.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://ecma-international.org/ecma-262/10.0/#sec-composewriteeventbytes', - Construct: 'https://ecma-international.org/ecma-262/10.0/#sec-construct', - CopyDataBlockBytes: 'https://ecma-international.org/ecma-262/10.0/#sec-copydatablockbytes', - CopyDataProperties: 'https://ecma-international.org/ecma-262/10.0/#sec-copydataproperties', - CreateArrayFromList: 'https://ecma-international.org/ecma-262/10.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://ecma-international.org/ecma-262/10.0/#sec-createarrayiterator', - CreateAsyncFromSyncIterator: 'https://ecma-international.org/ecma-262/10.0/#sec-createasyncfromsynciterator', - CreateBuiltinFunction: 'https://ecma-international.org/ecma-262/10.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://ecma-international.org/ecma-262/10.0/#sec-createbytedatablock', - CreateDataProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/10.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://ecma-international.org/ecma-262/10.0/#sec-createdynamicfunction', - CreateHTML: 'https://ecma-international.org/ecma-262/10.0/#sec-createhtml', - CreateIntrinsics: 'https://ecma-international.org/ecma-262/10.0/#sec-createintrinsics', - CreateIterResultObject: 'https://ecma-international.org/ecma-262/10.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/10.0/#sec-createlistfromarraylike', - CreateListIteratorRecord: 'https://ecma-international.org/ecma-262/10.0/#sec-createlistiteratorRecord', - CreateMapIterator: 'https://ecma-international.org/ecma-262/10.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://ecma-international.org/ecma-262/10.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-createperiterationenvironment', - CreateRealm: 'https://ecma-international.org/ecma-262/10.0/#sec-createrealm', - CreateResolvingFunctions: 'https://ecma-international.org/ecma-262/10.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://ecma-international.org/ecma-262/10.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://ecma-international.org/ecma-262/10.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://ecma-international.org/ecma-262/10.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://ecma-international.org/ecma-262/10.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://ecma-international.org/ecma-262/10.0/#sec-date-number', - DateString: 'https://ecma-international.org/ecma-262/10.0/#sec-datestring', - Day: 'https://ecma-international.org/ecma-262/10.0/#eqn-Day', - DayFromYear: 'https://ecma-international.org/ecma-262/10.0/#eqn-DaysFromYear', - DaysInYear: 'https://ecma-international.org/ecma-262/10.0/#eqn-DaysInYear', - DayWithinYear: 'https://ecma-international.org/ecma-262/10.0/#eqn-DayWithinYear', - Decode: 'https://ecma-international.org/ecma-262/10.0/#sec-decode', - DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/10.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/10.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-detacharraybuffer', - Encode: 'https://ecma-international.org/ecma-262/10.0/#sec-encode', - EnqueueJob: 'https://ecma-international.org/ecma-262/10.0/#sec-enqueuejob', - EnterCriticalSection: 'https://ecma-international.org/ecma-262/10.0/#sec-entercriticalsection', - EnumerableOwnPropertyNames: 'https://ecma-international.org/ecma-262/10.0/#sec-enumerableownpropertynames', - EnumerateObjectProperties: 'https://ecma-international.org/ecma-262/10.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://ecma-international.org/ecma-262/10.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/10.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://ecma-international.org/ecma-262/10.0/#sec-evaluatecall', - EvaluateNew: 'https://ecma-international.org/ecma-262/10.0/#sec-evaluatenew', - EventSet: 'https://ecma-international.org/ecma-262/10.0/#sec-event-set', - ExecuteModule: 'https://ecma-international.org/ecma-262/10.0/#sec-source-text-module-record-execute-module', - FlattenIntoArray: 'https://ecma-international.org/ecma-262/10.0/#sec-flattenintoarray', - floor: 'https://ecma-international.org/ecma-262/10.0/#eqn-floor', - ForBodyEvaluation: 'https://ecma-international.org/ecma-262/10.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://ecma-international.org/ecma-262/10.0/#sec-fulfillpromise', - FunctionAllocate: 'https://ecma-international.org/ecma-262/10.0/#sec-functionallocate', - FunctionCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://ecma-international.org/ecma-262/10.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://ecma-international.org/ecma-262/10.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://ecma-international.org/ecma-262/10.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://ecma-international.org/ecma-262/10.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://ecma-international.org/ecma-262/10.0/#sec-generatorstart', - GeneratorValidate: 'https://ecma-international.org/ecma-262/10.0/#sec-generatorvalidate', - GeneratorYield: 'https://ecma-international.org/ecma-262/10.0/#sec-generatoryield', - Get: 'https://ecma-international.org/ecma-262/10.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://ecma-international.org/ecma-262/10.0/#sec-getactivescriptormodule', - GetBase: 'https://ecma-international.org/ecma-262/10.0/#sec-getbase', - GetFunctionRealm: 'https://ecma-international.org/ecma-262/10.0/#sec-getfunctionrealm', - GetGeneratorKind: 'https://ecma-international.org/ecma-262/10.0/#sec-getgeneratorkind', - GetGlobalObject: 'https://ecma-international.org/ecma-262/10.0/#sec-getglobalobject', - GetIdentifierReference: 'https://ecma-international.org/ecma-262/10.0/#sec-getidentifierreference', - GetIterator: 'https://ecma-international.org/ecma-262/10.0/#sec-getiterator', - GetMethod: 'https://ecma-international.org/ecma-262/10.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://ecma-international.org/ecma-262/10.0/#sec-getmodulenamespace', - GetNewTarget: 'https://ecma-international.org/ecma-262/10.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://ecma-international.org/ecma-262/10.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://ecma-international.org/ecma-262/10.0/#sec-getreferencedname', - GetSubstitution: 'https://ecma-international.org/ecma-262/10.0/#sec-getsubstitution', - GetSuperConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://ecma-international.org/ecma-262/10.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-getthisenvironment', - GetThisValue: 'https://ecma-international.org/ecma-262/10.0/#sec-getthisvalue', - GetV: 'https://ecma-international.org/ecma-262/10.0/#sec-getv', - GetValue: 'https://ecma-international.org/ecma-262/10.0/#sec-getvalue', - GetValueFromBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://ecma-international.org/ecma-262/10.0/#sec-getviewvalue', - GetWaiterList: 'https://ecma-international.org/ecma-262/10.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://ecma-international.org/ecma-262/10.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://ecma-international.org/ecma-262/10.0/#sec-happens-before', - HasOwnProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://ecma-international.org/ecma-262/10.0/#sec-hasprimitivebase', - HasProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://ecma-international.org/ecma-262/10.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://ecma-international.org/ecma-262/10.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://ecma-international.org/ecma-262/10.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://ecma-international.org/ecma-262/10.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://ecma-international.org/ecma-262/10.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://ecma-international.org/ecma-262/10.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://ecma-international.org/ecma-262/10.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://ecma-international.org/ecma-262/10.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://ecma-international.org/ecma-262/10.0/#sec-importedlocalnames', - InitializeBoundName: 'https://ecma-international.org/ecma-262/10.0/#sec-initializeboundname', - InitializeEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-source-text-module-record-initialize-environment', - InitializeHostDefinedRealm: 'https://ecma-international.org/ecma-262/10.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://ecma-international.org/ecma-262/10.0/#sec-initializereferencedbinding', - InLeapYear: 'https://ecma-international.org/ecma-262/10.0/#eqn-InLeapYear', - InnerModuleEvaluation: 'https://ecma-international.org/ecma-262/10.0/#sec-innermoduleevaluation', - InnerModuleInstantiation: 'https://ecma-international.org/ecma-262/10.0/#sec-innermoduleinstantiation', - InstanceofOperator: 'https://ecma-international.org/ecma-262/10.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://ecma-international.org/ecma-262/10.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://ecma-international.org/ecma-262/10.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-internalizejsonproperty', - Invoke: 'https://ecma-international.org/ecma-262/10.0/#sec-invoke', - IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://ecma-international.org/ecma-262/10.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://ecma-international.org/ecma-262/10.0/#sec-isarray', - IsCallable: 'https://ecma-international.org/ecma-262/10.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://ecma-international.org/ecma-262/10.0/#sec-isconcatspreadable', - IsConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-isconstructor', - IsDataDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-isdetachedbuffer', - IsExtensible: 'https://ecma-international.org/ecma-262/10.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://ecma-international.org/ecma-262/10.0/#sec-isintailposition', - IsInteger: 'https://ecma-international.org/ecma-262/10.0/#sec-isinteger', - IsLabelledFunction: 'https://ecma-international.org/ecma-262/10.0/#sec-islabelledfunction', - IsPromise: 'https://ecma-international.org/ecma-262/10.0/#sec-ispromise', - IsPropertyKey: 'https://ecma-international.org/ecma-262/10.0/#sec-ispropertykey', - IsPropertyReference: 'https://ecma-international.org/ecma-262/10.0/#sec-ispropertyreference', - IsRegExp: 'https://ecma-international.org/ecma-262/10.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://ecma-international.org/ecma-262/10.0/#sec-isstrictreference', - IsStringPrefix: 'https://ecma-international.org/ecma-262/10.0/#sec-isstringprefix', - IsSuperReference: 'https://ecma-international.org/ecma-262/10.0/#sec-issuperreference', - IsUnresolvableReference: 'https://ecma-international.org/ecma-262/10.0/#sec-isunresolvablereference', - IsWordChar: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://ecma-international.org/ecma-262/10.0/#sec-iterabletolist', - IteratorClose: 'https://ecma-international.org/ecma-262/10.0/#sec-iteratorclose', - IteratorComplete: 'https://ecma-international.org/ecma-262/10.0/#sec-iteratorcomplete', - IteratorNext: 'https://ecma-international.org/ecma-262/10.0/#sec-iteratornext', - IteratorStep: 'https://ecma-international.org/ecma-262/10.0/#sec-iteratorstep', - IteratorValue: 'https://ecma-international.org/ecma-262/10.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://ecma-international.org/ecma-262/10.0/#sec-leavecriticalsection', - LocalTime: 'https://ecma-international.org/ecma-262/10.0/#sec-localtime', - LoopContinues: 'https://ecma-international.org/ecma-262/10.0/#sec-loopcontinues', - MakeArgGetter: 'https://ecma-international.org/ecma-262/10.0/#sec-makearggetter', - MakeArgSetter: 'https://ecma-international.org/ecma-262/10.0/#sec-makeargsetter', - MakeClassConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-makeclassconstructor', - MakeConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-makeconstructor', - MakeDate: 'https://ecma-international.org/ecma-262/10.0/#sec-makedate', - MakeDay: 'https://ecma-international.org/ecma-262/10.0/#sec-makeday', - MakeMethod: 'https://ecma-international.org/ecma-262/10.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://ecma-international.org/ecma-262/10.0/#sec-makesuperpropertyreference', - MakeTime: 'https://ecma-international.org/ecma-262/10.0/#sec-maketime', - max: 'https://ecma-international.org/ecma-262/10.0/#eqn-max', - 'memory-order': 'https://ecma-international.org/ecma-262/10.0/#sec-memory-order', - min: 'https://ecma-international.org/ecma-262/10.0/#eqn-min', - MinFromTime: 'https://ecma-international.org/ecma-262/10.0/#eqn-MinFromTime', - ModuleNamespaceCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-modulenamespacecreate', - modulo: 'https://ecma-international.org/ecma-262/10.0/#eqn-modulo', - MonthFromTime: 'https://ecma-international.org/ecma-262/10.0/#eqn-MonthFromTime', - msFromTime: 'https://ecma-international.org/ecma-262/10.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://ecma-international.org/ecma-262/10.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://ecma-international.org/ecma-262/10.0/#sec-newpromisecapability', - NormalCompletion: 'https://ecma-international.org/ecma-262/10.0/#sec-normalcompletion', - NotifyWaiter: 'https://ecma-international.org/ecma-262/10.0/#sec-notifywaiter', - NumberToRawBytes: 'https://ecma-international.org/ecma-262/10.0/#sec-numbertorawbytes', - NumberToString: 'https://ecma-international.org/ecma-262/10.0/#sec-tostring-applied-to-the-number-type', - ObjectCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-objectcreate', - ObjectDefineProperties: 'https://ecma-international.org/ecma-262/10.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarydelete', - OrdinaryGet: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarysetprototypeof', - OrdinarySetWithOwnDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarysetwithowndescriptor', - OrdinaryToPrimitive: 'https://ecma-international.org/ecma-262/10.0/#sec-ordinarytoprimitive', - ParseModule: 'https://ecma-international.org/ecma-262/10.0/#sec-parsemodule', - ParseScript: 'https://ecma-international.org/ecma-262/10.0/#sec-parse-script', - PerformEval: 'https://ecma-international.org/ecma-262/10.0/#sec-performeval', - PerformPromiseAll: 'https://ecma-international.org/ecma-262/10.0/#sec-performpromiseall', - PerformPromiseRace: 'https://ecma-international.org/ecma-262/10.0/#sec-performpromiserace', - PerformPromiseThen: 'https://ecma-international.org/ecma-262/10.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://ecma-international.org/ecma-262/10.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://ecma-international.org/ecma-262/10.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://ecma-international.org/ecma-262/10.0/#sec-promisereactionjob', - PromiseResolve: 'https://ecma-international.org/ecma-262/10.0/#sec-promise-resolve', - PromiseResolveThenableJob: 'https://ecma-international.org/ecma-262/10.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-proxycreate', - PutValue: 'https://ecma-international.org/ecma-262/10.0/#sec-putvalue', - QuoteJSONString: 'https://ecma-international.org/ecma-262/10.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://ecma-international.org/ecma-262/10.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://ecma-international.org/ecma-262/10.0/#sec-reads-bytes-from', - 'reads-from': 'https://ecma-international.org/ecma-262/10.0/#sec-reads-from', - RegExpAlloc: 'https://ecma-international.org/ecma-262/10.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/10.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-regexpcreate', - RegExpExec: 'https://ecma-international.org/ecma-262/10.0/#sec-regexpexec', - RegExpInitialize: 'https://ecma-international.org/ecma-262/10.0/#sec-regexpinitialize', - RejectPromise: 'https://ecma-international.org/ecma-262/10.0/#sec-rejectpromise', - RemoveWaiter: 'https://ecma-international.org/ecma-262/10.0/#sec-removewaiter', - RemoveWaiters: 'https://ecma-international.org/ecma-262/10.0/#sec-removewaiters', - RepeatMatcher: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://ecma-international.org/ecma-262/10.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://ecma-international.org/ecma-262/10.0/#sec-resolvebinding', - ResolveThisBinding: 'https://ecma-international.org/ecma-262/10.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://ecma-international.org/ecma-262/10.0/#sec-returnifabrupt', - RunJobs: 'https://ecma-international.org/ecma-262/10.0/#sec-runjobs', - SameValue: 'https://ecma-international.org/ecma-262/10.0/#sec-samevalue', - SameValueNonNumber: 'https://ecma-international.org/ecma-262/10.0/#sec-samevaluenonnumber', - SameValueZero: 'https://ecma-international.org/ecma-262/10.0/#sec-samevaluezero', - ScriptEvaluation: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://ecma-international.org/ecma-262/10.0/#sec-scriptevaluationjob', - SecFromTime: 'https://ecma-international.org/ecma-262/10.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://ecma-international.org/ecma-262/10.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://ecma-international.org/ecma-262/10.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-serializejsonproperty', - Set: 'https://ecma-international.org/ecma-262/10.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://ecma-international.org/ecma-262/10.0/#sec-setdefaultglobalbindings', - SetFunctionLength: 'https://ecma-international.org/ecma-262/10.0/#sec-setfunctionlength', - SetFunctionName: 'https://ecma-international.org/ecma-262/10.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://ecma-international.org/ecma-262/10.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://ecma-international.org/ecma-262/10.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://ecma-international.org/ecma-262/10.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://ecma-international.org/ecma-262/10.0/#sec-setvalueinbuffer', - SetViewValue: 'https://ecma-international.org/ecma-262/10.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://ecma-international.org/ecma-262/10.0/#sec-sharedatablockeventset', - SortCompare: 'https://ecma-international.org/ecma-262/10.0/#sec-sortcompare', - SpeciesConstructor: 'https://ecma-international.org/ecma-262/10.0/#sec-speciesconstructor', - SplitMatch: 'https://ecma-international.org/ecma-262/10.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://ecma-international.org/ecma-262/10.0/#sec-strict-equality-comparison', - StringCreate: 'https://ecma-international.org/ecma-262/10.0/#sec-stringcreate', - StringGetOwnProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-stringgetownproperty', - Suspend: 'https://ecma-international.org/ecma-262/10.0/#sec-suspend', - SymbolDescriptiveString: 'https://ecma-international.org/ecma-262/10.0/#sec-symboldescriptivestring', - SynchronizeEventSet: 'https://ecma-international.org/ecma-262/10.0/#sec-synchronizeeventset', - 'synchronizes-with': 'https://ecma-international.org/ecma-262/10.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://ecma-international.org/ecma-262/10.0/#sec-testintegritylevel', - thisBooleanValue: 'https://ecma-international.org/ecma-262/10.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://ecma-international.org/ecma-262/10.0/#sec-thisnumbervalue', - thisStringValue: 'https://ecma-international.org/ecma-262/10.0/#sec-thisstringvalue', - thisSymbolValue: 'https://ecma-international.org/ecma-262/10.0/#sec-thissymbolvalue', - thisTimeValue: 'https://ecma-international.org/ecma-262/10.0/#sec-thistimevalue', - ThrowCompletion: 'https://ecma-international.org/ecma-262/10.0/#sec-throwcompletion', - TimeClip: 'https://ecma-international.org/ecma-262/10.0/#sec-timeclip', - TimeFromYear: 'https://ecma-international.org/ecma-262/10.0/#eqn-TimeFromYear', - TimeString: 'https://ecma-international.org/ecma-262/10.0/#sec-timestring', - TimeWithinDay: 'https://ecma-international.org/ecma-262/10.0/#eqn-TimeWithinDay', - TimeZoneString: 'https://ecma-international.org/ecma-262/10.0/#sec-timezoneestring', - ToBoolean: 'https://ecma-international.org/ecma-262/10.0/#sec-toboolean', - ToDateString: 'https://ecma-international.org/ecma-262/10.0/#sec-todatestring', - ToIndex: 'https://ecma-international.org/ecma-262/10.0/#sec-toindex', - ToInt16: 'https://ecma-international.org/ecma-262/10.0/#sec-toint16', - ToInt32: 'https://ecma-international.org/ecma-262/10.0/#sec-toint32', - ToInt8: 'https://ecma-international.org/ecma-262/10.0/#sec-toint8', - ToInteger: 'https://ecma-international.org/ecma-262/10.0/#sec-tointeger', - ToLength: 'https://ecma-international.org/ecma-262/10.0/#sec-tolength', - ToNumber: 'https://ecma-international.org/ecma-262/10.0/#sec-tonumber', - ToObject: 'https://ecma-international.org/ecma-262/10.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://ecma-international.org/ecma-262/10.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://ecma-international.org/ecma-262/10.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://ecma-international.org/ecma-262/10.0/#sec-topropertykey', - ToString: 'https://ecma-international.org/ecma-262/10.0/#sec-tostring', - ToUint16: 'https://ecma-international.org/ecma-262/10.0/#sec-touint16', - ToUint32: 'https://ecma-international.org/ecma-262/10.0/#sec-touint32', - ToUint8: 'https://ecma-international.org/ecma-262/10.0/#sec-touint8', - ToUint8Clamp: 'https://ecma-international.org/ecma-262/10.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://ecma-international.org/ecma-262/10.0/#sec-triggerpromisereactions', - TrimString: 'https://ecma-international.org/ecma-262/10.0/#sec-trimstring', - Type: 'https://ecma-international.org/ecma-262/10.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://ecma-international.org/ecma-262/10.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://ecma-international.org/ecma-262/10.0/#typedarray-species-create', - UnicodeEscape: 'https://ecma-international.org/ecma-262/10.0/#sec-unicodeescape', - UnicodeMatchProperty: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-unicodematchproperty-p', - UnicodeMatchPropertyValue: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v', - UpdateEmpty: 'https://ecma-international.org/ecma-262/10.0/#sec-updateempty', - UTC: 'https://ecma-international.org/ecma-262/10.0/#sec-utc-t', - UTF16Decode: 'https://ecma-international.org/ecma-262/10.0/#sec-utf16decode', - UTF16Encoding: 'https://ecma-international.org/ecma-262/10.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://ecma-international.org/ecma-262/10.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://ecma-international.org/ecma-262/10.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://ecma-international.org/ecma-262/10.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://ecma-international.org/ecma-262/10.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://ecma-international.org/ecma-262/10.0/#sec-valueofreadevent', - WeekDay: 'https://ecma-international.org/ecma-262/10.0/#sec-week-day', - WordCharacters: 'https://ecma-international.org/ecma-262/10.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://ecma-international.org/ecma-262/10.0/#eqn-YearFromTime' -}; diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json deleted file mode 100644 index 46c61ae..0000000 --- a/node_modules/es-abstract/package.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "_from": "es-abstract@^1.5.0", - "_id": "es-abstract@1.16.3", - "_inBundle": false, - "_integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==", - "_location": "/es-abstract", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "es-abstract@^1.5.0", - "name": "es-abstract", - "escapedName": "es-abstract", - "rawSpec": "^1.5.0", - "saveSpec": null, - "fetchSpec": "^1.5.0" - }, - "_requiredBy": [ - "/string.prototype.trim" - ], - "_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz", - "_shasum": "52490d978f96ff9f89ec15b5cf244304a5bca161", - "_spec": "es-abstract@^1.5.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/string.prototype.trim", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/ljharb/es-abstract/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" - }, - "deprecated": false, - "description": "ECMAScript spec abstract operations.", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.2", - "cheerio": "^1.0.0-rc.3", - "diff": "^4.0.1", - "eclint": "^2.8.1", - "eslint": "^6.7.2", - "foreach": "^2.0.5", - "make-arrow-function": "^1.1.0", - "nyc": "^10.3.2", - "object-is": "^1.0.1", - "object.assign": "^4.1.0", - "object.fromentries": "^2.0.1", - "replace": "^1.1.1", - "safe-publish-latest": "^1.1.4", - "semver": "^6.3.0", - "tape": "^4.11.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "greenkeeper": { - "//": "nyc is ignored because it requires node 4+, and we support older than that", - "ignore": [ - "nyc" - ] - }, - "homepage": "https://github.com/ljharb/es-abstract#readme", - "keywords": [ - "ECMAScript", - "ES", - "abstract", - "operation", - "abstract operation", - "JavaScript", - "ES5", - "ES6", - "ES7" - ], - "license": "MIT", - "main": "index.js", - "name": "es-abstract", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-abstract.git" - }, - "scripts": { - "coverage": "nyc npm run --silent tests-only >/dev/null", - "eccheck": "eclint check *.js **/*.js > /dev/null", - "lint": "eslint .", - "postcoverage": "nyc report", - "posttest": "npx aud --production", - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "tests-only": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.16.3" -} diff --git a/node_modules/es-abstract/test/GetIntrinsic.js b/node_modules/es-abstract/test/GetIntrinsic.js deleted file mode 100644 index 3cbc4f4..0000000 --- a/node_modules/es-abstract/test/GetIntrinsic.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../GetIntrinsic'); - -var test = require('tape'); -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var v = require('./helpers/values'); - -test('export', function (t) { - t.equal(typeof GetIntrinsic, 'function', 'it is a function'); - t.equal(GetIntrinsic.length, 2, 'function has length of 2'); - - t.end(); -}); - -test('throws', function (t) { - t['throws']( - function () { GetIntrinsic('not an intrinsic'); }, - SyntaxError, - 'nonexistent intrinsic throws a syntax error' - ); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { GetIntrinsic('%', nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - t.end(); -}); - -test('base intrinsics', function (t) { - t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); - t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); - - t.end(); -}); - -test('dotted paths', function (t) { - t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); - t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); - - t.end(); -}); - -test('accessors', { skip: !Object.getOwnPropertyDescriptor || typeof Map !== 'function' }, function (t) { - var actual = Object.getOwnPropertyDescriptor(Map.prototype, 'size'); - t.ok(actual, 'Map.prototype.size has a descriptor'); - t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); - t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/diffOps.js b/node_modules/es-abstract/test/diffOps.js deleted file mode 100644 index 0fb2fc4..0000000 --- a/node_modules/es-abstract/test/diffOps.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); -var forEach = require('foreach'); - -module.exports = function diffOperations(actual, expected, expectedMissing) { - var actualKeys = keys(actual); - var expectedKeys = keys(expected); - - var extra = []; - var missing = []; - forEach(actualKeys, function (op) { - if (!(op in expected)) { - extra.push(op); - } else if (expectedMissing.indexOf(op) !== -1) { - extra.push(op); - } - }); - forEach(expectedKeys, function (op) { - if (typeof actual[op] !== 'function' && expectedMissing.indexOf(op) === -1) { - missing.push(op); - } - }); - - return { missing: missing, extra: extra }; -}; diff --git a/node_modules/es-abstract/test/es2015.js b/node_modules/es-abstract/test/es2015.js deleted file mode 100644 index 7922d9c..0000000 --- a/node_modules/es-abstract/test/es2015.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2015; - -var ops = require('../operations/2015'); - -var expectedMissing = ['Construct', 'CreateArrayFromList', 'CreateListIterator', 'NormalCompletion', 'RegExpBuiltinExec']; - -require('./tests').es2015(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2016.js b/node_modules/es-abstract/test/es2016.js deleted file mode 100644 index 016d35f..0000000 --- a/node_modules/es-abstract/test/es2016.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2016; - -var ops = require('../operations/2016'); - -var expectedMissing = ['AddRestrictedFunctionProperties', 'AllocateArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'Construct', 'CopyDataBlockBytes', 'CreateArrayFromList', 'CreateArrayIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateIntrinsics', 'CreateListIterator', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateDirectCall', 'EvaluateNew', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetFunctionRealm', 'GetGlobalObject', 'GetIdentifierReference', 'GetModuleNamespace', 'GetNewTarget', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GlobalDeclarationInstantiation', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsWordChar', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeMethod', 'MakeSuperPropertyReference', 'ModuleNamespaceCreate', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NextJob', 'NormalCompletion', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinarySet', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RegExpAlloc', 'RegExpBuiltinExec', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SortCompare', 'SplitMatch', 'StringCreate', 'ToString Applied to the Number Type', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'UpdateEmpty', 'ValidateTypedArray', 'abs', 'floor', 'max', 'min']; - -require('./tests').es2016(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2017.js b/node_modules/es-abstract/test/es2017.js deleted file mode 100644 index c497679..0000000 --- a/node_modules/es-abstract/test/es2017.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2017; - -var ops = require('../operations/2017'); - -var expectedMissing = ['AddRestrictedFunctionProperties', 'AddWaiter', 'AgentCanSuspend', 'AgentSignifier', 'AllocateArrayBuffer', 'AllocateSharedArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'AsyncFunctionAwait', 'AsyncFunctionCreate', 'AsyncFunctionStart', 'AtomicLoad', 'AtomicReadModifyWrite', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'ComposeWriteEventBytes', 'Construct', 'CopyDataBlockBytes', 'CreateArrayFromList', 'CreateArrayIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateIntrinsics', 'CreateListIterator', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateSharedByteDataBlock', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnterCriticalSection', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateDirectCall', 'EvaluateNew', 'EventSet', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetBase', 'GetFunctionRealm', 'GetGlobalObject', 'GetIdentifierReference', 'GetModifySetValueInBuffer', 'GetModuleNamespace', 'GetNewTarget', 'GetReferencedName', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GetWaiterList', 'GlobalDeclarationInstantiation', 'HasPrimitiveBase', 'HostEnsureCanCompileStrings', 'HostEventSet', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsPropertyReference', 'IsSharedArrayBuffer', 'IsStrictReference', 'IsSuperReference', 'IsUnresolvableReference', 'IsWordChar', 'LeaveCriticalSection', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeMethod', 'MakeSuperPropertyReference', 'ModuleNamespaceCreate', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NormalCompletion', 'NumberToRawBytes', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinarySet', 'OrdinaryToPrimitive', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RawBytesToNumber', 'RegExpAlloc', 'RegExpBuiltinExec', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RemoveWaiter', 'RemoveWaiters', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'RunJobs', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetImmutablePrototype', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SharedDataBlockEventSet', 'SortCompare', 'SplitMatch', 'StringCreate', 'StringGetOwnProperty', 'Suspend', 'ToString Applied to the Number Type', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'UpdateEmpty', 'ValidateAtomicAccess', 'ValidateSharedIntegerTypedArray', 'ValidateTypedArray', 'ValueOfReadEvent', 'WakeWaiter', 'WordCharacters', 'abs', 'agent-order', 'floor', 'happens-before', 'host-synchronizes-with', 'max', 'memory-order', 'min', 'reads-bytes-from', 'reads-from', 'synchronizes-with']; - -require('./tests').es2017(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2018.js b/node_modules/es-abstract/test/es2018.js deleted file mode 100644 index 37c029a..0000000 --- a/node_modules/es-abstract/test/es2018.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2018; - -var ops = require('../operations/2018'); - -var expectedMissing = ['abs', 'AddRestrictedFunctionProperties', 'AddWaiter', 'agent-order', 'AgentCanSuspend', 'AgentSignifier', 'AllocateArrayBuffer', 'AllocateSharedArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'AsyncFunctionStart', 'AsyncGeneratorEnqueue', 'AsyncGeneratorReject', 'AsyncGeneratorResolve', 'AsyncGeneratorResumeNext', 'AsyncGeneratorStart', 'AsyncGeneratorYield', 'AtomicLoad', 'AtomicReadModifyWrite', 'Await', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CaseClauseIsSelected', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'ComposeWriteEventBytes', 'CopyDataBlockBytes', 'CreateArrayIterator', 'CreateAsyncFromSyncIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateIntrinsics', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateSharedByteDataBlock', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnterCriticalSection', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateNew', 'EventSet', 'floor', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetBase', 'GetFunctionRealm', 'GetGeneratorKind', 'GetGlobalObject', 'GetIdentifierReference', 'GetModifySetValueInBuffer', 'GetModuleNamespace', 'GetNewTarget', 'GetReferencedName', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GetWaiterList', 'GlobalDeclarationInstantiation', 'happens-before', 'HasPrimitiveBase', 'host-synchronizes-with', 'HostEnsureCanCompileStrings', 'HostEventSet', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'InnerModuleEvaluation', 'InnerModuleInstantiation', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsPropertyReference', 'IsSharedArrayBuffer', 'IsStrictReference', 'IsSuperReference', 'IsUnresolvableReference', 'IsWordChar', 'LeaveCriticalSection', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeMethod', 'MakeSuperPropertyReference', 'max', 'memory-order', 'min', 'ModuleDeclarationEnvironmentSetup', 'ModuleExecution', 'ModuleNamespaceCreate', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NumberToRawBytes', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinaryToPrimitive', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RawBytesToNumber', 'reads-bytes-from', 'reads-from', 'RegExpAlloc', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RemoveWaiter', 'RemoveWaiters', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'RunJobs', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetImmutablePrototype', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SharedDataBlockEventSet', 'SortCompare', 'SplitMatch', 'StringCreate', 'StringGetOwnProperty', 'Suspend', 'synchronizes-with', 'TimeZoneString', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UnicodeEscape', 'UpdateEmpty', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'ValidateAtomicAccess', 'ValidateSharedIntegerTypedArray', 'ValidateTypedArray', 'ValueOfReadEvent', 'WakeWaiter', 'WordCharacters', 'AsyncFunctionCreate', 'AsyncGeneratorFunctionCreate', 'AsyncIteratorClose', 'BackreferenceMatcher', 'Construct', 'CreateArrayFromList', 'CreateListIteratorRecord', 'NormalCompletion', 'OrdinarySet', 'OrdinarySetWithOwnDescriptor', 'RegExpBuiltinExec', 'SetFunctionLength', 'ThrowCompletion', 'UnicodeMatchProperty', 'UnicodeMatchPropertyValue']; - -require('./tests').es2018(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es2019.js b/node_modules/es-abstract/test/es2019.js deleted file mode 100644 index 94e00a3..0000000 --- a/node_modules/es-abstract/test/es2019.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var ES = require('../').ES2019; - -var ops = require('../operations/2019'); - -var expectedMissing = ['abs', 'AddRestrictedFunctionProperties', 'AddWaiter', 'agent-order', 'AgentCanSuspend', 'AgentSignifier', 'AllocateArrayBuffer', 'AllocateSharedArrayBuffer', 'AllocateTypedArray', 'AllocateTypedArrayBuffer', 'AsyncFunctionStart', 'AsyncGeneratorEnqueue', 'AsyncGeneratorReject', 'AsyncGeneratorResolve', 'AsyncGeneratorResumeNext', 'AsyncGeneratorStart', 'AsyncGeneratorYield', 'AtomicLoad', 'AtomicReadModifyWrite', 'Await', 'BlockDeclarationInstantiation', 'BoundFunctionCreate', 'Canonicalize', 'CaseClauseIsSelected', 'CharacterRange', 'CharacterRangeOrUnion', 'CharacterSetMatcher', 'CloneArrayBuffer', 'Completion', 'ComposeWriteEventBytes', 'CopyDataBlockBytes', 'CreateArrayIterator', 'CreateAsyncFromSyncIterator', 'CreateBuiltinFunction', 'CreateByteDataBlock', 'CreateDynamicFunction', 'CreateIntrinsics', 'CreateMapIterator', 'CreateMappedArgumentsObject', 'CreatePerIterationEnvironment', 'CreateRealm', 'CreateResolvingFunctions', 'CreateSetIterator', 'CreateSharedByteDataBlock', 'CreateStringIterator', 'CreateUnmappedArgumentsObject', 'Decode', 'DetachArrayBuffer', 'Encode', 'EnqueueJob', 'EnterCriticalSection', 'EnumerateObjectProperties', 'EscapeRegExpPattern', 'EvalDeclarationInstantiation', 'EvaluateCall', 'EvaluateNew', 'EventSet', 'floor', 'ForBodyEvaluation', 'ForIn/OfBodyEvaluation', 'ForIn/OfHeadEvaluation', 'FulfillPromise', 'FunctionAllocate', 'FunctionCreate', 'FunctionDeclarationInstantiation', 'FunctionInitialize', 'GeneratorFunctionCreate', 'GeneratorResume', 'GeneratorResumeAbrupt', 'GeneratorStart', 'GeneratorValidate', 'GeneratorYield', 'GetActiveScriptOrModule', 'GetBase', 'GetFunctionRealm', 'GetGeneratorKind', 'GetGlobalObject', 'GetIdentifierReference', 'GetModifySetValueInBuffer', 'GetModuleNamespace', 'GetNewTarget', 'GetReferencedName', 'GetSuperConstructor', 'GetTemplateObject', 'GetThisEnvironment', 'GetThisValue', 'GetValue', 'GetValueFromBuffer', 'GetViewValue', 'GetWaiterList', 'GlobalDeclarationInstantiation', 'happens-before', 'HasPrimitiveBase', 'host-synchronizes-with', 'HostEnsureCanCompileStrings', 'HostEventSet', 'HostPromiseRejectionTracker', 'HostReportErrors', 'HostResolveImportedModule', 'IfAbruptRejectPromise', 'ImportedLocalNames', 'InitializeBoundName', 'InitializeHostDefinedRealm', 'InitializeReferencedBinding', 'InnerModuleEvaluation', 'InnerModuleInstantiation', 'IntegerIndexedElementGet', 'IntegerIndexedElementSet', 'IntegerIndexedObjectCreate', 'InternalizeJSONProperty', 'IsAnonymousFunctionDefinition', 'IsCompatiblePropertyDescriptor', 'IsDetachedBuffer', 'IsInTailPosition', 'IsLabelledFunction', 'IsPropertyReference', 'IsSharedArrayBuffer', 'IsStrictReference', 'IsSuperReference', 'IsUnresolvableReference', 'IsWordChar', 'LeaveCriticalSection', 'LocalTime', 'LoopContinues', 'MakeArgGetter', 'MakeArgSetter', 'MakeClassConstructor', 'MakeConstructor', 'MakeMethod', 'MakeSuperPropertyReference', 'max', 'memory-order', 'min', 'ModuleDeclarationEnvironmentSetup', 'ModuleExecution', 'ModuleNamespaceCreate', 'NewDeclarativeEnvironment', 'NewFunctionEnvironment', 'NewGlobalEnvironment', 'NewModuleEnvironment', 'NewObjectEnvironment', 'NewPromiseCapability', 'NumberToRawBytes', 'ObjectDefineProperties', 'OrdinaryCallBindThis', 'OrdinaryCallEvaluateBody', 'OrdinaryCreateFromConstructor', 'OrdinaryDelete', 'OrdinaryGet', 'OrdinaryIsExtensible', 'OrdinaryOwnPropertyKeys', 'OrdinaryPreventExtensions', 'OrdinaryToPrimitive', 'ParseModule', 'ParseScript', 'PerformEval', 'PerformPromiseAll', 'PerformPromiseRace', 'PerformPromiseThen', 'PrepareForOrdinaryCall', 'PrepareForTailCall', 'PromiseReactionJob', 'PromiseResolveThenableJob', 'ProxyCreate', 'PutValue', 'QuoteJSONString', 'RawBytesToNumber', 'reads-bytes-from', 'reads-from', 'RegExpAlloc', 'RegExpCreate', 'RegExpInitialize', 'RejectPromise', 'RemoveWaiter', 'RemoveWaiters', 'RepeatMatcher', 'ResolveBinding', 'ResolveThisBinding', 'ReturnIfAbrupt', 'RunJobs', 'ScriptEvaluation', 'ScriptEvaluationJob', 'SerializeJSONArray', 'SerializeJSONObject', 'SerializeJSONProperty', 'SetDefaultGlobalBindings', 'SetImmutablePrototype', 'SetRealmGlobalObject', 'SetValueInBuffer', 'SetViewValue', 'SharedDataBlockEventSet', 'SortCompare', 'SplitMatch', 'StringCreate', 'StringGetOwnProperty', 'Suspend', 'synchronizes-with', 'TimeZoneString', 'TopLevelModuleEvaluationJob', 'TriggerPromiseReactions', 'TypedArrayCreate', 'TypedArraySpeciesCreate', 'UnicodeEscape', 'UpdateEmpty', 'UTC', 'UTF16Decode', 'UTF16Encoding', 'ValidateAtomicAccess', 'ValidateSharedIntegerTypedArray', 'ValidateTypedArray', 'ValueOfReadEvent', 'WakeWaiter', 'WordCharacters', 'AsyncFunctionCreate', 'AsyncGeneratorFunctionCreate', 'AsyncIteratorClose', 'BackreferenceMatcher', 'Construct', 'CreateArrayFromList', 'CreateListIteratorRecord', 'NormalCompletion', 'OrdinarySet', 'OrdinarySetWithOwnDescriptor', 'RegExpBuiltinExec', 'SetFunctionLength', 'ThrowCompletion', 'UnicodeMatchProperty', 'UnicodeMatchPropertyValue', 'AsyncFromSyncIteratorContinuation', 'ExecuteModule', 'InitializeEnvironment', 'NotifyWaiter', 'SynchronizeEventSet']; - -require('./tests').es2019(ES, ops, expectedMissing); diff --git a/node_modules/es-abstract/test/es5.js b/node_modules/es-abstract/test/es5.js deleted file mode 100644 index efd9042..0000000 --- a/node_modules/es-abstract/test/es5.js +++ /dev/null @@ -1,782 +0,0 @@ -'use strict'; - -var ES = require('../').ES5; -var test = require('tape'); - -var forEach = require('foreach'); -var is = require('object-is'); -var debug = require('object-inspect'); - -var v = require('./helpers/values'); - -test('ToPrimitive', function (t) { - t.test('primitives', function (st) { - var testPrimitive = function (primitive) { - st.ok(is(ES.ToPrimitive(primitive), primitive), debug(primitive) + ' is returned correctly'); - }; - forEach(v.primitives, testPrimitive); - st.end(); - }); - - t.test('objects', function (st) { - st.equal(ES.ToPrimitive(v.coercibleObject), v.coercibleObject.valueOf(), 'coercibleObject coerces to valueOf'); - st.equal(ES.ToPrimitive(v.coercibleObject, Number), v.coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - st.equal(ES.ToPrimitive(v.coercibleObject, String), v.coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); - st.equal(ES.ToPrimitive(v.coercibleFnObject), v.coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); - st.equal(ES.ToPrimitive(v.toStringOnlyObject), v.toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); - st.equal(ES.ToPrimitive(v.valueOfOnlyObject), v.valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - st.equal(ES.ToPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - st.equal(ES.ToPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); - st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](function () { return ES.ToPrimitive(v.uncoercibleFnObject); }, TypeError, 'uncoercibleFnObject throws a TypeError'); - st.end(); - }); - - t.end(); -}); - -test('ToBoolean', function (t) { - t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); - t.equal(false, ES.ToBoolean(null), 'null coerces to false'); - t.equal(false, ES.ToBoolean(false), 'false returns false'); - t.equal(true, ES.ToBoolean(true), 'true returns true'); - forEach([0, -0, NaN], function (falsyNumber) { - t.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); - }); - forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { - t.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); - }); - t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); - t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); - forEach(v.objects, function (obj) { - t.equal(true, ES.ToBoolean(obj), 'object coerces to true'); - }); - t.equal(true, ES.ToBoolean(v.uncoercibleObject), 'uncoercibleObject coerces to true'); - t.end(); -}); - -test('ToNumber', function (t) { - t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); - t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); - t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); - t.equal(1, ES.ToNumber(true), 'true coerces to 1'); - t.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); - forEach([0, -0, 42, Infinity, -Infinity], function (num) { - t.equal(num, ES.ToNumber(num), num + ' returns itself'); - }); - forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { - t.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); - }); - forEach(v.objects, function (object) { - t.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); - }); - t['throws'](function () { return ES.ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); -}); - -test('ToInteger', function (t) { - t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity, 42], function (num) { - t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); - t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); - }); - t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); - t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); -}); - -test('ToInt32', function (t) { - t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); - t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); - }); - t.end(); -}); - -test('ToUint32', function (t) { - t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); - t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); - t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); - }); - t.end(); -}); - -test('ToUint16', function (t) { - t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); - t.end(); -}); - -test('ToString', function (t) { - t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); -}); - -test('ToObject', function (t) { - t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); - forEach(v.numbers, function (number) { - var obj = ES.ToObject(number); - t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); - t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); - t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); - }); - t.end(); -}); - -test('CheckObjectCoercible', function (t) { - t['throws'](function () { return ES.CheckObjectCoercible(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.CheckObjectCoercible(null); }, TypeError, 'null throws'); - var checkCoercible = function (value) { - t.doesNotThrow(function () { return ES.CheckObjectCoercible(value); }, debug(value) + ' does not throw'); - }; - forEach(v.objects.concat(v.nonNullPrimitives), checkCoercible); - t.end(); -}); - -test('IsCallable', function (t) { - t.equal(true, ES.IsCallable(function () {}), 'function is callable'); - var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(v.primitives); - forEach(nonCallables, function (nonCallable) { - t.equal(false, ES.IsCallable(nonCallable), debug(nonCallable) + ' is not callable'); - }); - t.end(); -}); - -test('SameValue', function (t) { - t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); - t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValue(val, val), debug(val) + ' is SameValue to itself'); - }); - t.end(); -}); - -test('Type', function (t) { - t.equal(ES.Type(), 'Undefined', 'Type() is Undefined'); - t.equal(ES.Type(undefined), 'Undefined', 'Type(undefined) is Undefined'); - t.equal(ES.Type(null), 'Null', 'Type(null) is Null'); - t.equal(ES.Type(true), 'Boolean', 'Type(true) is Boolean'); - t.equal(ES.Type(false), 'Boolean', 'Type(false) is Boolean'); - t.equal(ES.Type(0), 'Number', 'Type(0) is Number'); - t.equal(ES.Type(NaN), 'Number', 'Type(NaN) is Number'); - t.equal(ES.Type('abc'), 'String', 'Type("abc") is String'); - t.equal(ES.Type(function () {}), 'Object', 'Type(function () {}) is Object'); - t.equal(ES.Type({}), 'Object', 'Type({}) is Object'); - t.end(); -}); - -test('IsPropertyDescriptor', function (t) { - forEach(v.primitives, function (primitive) { - t.equal(ES.IsPropertyDescriptor(primitive), false, debug(primitive) + ' is not a Property Descriptor'); - }); - - t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.dataDescriptor()), true, 'data descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); - - t['throws']( - function () { ES.IsPropertyDescriptor(v.bothDescriptor()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t['throws']( - function () { ES.IsPropertyDescriptor(v.bothDescriptorWritable()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t.end(); -}); - -test('IsAccessorDescriptor', function (t) { - forEach(v.nonNullPrimitives.concat(null), function (primitive) { - t['throws'](function () { ES.IsAccessorDescriptor(primitive); }, TypeError, debug(primitive) + ' is not a Property Descriptor'); - }); - - t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); - - t.equal(ES.IsAccessorDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); - - t.end(); -}); - -test('IsDataDescriptor', function (t) { - forEach(v.nonNullPrimitives.concat(null), function (primitive) { - t['throws'](function () { ES.IsDataDescriptor(primitive); }, TypeError, debug(primitive) + ' is not a Property Descriptor'); - }); - - t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsDataDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.dataDescriptor()), true, 'data descriptor is a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); - - t.end(); -}); - -test('IsGenericDescriptor', function (t) { - forEach(v.nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.IsGenericDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); - - t.end(); -}); - -test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(v.nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - set: accessor['[[Set]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - get: mutator['[[Get]]'], - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = v.dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'], - enumerable: !!data['[[Enumerable]]'], - configurable: !!data['[[Configurable]]'] - }); - - t['throws']( - function () { ES.FromPropertyDescriptor(v.genericDescriptor()); }, - TypeError, - 'a complete Property Descriptor is required' - ); - - t.end(); -}); - -test('ToPropertyDescriptor', function (t) { - forEach(v.nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.ToPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }), accessor); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }), mutator); - - var data = v.descriptors.nonConfigurable(v.dataDescriptor()); - t.deepEqual(ES.ToPropertyDescriptor({ - value: data['[[Value]]'], - writable: data['[[Writable]]'], - configurable: !!data['[[Configurable]]'] - }), data); - - var both = v.bothDescriptor(); - t['throws']( - function () { - ES.ToPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); - }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t['throws']( - function () { ES.ToPropertyDescriptor({ get: 'not callable' }); }, - TypeError, - '"get" must be undefined or callable' - ); - - t['throws']( - function () { ES.ToPropertyDescriptor({ set: 'not callable' }); }, - TypeError, - '"set" must be undefined or callable' - ); - - t.end(); -}); - -test('Abstract Equality Comparison', function (t) { - t.test('same types use ===', function (st) { - forEach(v.primitives.concat(v.objects), function (value) { - st.equal(ES['Abstract Equality Comparison'](value, value), value === value, debug(value) + ' is abstractly equal to itself'); - }); - st.end(); - }); - - t.test('different types coerce', function (st) { - var pairs = [ - [null, undefined], - [3, '3'], - [true, '3'], - [true, 3], - [false, 0], - [false, '0'], - [3, [3]], - ['3', [3]], - [true, [1]], - [false, [0]], - [String(v.coercibleObject), v.coercibleObject], - [Number(String(v.coercibleObject)), v.coercibleObject], - [Number(v.coercibleObject), v.coercibleObject], - [String(Number(v.coercibleObject)), v.coercibleObject] - ]; - forEach(pairs, function (pair) { - var a = pair[0]; - var b = pair[1]; - // eslint-disable-next-line eqeqeq - st.equal(ES['Abstract Equality Comparison'](a, b), a == b, debug(a) + ' == ' + debug(b)); - // eslint-disable-next-line eqeqeq - st.equal(ES['Abstract Equality Comparison'](b, a), b == a, debug(b) + ' == ' + debug(a)); - }); - st.end(); - }); - - t.end(); -}); - -test('Strict Equality Comparison', function (t) { - t.test('same types use ===', function (st) { - forEach(v.primitives.concat(v.objects), function (value) { - st.equal(ES['Strict Equality Comparison'](value, value), value === value, debug(value) + ' is strictly equal to itself'); - }); - st.end(); - }); - - t.test('different types are not ===', function (st) { - var pairs = [ - [null, undefined], - [3, '3'], - [true, '3'], - [true, 3], - [false, 0], - [false, '0'], - [3, [3]], - ['3', [3]], - [true, [1]], - [false, [0]], - [String(v.coercibleObject), v.coercibleObject], - [Number(String(v.coercibleObject)), v.coercibleObject], - [Number(v.coercibleObject), v.coercibleObject], - [String(Number(v.coercibleObject)), v.coercibleObject] - ]; - forEach(pairs, function (pair) { - var a = pair[0]; - var b = pair[1]; - st.equal(ES['Strict Equality Comparison'](a, b), a === b, debug(a) + ' === ' + debug(b)); - st.equal(ES['Strict Equality Comparison'](b, a), b === a, debug(b) + ' === ' + debug(a)); - }); - st.end(); - }); - - t.end(); -}); - -test('Abstract Relational Comparison', function (t) { - t.test('at least one operand is NaN', function (st) { - st.equal(ES['Abstract Relational Comparison'](NaN, {}, true), undefined, 'LeftFirst: first is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison']({}, NaN, true), undefined, 'LeftFirst: second is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison'](NaN, {}, false), undefined, '!LeftFirst: first is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison']({}, NaN, false), undefined, '!LeftFirst: second is NaN, returns undefined'); - st.end(); - }); - - t.equal(ES['Abstract Relational Comparison'](3, 4, true), true, 'LeftFirst: 3 is less than 4'); - t.equal(ES['Abstract Relational Comparison'](4, 3, true), false, 'LeftFirst: 3 is not less than 4'); - t.equal(ES['Abstract Relational Comparison'](3, 4, false), true, '!LeftFirst: 3 is less than 4'); - t.equal(ES['Abstract Relational Comparison'](4, 3, false), false, '!LeftFirst: 3 is not less than 4'); - - t.equal(ES['Abstract Relational Comparison']('3', '4', true), true, 'LeftFirst: "3" is less than "4"'); - t.equal(ES['Abstract Relational Comparison']('4', '3', true), false, 'LeftFirst: "3" is not less than "4"'); - t.equal(ES['Abstract Relational Comparison']('3', '4', false), true, '!LeftFirst: "3" is less than "4"'); - t.equal(ES['Abstract Relational Comparison']('4', '3', false), false, '!LeftFirst: "3" is not less than "4"'); - - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, 42, true), true, 'LeftFirst: coercible object is less than 42'); - t.equal(ES['Abstract Relational Comparison'](42, v.coercibleObject, true), false, 'LeftFirst: 42 is not less than coercible object'); - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, 42, false), true, '!LeftFirst: coercible object is less than 42'); - t.equal(ES['Abstract Relational Comparison'](42, v.coercibleObject, false), false, '!LeftFirst: 42 is not less than coercible object'); - - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, '3', true), false, 'LeftFirst: coercible object is not less than "3"'); - t.equal(ES['Abstract Relational Comparison']('3', v.coercibleObject, true), false, 'LeftFirst: "3" is not less than coercible object'); - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, '3', false), false, '!LeftFirst: coercible object is not less than "3"'); - t.equal(ES['Abstract Relational Comparison']('3', v.coercibleObject, false), false, '!LeftFirst: "3" is not less than coercible object'); - - t.end(); -}); - -test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - set: accessor['[[Set]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - get: mutator['[[Get]]'], - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = v.dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'], - enumerable: !!data['[[Enumerable]]'], - configurable: !!data['[[Configurable]]'] - }); - - t['throws']( - function () { ES.FromPropertyDescriptor(v.genericDescriptor()); }, - TypeError, - 'a complete Property Descriptor is required' - ); - - t.end(); -}); - -test('SecFromTime', function (t) { - var now = new Date(); - t.equal(ES.SecFromTime(now.getTime()), now.getUTCSeconds(), 'second from Date timestamp matches getUTCSeconds'); - t.end(); -}); - -test('MinFromTime', function (t) { - var now = new Date(); - t.equal(ES.MinFromTime(now.getTime()), now.getUTCMinutes(), 'minute from Date timestamp matches getUTCMinutes'); - t.end(); -}); - -test('HourFromTime', function (t) { - var now = new Date(); - t.equal(ES.HourFromTime(now.getTime()), now.getUTCHours(), 'hour from Date timestamp matches getUTCHours'); - t.end(); -}); - -test('msFromTime', function (t) { - var now = new Date(); - t.equal(ES.msFromTime(now.getTime()), now.getUTCMilliseconds(), 'ms from Date timestamp matches getUTCMilliseconds'); - t.end(); -}); - -var msPerSecond = 1e3; -var msPerMinute = 60 * msPerSecond; -var msPerHour = 60 * msPerMinute; -var msPerDay = 24 * msPerHour; - -test('Day', function (t) { - var time = Date.UTC(2019, 8, 10, 2, 3, 4, 5); - var add = 2.5; - var later = new Date(time + (add * msPerDay)); - - t.equal(ES.Day(later.getTime()), ES.Day(time) + Math.floor(add), 'adding 2.5 days worth of ms, gives a Day delta of 2'); - t.end(); -}); - -test('TimeWithinDay', function (t) { - var time = Date.UTC(2019, 8, 10, 2, 3, 4, 5); - var add = 2.5; - var later = new Date(time + (add * msPerDay)); - - t.equal(ES.TimeWithinDay(later.getTime()), ES.TimeWithinDay(time) + (0.5 * msPerDay), 'adding 2.5 days worth of ms, gives a TimeWithinDay delta of +0.5'); - t.end(); -}); - -test('DayFromYear', function (t) { - t.equal(ES.DayFromYear(2021) - ES.DayFromYear(2020), 366, '2021 is a leap year, has 366 days'); - t.equal(ES.DayFromYear(2020) - ES.DayFromYear(2019), 365, '2020 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2019) - ES.DayFromYear(2018), 365, '2019 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2018) - ES.DayFromYear(2017), 365, '2018 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2017) - ES.DayFromYear(2016), 366, '2017 is a leap year, has 366 days'); - - t.end(); -}); - -test('TimeFromYear', function (t) { - for (var i = 1900; i < 2100; i += 1) { - t.equal(ES.TimeFromYear(i), Date.UTC(i, 0, 1), 'TimeFromYear matches a Date object’s year: ' + i); - } - t.end(); -}); - -test('YearFromTime', function (t) { - for (var i = 1900; i < 2100; i += 1) { - t.equal(ES.YearFromTime(Date.UTC(i, 0, 1)), i, 'YearFromTime matches a Date object’s year on 1/1: ' + i); - t.equal(ES.YearFromTime(Date.UTC(i, 10, 1)), i, 'YearFromTime matches a Date object’s year on 10/1: ' + i); - } - t.end(); -}); - -test('WeekDay', function (t) { - var now = new Date(); - var today = now.getUTCDay(); - for (var i = 0; i < 7; i += 1) { - var weekDay = ES.WeekDay(now.getTime() + (i * msPerDay)); - t.equal(weekDay, (today + i) % 7, i + ' days after today (' + today + '), WeekDay is ' + weekDay); - } - t.end(); -}); - -test('DaysInYear', function (t) { - t.equal(ES.DaysInYear(2021), 365, '2021 is not a leap year'); - t.equal(ES.DaysInYear(2020), 366, '2020 is a leap year'); - t.equal(ES.DaysInYear(2019), 365, '2019 is not a leap year'); - t.equal(ES.DaysInYear(2018), 365, '2018 is not a leap year'); - t.equal(ES.DaysInYear(2017), 365, '2017 is not a leap year'); - t.equal(ES.DaysInYear(2016), 366, '2016 is a leap year'); - - t.end(); -}); - -test('InLeapYear', function (t) { - t.equal(ES.InLeapYear(Date.UTC(2021, 0, 1)), 0, '2021 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2020, 0, 1)), 1, '2020 is a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2019, 0, 1)), 0, '2019 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2018, 0, 1)), 0, '2018 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2017, 0, 1)), 0, '2017 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2016, 0, 1)), 1, '2016 is a leap year'); - - t.end(); -}); - -test('DayWithinYear', function (t) { - t.equal(ES.DayWithinYear(Date.UTC(2019, 0, 1)), 0, '1/1 is the 1st day'); - t.equal(ES.DayWithinYear(Date.UTC(2019, 11, 31)), 364, '12/31 is the 365th day in a non leap year'); - t.equal(ES.DayWithinYear(Date.UTC(2016, 11, 31)), 365, '12/31 is the 366th day in a leap year'); - - t.end(); -}); - -test('MonthFromTime', function (t) { - t.equal(ES.MonthFromTime(Date.UTC(2019, 0, 1)), 0, 'non-leap: 1/1 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 0, 31)), 0, 'non-leap: 1/31 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 1)), 1, 'non-leap: 2/1 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 28)), 1, 'non-leap: 2/28 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 29)), 2, 'non-leap: 2/29 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 2, 1)), 2, 'non-leap: 3/1 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 2, 31)), 2, 'non-leap: 3/31 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 3, 1)), 3, 'non-leap: 4/1 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 3, 30)), 3, 'non-leap: 4/30 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 4, 1)), 4, 'non-leap: 5/1 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 4, 31)), 4, 'non-leap: 5/31 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 5, 1)), 5, 'non-leap: 6/1 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 5, 30)), 5, 'non-leap: 6/30 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 6, 1)), 6, 'non-leap: 7/1 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 6, 31)), 6, 'non-leap: 7/31 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 7, 1)), 7, 'non-leap: 8/1 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 7, 30)), 7, 'non-leap: 8/30 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 8, 1)), 8, 'non-leap: 9/1 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 8, 30)), 8, 'non-leap: 9/30 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 9, 1)), 9, 'non-leap: 10/1 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 9, 31)), 9, 'non-leap: 10/31 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 10, 1)), 10, 'non-leap: 11/1 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 10, 30)), 10, 'non-leap: 11/30 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 11, 1)), 11, 'non-leap: 12/1 gives December'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 11, 31)), 11, 'non-leap: 12/31 gives December'); - - t.equal(ES.MonthFromTime(Date.UTC(2016, 0, 1)), 0, 'leap: 1/1 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 0, 31)), 0, 'leap: 1/31 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 1)), 1, 'leap: 2/1 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 28)), 1, 'leap: 2/28 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 29)), 1, 'leap: 2/29 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 2, 1)), 2, 'leap: 3/1 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 2, 31)), 2, 'leap: 3/31 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 3, 1)), 3, 'leap: 4/1 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 3, 30)), 3, 'leap: 4/30 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 4, 1)), 4, 'leap: 5/1 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 4, 31)), 4, 'leap: 5/31 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 5, 1)), 5, 'leap: 6/1 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 5, 30)), 5, 'leap: 6/30 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 6, 1)), 6, 'leap: 7/1 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 6, 31)), 6, 'leap: 7/31 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 7, 1)), 7, 'leap: 8/1 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 7, 30)), 7, 'leap: 8/30 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 8, 1)), 8, 'leap: 9/1 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 8, 30)), 8, 'leap: 9/30 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 9, 1)), 9, 'leap: 10/1 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 9, 31)), 9, 'leap: 10/31 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 10, 1)), 10, 'leap: 11/1 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 10, 30)), 10, 'leap: 11/30 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 11, 1)), 11, 'leap: 12/1 gives December'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 11, 31)), 11, 'leap: 12/31 gives December'); - t.end(); -}); - -test('DateFromTime', function (t) { - var i; - for (i = 1; i <= 28; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 1, i)), i, '2019.02.' + i + ' is date ' + i); - } - for (i = 1; i <= 29; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2016, 1, i)), i, '2016.02.' + i + ' is date ' + i); - } - for (i = 1; i <= 30; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 8, i)), i, '2019.09.' + i + ' is date ' + i); - } - for (i = 1; i <= 31; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 9, i)), i, '2019.10.' + i + ' is date ' + i); - } - t.end(); -}); - -test('MakeDay', function (t) { - var day2015 = 16687; - t.equal(ES.MakeDay(2015, 8, 9), day2015, '2015.09.09 is day 16687'); - var day2016 = day2015 + 366; // 2016 is a leap year - t.equal(ES.MakeDay(2016, 8, 9), day2016, '2015.09.09 is day 17053'); - var day2017 = day2016 + 365; - t.equal(ES.MakeDay(2017, 8, 9), day2017, '2017.09.09 is day 17418'); - var day2018 = day2017 + 365; - t.equal(ES.MakeDay(2018, 8, 9), day2018, '2018.09.09 is day 17783'); - var day2019 = day2018 + 365; - t.equal(ES.MakeDay(2019, 8, 9), day2019, '2019.09.09 is day 18148'); - t.end(); -}); - -test('MakeDate', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.ok(is(ES.MakeDate(nonFiniteNumber, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `day`'); - t.ok(is(ES.MakeDate(0, nonFiniteNumber), NaN), debug(nonFiniteNumber) + ' is not a finite `time`'); - }); - t.equal(ES.MakeDate(0, 0), 0, 'zero day and zero time is zero date'); - t.equal(ES.MakeDate(0, 123), 123, 'zero day and nonzero time is a date of the "time"'); - t.equal(ES.MakeDate(1, 0), msPerDay, 'day of 1 and zero time is a date of "ms per day"'); - t.equal(ES.MakeDate(3, 0), 3 * msPerDay, 'day of 3 and zero time is a date of thrice "ms per day"'); - t.equal(ES.MakeDate(1, 123), msPerDay + 123, 'day of 1 and nonzero time is a date of "ms per day" plus the "time"'); - t.equal(ES.MakeDate(3, 123), (3 * msPerDay) + 123, 'day of 3 and nonzero time is a date of thrice "ms per day" plus the "time"'); - - t.end(); -}); - -test('MakeTime', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.ok(is(ES.MakeTime(nonFiniteNumber, 0, 0, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `hour`'); - t.ok(is(ES.MakeTime(0, nonFiniteNumber, 0, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `min`'); - t.ok(is(ES.MakeTime(0, 0, nonFiniteNumber, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `sec`'); - t.ok(is(ES.MakeTime(0, 0, 0, nonFiniteNumber), NaN), debug(nonFiniteNumber) + ' is not a finite `ms`'); - }); - - t.equal( - ES.MakeTime(1.2, 2.3, 3.4, 4.5), - (1 * msPerHour) + (2 * msPerMinute) + (3 * msPerSecond) + 4, - 'all numbers are converted to integer, multiplied by the right number of ms, and summed' - ); - t.end(); -}); - -test('TimeClip', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.ok(is(ES.TimeClip(nonFiniteNumber), NaN), debug(nonFiniteNumber) + ' is not a finite `time`'); - }); - t.ok(is(ES.TimeClip(8.64e15 + 1), NaN), '8.64e15 is the largest magnitude considered "finite"'); - t.ok(is(ES.TimeClip(-8.64e15 - 1), NaN), '-8.64e15 is the largest magnitude considered "finite"'); - - forEach(v.zeroes.concat([-10, 10, Date.now()]), function (time) { - t.equal(ES.TimeClip(time), time, debug(time) + ' is a time of ' + debug(time)); - }); - - t.end(); -}); - -test('modulo', function (t) { - t.equal(3 % 2, 1, '+3 % 2 is +1'); - t.equal(ES.modulo(3, 2), 1, '+3 mod 2 is +1'); - - t.equal(-3 % 2, -1, '-3 % 2 is -1'); - t.equal(ES.modulo(-3, 2), 1, '-3 mod 2 is +1'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/es6.js b/node_modules/es-abstract/test/es6.js deleted file mode 100644 index e7c9d98..0000000 --- a/node_modules/es-abstract/test/es6.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var ES = require('../'); -var ES6 = ES.ES6; -var ES2015 = ES.ES2015; -var ES6entry = require('../es6'); - -test('legacy es6 export', function (t) { - t.equal(ES6, ES2015, 'main ES6 === main ES2015'); - t.end(); -}); - -test('legacy es6 entry point', function (t) { - t.equal(ES6, ES6entry, 'main ES6 === ES6 entry point'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/es7.js b/node_modules/es-abstract/test/es7.js deleted file mode 100644 index ee57e15..0000000 --- a/node_modules/es-abstract/test/es7.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var ES = require('../'); -var ES7 = ES.ES7; -var ES2016 = ES.ES2016; -var ES7entry = require('../es7'); - -test('legacy es7 export', function (t) { - t.equal(ES7, ES2016, 'main ES7 === main ES2016'); - t.end(); -}); - -test('legacy es7 entry point', function (t) { - t.equal(ES7, ES7entry, 'main ES7 === ES7 entry point'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/assertRecord.js b/node_modules/es-abstract/test/helpers/assertRecord.js deleted file mode 100644 index 22e1aea..0000000 --- a/node_modules/es-abstract/test/helpers/assertRecord.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var assertRecord = require('../../helpers/assertRecord'); -var v = require('./values'); - -module.exports = function assertRecordTests(ES, test) { - test('Property Descriptor', function (t) { - var record = 'Property Descriptor'; - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { assertRecord(ES, record, 'arg', primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t['throws']( - function () { assertRecord(ES, record, 'arg', { invalid: true }); }, - TypeError, - 'invalid keys not allowed on a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', {}); }, - 'empty object is an incomplete Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.accessorDescriptor()); }, - 'accessor descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.mutatorDescriptor()); }, - 'mutator descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.dataDescriptor()); }, - 'data descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES, record, 'arg', v.genericDescriptor()); }, - 'generic descriptor is a Property Descriptor' - ); - - t['throws']( - function () { assertRecord(ES, record, 'arg', v.bothDescriptor()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t.end(); - }); -}; diff --git a/node_modules/es-abstract/test/helpers/getSymbolDescription.js b/node_modules/es-abstract/test/helpers/getSymbolDescription.js deleted file mode 100644 index 49af899..0000000 --- a/node_modules/es-abstract/test/helpers/getSymbolDescription.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var test = require('tape'); -var debug = require('object-inspect'); -var forEach = require('foreach'); - -var v = require('./values'); -var getSymbolDescription = require('../../helpers/getSymbolDescription'); - -test('getSymbolDescription', function (t) { - t.test('no symbols', { skip: v.hasSymbols }, function (st) { - st['throws']( - getSymbolDescription, - SyntaxError, - 'requires Symbol support' - ); - - st.end(); - }); - - forEach(v.nonSymbolPrimitives.concat(v.objects), function (nonSymbol) { - t['throws']( - function () { getSymbolDescription(nonSymbol); }, - TypeError, - debug(nonSymbol) + ' is not a Symbol' - ); - }); - - t.test('with symbols', { skip: !v.hasSymbols }, function (st) { - forEach( - [ - [Symbol(), undefined], - [Symbol(undefined), undefined], - [Symbol(null), 'null'], - [Symbol(''), ''], - [Symbol.iterator, 'Symbol.iterator'], - [Symbol('foo'), 'foo'] - ], - function (pair) { - var sym = pair[0]; - var desc = pair[1]; - st.equal(getSymbolDescription(sym), desc, debug(sym) + ' yields ' + debug(desc)); - } - ); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/values.js b/node_modules/es-abstract/test/helpers/values.js deleted file mode 100644 index ccef743..0000000 --- a/node_modules/es-abstract/test/helpers/values.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict'; - -var assign = require('../../helpers/assign'); - -var hasSymbols = require('has-symbols')(); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; -var objects = [{}, coercibleObject, coercibleFnObject, toStringOnlyObject, valueOfOnlyObject]; -var nullPrimitives = [undefined, null]; -var nonIntegerNumbers = [-1.3, 0.2, 1.8, 1 / 3]; -var zeroes = [0, -0]; -var infinities = [Infinity, -Infinity]; -var numbers = zeroes.concat([42], infinities, nonIntegerNumbers); -var strings = ['', 'foo', 'a\uD83D\uDCA9c']; -var booleans = [true, false]; -var symbols = hasSymbols ? [Symbol.iterator, Symbol('foo')] : []; -var nonSymbolPrimitives = [].concat(nullPrimitives, booleans, strings, numbers); -var nonNumberPrimitives = [].concat(nullPrimitives, booleans, strings, symbols); -var nonNullPrimitives = [].concat(booleans, strings, numbers, symbols); -var nonUndefinedPrimitives = [].concat(null, nonNullPrimitives); -var nonStrings = [].concat(nullPrimitives, booleans, numbers, symbols, objects); -var primitives = [].concat(nullPrimitives, nonNullPrimitives); -var nonPropertyKeys = [].concat(nullPrimitives, booleans, numbers, objects); -var propertyKeys = [].concat(strings, symbols); -var nonBooleans = [].concat(nullPrimitives, strings, symbols, numbers, objects); -var falsies = [].concat(nullPrimitives, false, '', 0, -0, NaN); -var truthies = [].concat(true, 'foo', 42, symbols, objects); -var timestamps = [].concat(0, 946713600000, 1546329600000); -var nonFunctions = [].concat(primitives, objects, [42]); -var nonArrays = [].concat(nonFunctions); - -var descriptors = { - configurable: function (descriptor) { - return assign(assign({}, descriptor), { '[[Configurable]]': true }); - }, - nonConfigurable: function (descriptor) { - return assign(assign({}, descriptor), { '[[Configurable]]': false }); - }, - enumerable: function (descriptor) { - return assign(assign({}, descriptor), { '[[Enumerable]]': true }); - }, - nonEnumerable: function (descriptor) { - return assign(assign({}, descriptor), { '[[Enumerable]]': false }); - }, - writable: function (descriptor) { - return assign(assign({}, descriptor), { '[[Writable]]': true }); - }, - nonWritable: function (descriptor) { - return assign(assign({}, descriptor), { '[[Writable]]': false }); - } -}; - -module.exports = { - coercibleObject: coercibleObject, - coercibleFnObject: coercibleFnObject, - valueOfOnlyObject: valueOfOnlyObject, - toStringOnlyObject: toStringOnlyObject, - uncoercibleObject: uncoercibleObject, - uncoercibleFnObject: uncoercibleFnObject, - objects: objects, - nonFunctions: nonFunctions, - nonArrays: nonArrays, - nullPrimitives: nullPrimitives, - numbers: numbers, - zeroes: zeroes, - infinities: infinities, - strings: strings, - booleans: booleans, - symbols: symbols, - hasSymbols: hasSymbols, - nonSymbolPrimitives: nonSymbolPrimitives, - nonNumberPrimitives: nonNumberPrimitives, - nonNullPrimitives: nonNullPrimitives, - nonUndefinedPrimitives: nonUndefinedPrimitives, - nonStrings: nonStrings, - nonNumbers: nonNumberPrimitives.concat(objects), - nonIntegerNumbers: nonIntegerNumbers, - primitives: primitives, - nonPropertyKeys: nonPropertyKeys, - propertyKeys: propertyKeys, - nonBooleans: nonBooleans, - falsies: falsies, - truthies: truthies, - timestamps: timestamps, - bothDescriptor: function () { - return { '[[Get]]': function () {}, '[[Value]]': true }; - }, - bothDescriptorWritable: function () { - return descriptors.writable({ '[[Get]]': function () {} }); - }, - accessorDescriptor: function (value) { - return descriptors.enumerable(descriptors.configurable({ - '[[Get]]': function get() { return value; } - })); - }, - mutatorDescriptor: function () { - return descriptors.enumerable(descriptors.configurable({ - '[[Set]]': function () {} - })); - }, - dataDescriptor: function (value) { - return descriptors.nonWritable({ - '[[Value]]': arguments.length > 0 ? value : 42 - }); - }, - genericDescriptor: function () { - return descriptors.configurable(descriptors.nonEnumerable()); - }, - descriptors: descriptors -}; diff --git a/node_modules/es-abstract/test/index.js b/node_modules/es-abstract/test/index.js deleted file mode 100644 index a435044..0000000 --- a/node_modules/es-abstract/test/index.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var ES = require('../'); -var test = require('tape'); - -var ESkeys = Object.keys(ES).sort(); -var ES6keys = Object.keys(ES.ES6).sort(); - -test('exposed properties', function (t) { - t.deepEqual(ESkeys, ES6keys.concat(['ES2019', 'ES2018', 'ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys'); - t.end(); -}); - -test('methods match', function (t) { - ES6keys.forEach(function (key) { - t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method'); - }); - t.end(); -}); - -require('./GetIntrinsic'); - -require('./es5'); -require('./es6'); -require('./es2015'); -require('./es7'); -require('./es2016'); -require('./es2017'); -require('./es2018'); -require('./es2019'); diff --git a/node_modules/es-abstract/test/tests.js b/node_modules/es-abstract/test/tests.js deleted file mode 100644 index a5df2a3..0000000 --- a/node_modules/es-abstract/test/tests.js +++ /dev/null @@ -1,4074 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var forEach = require('foreach'); -var is = require('object-is'); -var debug = require('object-inspect'); -var assign = require('object.assign'); -var keys = require('object-keys'); -var has = require('has'); -var arrowFns = require('make-arrow-function').list(); - -var getInferredName = require('../helpers/getInferredName'); -var assertRecordTests = require('./helpers/assertRecord'); -var v = require('./helpers/values'); -var diffOps = require('./diffOps'); - -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; - -var getArraySubclassWithSpeciesConstructor = function getArraySubclass(speciesConstructor) { - var Bar = function Bar() { - var inst = []; - Object.setPrototypeOf(inst, Bar.prototype); - Object.defineProperty(inst, 'constructor', { value: Bar }); - return inst; - }; - Bar.prototype = Object.create(Array.prototype); - Object.setPrototypeOf(Bar, Array); - Object.defineProperty(Bar, Symbol.species, { value: speciesConstructor }); - - return Bar; -}; - -var testIterator = function (t, iterator, expected) { - var resultCount = 0; - var result; - while (result = iterator.next(), !result.done) { // eslint-disable-line no-sequences - t.deepEqual(result, { done: false, value: expected[resultCount] }, 'result ' + resultCount); - resultCount += 1; - } - t.equal(resultCount, expected.length, 'expected ' + expected.length + ', got ' + resultCount); -}; - -var hasSpecies = v.hasSymbols && Symbol.species; - -var hasGroups = 'groups' in (/a/).exec('a'); -var groups = function groups(matchObject) { - return hasGroups ? assign(matchObject, { groups: matchObject.groups }) : matchObject; -}; - -var testEnumerableOwnNames = function (t, enumerableOwnNames) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { enumerableOwnNames(nonObject); }, - debug(nonObject) + ' is not an Object' - ); - }); - - var Child = function Child() { - this.own = {}; - }; - Child.prototype = { - inherited: {} - }; - - var obj = new Child(); - - t.equal('own' in obj, true, 'has "own"'); - t.equal(has(obj, 'own'), true, 'has own "own"'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, 'own'), true, 'has enumerable "own"'); - - t.equal('inherited' in obj, true, 'has "inherited"'); - t.equal(has(obj, 'inherited'), false, 'has non-own "inherited"'); - t.equal(has(Child.prototype, 'inherited'), true, 'Child.prototype has own "inherited"'); - t.equal(Child.prototype.inherited, obj.inherited, 'Child.prototype.inherited === obj.inherited'); - t.equal(Object.prototype.propertyIsEnumerable.call(Child.prototype, 'inherited'), true, 'has enumerable "inherited"'); - - t.equal('toString' in obj, true, 'has "toString"'); - t.equal(has(obj, 'toString'), false, 'has non-own "toString"'); - t.equal(has(Object.prototype, 'toString'), true, 'Object.prototype has own "toString"'); - t.equal(Object.prototype.toString, obj.toString, 'Object.prototype.toString === obj.toString'); - // eslint-disable-next-line no-useless-call - t.equal(Object.prototype.propertyIsEnumerable.call(Object.prototype, 'toString'), false, 'has non-enumerable "toString"'); - - return obj; -}; - -var es2015 = function ES2015(ES, ops, expectedMissing, skips) { - test('has expected operations', function (t) { - var diff = diffOps(ES, ops, expectedMissing); - - t.deepEqual(diff.extra, [], 'no extra ops'); - - t.deepEqual(diff.missing, [], 'no unexpected missing ops'); - - t.end(); - }); - - test('ToPrimitive', function (t) { - t.test('primitives', function (st) { - var testPrimitive = function (primitive) { - st.ok(is(ES.ToPrimitive(primitive), primitive), debug(primitive) + ' is returned correctly'); - }; - forEach(v.primitives, testPrimitive); - st.end(); - }); - - t.test('objects', function (st) { - st.equal(ES.ToPrimitive(v.coercibleObject), 3, 'coercibleObject with no hint coerces to valueOf'); - st.ok(is(ES.ToPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); - st.equal(ES.ToPrimitive(v.coercibleObject, Number), 3, 'coercibleObject with hint Number coerces to valueOf'); - st.ok(is(ES.ToPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to NaN'); - st.equal(ES.ToPrimitive(v.coercibleObject, String), 42, 'coercibleObject with hint String coerces to nonstringified toString'); - st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - st.equal(ES.ToPrimitive(v.toStringOnlyObject), 7, 'toStringOnlyObject returns non-stringified toString'); - st.equal(ES.ToPrimitive(v.valueOfOnlyObject), 4, 'valueOfOnlyObject returns valueOf'); - st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - st.end(); - }); - - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString'); - var now = new Date(); - st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString'); - st.end(); - }); - - t.end(); - }); - - test('ToBoolean', function (t) { - t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); - t.equal(false, ES.ToBoolean(null), 'null coerces to false'); - t.equal(false, ES.ToBoolean(false), 'false returns false'); - t.equal(true, ES.ToBoolean(true), 'true returns true'); - - t.test('numbers', function (st) { - forEach(v.zeroes.concat(NaN), function (falsyNumber) { - st.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); - }); - forEach(v.infinities.concat([42, 1]), function (truthyNumber) { - st.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); - }); - - st.end(); - }); - - t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); - t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); - - t.test('objects', function (st) { - forEach(v.objects, function (obj) { - st.equal(true, ES.ToBoolean(obj), 'object coerces to true'); - }); - st.equal(true, ES.ToBoolean(v.uncoercibleObject), 'uncoercibleObject coerces to true'); - - st.end(); - }); - - t.end(); - }); - - test('ToNumber', function (t) { - t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); - t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); - t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); - t.equal(1, ES.ToNumber(true), 'true coerces to 1'); - - t.test('numbers', function (st) { - st.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); - forEach(v.zeroes.concat(v.infinities, 42), function (num) { - st.equal(num, ES.ToNumber(num), num + ' returns itself'); - }); - forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { - st.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); - }); - st.end(); - }); - - t.test('objects', function (st) { - forEach(v.objects, function (object) { - st.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); - }); - st['throws'](function () { return ES.ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - st.end(); - }); - - t.test('binary literals', function (st) { - st.equal(ES.ToNumber('0b10'), 2, '0b10 is 2'); - st.equal(ES.ToNumber({ toString: function () { return '0b11'; } }), 3, 'Object that toStrings to 0b11 is 3'); - - st.equal(true, is(ES.ToNumber('0b12'), NaN), '0b12 is NaN'); - st.equal(true, is(ES.ToNumber({ toString: function () { return '0b112'; } }), NaN), 'Object that toStrings to 0b112 is NaN'); - st.end(); - }); - - t.test('octal literals', function (st) { - st.equal(ES.ToNumber('0o10'), 8, '0o10 is 8'); - st.equal(ES.ToNumber({ toString: function () { return '0o11'; } }), 9, 'Object that toStrings to 0o11 is 9'); - - st.equal(true, is(ES.ToNumber('0o18'), NaN), '0o18 is NaN'); - st.equal(true, is(ES.ToNumber({ toString: function () { return '0o118'; } }), NaN), 'Object that toStrings to 0o118 is NaN'); - st.end(); - }); - - t.test('signed hex numbers', function (st) { - st.equal(true, is(ES.ToNumber('-0xF'), NaN), '-0xF is NaN'); - st.equal(true, is(ES.ToNumber(' -0xF '), NaN), 'space-padded -0xF is NaN'); - st.equal(true, is(ES.ToNumber('+0xF'), NaN), '+0xF is NaN'); - st.equal(true, is(ES.ToNumber(' +0xF '), NaN), 'space-padded +0xF is NaN'); - - st.end(); - }); - - t.test('trimming of whitespace and non-whitespace characters', function (st) { - var whitespace = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; - st.equal(0, ES.ToNumber(whitespace + 0 + whitespace), 'whitespace is trimmed'); - - // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. - var nonWhitespaces = { - '\\u0085': '\u0085', - '\\u200b': '\u200b', - '\\ufffe': '\ufffe' - }; - - forEach(nonWhitespaces, function (desc, nonWS) { - st.equal(true, is(ES.ToNumber(nonWS + 0 + nonWS), NaN), 'non-whitespace ' + desc + ' not trimmed'); - }); - - st.end(); - }); - - forEach(v.symbols, function (symbol) { - t['throws']( - function () { ES.ToNumber(symbol); }, - TypeError, - 'Symbols can’t be converted to a Number: ' + debug(symbol) - ); - }); - - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN'); - var now = Date.now(); - st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp'); - st.end(); - }); - - t.end(); - }); - - test('ToInteger', function (t) { - t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity, 42], function (num) { - t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); - t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); - }); - t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); - t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); - }); - - test('ToInt32', function (t) { - t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); - t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); - }); - t.end(); - }); - - test('ToUint32', function (t) { - t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); - t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); - t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); - t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); - }); - t.end(); - }); - - test('ToInt16', function (t) { - t.ok(is(0, ES.ToInt16(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt16(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt16(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt16(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt16(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt16(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToInt16(0x80000000 - 1), -1), '2^31 - 1 returns -1'); - t.ok(is(ES.ToInt16(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToInt16(0x10000 - 1), -1), '2^16 - 1 returns -1'); - t.end(); - }); - - test('ToUint16', function (t) { - t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); - t.end(); - }); - - test('ToInt8', function (t) { - t.ok(is(0, ES.ToInt8(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToInt8(num)), num + ' returns +0'); - t.ok(is(0, ES.ToInt8(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToInt8(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToInt8(0x100000000 - 1), -1), '2^32 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToInt8(0x80000000 - 1), -1), '2^31 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToInt8(0x10000 - 1), -1), '2^16 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x100), 0), '2^8 returns +0'); - t.ok(is(ES.ToInt8(0x100 - 1), -1), '2^8 - 1 returns -1'); - t.ok(is(ES.ToInt8(0x10), 0x10), '2^4 returns 2^4'); - t.end(); - }); - - test('ToUint8', function (t) { - t.ok(is(0, ES.ToUint8(NaN)), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.ok(is(0, ES.ToUint8(num)), num + ' returns +0'); - t.ok(is(0, ES.ToUint8(-num)), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.ok(is(ES.ToUint8(0x100000000), 0), '2^32 returns +0'); - t.ok(is(ES.ToUint8(0x100000000 - 1), 0x100 - 1), '2^32 - 1 returns 2^8 - 1'); - t.ok(is(ES.ToUint8(0x80000000), 0), '2^31 returns +0'); - t.ok(is(ES.ToUint8(0x80000000 - 1), 0x100 - 1), '2^31 - 1 returns 2^8 - 1'); - t.ok(is(ES.ToUint8(0x10000), 0), '2^16 returns +0'); - t.ok(is(ES.ToUint8(0x10000 - 1), 0x100 - 1), '2^16 - 1 returns 2^8 - 1'); - t.ok(is(ES.ToUint8(0x100), 0), '2^8 returns +0'); - t.ok(is(ES.ToUint8(0x100 - 1), 0x100 - 1), '2^8 - 1 returns 2^16 - 1'); - t.ok(is(ES.ToUint8(0x10), 0x10), '2^4 returns 2^4'); - t.ok(is(ES.ToUint8(0x10 - 1), 0x10 - 1), '2^4 - 1 returns 2^4 - 1'); - t.end(); - }); - - test('ToUint8Clamp', function (t) { - t.ok(is(0, ES.ToUint8Clamp(NaN)), 'NaN coerces to +0'); - t.ok(is(0, ES.ToUint8Clamp(0)), '+0 returns +0'); - t.ok(is(0, ES.ToUint8Clamp(-0)), '-0 returns +0'); - t.ok(is(0, ES.ToUint8Clamp(-Infinity)), '-Infinity returns +0'); - t['throws'](function () { return ES.ToUint8Clamp(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - forEach([255, 256, 0x100000, Infinity], function (number) { - t.ok(is(255, ES.ToUint8Clamp(number)), number + ' coerces to 255'); - }); - t.equal(1, ES.ToUint8Clamp(1.49), '1.49 coerces to 1'); - t.equal(2, ES.ToUint8Clamp(1.5), '1.5 coerces to 2, because 2 is even'); - t.equal(2, ES.ToUint8Clamp(1.51), '1.51 coerces to 2'); - - t.equal(2, ES.ToUint8Clamp(2.49), '2.49 coerces to 2'); - t.equal(2, ES.ToUint8Clamp(2.5), '2.5 coerces to 2, because 2 is even'); - t.equal(3, ES.ToUint8Clamp(2.51), '2.51 coerces to 3'); - t.end(); - }); - - test('ToString', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (item) { - t.equal(ES.ToString(item), String(item), 'ES.ToString(' + debug(item) + ') ToStrings to String(' + debug(item) + ')'); - }); - - t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - - forEach(v.symbols, function (symbol) { - t['throws'](function () { return ES.ToString(symbol); }, TypeError, debug(symbol) + ' throws'); - }); - t.end(); - }); - - test('ToObject', function (t) { - t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); - forEach(v.numbers, function (number) { - var obj = ES.ToObject(number); - t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); - t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); - t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); - }); - t.end(); - }); - - test('RequireObjectCoercible', function (t) { - t.equal(false, 'CheckObjectCoercible' in ES, 'CheckObjectCoercible -> RequireObjectCoercible in ES6'); - t['throws'](function () { return ES.RequireObjectCoercible(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.RequireObjectCoercible(null); }, TypeError, 'null throws'); - var isCoercible = function (value) { - t.doesNotThrow(function () { return ES.RequireObjectCoercible(value); }, debug(value) + ' does not throw'); - }; - forEach(v.objects.concat(v.nonNullPrimitives), isCoercible); - t.end(); - }); - - test('IsCallable', function (t) { - t.equal(true, ES.IsCallable(function () {}), 'function is callable'); - var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(v.nonFunctions); - forEach(nonCallables, function (nonCallable) { - t.equal(false, ES.IsCallable(nonCallable), debug(nonCallable) + ' is not callable'); - }); - t.end(); - }); - - test('SameValue', function (t) { - t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); - t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValue(val, val), debug(val) + ' is SameValue to itself'); - }); - t.end(); - }); - - test('SameValueZero', function (t) { - t.equal(true, ES.SameValueZero(NaN, NaN), 'NaN is SameValueZero as NaN'); - t.equal(true, ES.SameValueZero(0, -0), '+0 is SameValueZero as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValueZero(val, val), debug(val) + ' is SameValueZero to itself'); - }); - t.end(); - }); - - test('ToPropertyKey', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (value) { - t.equal(ES.ToPropertyKey(value), String(value), 'ToPropertyKey(value) === String(value) for non-Symbols'); - }); - - forEach(v.symbols, function (symbol) { - t.equal( - ES.ToPropertyKey(symbol), - symbol, - 'ToPropertyKey(' + debug(symbol) + ') === ' + debug(symbol) - ); - t.equal( - ES.ToPropertyKey(Object(symbol)), - symbol, - 'ToPropertyKey(' + debug(Object(symbol)) + ') === ' + debug(symbol) - ); - }); - - t.end(); - }); - - test('ToLength', function (t) { - t['throws'](function () { return ES.ToLength(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - t.equal(3, ES.ToLength(v.coercibleObject), 'coercibleObject coerces to 3'); - t.equal(42, ES.ToLength('42.5'), '"42.5" coerces to 42'); - t.equal(7, ES.ToLength(7.3), '7.3 coerces to 7'); - forEach([-0, -1, -42, -Infinity], function (negative) { - t.ok(is(0, ES.ToLength(negative)), negative + ' coerces to +0'); - }); - t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 1), '2^53 coerces to 2^53 - 1'); - t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 3), '2^53 + 2 coerces to 2^53 - 1'); - t.end(); - }); - - test('IsArray', function (t) { - t.equal(true, ES.IsArray([]), '[] is array'); - t.equal(false, ES.IsArray({}), '{} is not array'); - t.equal(false, ES.IsArray({ length: 1, 0: true }), 'arraylike object is not array'); - forEach(v.objects.concat(v.primitives), function (value) { - t.equal(false, ES.IsArray(value), debug(value) + ' is not array'); - }); - t.end(); - }); - - test('IsRegExp', function (t) { - forEach([/a/g, new RegExp('a', 'g')], function (regex) { - t.equal(true, ES.IsRegExp(regex), regex + ' is regex'); - }); - - forEach(v.objects.concat(v.primitives), function (nonRegex) { - t.equal(false, ES.IsRegExp(nonRegex), debug(nonRegex) + ' is not regex'); - }); - - t.test('Symbol.match', { skip: !v.hasSymbols || !Symbol.match }, function (st) { - var obj = {}; - obj[Symbol.match] = true; - st.equal(true, ES.IsRegExp(obj), 'object with truthy Symbol.match is regex'); - - var regex = /a/; - regex[Symbol.match] = false; - st.equal(false, ES.IsRegExp(regex), 'regex with falsy Symbol.match is not regex'); - - st.end(); - }); - - t.end(); - }); - - test('IsPropertyKey', function (t) { - forEach(v.numbers.concat(v.objects), function (notKey) { - t.equal(false, ES.IsPropertyKey(notKey), debug(notKey) + ' is not property key'); - }); - - t.equal(true, ES.IsPropertyKey('foo'), 'string is property key'); - - forEach(v.symbols, function (symbol) { - t.equal(true, ES.IsPropertyKey(symbol), debug(symbol) + ' is property key'); - }); - t.end(); - }); - - test('IsInteger', function (t) { - for (var i = -100; i < 100; i += 10) { - t.equal(true, ES.IsInteger(i), i + ' is integer'); - t.equal(false, ES.IsInteger(i + 0.2), (i + 0.2) + ' is not integer'); - } - t.equal(true, ES.IsInteger(-0), '-0 is integer'); - var notInts = v.nonNumbers.concat(v.nonIntegerNumbers, v.infinities, [NaN, [], new Date()]); - forEach(notInts, function (notInt) { - t.equal(false, ES.IsInteger(notInt), debug(notInt) + ' is not integer'); - }); - t.equal(false, ES.IsInteger(v.uncoercibleObject), 'uncoercibleObject is not integer'); - t.end(); - }); - - test('IsExtensible', function (t) { - forEach(v.objects, function (object) { - t.equal(true, ES.IsExtensible(object), debug(object) + ' object is extensible'); - }); - forEach(v.primitives, function (primitive) { - t.equal(false, ES.IsExtensible(primitive), debug(primitive) + ' is not extensible'); - }); - if (Object.preventExtensions) { - t.equal(false, ES.IsExtensible(Object.preventExtensions({})), 'object with extensions prevented is not extensible'); - } - t.end(); - }); - - test('CanonicalNumericIndexString', function (t) { - var throwsOnNonString = function (notString) { - t['throws']( - function () { return ES.CanonicalNumericIndexString(notString); }, - TypeError, - debug(notString) + ' is not a string' - ); - }; - forEach(v.objects.concat(v.numbers), throwsOnNonString); - t.ok(is(-0, ES.CanonicalNumericIndexString('-0')), '"-0" returns -0'); - for (var i = -50; i < 50; i += 10) { - t.equal(i, ES.CanonicalNumericIndexString(String(i)), '"' + i + '" returns ' + i); - t.equal(undefined, ES.CanonicalNumericIndexString(String(i) + 'a'), '"' + i + 'a" returns undefined'); - } - t.end(); - }); - - test('IsConstructor', function (t) { - t.equal(true, ES.IsConstructor(function () {}), 'function is constructor'); - t.equal(false, ES.IsConstructor(/a/g), 'regex is not constructor'); - forEach(v.objects, function (object) { - t.equal(false, ES.IsConstructor(object), object + ' object is not constructor'); - }); - - try { - var foo = Function('return class Foo {}')(); // eslint-disable-line no-new-func - t.equal(ES.IsConstructor(foo), true, 'class is constructor'); - } catch (e) { - t.comment('SKIP: class syntax not supported.'); - } - t.end(); - }); - - test('Call', function (t) { - var receiver = {}; - var notFuncs = v.nonFunctions.concat([/a/g, new RegExp('a', 'g')]); - t.plan(notFuncs.length + 4); - var throwsIfNotCallable = function (notFunc) { - t['throws']( - function () { return ES.Call(notFunc, receiver); }, - TypeError, - debug(notFunc) + ' (' + typeof notFunc + ') is not callable' - ); - }; - forEach(notFuncs, throwsIfNotCallable); - ES.Call( - function (a, b) { - t.equal(this, receiver, 'context matches expected'); - t.deepEqual([a, b], [1, 2], 'named args are correct'); - t.equal(arguments.length, 3, 'extra argument was passed'); - t.equal(arguments[2], 3, 'extra argument was correct'); - }, - receiver, - [1, 2, 3] - ); - t.end(); - }); - - test('GetV', function (t) { - t['throws'](function () { return ES.GetV({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - var obj = { a: function () {} }; - t.equal(ES.GetV(obj, 'a'), obj.a, 'returns property if it exists'); - t.equal(ES.GetV(obj, 'b'), undefined, 'returns undefiend if property does not exist'); - t.end(); - }); - - test('GetMethod', function (t) { - t['throws'](function () { return ES.GetMethod({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - t.equal(ES.GetMethod({}, 'a'), undefined, 'returns undefined in property is undefined'); - t.equal(ES.GetMethod({ a: null }, 'a'), undefined, 'returns undefined if property is null'); - t.equal(ES.GetMethod({ a: undefined }, 'a'), undefined, 'returns undefined if property is undefined'); - var obj = { a: function () {} }; - t['throws'](function () { ES.GetMethod({ a: 'b' }, 'a'); }, TypeError, 'throws TypeError if property exists and is not callable'); - t.equal(ES.GetMethod(obj, 'a'), obj.a, 'returns property if it is callable'); - t.end(); - }); - - test('Get', function (t) { - t['throws'](function () { return ES.Get('a', 'a'); }, TypeError, 'Throws a TypeError if `O` is not an Object'); - t['throws'](function () { return ES.Get({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - - var value = {}; - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - var sym = Symbol('sym'); - var obj = {}; - obj[sym] = value; - st.equal(ES.Get(obj, sym), value, 'returns property `P` if it exists on object `O`'); - st.end(); - }); - t.equal(ES.Get({ a: value }, 'a'), value, 'returns property `P` if it exists on object `O`'); - t.end(); - }); - - test('Type', { skip: !v.hasSymbols }, function (t) { - t.equal(ES.Type(Symbol.iterator), 'Symbol', 'Type(Symbol.iterator) is Symbol'); - t.end(); - }); - - test('SpeciesConstructor', function (t) { - t['throws'](function () { ES.SpeciesConstructor(null); }, TypeError); - t['throws'](function () { ES.SpeciesConstructor(undefined); }, TypeError); - - var defaultConstructor = function Foo() {}; - - t.equal( - ES.SpeciesConstructor({ constructor: undefined }, defaultConstructor), - defaultConstructor, - 'undefined constructor returns defaultConstructor' - ); - - t['throws']( - function () { return ES.SpeciesConstructor({ constructor: null }, defaultConstructor); }, - TypeError, - 'non-undefined non-object constructor throws' - ); - - t.test('with Symbol.species', { skip: !hasSpecies }, function (st) { - var Bar = function Bar() {}; - Bar[Symbol.species] = null; - - st.equal( - ES.SpeciesConstructor(new Bar(), defaultConstructor), - defaultConstructor, - 'undefined/null Symbol.species returns default constructor' - ); - - var Baz = function Baz() {}; - Baz[Symbol.species] = Bar; - st.equal( - ES.SpeciesConstructor(new Baz(), defaultConstructor), - Bar, - 'returns Symbol.species constructor value' - ); - - Baz[Symbol.species] = {}; - st['throws']( - function () { ES.SpeciesConstructor(new Baz(), defaultConstructor); }, - TypeError, - 'throws when non-constructor non-null non-undefined species value found' - ); - - st.end(); - }); - - t.end(); - }); - - test('IsPropertyDescriptor', { skip: skips && skips.IsPropertyDescriptor }, function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t.equal( - ES.IsPropertyDescriptor(primitive), - false, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.dataDescriptor()), true, 'data descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); - - t['throws']( - function () { ES.IsPropertyDescriptor(v.bothDescriptor()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t.end(); - }); - - assertRecordTests(ES, test); - - test('IsAccessorDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsAccessorDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); - - t.equal(ES.IsAccessorDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); - - t.end(); - }); - - test('IsDataDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsDataDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsDataDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.dataDescriptor()), true, 'data descriptor is a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); - - t.end(); - }); - - test('IsGenericDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsGenericDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); - - t.end(); - }); - - test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = v.dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'] - }); - - t.deepEqual(ES.FromPropertyDescriptor(v.genericDescriptor()), { - enumerable: false, - configurable: true - }); - - t.end(); - }); - - test('ToPropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.ToPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }), accessor); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }), mutator); - - var data = v.dataDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - value: data['[[Value]]'], - writable: data['[[Writable]]'], - configurable: !!data['[[Configurable]]'] - }), assign(data, { '[[Configurable]]': false })); - - var both = v.bothDescriptor(); - t['throws']( - function () { - ES.FromPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); - }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t.end(); - }); - - test('CompletePropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.CompletePropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var generic = v.genericDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(generic), - { - '[[Configurable]]': !!generic['[[Configurable]]'], - '[[Enumerable]]': !!generic['[[Enumerable]]'], - '[[Value]]': undefined, - '[[Writable]]': false - }, - 'completes a Generic Descriptor' - ); - - var data = v.dataDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(data), - { - '[[Configurable]]': !!data['[[Configurable]]'], - '[[Enumerable]]': false, - '[[Value]]': data['[[Value]]'], - '[[Writable]]': !!data['[[Writable]]'] - }, - 'completes a Data Descriptor' - ); - - var accessor = v.accessorDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(accessor), - { - '[[Get]]': accessor['[[Get]]'], - '[[Enumerable]]': !!accessor['[[Enumerable]]'], - '[[Configurable]]': !!accessor['[[Configurable]]'], - '[[Set]]': undefined - }, - 'completes an Accessor Descriptor' - ); - - var mutator = v.mutatorDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(mutator), - { - '[[Set]]': mutator['[[Set]]'], - '[[Enumerable]]': !!mutator['[[Enumerable]]'], - '[[Configurable]]': !!mutator['[[Configurable]]'], - '[[Get]]': undefined - }, - 'completes a mutator Descriptor' - ); - - t['throws']( - function () { ES.CompletePropertyDescriptor(v.bothDescriptor()); }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t.end(); - }); - - test('Set', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.Set(primitive, '', null, false); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.Set({}, nonKey, null, false); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.Set({}, '', null, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - var o = {}; - var value = {}; - ES.Set(o, 'key', value, true); - t.deepEqual(o, { key: value }, 'key is set'); - - t.test('nonwritable', { skip: !Object.defineProperty }, function (st) { - var obj = { a: value }; - Object.defineProperty(obj, 'a', { writable: false }); - - st['throws']( - function () { ES.Set(obj, 'a', value, true); }, - TypeError, - 'can not Set nonwritable property' - ); - - st.doesNotThrow( - function () { ES.Set(obj, 'a', value, false); }, - 'setting Throw to false prevents an exception' - ); - - st.end(); - }); - - t.test('nonconfigurable', { skip: !Object.defineProperty }, function (st) { - var obj = { a: value }; - Object.defineProperty(obj, 'a', { configurable: false }); - - ES.Set(obj, 'a', value, true); - st.deepEqual(obj, { a: value }, 'key is set'); - - st.end(); - }); - - t.end(); - }); - - test('HasOwnProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.HasOwnProperty(primitive, 'key'); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.HasOwnProperty({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.HasOwnProperty({}, 'toString'), false, 'inherited properties are not own'); - t.equal( - ES.HasOwnProperty({ toString: 1 }, 'toString'), - true, - 'shadowed inherited own properties are own' - ); - t.equal(ES.HasOwnProperty({ a: 1 }, 'a'), true, 'own properties are own'); - - t.end(); - }); - - test('HasProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.HasProperty(primitive, 'key'); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.HasProperty({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.HasProperty({}, 'nope'), false, 'object does not have nonexistent properties'); - t.equal(ES.HasProperty({}, 'toString'), true, 'object has inherited properties'); - t.equal( - ES.HasProperty({ toString: 1 }, 'toString'), - true, - 'object has shadowed inherited own properties' - ); - t.equal(ES.HasProperty({ a: 1 }, 'a'), true, 'object has own properties'); - - t.end(); - }); - - test('IsConcatSpreadable', function (t) { - forEach(v.primitives, function (primitive) { - t.equal(ES.IsConcatSpreadable(primitive), false, debug(primitive) + ' is not an Object'); - }); - - var hasSymbolConcatSpreadable = v.hasSymbols && Symbol.isConcatSpreadable; - t.test('Symbol.isConcatSpreadable', { skip: !hasSymbolConcatSpreadable }, function (st) { - forEach(v.falsies, function (falsy) { - var obj = {}; - obj[Symbol.isConcatSpreadable] = falsy; - st.equal( - ES.IsConcatSpreadable(obj), - false, - 'an object with ' + debug(falsy) + ' as Symbol.isConcatSpreadable is not concat spreadable' - ); - }); - - forEach(v.truthies, function (truthy) { - var obj = {}; - obj[Symbol.isConcatSpreadable] = truthy; - st.equal( - ES.IsConcatSpreadable(obj), - true, - 'an object with ' + debug(truthy) + ' as Symbol.isConcatSpreadable is concat spreadable' - ); - }); - - st.end(); - }); - - forEach(v.objects, function (object) { - t.equal( - ES.IsConcatSpreadable(object), - false, - 'non-array without Symbol.isConcatSpreadable is not concat spreadable' - ); - }); - - t.equal(ES.IsConcatSpreadable([]), true, 'arrays are concat spreadable'); - - t.end(); - }); - - test('Invoke', function (t) { - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.Invoke({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t['throws'](function () { ES.Invoke({ o: false }, 'o'); }, TypeError, 'fails on a non-function'); - - t.test('invoked callback', function (st) { - var aValue = {}; - var bValue = {}; - var obj = { - f: function (a) { - st.equal(arguments.length, 2, '2 args passed'); - st.equal(a, aValue, 'first arg is correct'); - st.equal(arguments[1], bValue, 'second arg is correct'); - } - }; - st.plan(3); - ES.Invoke(obj, 'f', aValue, bValue); - }); - - t.end(); - }); - - test('GetIterator', function (t) { - var arr = [1, 2]; - testIterator(t, ES.GetIterator(arr), arr); - - testIterator(t, ES.GetIterator('abc'), 'abc'.split('')); - - t.test('Symbol.iterator', { skip: !v.hasSymbols }, function (st) { - var m = new Map(); - m.set(1, 'a'); - m.set(2, 'b'); - - testIterator(st, ES.GetIterator(m), [[1, 'a'], [2, 'b']]); - - st.end(); - }); - - t.end(); - }); - - test('IteratorNext', { skip: true }); - - test('IteratorComplete', { skip: true }); - - test('IteratorValue', { skip: true }); - - test('IteratorStep', { skip: true }); - - test('IteratorClose', { skip: true }); - - test('CreateIterResultObject', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.CreateIterResultObject({}, nonBoolean); }, - TypeError, - '"done" argument must be a boolean; ' + debug(nonBoolean) + ' is not' - ); - }); - - var value = {}; - t.deepEqual( - ES.CreateIterResultObject(value, true), - { value: value, done: true }, - 'creates a "done" iteration result' - ); - t.deepEqual( - ES.CreateIterResultObject(value, false), - { value: value, done: false }, - 'creates a "not done" iteration result' - ); - - t.end(); - }); - - test('RegExpExec', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.RegExpExec(primitive); }, - TypeError, - '"R" argument must be an object; ' + debug(primitive) + ' is not' - ); - }); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.RegExpExec({}, nonString); }, - TypeError, - '"S" argument must be a String; ' + debug(nonString) + ' is not' - ); - }); - - t.test('gets and calls a callable "exec"', function (st) { - var str = '123'; - var o = { - exec: function (S) { - st.equal(this, o, '"exec" receiver is R'); - st.equal(S, str, '"exec" argument is S'); - - return null; - } - }; - st.plan(2); - ES.RegExpExec(o, str); - st.end(); - }); - - t.test('throws if a callable "exec" returns a non-null non-object', function (st) { - var str = '123'; - st.plan(v.nonNullPrimitives.length); - forEach(v.nonNullPrimitives, function (nonNullPrimitive) { - st['throws']( - function () { ES.RegExpExec({ exec: function () { return nonNullPrimitive; } }, str); }, - TypeError, - '"exec" method must return `null` or an Object; ' + debug(nonNullPrimitive) + ' is not' - ); - }); - st.end(); - }); - - t.test('actual regex that should match against a string', function (st) { - var S = 'aabc'; - var R = /a/g; - var match1 = ES.RegExpExec(R, S); - var match2 = ES.RegExpExec(R, S); - var match3 = ES.RegExpExec(R, S); - st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); - st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); - st.equal(match3, null, 'match 3 is null as expected'); - st.end(); - }); - - t.test('actual regex that should match against a string, with shadowed "exec"', function (st) { - var S = 'aabc'; - var R = /a/g; - R.exec = undefined; - var match1 = ES.RegExpExec(R, S); - var match2 = ES.RegExpExec(R, S); - var match3 = ES.RegExpExec(R, S); - st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); - st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); - st.equal(match3, null, 'match 3 is null as expected'); - st.end(); - }); - t.end(); - }); - - test('ArraySpeciesCreate', function (t) { - t.test('errors', function (st) { - var testNonNumber = function (nonNumber) { - st['throws']( - function () { ES.ArraySpeciesCreate([], nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a number' - ); - }; - forEach(v.nonNumbers, testNonNumber); - - st['throws']( - function () { ES.ArraySpeciesCreate([], -1); }, - TypeError, - '-1 is not >= 0' - ); - st['throws']( - function () { ES.ArraySpeciesCreate([], -Infinity); }, - TypeError, - '-Infinity is not >= 0' - ); - - var testNonIntegers = function (nonInteger) { - st['throws']( - function () { ES.ArraySpeciesCreate([], nonInteger); }, - TypeError, - debug(nonInteger) + ' is not an integer' - ); - }; - forEach(v.nonIntegerNumbers, testNonIntegers); - - st.end(); - }); - - t.test('works with a non-array', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - var arr = ES.ArraySpeciesCreate(nonArray, 0); - st.ok(ES.IsArray(arr), 'is an array'); - st.equal(arr.length, 0, 'length is correct'); - st.equal(arr.constructor, Array, 'constructor is correct'); - }); - - st.end(); - }); - - t.test('works with a normal array', function (st) { - var len = 2; - var orig = [1, 2, 3]; - var arr = ES.ArraySpeciesCreate(orig, len); - - st.ok(ES.IsArray(arr), 'is an array'); - st.equal(arr.length, len, 'length is correct'); - st.equal(arr.constructor, orig.constructor, 'constructor is correct'); - - st.end(); - }); - - t.test('-0 length produces +0 length', function (st) { - var len = -0; - st.ok(is(len, -0), '-0 is negative zero'); - st.notOk(is(len, 0), '-0 is not positive zero'); - - var orig = [1, 2, 3]; - var arr = ES.ArraySpeciesCreate(orig, len); - - st.equal(ES.IsArray(arr), true); - st.ok(is(arr.length, 0)); - st.equal(arr.constructor, orig.constructor); - - st.end(); - }); - - t.test('works with species construtor', { skip: !hasSpecies }, function (st) { - var sentinel = {}; - var Foo = function Foo(len) { - this.length = len; - this.sentinel = sentinel; - }; - var Bar = getArraySubclassWithSpeciesConstructor(Foo); - var bar = new Bar(); - - t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Foo, 'result used species constructor'); - st.equal(arr.length, 3, 'length property is correct'); - st.equal(arr.sentinel, sentinel, 'Foo constructor was exercised'); - - st.end(); - }); - - t.test('works with null species constructor', { skip: !hasSpecies }, function (st) { - var Bar = getArraySubclassWithSpeciesConstructor(null); - var bar = new Bar(); - - t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Array, 'result used default constructor'); - st.equal(arr.length, 3, 'length property is correct'); - - st.end(); - }); - - t.test('works with undefined species constructor', { skip: !hasSpecies }, function (st) { - var Bar = getArraySubclassWithSpeciesConstructor(); - var bar = new Bar(); - - t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Array, 'result used default constructor'); - st.equal(arr.length, 3, 'length property is correct'); - - st.end(); - }); - - t.test('throws with object non-construtor species constructor', { skip: !hasSpecies }, function (st) { - forEach(v.objects, function (obj) { - var Bar = getArraySubclassWithSpeciesConstructor(obj); - var bar = new Bar(); - - st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - st['throws']( - function () { ES.ArraySpeciesCreate(bar, 3); }, - TypeError, - debug(obj) + ' is not a constructor' - ); - }); - - st.end(); - }); - - t.end(); - }); - - test('CreateDataProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateDataProperty(primitive); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateDataProperty({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a property key' - ); - }); - - var sentinel = {}; - forEach(v.propertyKeys, function (propertyKey) { - var obj = {}; - var status = ES.CreateDataProperty(obj, propertyKey, sentinel); - t.equal(status, true, 'status is true'); - t.equal( - obj[propertyKey], - sentinel, - debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - - if (typeof Object.defineProperty === 'function') { - var nonWritable = Object.defineProperty({}, propertyKey, { configurable: true, writable: false }); - - var nonWritableStatus = ES.CreateDataProperty(nonWritable, propertyKey, sentinel); - t.equal(nonWritableStatus, false, 'create data property failed'); - t.notEqual( - nonWritable[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonwritable' - ); - - var nonConfigurable = Object.defineProperty({}, propertyKey, { configurable: false, writable: true }); - - var nonConfigurableStatus = ES.CreateDataProperty(nonConfigurable, propertyKey, sentinel); - t.equal(nonConfigurableStatus, false, 'create data property failed'); - t.notEqual( - nonConfigurable[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonconfigurable' - ); - } - }); - - t.end(); - }); - - test('CreateDataPropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateDataPropertyOrThrow(primitive); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateDataPropertyOrThrow({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a property key' - ); - }); - - var sentinel = {}; - forEach(v.propertyKeys, function (propertyKey) { - var obj = {}; - var status = ES.CreateDataPropertyOrThrow(obj, propertyKey, sentinel); - t.equal(status, true, 'status is true'); - t.equal( - obj[propertyKey], - sentinel, - debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - - if (typeof Object.preventExtensions === 'function') { - var notExtensible = {}; - Object.preventExtensions(notExtensible); - - t['throws']( - function () { ES.CreateDataPropertyOrThrow(notExtensible, propertyKey, sentinel); }, - TypeError, - 'can not install ' + debug(propertyKey) + ' on non-extensible object' - ); - t.notEqual( - notExtensible[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object' - ); - } - }); - - t.end(); - }); - - test('ObjectCreate', function (t) { - forEach(v.nonNullPrimitives, function (value) { - t['throws']( - function () { ES.ObjectCreate(value); }, - TypeError, - debug(value) + ' is not null, or an object' - ); - }); - - t.test('proto arg', function (st) { - var Parent = function Parent() {}; - Parent.prototype.foo = {}; - var child = ES.ObjectCreate(Parent.prototype); - st.equal(child instanceof Parent, true, 'child is instanceof Parent'); - st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); - - st.end(); - }); - - t.test('internal slots arg', function (st) { - st.doesNotThrow(function () { ES.ObjectCreate(null, []); }, 'an empty slot list is valid'); - - st['throws']( - function () { ES.ObjectCreate(null, ['a']); }, - SyntaxError, - 'internal slots are not supported' - ); - - st.end(); - }); - - t.test('null proto', { skip: !Object.create }, function (st) { - st.equal('toString' in {}, true, 'normal objects have toString'); - st.equal('toString' in ES.ObjectCreate(null), false, 'makes a null object'); - - st.end(); - }); - - t.test('null proto when no native Object.create', { skip: Object.create }, function (st) { - st['throws']( - function () { ES.ObjectCreate(null); }, - SyntaxError, - 'without a native Object.create, can not create null objects' - ); - - st.end(); - }); - - t.end(); - }); - - test('AdvanceStringIndex', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.AdvanceStringIndex(nonString); }, - TypeError, - '"S" argument must be a String; ' + debug(nonString) + ' is not' - ); - }); - - var notInts = v.nonNumbers.concat( - v.nonIntegerNumbers, - v.infinities, - [NaN, [], new Date(), Math.pow(2, 53), -1] - ); - forEach(notInts, function (nonInt) { - t['throws']( - function () { ES.AdvanceStringIndex('abc', nonInt); }, - TypeError, - '"index" argument must be an integer, ' + debug(nonInt) + ' is not.' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.AdvanceStringIndex('abc', 0, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - var str = 'a\uD83D\uDCA9c'; - - t.test('non-unicode mode', function (st) { - for (var i = 0; i < str.length + 2; i += 1) { - st.equal(ES.AdvanceStringIndex(str, i, false), i + 1, i + ' advances to ' + (i + 1)); - } - - st.end(); - }); - - t.test('unicode mode', function (st) { - st.equal(ES.AdvanceStringIndex(str, 0, true), 1, '0 advances to 1'); - st.equal(ES.AdvanceStringIndex(str, 1, true), 3, '1 advances to 3'); - st.equal(ES.AdvanceStringIndex(str, 2, true), 3, '2 advances to 3'); - st.equal(ES.AdvanceStringIndex(str, 3, true), 4, '3 advances to 4'); - st.equal(ES.AdvanceStringIndex(str, 4, true), 5, '4 advances to 5'); - - st.end(); - }); - - t.test('lone surrogates', function (st) { - var halfPoo = 'a\uD83Dc'; - - st.equal(ES.AdvanceStringIndex(halfPoo, 0, true), 1, '0 advances to 1'); - st.equal(ES.AdvanceStringIndex(halfPoo, 1, true), 2, '1 advances to 2'); - st.equal(ES.AdvanceStringIndex(halfPoo, 2, true), 3, '2 advances to 3'); - st.equal(ES.AdvanceStringIndex(halfPoo, 3, true), 4, '3 advances to 4'); - - st.end(); - }); - - t.test('surrogate pairs', function (st) { - var lowestPair = String.fromCharCode('0xD800') + String.fromCharCode('0xDC00'); - var highestPair = String.fromCharCode('0xDBFF') + String.fromCharCode('0xDFFF'); - var poop = String.fromCharCode('0xD83D') + String.fromCharCode('0xDCA9'); - - st.equal(ES.AdvanceStringIndex(lowestPair, 0, true), 2, 'lowest surrogate pair, 0 -> 2'); - st.equal(ES.AdvanceStringIndex(highestPair, 0, true), 2, 'highest surrogate pair, 0 -> 2'); - st.equal(ES.AdvanceStringIndex(poop, 0, true), 2, 'poop, 0 -> 2'); - - st.end(); - }); - - t.end(); - }); - - test('CreateMethodProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateMethodProperty(primitive, 'key'); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateMethodProperty({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = {}; - var key = 'the key'; - var value = { foo: 'bar' }; - - st.equal(ES.CreateMethodProperty(obj, key, value), true, 'defines property successfully'); - st.test('property descriptor', { skip: !Object.getOwnPropertyDescriptor }, function (s2t) { - s2t.deepEqual( - Object.getOwnPropertyDescriptor(obj, key), - { - configurable: true, - enumerable: false, - value: value, - writable: true - }, - 'sets the correct property descriptor' - ); - - s2t.end(); - }); - st.equal(obj[key], value, 'sets the correct value'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { ES.CreateMethodProperty(obj, 'foo', { value: 'baz' }); }, - TypeError, - 'nonconfigurable key can not be defined' - ); - - st.end(); - }); - - var hasNonConfigurableFunctionName = !Object.getOwnPropertyDescriptor - || !Object.getOwnPropertyDescriptor(function () {}, 'name').configurable; - t.test('fails as expected on a function with a nonconfigurable name', { skip: !hasNonConfigurableFunctionName }, function (st) { - st['throws']( - function () { ES.CreateMethodProperty(function () {}, 'name', { value: 'baz' }); }, - TypeError, - 'nonconfigurable function name can not be defined' - ); - st.end(); - }); - - t.end(); - }); - - test('DefinePropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.DefinePropertyOrThrow(primitive, 'key', {}); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.DefinePropertyOrThrow({}, nonPropertyKey, {}); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = {}; - var key = 'the key'; - var descriptor = { - configurable: true, - enumerable: false, - value: { foo: 'bar' }, - writable: true - }; - - st.equal(ES.DefinePropertyOrThrow(obj, key, descriptor), true, 'defines property successfully'); - st.test('property descriptor', { skip: !Object.getOwnPropertyDescriptor }, function (s2t) { - s2t.deepEqual( - Object.getOwnPropertyDescriptor(obj, key), - descriptor, - 'sets the correct property descriptor' - ); - - s2t.end(); - }); - st.deepEqual(obj[key], descriptor.value, 'sets the correct value'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { - ES.DefinePropertyOrThrow(obj, 'foo', { configurable: true, value: 'baz' }); - }, - TypeError, - 'nonconfigurable key can not be defined' - ); - - st.end(); - }); - - var hasNonConfigurableFunctionName = !Object.getOwnPropertyDescriptor - || !Object.getOwnPropertyDescriptor(function () {}, 'name').configurable; - t.test('fails as expected on a function with a nonconfigurable name', { skip: !hasNonConfigurableFunctionName }, function (st) { - st['throws']( - function () { - ES.DefinePropertyOrThrow(function () {}, 'name', { configurable: true, value: 'baz' }); - }, - TypeError, - 'nonconfigurable function name can not be defined' - ); - st.end(); - }); - - t.end(); - }); - - test('DeletePropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.DeletePropertyOrThrow(primitive, 'key', {}); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.DeletePropertyOrThrow({}, nonPropertyKey, {}); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = { 'the key': 42 }; - var key = 'the key'; - - st.equal(ES.DeletePropertyOrThrow(obj, key), true, 'deletes property successfully'); - st.equal(key in obj, false, 'key is no longer in the object'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { ES.DeletePropertyOrThrow(obj, 'foo'); }, - TypeError, - 'nonconfigurable key can not be deleted' - ); - - st.end(); - }); - - var hasNonConfigurableFunctionName = !Object.getOwnPropertyDescriptor - || !Object.getOwnPropertyDescriptor(function () {}, 'name').configurable; - t.test('fails as expected on a function with a nonconfigurable name', { skip: !hasNonConfigurableFunctionName }, function (st) { - st['throws']( - function () { ES.DeletePropertyOrThrow(function () {}, 'name'); }, - TypeError, - 'nonconfigurable function name can not be deleted' - ); - st.end(); - }); - - t.end(); - }); - - test('EnumerableOwnNames', { skip: skips && skips.EnumerableOwnNames }, function (t) { - var obj = testEnumerableOwnNames(t, function (O) { return ES.EnumerableOwnNames(O); }); - - t.deepEqual( - ES.EnumerableOwnNames(obj), - ['own'], - 'returns enumerable own names' - ); - - t.end(); - }); - - test('thisNumberValue', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.thisNumberValue(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.numbers, function (number) { - t.equal(ES.thisNumberValue(number), number, debug(number) + ' is its own thisNumberValue'); - var obj = Object(number); - t.equal(ES.thisNumberValue(obj), number, debug(obj) + ' is the boxed thisNumberValue'); - }); - - t.end(); - }); - - test('thisBooleanValue', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.thisBooleanValue(nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach(v.booleans, function (boolean) { - t.equal(ES.thisBooleanValue(boolean), boolean, debug(boolean) + ' is its own thisBooleanValue'); - var obj = Object(boolean); - t.equal(ES.thisBooleanValue(obj), boolean, debug(obj) + ' is the boxed thisBooleanValue'); - }); - - t.end(); - }); - - test('thisStringValue', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.thisStringValue(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.strings, function (string) { - t.equal(ES.thisStringValue(string), string, debug(string) + ' is its own thisStringValue'); - var obj = Object(string); - t.equal(ES.thisStringValue(obj), string, debug(obj) + ' is the boxed thisStringValue'); - }); - - t.end(); - }); - - test('thisTimeValue', function (t) { - forEach(v.primitives.concat(v.objects), function (nonDate) { - t['throws']( - function () { ES.thisTimeValue(nonDate); }, - TypeError, - debug(nonDate) + ' is not a Date' - ); - }); - - forEach(v.timestamps, function (timestamp) { - var date = new Date(timestamp); - - t.equal(ES.thisTimeValue(date), timestamp, debug(date) + ' is its own thisTimeValue'); - }); - - t.end(); - }); - - test('SetIntegrityLevel', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.SetIntegrityLevel(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - t['throws']( - function () { ES.SetIntegrityLevel({}); }, - /^TypeError: Assertion failed: `level` must be `"sealed"` or `"frozen"`$/, - '`level` must be `"sealed"` or `"frozen"`' - ); - - var O = { a: 1 }; - t.equal(ES.SetIntegrityLevel(O, 'sealed'), true); - t['throws']( - function () { O.b = 2; }, - /^TypeError: (Cannot|Can't) add property b, object is not extensible$/, - 'sealing prevent new properties from being added' - ); - O.a = 2; - t.equal(O.a, 2, 'pre-frozen, existing properties are mutable'); - - t.equal(ES.SetIntegrityLevel(O, 'frozen'), true); - t['throws']( - function () { O.a = 3; }, - /^TypeError: Cannot assign to read only property 'a' of /, - 'freezing prevents existing properties from being mutated' - ); - - t.end(); - }); - - test('TestIntegrityLevel', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.TestIntegrityLevel(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - t['throws']( - function () { ES.TestIntegrityLevel({ a: 1 }); }, - /^TypeError: Assertion failed: `level` must be `"sealed"` or `"frozen"`$/, - '`level` must be `"sealed"` or `"frozen"`' - ); - - t.equal(ES.TestIntegrityLevel({ a: 1 }, 'sealed'), false, 'basic object is not sealed'); - t.equal(ES.TestIntegrityLevel({ a: 1 }, 'frozen'), false, 'basic object is not frozen'); - - t.test('preventExtensions', { skip: !Object.preventExtensions }, function (st) { - var o = Object.preventExtensions({ a: 1 }); - st.equal(ES.TestIntegrityLevel(o, 'sealed'), false, 'nonextensible object is not sealed'); - st.equal(ES.TestIntegrityLevel(o, 'frozen'), false, 'nonextensible object is not frozen'); - - var empty = Object.preventExtensions({}); - st.equal(ES.TestIntegrityLevel(empty, 'sealed'), true, 'empty nonextensible object is sealed'); - st.equal(ES.TestIntegrityLevel(empty, 'frozen'), true, 'empty nonextensible object is frozen'); - st.end(); - }); - - t.test('seal', { skip: !Object.seal }, function (st) { - var o = Object.seal({ a: 1 }); - st.equal(ES.TestIntegrityLevel(o, 'sealed'), true, 'sealed object is sealed'); - st.equal(ES.TestIntegrityLevel(o, 'frozen'), false, 'sealed object is not frozen'); - - var empty = Object.seal({}); - st.equal(ES.TestIntegrityLevel(empty, 'sealed'), true, 'empty sealed object is sealed'); - st.equal(ES.TestIntegrityLevel(empty, 'frozen'), true, 'empty sealed object is frozen'); - - st.end(); - }); - - t.test('freeze', { skip: !Object.freeze }, function (st) { - var o = Object.freeze({ a: 1 }); - st.equal(ES.TestIntegrityLevel(o, 'sealed'), true, 'frozen object is sealed'); - st.equal(ES.TestIntegrityLevel(o, 'frozen'), true, 'frozen object is frozen'); - - var empty = Object.freeze({}); - st.equal(ES.TestIntegrityLevel(empty, 'sealed'), true, 'empty frozen object is sealed'); - st.equal(ES.TestIntegrityLevel(empty, 'frozen'), true, 'empty frozen object is frozen'); - - st.end(); - }); - - t.end(); - }); - - test('OrdinaryHasInstance', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t.equal(ES.OrdinaryHasInstance(nonFunction, {}), false, debug(nonFunction) + ' is not callable'); - }); - - forEach(v.primitives, function (primitive) { - t.equal(ES.OrdinaryHasInstance(function () {}, primitive), false, debug(primitive) + ' is not an object'); - }); - - var C = function C() {}; - var D = function D() {}; - t.equal(ES.OrdinaryHasInstance(C, new C()), true, 'constructor function has an instance of itself'); - t.equal(ES.OrdinaryHasInstance(C, new D()), false, 'constructor/instance mismatch is false'); - t.equal(ES.OrdinaryHasInstance(D, new C()), false, 'instance/constructor mismatch is false'); - t.equal(ES.OrdinaryHasInstance(C, {}), false, 'plain object is not an instance of a constructor'); - t.equal(ES.OrdinaryHasInstance(Object, {}), true, 'plain object is an instance of Object'); - - t.end(); - }); - - test('OrdinaryHasProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryHasProperty(primitive, ''); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.OrdinaryHasProperty({}, nonPropertyKey); }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.OrdinaryHasProperty({ a: 1 }, 'a'), true, 'own property is true'); - t.equal(ES.OrdinaryHasProperty({}, 'toString'), true, 'inherited property is true'); - t.equal(ES.OrdinaryHasProperty({}, 'nope'), false, 'absent property is false'); - - t.end(); - }); - - test('InstanceofOperator', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.InstanceofOperator(primitive, function () {}); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.InstanceofOperator({}, nonFunction); }, - TypeError, - debug(nonFunction) + ' is not callable' - ); - }); - - var C = function C() {}; - var D = function D() {}; - - t.equal(ES.InstanceofOperator(new C(), C), true, 'constructor function has an instance of itself'); - t.equal(ES.InstanceofOperator(new D(), C), false, 'constructor/instance mismatch is false'); - t.equal(ES.InstanceofOperator(new C(), D), false, 'instance/constructor mismatch is false'); - t.equal(ES.InstanceofOperator({}, C), false, 'plain object is not an instance of a constructor'); - t.equal(ES.InstanceofOperator({}, Object), true, 'plain object is an instance of Object'); - - t.test('Symbol.hasInstance', { skip: !v.hasSymbols || !Symbol.hasInstance }, function (st) { - st.plan(4); - - var O = {}; - var C2 = function () {}; - st.equal(ES.InstanceofOperator(O, C2), false, 'O is not an instance of C2'); - - Object.defineProperty(C2, Symbol.hasInstance, { - value: function (obj) { - st.equal(this, C2, 'hasInstance receiver is C2'); - st.equal(obj, O, 'hasInstance argument is O'); - - return {}; // testing coercion to boolean - } - }); - - st.equal(ES.InstanceofOperator(O, C2), true, 'O is now an instance of C2'); - - st.end(); - }); - - t.end(); - }); - - test('Abstract Equality Comparison', function (t) { - t.test('same types use ===', function (st) { - forEach(v.primitives.concat(v.objects), function (value) { - st.equal(ES['Abstract Equality Comparison'](value, value), value === value, debug(value) + ' is abstractly equal to itself'); - }); - st.end(); - }); - - t.test('different types coerce', function (st) { - var pairs = [ - [null, undefined], - [3, '3'], - [true, '3'], - [true, 3], - [false, 0], - [false, '0'], - [3, [3]], - ['3', [3]], - [true, [1]], - [false, [0]], - [String(v.coercibleObject), v.coercibleObject], - [Number(String(v.coercibleObject)), v.coercibleObject], - [Number(v.coercibleObject), v.coercibleObject], - [String(Number(v.coercibleObject)), v.coercibleObject] - ]; - forEach(pairs, function (pair) { - var a = pair[0]; - var b = pair[1]; - // eslint-disable-next-line eqeqeq - st.equal(ES['Abstract Equality Comparison'](a, b), a == b, debug(a) + ' == ' + debug(b)); - // eslint-disable-next-line eqeqeq - st.equal(ES['Abstract Equality Comparison'](b, a), b == a, debug(b) + ' == ' + debug(a)); - }); - st.end(); - }); - - t.end(); - }); - - test('Strict Equality Comparison', function (t) { - t.test('same types use ===', function (st) { - forEach(v.primitives.concat(v.objects), function (value) { - st.equal(ES['Strict Equality Comparison'](value, value), value === value, debug(value) + ' is strictly equal to itself'); - }); - st.end(); - }); - - t.test('different types are not ===', function (st) { - var pairs = [ - [null, undefined], - [3, '3'], - [true, '3'], - [true, 3], - [false, 0], - [false, '0'], - [3, [3]], - ['3', [3]], - [true, [1]], - [false, [0]], - [String(v.coercibleObject), v.coercibleObject], - [Number(String(v.coercibleObject)), v.coercibleObject], - [Number(v.coercibleObject), v.coercibleObject], - [String(Number(v.coercibleObject)), v.coercibleObject] - ]; - forEach(pairs, function (pair) { - var a = pair[0]; - var b = pair[1]; - st.equal(ES['Strict Equality Comparison'](a, b), a === b, debug(a) + ' === ' + debug(b)); - st.equal(ES['Strict Equality Comparison'](b, a), b === a, debug(b) + ' === ' + debug(a)); - }); - st.end(); - }); - - t.end(); - }); - - test('Abstract Relational Comparison', function (t) { - t.test('at least one operand is NaN', function (st) { - st.equal(ES['Abstract Relational Comparison'](NaN, {}, true), undefined, 'LeftFirst: first is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison']({}, NaN, true), undefined, 'LeftFirst: second is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison'](NaN, {}, false), undefined, '!LeftFirst: first is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison']({}, NaN, false), undefined, '!LeftFirst: second is NaN, returns undefined'); - st.end(); - }); - - t.equal(ES['Abstract Relational Comparison'](3, 4, true), true, 'LeftFirst: 3 is less than 4'); - t.equal(ES['Abstract Relational Comparison'](4, 3, true), false, 'LeftFirst: 3 is not less than 4'); - t.equal(ES['Abstract Relational Comparison'](3, 4, false), true, '!LeftFirst: 3 is less than 4'); - t.equal(ES['Abstract Relational Comparison'](4, 3, false), false, '!LeftFirst: 3 is not less than 4'); - - t.equal(ES['Abstract Relational Comparison']('3', '4', true), true, 'LeftFirst: "3" is less than "4"'); - t.equal(ES['Abstract Relational Comparison']('4', '3', true), false, 'LeftFirst: "3" is not less than "4"'); - t.equal(ES['Abstract Relational Comparison']('3', '4', false), true, '!LeftFirst: "3" is less than "4"'); - t.equal(ES['Abstract Relational Comparison']('4', '3', false), false, '!LeftFirst: "3" is not less than "4"'); - - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, 42, true), true, 'LeftFirst: coercible object is less than 42'); - t.equal(ES['Abstract Relational Comparison'](42, v.coercibleObject, true), false, 'LeftFirst: 42 is not less than coercible object'); - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, 42, false), true, '!LeftFirst: coercible object is less than 42'); - t.equal(ES['Abstract Relational Comparison'](42, v.coercibleObject, false), false, '!LeftFirst: 42 is not less than coercible object'); - - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, '3', true), false, 'LeftFirst: coercible object is not less than "3"'); - t.equal(ES['Abstract Relational Comparison']('3', v.coercibleObject, true), false, 'LeftFirst: "3" is not less than coercible object'); - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, '3', false), false, '!LeftFirst: coercible object is not less than "3"'); - t.equal(ES['Abstract Relational Comparison']('3', v.coercibleObject, false), false, '!LeftFirst: "3" is not less than coercible object'); - - t.end(); - }); - - test('ValidateAndApplyPropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (nonUndefinedPrimitive) { - t['throws']( - function () { ES.ValidateAndApplyPropertyDescriptor(nonUndefinedPrimitive, '', false, v.genericDescriptor(), v.genericDescriptor()); }, - TypeError, - 'O: ' + debug(nonUndefinedPrimitive) + ' is not undefined or an Object' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - undefined, - null, - nonBoolean, - v.genericDescriptor(), - v.genericDescriptor() - ); - }, - TypeError, - 'extensible: ' + debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach(v.primitives, function (primitive) { - // Desc must be a Property Descriptor - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - undefined, - null, - false, - primitive, - v.genericDescriptor() - ); - }, - TypeError, - 'Desc: ' + debug(primitive) + ' is not a Property Descriptor' - ); - }); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - // current must be undefined or a Property Descriptor - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - undefined, - null, - false, - v.genericDescriptor(), - primitive - ); - }, - TypeError, - 'current: ' + debug(primitive) + ' is not a Property Descriptor or undefined' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - // if O is an object, P must be a property key - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - {}, - nonPropertyKey, - false, - v.genericDescriptor(), - v.genericDescriptor() - ); - }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('current is undefined', function (st) { - var propertyKey = 'howdy'; - - st.test('generic descriptor', function (s2t) { - var generic = v.genericDescriptor(); - generic['[[Enumerable]]'] = true; - var O = {}; - ES.ValidateAndApplyPropertyDescriptor(undefined, propertyKey, true, generic); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, false, generic), - false, - 'when extensible is false, nothing happens' - ); - s2t.deepEqual(O, {}, 'no changes applied when O is undefined or extensible is false'); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, true, generic), - true, - 'operation is successful' - ); - var expected = {}; - expected[propertyKey] = undefined; - s2t.deepEqual(O, expected, 'generic descriptor has been defined as an own data property'); - s2t.end(); - }); - - st.test('data descriptor', function (s2t) { - var data = v.dataDescriptor(); - data['[[Enumerable]]'] = true; - - var O = {}; - ES.ValidateAndApplyPropertyDescriptor(undefined, propertyKey, true, data); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, false, data), - false, - 'when extensible is false, nothing happens' - ); - s2t.deepEqual(O, {}, 'no changes applied when O is undefined or extensible is false'); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, true, data), - true, - 'operation is successful' - ); - var expected = {}; - expected[propertyKey] = data['[[Value]]']; - s2t.deepEqual(O, expected, 'data descriptor has been defined as an own data property'); - s2t.end(); - }); - - st.test('accessor descriptor', function (s2t) { - var count = 0; - var accessor = v.accessorDescriptor(); - accessor['[[Enumerable]]'] = true; - accessor['[[Get]]'] = function () { - count += 1; - return count; - }; - - var O = {}; - ES.ValidateAndApplyPropertyDescriptor(undefined, propertyKey, true, accessor); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, false, accessor), - false, - 'when extensible is false, nothing happens' - ); - s2t.deepEqual(O, {}, 'no changes applied when O is undefined or extensible is false'); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, true, accessor), - true, - 'operation is successful' - ); - var expected = {}; - expected[propertyKey] = accessor['[[Get]]']() + 1; - s2t.deepEqual(O, expected, 'accessor descriptor has been defined as an own accessor property'); - s2t.end(); - }); - - st.end(); - }); - - t.test('every field in Desc is absent', { skip: 'it is unclear if having no fields qualifies Desc to be a Property Descriptor' }); - - forEach([v.dataDescriptor, v.accessorDescriptor, v.mutatorDescriptor], function (getDescriptor) { - t.equal( - ES.ValidateAndApplyPropertyDescriptor(undefined, 'property key', true, getDescriptor(), getDescriptor()), - true, - 'when Desc and current are the same, early return true' - ); - }); - - t.test('current is nonconfigurable', function (st) { - // note: these must not be generic descriptors, or else the algorithm returns an early true - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable(v.dataDescriptor()), - v.descriptors.nonConfigurable(v.dataDescriptor()) - ), - false, - 'false if Desc is configurable' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.enumerable(v.dataDescriptor()), - v.descriptors.nonEnumerable(v.dataDescriptor()) - ), - false, - 'false if Desc is Enumerable and current is not' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.nonEnumerable(v.dataDescriptor()), - v.descriptors.enumerable(v.dataDescriptor()) - ), - false, - 'false if Desc is not Enumerable and current is' - ); - - var descLackingEnumerable = v.accessorDescriptor(); - delete descLackingEnumerable['[[Enumerable]]']; - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - descLackingEnumerable, - v.descriptors.enumerable(v.accessorDescriptor()) - ), - true, - 'not false if Desc lacks Enumerable' - ); - - st.end(); - }); - - t.test('Desc and current: one is a data descriptor, one is not', { skip: !Object.defineProperty }, function (st) { - // note: Desc must be configurable if current is nonconfigurable, to hit this branch - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable(v.accessorDescriptor()), - v.descriptors.nonConfigurable(v.dataDescriptor()) - ), - false, - 'false if current (data) is nonconfigurable' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable(v.dataDescriptor()), - v.descriptors.nonConfigurable(v.accessorDescriptor()) - ), - false, - 'false if current (not data) is nonconfigurable' - ); - - // one is data and one is not, - // // if current is data, convert to accessor - // // else convert to data - - var startsWithData = { - 'property key': 42 - }; - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - startsWithData, - 'property key', - true, - v.descriptors.enumerable(v.descriptors.configurable(v.accessorDescriptor())), - v.descriptors.enumerable(v.descriptors.configurable(v.dataDescriptor())) - ), - true, - 'operation is successful: current is data, Desc is accessor' - ); - var shouldBeAccessor = Object.getOwnPropertyDescriptor(startsWithData, 'property key'); - st.equal(typeof shouldBeAccessor.get, 'function', 'has a getter'); - - var key = 'property key'; - var startsWithAccessor = {}; - Object.defineProperty(startsWithAccessor, key, { - configurable: true, - enumerable: true, - get: function get() { return 42; } - }); - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - startsWithAccessor, - key, - true, - v.descriptors.enumerable(v.descriptors.configurable(v.dataDescriptor())), - v.descriptors.enumerable(v.descriptors.configurable(v.accessorDescriptor(42))) - ), - true, - 'operation is successful: current is accessor, Desc is data' - ); - var shouldBeData = Object.getOwnPropertyDescriptor(startsWithAccessor, 'property key'); - st.deepEqual(shouldBeData, { configurable: true, enumerable: true, value: 42, writable: false }, 'is a data property'); - - st.end(); - }); - - t.test('Desc and current are both data descriptors', function (st) { - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.writable(v.dataDescriptor()), - v.descriptors.nonWritable(v.descriptors.nonConfigurable(v.dataDescriptor())) - ), - false, - 'false if frozen current and writable Desc' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable({ '[[Value]]': 42 }), - v.descriptors.nonWritable({ '[[Value]]': 7 }) - ), - false, - 'false if nonwritable current has a different value than Desc' - ); - - st.end(); - }); - - t.test('current is nonconfigurable; Desc and current are both accessor descriptors', function (st) { - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.mutatorDescriptor(), - v.descriptors.nonConfigurable(v.mutatorDescriptor()) - ), - false, - 'false if both Sets are not equal' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.accessorDescriptor(), - v.descriptors.nonConfigurable(v.accessorDescriptor()) - ), - false, - 'false if both Gets are not equal' - ); - - st.end(); - }); - - t.end(); - }); - - test('OrdinaryGetOwnProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryGetOwnProperty(primitive, ''); }, - TypeError, - 'O: ' + debug(primitive) + ' is not an Object' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.OrdinaryGetOwnProperty({}, nonPropertyKey); }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.OrdinaryGetOwnProperty({}, 'not in the object'), undefined, 'missing property yields undefined'); - t.equal(ES.OrdinaryGetOwnProperty({}, 'toString'), undefined, 'inherited non-own property yields undefined'); - - t.deepEqual( - ES.OrdinaryGetOwnProperty({ a: 1 }, 'a'), - ES.ToPropertyDescriptor({ - configurable: true, - enumerable: true, - value: 1, - writable: true - }), - 'own assigned data property yields expected descriptor' - ); - - t.deepEqual( - ES.OrdinaryGetOwnProperty(/a/, 'lastIndex'), - ES.ToPropertyDescriptor({ - configurable: false, - enumerable: false, - value: 0, - writable: true - }), - 'regex lastIndex yields expected descriptor' - ); - - t.deepEqual( - ES.OrdinaryGetOwnProperty([], 'length'), - ES.ToPropertyDescriptor({ - configurable: false, - enumerable: false, - value: 0, - writable: true - }), - 'array length yields expected descriptor' - ); - - t.deepEqual( - ES.OrdinaryGetOwnProperty(Object.prototype, 'toString'), - ES.ToPropertyDescriptor({ - configurable: true, - enumerable: false, - value: Object.prototype.toString, - writable: true - }), - 'own non-enumerable data property yields expected descriptor' - ); - - t.test('ES5+', { skip: !Object.defineProperty }, function (st) { - var O = {}; - Object.defineProperty(O, 'foo', { - configurable: false, - enumerable: false, - value: O, - writable: true - }); - - t.deepEqual( - ES.OrdinaryGetOwnProperty(O, 'foo'), - ES.ToPropertyDescriptor({ - configurable: false, - enumerable: false, - value: O, - writable: true - }), - 'defined own property yields expected descriptor' - ); - - st.end(); - }); - - t.end(); - }); - - test('OrdinaryDefineOwnProperty', { skip: !Object.defineProperty }, function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CopyDataProperties(primitive, {}, []); }, - TypeError, - 'O: ' + debug(primitive) + ' is not an Object' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.OrdinaryDefineOwnProperty({}, nonPropertyKey, v.genericDescriptor()); }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryDefineOwnProperty(primitive, '', v.genericDescriptor()); }, - TypeError, - 'Desc: ' + debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var O = {}; - var P = 'property key'; - var Desc = v.accessorDescriptor(); - t.equal( - ES.OrdinaryDefineOwnProperty(O, P, Desc), - true, - 'operation is successful' - ); - t.deepEqual( - Object.getOwnPropertyDescriptor(O, P), - ES.FromPropertyDescriptor(ES.CompletePropertyDescriptor(Desc)), - 'expected property descriptor is defined' - ); - - t.end(); - }); - - test('ArrayCreate', function (t) { - forEach(v.nonIntegerNumbers.concat([-1]), function (nonIntegerNumber) { - t['throws']( - function () { ES.ArrayCreate(nonIntegerNumber); }, - TypeError, - 'length must be an integer number >= 0' - ); - }); - - t['throws']( - function () { ES.ArrayCreate(Math.pow(2, 32)); }, - RangeError, - 'length must be < 2**32' - ); - - t.deepEqual(ES.ArrayCreate(-0), [], 'length of -0 creates an empty array'); - t.deepEqual(ES.ArrayCreate(0), [], 'length of +0 creates an empty array'); - // eslint-disable-next-line no-sparse-arrays, comma-spacing - t.deepEqual(ES.ArrayCreate(1), [,], 'length of 1 creates a sparse array of length 1'); - // eslint-disable-next-line no-sparse-arrays, comma-spacing - t.deepEqual(ES.ArrayCreate(2), [,,], 'length of 2 creates a sparse array of length 2'); - - // eslint-disable-next-line no-proto - t.test('proto argument', { skip: [].__proto__ !== Array.prototype }, function (st) { - var fakeProto = { - push: { toString: function () { return 'not array push'; } } - }; - st.equal(ES.ArrayCreate(0, fakeProto).push, fakeProto.push, 'passing the proto argument works'); - st.end(); - }); - - t.end(); - }); - - test('ArraySetLength', function (t) { - forEach(v.primitives.concat(v.objects), function (nonArray) { - t['throws']( - function () { ES.ArraySetLength(nonArray, 0); }, - TypeError, - 'A: ' + debug(nonArray) + ' is not an Array' - ); - }); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.ArraySetLength([], primitive); }, - TypeError, - 'Desc: ' + debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.test('making length nonwritable', { skip: !Object.defineProperty }, function (st) { - var a = []; - ES.ArraySetLength(a, { '[[Writable]]': false }); - st.deepEqual( - Object.getOwnPropertyDescriptor(a, 'length'), - { - configurable: false, - enumerable: false, - value: 0, - writable: false - }, - 'without a value, length becomes nonwritable' - ); - st.end(); - }); - - var arr = []; - ES.ArraySetLength(arr, { '[[Value]]': 7 }); - t.equal(arr.length, 7, 'array now has a length of 7'); - - t.end(); - }); - - test('CreateHTML', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.CreateHTML('', nonString, '', ''); }, - TypeError, - 'tag: ' + debug(nonString) + ' is not a String' - ); - t['throws']( - function () { ES.CreateHTML('', '', nonString, ''); }, - TypeError, - 'attribute: ' + debug(nonString) + ' is not a String' - ); - }); - - t.equal( - ES.CreateHTML( - { toString: function () { return 'the string'; } }, - 'some HTML tag!', - '' - ), - 'the string', - 'works with an empty string attribute value' - ); - - t.equal( - ES.CreateHTML( - { toString: function () { return 'the string'; } }, - 'some HTML tag!', - 'attr', - 'value "with quotes"' - ), - 'the string', - 'works with an attribute, and a value with quotes' - ); - - t.end(); - }); - - test('GetOwnPropertyKeys', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.GetOwnPropertyKeys(primitive, 'String'); }, - TypeError, - 'O: ' + debug(primitive) + ' is not an Object' - ); - }); - - t['throws']( - function () { ES.GetOwnPropertyKeys({}, 'not string or symbol'); }, - TypeError, - 'Type: must be "String" or "Symbol"' - ); - - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - var O = { a: 1 }; - O[Symbol.iterator] = true; - var s = Symbol('test'); - Object.defineProperty(O, s, { enumerable: false, value: true }); - - st.deepEqual( - ES.GetOwnPropertyKeys(O, 'Symbol'), - [Symbol.iterator, s], - 'works with Symbols, enumerable or not' - ); - - st.end(); - }); - - t.test('non-enumerable names', { skip: !Object.defineProperty }, function (st) { - var O = { a: 1 }; - Object.defineProperty(O, 'b', { enumerable: false, value: 2 }); - if (v.hasSymbols) { - O[Symbol.iterator] = true; - } - - st.deepEqual( - ES.GetOwnPropertyKeys(O, 'String').sort(), - ['a', 'b'].sort(), - 'works with Strings, enumerable or not' - ); - - st.end(); - }); - - t.deepEqual( - ES.GetOwnPropertyKeys({ a: 1, b: 2 }, 'String').sort(), - ['a', 'b'].sort(), - 'works with enumerable keys' - ); - - t.end(); - }); - - test('SymbolDescriptiveString', function (t) { - forEach(v.nonSymbolPrimitives.concat(v.objects), function (nonSymbol) { - t['throws']( - function () { ES.SymbolDescriptiveString(nonSymbol); }, - TypeError, - debug(nonSymbol) + ' is not a Symbol' - ); - }); - - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - st.equal(ES.SymbolDescriptiveString(Symbol()), 'Symbol()', 'undefined description'); - st.equal(ES.SymbolDescriptiveString(Symbol('')), 'Symbol()', 'empty string description'); - st.equal(ES.SymbolDescriptiveString(Symbol.iterator), 'Symbol(Symbol.iterator)', 'well-known symbol'); - st.equal(ES.SymbolDescriptiveString(Symbol('foo')), 'Symbol(foo)', 'string description'); - - st.end(); - }); - - t.end(); - }); - - test('GetSubstitution', { skip: skips && skips.GetSubstitution }, function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.GetSubstitution(nonString, '', 0, [], ''); }, - TypeError, - '`matched`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', nonString, 0, [], ''); }, - TypeError, - '`str`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [], nonString); }, - TypeError, - '`replacement`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [nonString], ''); }, - TypeError, - '`captures`: ' + debug([nonString]) + ' is not an Array of strings' - ); - }); - - forEach(v.nonIntegerNumbers.concat([-1, -42, -Infinity]), function (nonNonNegativeInteger) { - t['throws']( - function () { ES.GetSubstitution('', '', nonNonNegativeInteger, [], ''); }, - TypeError, - '`position`: ' + debug(nonNonNegativeInteger) + ' is not a non-negative integer' - ); - }); - - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.GetSubstitution('', '', 0, nonArray, ''); }, - TypeError, - '`captures`: ' + debug(nonArray) + ' is not an Array' - ); - }); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], '123'), - '123', - 'returns the substitution' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '$$2$'), - '$2$', - 'supports $$, and trailing $' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$&<'), - '>abcdef<', - 'supports $&' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$`<'), - '><', - 'supports $` at position 0' - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], '>$`<'), - '>ab<', - 'supports $` at position > 0' - ); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 7, [], ">$'<"), - '><', - "supports $' at a position where there's less than `matched.length` chars left" - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], ">$'<"), - '>ghi<', - "supports $' at a position where there's more than `matched.length` chars left" - ); - - for (var i = 0; i < 100; i += 1) { - var captures = []; - captures[i] = 'test'; - if (i > 0) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$' + i + '<'), - '>undefined<', - 'supports $' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$' + i), - '>undefined', - 'supports $' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$' + i + '<'), - '><', - 'supports $' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$' + i), - '>', - 'supports $' + i + ' at the end of the replacement, with a capture at that index' - ); - } - if (i < 10) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$0' + i + '<'), - i === 0 ? '><' : '>undefined<', - 'supports $0' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$0' + i), - i === 0 ? '>' : '>undefined', - 'supports $0' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$0' + i + '<'), - '><', - 'supports $0' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$0' + i), - '>', - 'supports $0' + i + ' at the end of the replacement, with a capture at that index' - ); - } - } - - t.end(); - }); - - test('SecFromTime', function (t) { - var now = new Date(); - t.equal(ES.SecFromTime(now.getTime()), now.getUTCSeconds(), 'second from Date timestamp matches getUTCSeconds'); - t.end(); - }); - - test('MinFromTime', function (t) { - var now = new Date(); - t.equal(ES.MinFromTime(now.getTime()), now.getUTCMinutes(), 'minute from Date timestamp matches getUTCMinutes'); - t.end(); - }); - - test('HourFromTime', function (t) { - var now = new Date(); - t.equal(ES.HourFromTime(now.getTime()), now.getUTCHours(), 'hour from Date timestamp matches getUTCHours'); - t.end(); - }); - - test('msFromTime', function (t) { - var now = new Date(); - t.equal(ES.msFromTime(now.getTime()), now.getUTCMilliseconds(), 'ms from Date timestamp matches getUTCMilliseconds'); - t.end(); - }); - - var msPerSecond = 1e3; - var msPerMinute = 60 * msPerSecond; - var msPerHour = 60 * msPerMinute; - var msPerDay = 24 * msPerHour; - - test('Day', function (t) { - var time = Date.UTC(2019, 8, 10, 2, 3, 4, 5); - var add = 2.5; - var later = new Date(time + (add * msPerDay)); - - t.equal(ES.Day(later.getTime()), ES.Day(time) + Math.floor(add), 'adding 2.5 days worth of ms, gives a Day delta of 2'); - t.end(); - }); - - test('TimeWithinDay', function (t) { - var time = Date.UTC(2019, 8, 10, 2, 3, 4, 5); - var add = 2.5; - var later = new Date(time + (add * msPerDay)); - - t.equal(ES.TimeWithinDay(later.getTime()), ES.TimeWithinDay(time) + (0.5 * msPerDay), 'adding 2.5 days worth of ms, gives a TimeWithinDay delta of +0.5'); - t.end(); - }); - - test('DayFromYear', function (t) { - t.equal(ES.DayFromYear(2021) - ES.DayFromYear(2020), 366, '2021 is a leap year, has 366 days'); - t.equal(ES.DayFromYear(2020) - ES.DayFromYear(2019), 365, '2020 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2019) - ES.DayFromYear(2018), 365, '2019 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2018) - ES.DayFromYear(2017), 365, '2018 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2017) - ES.DayFromYear(2016), 366, '2017 is a leap year, has 366 days'); - - t.end(); - }); - - test('TimeFromYear', function (t) { - for (var i = 1900; i < 2100; i += 1) { - t.equal(ES.TimeFromYear(i), Date.UTC(i, 0, 1), 'TimeFromYear matches a Date object’s year: ' + i); - } - t.end(); - }); - - test('YearFromTime', function (t) { - for (var i = 1900; i < 2100; i += 1) { - t.equal(ES.YearFromTime(Date.UTC(i, 0, 1)), i, 'YearFromTime matches a Date object’s year on 1/1: ' + i); - t.equal(ES.YearFromTime(Date.UTC(i, 10, 1)), i, 'YearFromTime matches a Date object’s year on 10/1: ' + i); - } - t.end(); - }); - - test('WeekDay', function (t) { - var now = new Date(); - var today = now.getUTCDay(); - for (var i = 0; i < 7; i += 1) { - var weekDay = ES.WeekDay(now.getTime() + (i * msPerDay)); - t.equal(weekDay, (today + i) % 7, i + ' days after today (' + today + '), WeekDay is ' + weekDay); - } - t.end(); - }); - - test('DaysInYear', function (t) { - t.equal(ES.DaysInYear(2021), 365, '2021 is not a leap year'); - t.equal(ES.DaysInYear(2020), 366, '2020 is a leap year'); - t.equal(ES.DaysInYear(2019), 365, '2019 is not a leap year'); - t.equal(ES.DaysInYear(2018), 365, '2018 is not a leap year'); - t.equal(ES.DaysInYear(2017), 365, '2017 is not a leap year'); - t.equal(ES.DaysInYear(2016), 366, '2016 is a leap year'); - - t.end(); - }); - - test('InLeapYear', function (t) { - t.equal(ES.InLeapYear(Date.UTC(2021, 0, 1)), 0, '2021 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2020, 0, 1)), 1, '2020 is a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2019, 0, 1)), 0, '2019 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2018, 0, 1)), 0, '2018 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2017, 0, 1)), 0, '2017 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2016, 0, 1)), 1, '2016 is a leap year'); - - t.end(); - }); - - test('DayWithinYear', function (t) { - t.equal(ES.DayWithinYear(Date.UTC(2019, 0, 1)), 0, '1/1 is the 1st day'); - t.equal(ES.DayWithinYear(Date.UTC(2019, 11, 31)), 364, '12/31 is the 365th day in a non leap year'); - t.equal(ES.DayWithinYear(Date.UTC(2016, 11, 31)), 365, '12/31 is the 366th day in a leap year'); - - t.end(); - }); - - test('MonthFromTime', function (t) { - t.equal(ES.MonthFromTime(Date.UTC(2019, 0, 1)), 0, 'non-leap: 1/1 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 0, 31)), 0, 'non-leap: 1/31 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 1)), 1, 'non-leap: 2/1 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 28)), 1, 'non-leap: 2/28 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 29)), 2, 'non-leap: 2/29 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 2, 1)), 2, 'non-leap: 3/1 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 2, 31)), 2, 'non-leap: 3/31 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 3, 1)), 3, 'non-leap: 4/1 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 3, 30)), 3, 'non-leap: 4/30 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 4, 1)), 4, 'non-leap: 5/1 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 4, 31)), 4, 'non-leap: 5/31 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 5, 1)), 5, 'non-leap: 6/1 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 5, 30)), 5, 'non-leap: 6/30 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 6, 1)), 6, 'non-leap: 7/1 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 6, 31)), 6, 'non-leap: 7/31 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 7, 1)), 7, 'non-leap: 8/1 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 7, 30)), 7, 'non-leap: 8/30 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 8, 1)), 8, 'non-leap: 9/1 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 8, 30)), 8, 'non-leap: 9/30 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 9, 1)), 9, 'non-leap: 10/1 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 9, 31)), 9, 'non-leap: 10/31 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 10, 1)), 10, 'non-leap: 11/1 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 10, 30)), 10, 'non-leap: 11/30 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 11, 1)), 11, 'non-leap: 12/1 gives December'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 11, 31)), 11, 'non-leap: 12/31 gives December'); - - t.equal(ES.MonthFromTime(Date.UTC(2016, 0, 1)), 0, 'leap: 1/1 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 0, 31)), 0, 'leap: 1/31 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 1)), 1, 'leap: 2/1 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 28)), 1, 'leap: 2/28 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 29)), 1, 'leap: 2/29 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 2, 1)), 2, 'leap: 3/1 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 2, 31)), 2, 'leap: 3/31 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 3, 1)), 3, 'leap: 4/1 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 3, 30)), 3, 'leap: 4/30 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 4, 1)), 4, 'leap: 5/1 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 4, 31)), 4, 'leap: 5/31 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 5, 1)), 5, 'leap: 6/1 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 5, 30)), 5, 'leap: 6/30 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 6, 1)), 6, 'leap: 7/1 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 6, 31)), 6, 'leap: 7/31 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 7, 1)), 7, 'leap: 8/1 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 7, 30)), 7, 'leap: 8/30 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 8, 1)), 8, 'leap: 9/1 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 8, 30)), 8, 'leap: 9/30 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 9, 1)), 9, 'leap: 10/1 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 9, 31)), 9, 'leap: 10/31 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 10, 1)), 10, 'leap: 11/1 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 10, 30)), 10, 'leap: 11/30 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 11, 1)), 11, 'leap: 12/1 gives December'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 11, 31)), 11, 'leap: 12/31 gives December'); - t.end(); - }); - - test('DateFromTime', function (t) { - var i; - for (i = 1; i <= 28; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 1, i)), i, '2019.02.' + i + ' is date ' + i); - } - for (i = 1; i <= 29; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2016, 1, i)), i, '2016.02.' + i + ' is date ' + i); - } - for (i = 1; i <= 30; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 8, i)), i, '2019.09.' + i + ' is date ' + i); - } - for (i = 1; i <= 31; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 9, i)), i, '2019.10.' + i + ' is date ' + i); - } - t.end(); - }); - - test('MakeDay', function (t) { - var day2015 = 16687; - t.equal(ES.MakeDay(2015, 8, 9), day2015, '2015.09.09 is day 16687'); - var day2016 = day2015 + 366; // 2016 is a leap year - t.equal(ES.MakeDay(2016, 8, 9), day2016, '2015.09.09 is day 17053'); - var day2017 = day2016 + 365; - t.equal(ES.MakeDay(2017, 8, 9), day2017, '2017.09.09 is day 17418'); - var day2018 = day2017 + 365; - t.equal(ES.MakeDay(2018, 8, 9), day2018, '2018.09.09 is day 17783'); - var day2019 = day2018 + 365; - t.equal(ES.MakeDay(2019, 8, 9), day2019, '2019.09.09 is day 18148'); - t.end(); - }); - - test('MakeDate', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.ok(is(ES.MakeDate(nonFiniteNumber, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `day`'); - t.ok(is(ES.MakeDate(0, nonFiniteNumber), NaN), debug(nonFiniteNumber) + ' is not a finite `time`'); - }); - t.equal(ES.MakeDate(0, 0), 0, 'zero day and zero time is zero date'); - t.equal(ES.MakeDate(0, 123), 123, 'zero day and nonzero time is a date of the "time"'); - t.equal(ES.MakeDate(1, 0), msPerDay, 'day of 1 and zero time is a date of "ms per day"'); - t.equal(ES.MakeDate(3, 0), 3 * msPerDay, 'day of 3 and zero time is a date of thrice "ms per day"'); - t.equal(ES.MakeDate(1, 123), msPerDay + 123, 'day of 1 and nonzero time is a date of "ms per day" plus the "time"'); - t.equal(ES.MakeDate(3, 123), (3 * msPerDay) + 123, 'day of 3 and nonzero time is a date of thrice "ms per day" plus the "time"'); - - t.end(); - }); - - test('MakeTime', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.ok(is(ES.MakeTime(nonFiniteNumber, 0, 0, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `hour`'); - t.ok(is(ES.MakeTime(0, nonFiniteNumber, 0, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `min`'); - t.ok(is(ES.MakeTime(0, 0, nonFiniteNumber, 0), NaN), debug(nonFiniteNumber) + ' is not a finite `sec`'); - t.ok(is(ES.MakeTime(0, 0, 0, nonFiniteNumber), NaN), debug(nonFiniteNumber) + ' is not a finite `ms`'); - }); - - t.equal( - ES.MakeTime(1.2, 2.3, 3.4, 4.5), - (1 * msPerHour) + (2 * msPerMinute) + (3 * msPerSecond) + 4, - 'all numbers are converted to integer, multiplied by the right number of ms, and summed' - ); - - t.end(); - }); - - test('TimeClip', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.ok(is(ES.TimeClip(nonFiniteNumber), NaN), debug(nonFiniteNumber) + ' is not a finite `time`'); - }); - t.ok(is(ES.TimeClip(8.64e15 + 1), NaN), '8.64e15 is the largest magnitude considered "finite"'); - t.ok(is(ES.TimeClip(-8.64e15 - 1), NaN), '-8.64e15 is the largest magnitude considered "finite"'); - - forEach(v.zeroes.concat([-10, 10, Date.now()]), function (time) { - t.equal(ES.TimeClip(time), time, debug(time) + ' is a time of ' + debug(time)); - }); - - t.end(); - }); - - test('modulo', function (t) { - t.equal(3 % 2, 1, '+3 % 2 is +1'); - t.equal(ES.modulo(3, 2), 1, '+3 mod 2 is +1'); - - t.equal(-3 % 2, -1, '-3 % 2 is -1'); - t.equal(ES.modulo(-3, 2), 1, '-3 mod 2 is +1'); - t.end(); - }); - - test('ToDateString', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.ToDateString(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.ToDateString(NaN), 'Invalid Date', 'NaN becomes "Invalid Date"'); - var now = Date.now(); - t.equal(ES.ToDateString(now), Date(now), 'any timestamp becomes `Date(timestamp)`'); - t.end(); - }); - - test('CreateListFromArrayLike', function (t) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { ES.CreateListFromArrayLike(nonObject); }, - TypeError, - debug(nonObject) + ' is not an Object' - ); - }); - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.CreateListFromArrayLike({}, nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - t.deepEqual( - ES.CreateListFromArrayLike({ length: 2, 0: 'a', 1: 'b', 2: 'c' }), - ['a', 'b'], - 'arraylike stops at the length' - ); - - t.end(); - }); - - test('GetPrototypeFromConstructor', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.GetPrototypeFromConstructor(nonFunction, '%Array%'); }, - TypeError, - debug(nonFunction) + ' is not a constructor' - ); - }); - - forEach(arrowFns, function (arrowFn) { - t['throws']( - function () { ES.GetPrototypeFromConstructor(arrowFn, '%Array%'); }, - TypeError, - debug(arrowFn) + ' is not a constructor' - ); - }); - - var f = function () {}; - t.equal( - ES.GetPrototypeFromConstructor(f, '%Array.prototype%'), - f.prototype, - 'function with normal `prototype` property returns it' - ); - forEach([true, 'foo', 42], function (truthyPrimitive) { - f.prototype = truthyPrimitive; - t.equal( - ES.GetPrototypeFromConstructor(f, '%Array.prototype%'), - Array.prototype, - 'function with non-object `prototype` property (' + debug(truthyPrimitive) + ') returns default intrinsic' - ); - }); - - t.end(); - }); - - var getNamelessFunction = function () { - var f = Object(function () {}); - try { - delete f.name; - } catch (e) { /**/ } - return f; - }; - - test('SetFunctionName', function (t) { - t.test('non-extensible function', { skip: !Object.preventExtensions }, function (st) { - var f = getNamelessFunction(); - Object.preventExtensions(f); - st['throws']( - function () { ES.SetFunctionName(f, ''); }, - TypeError, - 'throws on a non-extensible function' - ); - st.end(); - }); - - t['throws']( - function () { ES.SetFunctionName(function g() {}, ''); }, - TypeError, - 'throws if function has an own `name` property' - ); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.SetFunctionName(getNamelessFunction(), nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Symbol or String' - ); - }); - - t.test('symbols', { skip: !v.hasSymbols || has(getNamelessFunction(), 'name') }, function (st) { - var pairs = [ - [Symbol(), ''], - [Symbol(undefined), ''], - [Symbol(null), '[null]'], - [Symbol(''), getInferredName ? '[]' : ''], - [Symbol.iterator, '[Symbol.iterator]'], - [Symbol('foo'), '[foo]'] - ]; - forEach(pairs, function (pair) { - var sym = pair[0]; - var desc = pair[1]; - var f = getNamelessFunction(); - ES.SetFunctionName(f, sym); - st.equal(f.name, desc, debug(sym) + ' yields a name of ' + debug(desc)); - }); - - st.end(); - }); - - var f = getNamelessFunction(); - t.test('when names are configurable', { skip: has(f, 'name') }, function (st) { - // without prefix - st.notEqual(f.name, 'foo', 'precondition'); - ES.SetFunctionName(f, 'foo'); - st.equal(f.name, 'foo', 'function name is set without a prefix'); - - // with prefix - var g = getNamelessFunction(); - st.notEqual(g.name, 'pre- foo', 'precondition'); - ES.SetFunctionName(g, 'foo', 'pre-'); - st.equal(g.name, 'pre- foo', 'function name is set with a prefix'); - - st.end(); - }); - - t.end(); - }); -}; - -var es2016 = function ES2016(ES, ops, expectedMissing, skips) { - es2015(ES, ops, expectedMissing, skips); - - test('SameValueNonNumber', function (t) { - var willThrow = [ - [3, 4], - [NaN, 4], - [4, ''], - ['abc', true], - [{}, false] - ]; - forEach(willThrow, function (nums) { - t['throws'](function () { return ES.SameValueNonNumber.apply(ES, nums); }, TypeError, 'value must be same type and non-number'); - }); - - forEach(v.objects.concat(v.nonNumberPrimitives), function (val) { - t.equal(val === val, ES.SameValueNonNumber(val, val), debug(val) + ' is SameValueNonNumber to itself'); - }); - - t.end(); - }); - - test('IterableToArrayLike', { skip: skips && skips.IterableToArrayLike }, function (t) { - t.test('custom iterables', { skip: !v.hasSymbols }, function (st) { - var O = {}; - O[Symbol.iterator] = function () { - var i = -1; - return { - next: function () { - i += 1; - return { - done: i >= 5, - value: i - }; - } - }; - }; - st.deepEqual( - ES.IterableToArrayLike(O), - [0, 1, 2, 3, 4], - 'Symbol.iterator method is called and values collected' - ); - - st.end(); - }); - - t.deepEqual(ES.IterableToArrayLike('abc'), ['a', 'b', 'c'], 'a string of code units spreads'); - t.deepEqual(ES.IterableToArrayLike('💩'), ['💩'], 'a string of code points spreads'); - t.deepEqual(ES.IterableToArrayLike('a💩c'), ['a', '💩', 'c'], 'a string of code points and units spreads'); - - var arr = [1, 2, 3]; - t.deepEqual(ES.IterableToArrayLike(arr), arr, 'an array becomes a similar array'); - t.notEqual(ES.IterableToArrayLike(arr), arr, 'an array becomes a different, but similar, array'); - - var O = {}; - t.equal(ES.IterableToArrayLike(O), O, 'a non-iterable non-array non-string object is returned directly'); - - t.end(); - }); - - test('OrdinaryGetPrototypeOf', function (t) { - t.equal(ES.OrdinaryGetPrototypeOf([]), Array.prototype, 'array [[Prototype]] is Array.prototype'); - t.equal(ES.OrdinaryGetPrototypeOf({}), Object.prototype, 'object [[Prototype]] is Object.prototype'); - t.equal(ES.OrdinaryGetPrototypeOf(/a/g), RegExp.prototype, 'regex [[Prototype]] is RegExp.prototype'); - t.equal(ES.OrdinaryGetPrototypeOf(Object('')), String.prototype, 'boxed string [[Prototype]] is String.prototype'); - t.equal(ES.OrdinaryGetPrototypeOf(Object(42)), Number.prototype, 'boxed number [[Prototype]] is Number.prototype'); - t.equal(ES.OrdinaryGetPrototypeOf(Object(true)), Boolean.prototype, 'boxed boolean [[Prototype]] is Boolean.prototype'); - if (v.hasSymbols) { - t.equal(ES.OrdinaryGetPrototypeOf(Object(Symbol.iterator)), Symbol.prototype, 'boxed symbol [[Prototype]] is Symbol.prototype'); - } - - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryGetPrototypeOf(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - t.end(); - }); - - test('OrdinarySetPrototypeOf', function (t) { - var a = []; - var proto = {}; - - t.equal(ES.OrdinaryGetPrototypeOf(a), Array.prototype, 'precondition'); - t.equal(ES.OrdinarySetPrototypeOf(a, proto), true, 'setting prototype is successful'); - t.equal(ES.OrdinaryGetPrototypeOf(a), proto, 'postcondition'); - - t.end(); - }); -}; - -var es2017 = function ES2017(ES, ops, expectedMissing, skips) { - es2016(ES, ops, expectedMissing, assign({}, skips, { - EnumerableOwnNames: true, - IterableToArrayLike: true - })); - - test('ToIndex', function (t) { - t.ok(is(ES.ToIndex(), 0), 'no value gives 0'); - t.ok(is(ES.ToIndex(undefined), 0), 'undefined value gives 0'); - - t['throws'](function () { ES.ToIndex(-1); }, RangeError, 'negative numbers throw'); - - t['throws'](function () { ES.ToIndex(MAX_SAFE_INTEGER + 1); }, RangeError, 'too large numbers throw'); - - t.equal(ES.ToIndex(3), 3, 'numbers work'); - t.equal(ES.ToIndex(v.valueOfOnlyObject), 4, 'coercible objects are coerced'); - - t.end(); - }); - - test('EnumerableOwnProperties', { skip: skips && skips.EnumerableOwnProperties }, function (t) { - var obj = testEnumerableOwnNames(t, function (O) { - return ES.EnumerableOwnProperties(O, 'key'); - }); - - t.deepEqual( - ES.EnumerableOwnProperties(obj, 'value'), - [obj.own], - 'returns enumerable own values' - ); - - t.deepEqual( - ES.EnumerableOwnProperties(obj, 'key+value'), - [['own', obj.own]], - 'returns enumerable own entries' - ); - - t.end(); - }); - - test('IterableToList', function (t) { - var customIterator = function () { - var i = -1; - return { - next: function () { - i += 1; - return { - done: i >= 5, - value: i - }; - } - }; - }; - - t.deepEqual( - ES.IterableToList({}, customIterator), - [0, 1, 2, 3, 4], - 'iterator method is called and values collected' - ); - - t.test('Symbol support', { skip: !v.hasSymbols }, function (st) { - st.deepEqual(ES.IterableToList('abc', String.prototype[Symbol.iterator]), ['a', 'b', 'c'], 'a string of code units spreads'); - st.deepEqual(ES.IterableToList('☃', String.prototype[Symbol.iterator]), ['☃'], 'a string of code points spreads'); - - var arr = [1, 2, 3]; - st.deepEqual(ES.IterableToList(arr, arr[Symbol.iterator]), arr, 'an array becomes a similar array'); - st.notEqual(ES.IterableToList(arr, arr[Symbol.iterator]), arr, 'an array becomes a different, but similar, array'); - - st.end(); - }); - - t['throws']( - function () { ES.IterableToList({}, void 0); }, - TypeError, - 'non-function iterator method' - ); - - t.end(); - }); -}; - -var es2018 = function ES2018(ES, ops, expectedMissing, skips) { - es2017(ES, ops, expectedMissing, assign({}, skips, { - EnumerableOwnProperties: true, - GetSubstitution: true, - IsPropertyDescriptor: true - })); - - test('thisSymbolValue', function (t) { - forEach(v.nonSymbolPrimitives.concat(v.objects), function (nonSymbol) { - t['throws']( - function () { ES.thisSymbolValue(nonSymbol); }, - v.hasSymbols ? TypeError : SyntaxError, - debug(nonSymbol) + ' is not a Symbol' - ); - }); - - t.test('no native Symbols', { skip: v.hasSymbols }, function (st) { - forEach(v.objects.concat(v.primitives), function (value) { - st['throws']( - function () { ES.thisSymbolValue(value); }, - SyntaxError, - 'Symbols are not supported' - ); - }); - st.end(); - }); - - t.test('symbol values', { skip: !v.hasSymbols }, function (st) { - forEach(v.symbols, function (symbol) { - st.equal(ES.thisSymbolValue(symbol), symbol, 'Symbol value of ' + debug(symbol) + ' is same symbol'); - - st.equal( - ES.thisSymbolValue(Object(symbol)), - symbol, - 'Symbol value of ' + debug(Object(symbol)) + ' is ' + debug(symbol) - ); - }); - - st.end(); - }); - - t.end(); - }); - - test('IsStringPrefix', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.IsStringPrefix(nonString, 'a'); }, - TypeError, - 'first arg: ' + debug(nonString) + ' is not a string' - ); - t['throws']( - function () { ES.IsStringPrefix('a', nonString); }, - TypeError, - 'second arg: ' + debug(nonString) + ' is not a string' - ); - }); - - forEach(v.strings, function (string) { - t.equal(ES.IsStringPrefix(string, string), true, debug(string) + ' is a prefix of itself'); - - t.equal(ES.IsStringPrefix('', string), true, 'the empty string is a prefix of everything'); - }); - - t.equal(ES.IsStringPrefix('abc', 'abcd'), true, '"abc" is a prefix of "abcd"'); - t.equal(ES.IsStringPrefix('abcd', 'abc'), false, '"abcd" is not a prefix of "abc"'); - - t.equal(ES.IsStringPrefix('a', 'bc'), false, '"a" is not a prefix of "bc"'); - - t.end(); - }); - - test('NumberToString', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.NumberToString(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.numbers, function (number) { - t.equal(ES.NumberToString(number), String(number), debug(number) + ' stringifies to ' + number); - }); - - t.end(); - }); - - test('CopyDataProperties', function (t) { - t.test('first argument: target', function (st) { - forEach(v.primitives, function (primitive) { - st['throws']( - function () { ES.CopyDataProperties(primitive, {}, []); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - st.end(); - }); - - t.test('second argument: source', function (st) { - var frozenTarget = Object.freeze ? Object.freeze({}) : {}; - forEach(v.nullPrimitives, function (nullish) { - st.equal( - ES.CopyDataProperties(frozenTarget, nullish, []), - frozenTarget, - debug(nullish) + ' "source" yields identical, unmodified target' - ); - }); - - forEach(v.nonNullPrimitives, function (objectCoercible) { - var target = {}; - var result = ES.CopyDataProperties(target, objectCoercible, []); - st.equal(result, target, 'result === target'); - st.deepEqual(keys(result), keys(Object(objectCoercible)), 'target ends up with keys of ' + debug(objectCoercible)); - }); - - st.end(); - }); - - t.test('third argument: excludedItems', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, [nonPropertyKey]); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - var result = ES.CopyDataProperties({}, { a: 1, b: 2, c: 3 }, ['b']); - st.deepEqual(keys(result), ['a', 'c'], 'excluded string keys are excluded'); - - st.test('excluding symbols', { skip: !v.hasSymbols }, function (s2t) { - var source = {}; - forEach(v.symbols, function (symbol) { - source[symbol] = true; - }); - - var includedSymbols = v.symbols.slice(1); - var excludedSymbols = v.symbols.slice(0, 1); - var target = ES.CopyDataProperties({}, source, excludedSymbols); - - forEach(includedSymbols, function (symbol) { - s2t.equal(has(target, symbol), true, debug(symbol) + ' is included'); - }); - - forEach(excludedSymbols, function (symbol) { - s2t.equal(has(target, symbol), false, debug(symbol) + ' is excluded'); - }); - - s2t.end(); - }); - - st.end(); - }); - - t.end(); - }); - - test('PromiseResolve', function (t) { - t.test('Promises unsupported', { skip: typeof Promise === 'function' }, function (st) { - st['throws']( - function () { ES.PromiseResolve(); }, - SyntaxError, - 'Promises are not supported' - ); - st.end(); - }); - - t.test('Promises supported', { skip: typeof Promise !== 'function' }, function (st) { - st.plan(2); - - var a = {}; - var b = {}; - var fulfilled = Promise.resolve(a); - var rejected = Promise.reject(b); - - ES.PromiseResolve(Promise, fulfilled).then(function (x) { - st.equal(x, a, 'fulfilled promise resolves to fulfilled'); - }); - - ES.PromiseResolve(Promise, rejected)['catch'](function (e) { - st.equal(e, b, 'rejected promise resolves to rejected'); - }); - }); - - t.end(); - }); - - test('EnumerableOwnPropertyNames', { skip: skips && skips.EnumerableOwnPropertyNames }, function (t) { - var obj = testEnumerableOwnNames(t, function (O) { - return ES.EnumerableOwnPropertyNames(O, 'key'); - }); - - t.deepEqual( - ES.EnumerableOwnPropertyNames(obj, 'value'), - [obj.own], - 'returns enumerable own values' - ); - - t.deepEqual( - ES.EnumerableOwnPropertyNames(obj, 'key+value'), - [['own', obj.own]], - 'returns enumerable own entries' - ); - - t.end(); - }); - - test('IsPromise', { skip: typeof Promise !== 'function' }, function (t) { - forEach(v.objects.concat(v.primitives), function (nonPromise) { - t.equal(ES.IsPromise(nonPromise), false, debug(nonPromise) + ' is not a Promise'); - }); - - var thenable = { then: Promise.prototype.then }; - t.equal(ES.IsPromise(thenable), false, 'generic thenable is not a Promise'); - - t.equal(ES.IsPromise(Promise.resolve()), true, 'Promise is a Promise'); - - t.end(); - }); - - test('GetSubstitution (ES2018+)', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.GetSubstitution(nonString, '', 0, [], undefined, ''); }, - TypeError, - '`matched`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', nonString, 0, [], undefined, ''); }, - TypeError, - '`str`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [], undefined, nonString); }, - TypeError, - '`replacement`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [nonString], undefined, ''); }, - TypeError, - '`captures`: ' + debug([nonString]) + ' is not an Array of strings' - ); - }); - - forEach(v.nonIntegerNumbers.concat([-1, -42, -Infinity]), function (nonNonNegativeInteger) { - t['throws']( - function () { ES.GetSubstitution('', '', nonNonNegativeInteger, [], undefined, ''); }, - TypeError, - '`position`: ' + debug(nonNonNegativeInteger) + ' is not a non-negative integer' - ); - }); - - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.GetSubstitution('', '', 0, nonArray, undefined, ''); }, - TypeError, - '`captures`: ' + debug(nonArray) + ' is not an Array' - ); - }); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], undefined, '123'), - '123', - 'returns the substitution' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '$$2$'), - '$2$', - 'supports $$, and trailing $' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$&<'), - '>abcdef<', - 'supports $&' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$`<'), - '><', - 'supports $` at position 0' - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], undefined, '>$`<'), - '>ab<', - 'supports $` at position > 0' - ); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 7, [], undefined, ">$'<"), - '><', - "supports $' at a position where there's less than `matched.length` chars left" - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], undefined, ">$'<"), - '>ghi<', - "supports $' at a position where there's more than `matched.length` chars left" - ); - - for (var i = 0; i < 100; i += 1) { - var captures = []; - captures[i] = 'test'; - if (i > 0) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$' + i + '<'), - '>undefined<', - 'supports $' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$' + i), - '>undefined', - 'supports $' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$' + i + '<'), - '><', - 'supports $' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$' + i), - '>', - 'supports $' + i + ' at the end of the replacement, with a capture at that index' - ); - } - if (i < 10) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$0' + i + '<'), - i === 0 ? '><' : '>undefined<', - 'supports $0' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$0' + i), - i === 0 ? '>' : '>undefined', - 'supports $0' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$0' + i + '<'), - '><', - 'supports $0' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$0' + i), - '>', - 'supports $0' + i + ' at the end of the replacement, with a capture at that index' - ); - } - } - - t.end(); - }); - - test('DateString', function (t) { - forEach(v.nonNumbers.concat(NaN), function (nonNumberOrNaN) { - t['throws']( - function () { ES.DateString(nonNumberOrNaN); }, - TypeError, - debug(nonNumberOrNaN) + ' is not a non-NaN Number' - ); - }); - - t.equal(ES.DateString(Date.UTC(2019, 8, 10, 7, 8, 9)), 'Tue Sep 10 2019'); - t.equal(ES.DateString(Date.UTC(2016, 1, 29, 7, 8, 9)), 'Mon Feb 29 2016'); // leap day - t.end(); - }); - - test('TimeString', function (t) { - forEach(v.nonNumbers.concat(NaN), function (nonNumberOrNaN) { - t['throws']( - function () { ES.TimeString(nonNumberOrNaN); }, - TypeError, - debug(nonNumberOrNaN) + ' is not a non-NaN Number' - ); - }); - - var tv = Date.UTC(2019, 8, 10, 7, 8, 9); - t.equal(ES.TimeString(tv), '07:08:09 GMT'); - t.end(); - }); -}; - -var es2019 = function ES2018(ES, ops, expectedMissing, skips) { - es2018(ES, ops, expectedMissing, assign({}, skips, { - })); - - test('AddEntriesFromIterable', function (t) { - t['throws']( - function () { ES.AddEntriesFromIterable({}, undefined, function () {}); }, - TypeError, - 'iterable must not be undefined' - ); - t['throws']( - function () { ES.AddEntriesFromIterable({}, null, function () {}); }, - TypeError, - 'iterable must not be null' - ); - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.AddEntriesFromIterable({}, {}, nonFunction); }, - TypeError, - debug(nonFunction) + ' is not a function' - ); - }); - - t.test('Symbol support', { skip: !v.hasSymbols }, function (st) { - st.plan(4); - - var O = {}; - st.equal(ES.AddEntriesFromIterable(O, [], function () {}), O, 'returns the target'); - - var adder = function (key, value) { - st.equal(this, O, 'adder gets proper receiver'); - st.equal(key, 0, 'k is key'); - st.equal(value, 'a', 'v is value'); - }; - ES.AddEntriesFromIterable(O, ['a'].entries(), adder); - - st.end(); - }); - - t.end(); - }); - - test('FlattenIntoArray', function (t) { - t.test('no mapper function', function (st) { - var testDepth = function testDepth(tt, depth, expected) { - var a = []; - var o = [[1], 2, , [[3]], [], 4, [[[[5]]]]]; // eslint-disable-line no-sparse-arrays - ES.FlattenIntoArray(a, o, o.length, 0, depth); - tt.deepEqual(a, expected, 'depth: ' + depth); - }; - - testDepth(st, 1, [1, 2, [3], 4, [[[5]]]]); - testDepth(st, 2, [1, 2, 3, 4, [[5]]]); - testDepth(st, 3, [1, 2, 3, 4, [5]]); - testDepth(st, 4, [1, 2, 3, 4, 5]); - testDepth(st, Infinity, [1, 2, 3, 4, 5]); - st.end(); - }); - - t.test('mapper function', function (st) { - var testMapper = function testMapper(tt, mapper, expected, thisArg) { - var a = []; - var o = [[1], 2, , [[3]], [], 4, [[[[5]]]]]; // eslint-disable-line no-sparse-arrays - ES.FlattenIntoArray(a, o, o.length, 0, 1, mapper, thisArg); - tt.deepEqual(a, expected); - }; - - var double = function double(x) { - return typeof x === 'number' ? 2 * x : x; - }; - testMapper( - st, - double, - [1, 4, [3], 8, [[[5]]]] - ); - testMapper( - st, - function (x) { return [this, double(x)]; }, - [42, [1], 42, 4, 42, [[3]], 42, [], 42, 8, 42, [[[[5]]]]], - 42 - ); - st.end(); - }); - - t.end(); - }); - - test('TrimString', function (t) { - t.test('non-object string', function (st) { - forEach(v.nullPrimitives, function (nullish) { - st['throws']( - function () { ES.TrimString(nullish); }, - debug(nullish) + ' is not an Object' - ); - }); - st.end(); - }); - - var string = ' \n abc \n '; - t.equal(ES.TrimString(string, 'start'), string.slice(string.indexOf('a'))); - t.equal(ES.TrimString(string, 'end'), string.slice(0, string.lastIndexOf('c') + 1)); - t.equal(ES.TrimString(string, 'start+end'), string.slice(string.indexOf('a'), string.lastIndexOf('c') + 1)); - - t.end(); - }); -}; - -module.exports = { - es2015: es2015, - es2016: es2016, - es2017: es2017, - es2018: es2018, - es2019: es2019 -}; diff --git a/node_modules/es-to-primitive/.eslintrc b/node_modules/es-to-primitive/.eslintrc deleted file mode 100644 index b6639b9..0000000 --- a/node_modules/es-to-primitive/.eslintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 14], - "func-name-matching": 0, - "id-length": [2, { "min": 1, "max": 24, "properties": "never" }], - "max-statements": [2, 20], - "new-cap": [2, { "capIsNewExceptions": ["GetMethod"] }] - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "max-lines-per-function": [2, { "max": 68 }], - }, - } - ], -} diff --git a/node_modules/es-to-primitive/.github/FUNDING.yml b/node_modules/es-to-primitive/.github/FUNDING.yml deleted file mode 100644 index 9f928ae..0000000 --- a/node_modules/es-to-primitive/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-to-primitive -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/es-to-primitive/.travis.yml b/node_modules/es-to-primitive/.travis.yml deleted file mode 100644 index d4c5a84..0000000 --- a/node_modules/es-to-primitive/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: ~> 1.0 -language: node_js -cache: - directories: - - "$(nvm cache dir)" -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml - - ljharb/travis-ci:node/coverage.yml -matrix: - allow_failures: - - env: COVERAGE=true diff --git a/node_modules/es-to-primitive/CHANGELOG.md b/node_modules/es-to-primitive/CHANGELOG.md deleted file mode 100644 index 0a5dda7..0000000 --- a/node_modules/es-to-primitive/CHANGELOG.md +++ /dev/null @@ -1,49 +0,0 @@ -1.2.1 / 2019-11-08 -================= - * [readme] remove testling URLs - * [meta] add `funding` field - * [meta] create FUNDING.yml - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `replace`, `semver`, `tape`, `function.prototype.name` - * [Tests] use shared travis-ci configs - * [Tests] Add es5 tests for `symbol` types (#45) - * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops - * [Tests] remove `jscs` - -1.2.0 / 2018-09-27 -================= - * [New] create ES2015 entry point/property, to replace ES6 - * [Fix] Ensure optional arguments are not part of the length (#29) - * [Deps] update `is-callable` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `object-inspect`, `replace` - * [Tests] avoid util.inspect bug with `new Date(NaN)` on node v6.0 and v6.1. - * [Tests] up to `node` `v10.11`, `v9.11`, `v8.12`, `v6.14`, `v4.9` - -1.1.1 / 2016-01-03 -================= - * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) - -1.1.0 / 2015-12-27 -================= - * [New] add `Symbol.toPrimitive` support - * [Deps] update `is-callable`, `is-date-object` - * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` - * [Dev Deps] remove unused deps - * [Tests] up to `node` `v5.3` - * [Tests] fix npm upgrades on older node versions - * [Tests] fix testling - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.1 / 2016-01-03 -================= - * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) - * [Deps] update `is-callable`, `is-date-object` - * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` - * [Dev Deps] remove unused deps - * [Tests] up to `node` `v5.3` - * [Tests] fix npm upgrades on older node versions - * [Tests] fix testling - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.0 / 2015-03-19 -================= - * Initial release. diff --git a/node_modules/es-to-primitive/LICENSE b/node_modules/es-to-primitive/LICENSE deleted file mode 100644 index b43df44..0000000 --- a/node_modules/es-to-primitive/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/es-to-primitive/Makefile b/node_modules/es-to-primitive/Makefile deleted file mode 100644 index b9e4fe1..0000000 --- a/node_modules/es-to-primitive/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/es-to-primitive/README.md b/node_modules/es-to-primitive/README.md deleted file mode 100644 index 5ce322b..0000000 --- a/node_modules/es-to-primitive/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# es-to-primitive [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions. -When different versions of the spec conflict, the default export will be the latest version of the abstract operation. -Alternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version. - -## Example - -```js -var toPrimitive = require('es-to-primitive'); -var assert = require('assert'); - -assert(toPrimitive(function () {}) === String(function () {})); - -var date = new Date(); -assert(toPrimitive(date) === String(date)); - -assert(toPrimitive({ valueOf: function () { return 3; } }) === 3); - -assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3])); - -var sym = Symbol(); -assert(toPrimitive(Object(sym)) === sym); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/es-to-primitive -[npm-version-svg]: http://versionbadg.es/ljharb/es-to-primitive.svg -[travis-svg]: https://travis-ci.org/ljharb/es-to-primitive.svg -[travis-url]: https://travis-ci.org/ljharb/es-to-primitive -[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg -[deps-url]: https://david-dm.org/ljharb/es-to-primitive -[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/es-to-primitive.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/es-to-primitive.svg -[downloads-url]: http://npm-stat.com/charts.html?package=es-to-primitive diff --git a/node_modules/es-to-primitive/es2015.js b/node_modules/es-to-primitive/es2015.js deleted file mode 100644 index 4a11a34..0000000 --- a/node_modules/es-to-primitive/es2015.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; - -var isPrimitive = require('./helpers/isPrimitive'); -var isCallable = require('is-callable'); -var isDate = require('is-date-object'); -var isSymbol = require('is-symbol'); - -var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { - if (typeof O === 'undefined' || O === null) { - throw new TypeError('Cannot call method on ' + O); - } - if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { - throw new TypeError('hint must be "string" or "number"'); - } - var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; - var method, result, i; - for (i = 0; i < methodNames.length; ++i) { - method = O[methodNames[i]]; - if (isCallable(method)) { - result = method.call(O); - if (isPrimitive(result)) { - return result; - } - } - } - throw new TypeError('No default value'); -}; - -var GetMethod = function GetMethod(O, P) { - var func = O[P]; - if (func !== null && typeof func !== 'undefined') { - if (!isCallable(func)) { - throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); - } - return func; - } - return void 0; -}; - -// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive -module.exports = function ToPrimitive(input) { - if (isPrimitive(input)) { - return input; - } - var hint = 'default'; - if (arguments.length > 1) { - if (arguments[1] === String) { - hint = 'string'; - } else if (arguments[1] === Number) { - hint = 'number'; - } - } - - var exoticToPrim; - if (hasSymbols) { - if (Symbol.toPrimitive) { - exoticToPrim = GetMethod(input, Symbol.toPrimitive); - } else if (isSymbol(input)) { - exoticToPrim = Symbol.prototype.valueOf; - } - } - if (typeof exoticToPrim !== 'undefined') { - var result = exoticToPrim.call(input, hint); - if (isPrimitive(result)) { - return result; - } - throw new TypeError('unable to convert exotic object to primitive'); - } - if (hint === 'default' && (isDate(input) || isSymbol(input))) { - hint = 'string'; - } - return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); -}; diff --git a/node_modules/es-to-primitive/es5.js b/node_modules/es-to-primitive/es5.js deleted file mode 100644 index 602aa36..0000000 --- a/node_modules/es-to-primitive/es5.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var toStr = Object.prototype.toString; - -var isPrimitive = require('./helpers/isPrimitive'); - -var isCallable = require('is-callable'); - -// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8 -var ES5internalSlots = { - '[[DefaultValue]]': function (O) { - var actualHint; - if (arguments.length > 1) { - actualHint = arguments[1]; - } else { - actualHint = toStr.call(O) === '[object Date]' ? String : Number; - } - - if (actualHint === String || actualHint === Number) { - var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; - var value, i; - for (i = 0; i < methods.length; ++i) { - if (isCallable(O[methods[i]])) { - value = O[methods[i]](); - if (isPrimitive(value)) { - return value; - } - } - } - throw new TypeError('No default value'); - } - throw new TypeError('invalid [[DefaultValue]] hint supplied'); - } -}; - -// http://ecma-international.org/ecma-262/5.1/#sec-9.1 -module.exports = function ToPrimitive(input) { - if (isPrimitive(input)) { - return input; - } - if (arguments.length > 1) { - return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]); - } - return ES5internalSlots['[[DefaultValue]]'](input); -}; diff --git a/node_modules/es-to-primitive/es6.js b/node_modules/es-to-primitive/es6.js deleted file mode 100644 index 2d1f4dc..0000000 --- a/node_modules/es-to-primitive/es6.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./es2015'); diff --git a/node_modules/es-to-primitive/helpers/isPrimitive.js b/node_modules/es-to-primitive/helpers/isPrimitive.js deleted file mode 100644 index 06f0bf0..0000000 --- a/node_modules/es-to-primitive/helpers/isPrimitive.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function isPrimitive(value) { - return value === null || (typeof value !== 'function' && typeof value !== 'object'); -}; diff --git a/node_modules/es-to-primitive/index.js b/node_modules/es-to-primitive/index.js deleted file mode 100644 index e60d912..0000000 --- a/node_modules/es-to-primitive/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var ES5 = require('./es5'); -var ES6 = require('./es6'); -var ES2015 = require('./es2015'); - -if (Object.defineProperty) { - Object.defineProperty(ES2015, 'ES5', { enumerable: false, value: ES5 }); - Object.defineProperty(ES2015, 'ES6', { enumerable: false, value: ES6 }); - Object.defineProperty(ES2015, 'ES2015', { enumerable: false, value: ES2015 }); -} else { - ES6.ES5 = ES5; - ES6.ES6 = ES6; - ES6.ES2015 = ES2015; -} - -module.exports = ES2015; diff --git a/node_modules/es-to-primitive/package.json b/node_modules/es-to-primitive/package.json deleted file mode 100644 index 0bed372..0000000 --- a/node_modules/es-to-primitive/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_from": "es-to-primitive@^1.2.1", - "_id": "es-to-primitive@1.2.1", - "_inBundle": false, - "_integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "_location": "/es-to-primitive", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "es-to-primitive@^1.2.1", - "name": "es-to-primitive", - "escapedName": "es-to-primitive", - "rawSpec": "^1.2.1", - "saveSpec": null, - "fetchSpec": "^1.2.1" - }, - "_requiredBy": [ - "/es-abstract" - ], - "_resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "_shasum": "e55cd4c9cdc188bcefb03b366c736323fc5c898a", - "_spec": "es-to-primitive@^1.2.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/es-abstract", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "bugs": { - "url": "https://github.com/ljharb/es-to-primitive/issues" - }, - "bundleDependencies": false, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "deprecated": false, - "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.0", - "covert": "^1.1.1", - "eslint": "^6.6.0", - "foreach": "^2.0.5", - "function.prototype.name": "^1.1.1", - "has-symbols": "^1.0.0", - "object-inspect": "^1.6.0", - "object-is": "^1.0.1", - "replace": "^1.1.1", - "semver": "^6.3.0", - "tape": "^4.11.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/es-to-primitive#readme", - "keywords": [ - "primitive", - "abstract", - "ecmascript", - "es5", - "es6", - "es2015", - "toPrimitive", - "coerce", - "type", - "object", - "string", - "number", - "boolean", - "symbol", - "null", - "undefined" - ], - "license": "MIT", - "main": "index.js", - "name": "es-to-primitive", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-to-primitive.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "eslint .", - "posttest": "npx aud", - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "tests-only": "node --es-staging test" - }, - "testling": { - "files": "test", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.2.1" -} diff --git a/node_modules/es-to-primitive/test/es2015.js b/node_modules/es-to-primitive/test/es2015.js deleted file mode 100644 index 80f4083..0000000 --- a/node_modules/es-to-primitive/test/es2015.js +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -var test = require('tape'); -var toPrimitive = require('../es2015'); -var is = require('object-is'); -var forEach = require('foreach'); -var functionName = require('function.prototype.name'); -var debug = require('object-inspect'); - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; -var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; - -test('function properties', function (t) { - t.equal(toPrimitive.length, 1, 'length is 1'); - t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); - - t.end(); -}); - -var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; - -test('primitives', function (t) { - forEach(primitives, function (i) { - t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); - t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); - t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); - }); - t.end(); -}); - -test('Symbols', { skip: !hasSymbols }, function (t) { - var symbols = [ - Symbol('foo'), - Symbol.iterator, - Symbol['for']('foo') // eslint-disable-line no-restricted-properties - ]; - forEach(symbols, function (sym) { - t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); - t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); - t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); - }); - - var primitiveSym = Symbol('primitiveSym'); - var objectSym = Object(primitiveSym); - t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); - t.end(); -}); - -test('Arrays', function (t) { - var arrays = [[], ['a', 'b'], [1, 2]]; - forEach(arrays, function (arr) { - t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - }); - t.end(); -}); - -test('Dates', function (t) { - var dates = [new Date(), new Date(0), new Date(NaN)]; - forEach(dates, function (date) { - t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); - }); - t.end(); -}); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; - -test('Objects', function (t) { - t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); - t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - - t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); - - t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); - - t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { - var overriddenObject = { toString: st.fail, valueOf: st.fail }; - overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; - - st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); - st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); - st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); - - var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; - nullToPrimitive[Symbol.toPrimitive] = null; - st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); - - st.test('exceptions', function (sst) { - var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - nonFunctionToPrimitive[Symbol.toPrimitive] = {}; - sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); - - var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { - return { toString: function () { return hint; } }; - }; - sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); - - var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; - sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); - - sst.end(); - }); - - st.end(); - }); - - t.test('exceptions', function (st) { - st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); - - st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); - st.end(); - }); - t.end(); -}); diff --git a/node_modules/es-to-primitive/test/es5.js b/node_modules/es-to-primitive/test/es5.js deleted file mode 100644 index 79444b0..0000000 --- a/node_modules/es-to-primitive/test/es5.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var test = require('tape'); -var toPrimitive = require('../es5'); -var is = require('object-is'); -var forEach = require('foreach'); -var functionName = require('function.prototype.name'); -var debug = require('object-inspect'); -var hasSymbols = require('has-symbols')(); - -test('function properties', function (t) { - t.equal(toPrimitive.length, 1, 'length is 1'); - t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); - - t.end(); -}); - -var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; - -test('primitives', function (t) { - forEach(primitives, function (i) { - t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); - t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); - t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); - }); - t.end(); -}); - -test('Symbols', { skip: !hasSymbols }, function (t) { - var symbols = [ - Symbol('foo'), - Symbol.iterator, - Symbol['for']('foo') // eslint-disable-line no-restricted-properties - ]; - forEach(symbols, function (sym) { - t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); - t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); - t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); - }); - - var primitiveSym = Symbol('primitiveSym'); - var stringSym = Symbol.prototype.toString.call(primitiveSym); - var objectSym = Object(primitiveSym); - t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); - - // This is different from ES2015, as the ES5 algorithm doesn't account for the existence of Symbols: - t.equal(toPrimitive(objectSym, String), stringSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(stringSym)); - t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); - t.end(); -}); - -test('Arrays', function (t) { - var arrays = [[], ['a', 'b'], [1, 2]]; - forEach(arrays, function (arr) { - t.ok(is(toPrimitive(arr), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); - t.equal(toPrimitive(arr, String), arr.toString(), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); - t.ok(is(toPrimitive(arr, Number), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); - }); - t.end(); -}); - -test('Dates', function (t) { - var dates = [new Date(), new Date(0), new Date(NaN)]; - forEach(dates, function (date) { - t.equal(toPrimitive(date), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); - t.equal(toPrimitive(date, String), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); - t.ok(is(toPrimitive(date, Number), date.valueOf()), 'toPrimitive(' + debug(date) + ') returns valueOf of the date'); - }); - t.end(); -}); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; - -test('Objects', function (t) { - t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); - t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - - t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); - t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to toString'); - t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to toString'); - - t.ok(is(toPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); - t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - t.ok(is(toPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to Object#toString'); - - t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); - t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns toString'); - t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns toString'); - - t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); - - t.test('exceptions', function (st) { - st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); - - st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/es-to-primitive/test/es6.js b/node_modules/es-to-primitive/test/es6.js deleted file mode 100644 index 16ea0e8..0000000 --- a/node_modules/es-to-primitive/test/es6.js +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -var test = require('tape'); -var toPrimitive = require('../es6'); -var is = require('object-is'); -var forEach = require('foreach'); -var functionName = require('function.prototype.name'); -var debug = require('object-inspect'); - -var hasSymbols = require('has-symbols')(); -var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; - -test('function properties', function (t) { - t.equal(toPrimitive.length, 1, 'length is 1'); - t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); - - t.end(); -}); - -var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; - -test('primitives', function (t) { - forEach(primitives, function (i) { - t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); - t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); - t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); - }); - t.end(); -}); - -test('Symbols', { skip: !hasSymbols }, function (t) { - var symbols = [ - Symbol('foo'), - Symbol.iterator, - Symbol['for']('foo') // eslint-disable-line no-restricted-properties - ]; - forEach(symbols, function (sym) { - t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); - t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); - t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); - }); - - var primitiveSym = Symbol('primitiveSym'); - var objectSym = Object(primitiveSym); - t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); - t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); - t.end(); -}); - -test('Arrays', function (t) { - var arrays = [[], ['a', 'b'], [1, 2]]; - forEach(arrays, function (arr) { - t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); - }); - t.end(); -}); - -test('Dates', function (t) { - var dates = [new Date(), new Date(0), new Date(NaN)]; - forEach(dates, function (date) { - t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); - t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); - }); - t.end(); -}); - -var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; -var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; -var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; -var coercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return 42; } -}; -var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; -var uncoercibleFnObject = { - valueOf: function () { return function valueOfFn() {}; }, - toString: function () { return function toStrFn() {}; } -}; - -test('Objects', function (t) { - t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); - t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); - t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); - - t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); - t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - - t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); - t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); - - t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); - t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); - - t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { - var overriddenObject = { toString: st.fail, valueOf: st.fail }; - overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; - - st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); - st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); - st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); - - var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; - nullToPrimitive[Symbol.toPrimitive] = null; - st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); - st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); - - st.test('exceptions', function (sst) { - var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - nonFunctionToPrimitive[Symbol.toPrimitive] = {}; - sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); - - var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { - return { toString: function () { return hint; } }; - }; - sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); - - var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; - throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; - sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); - - sst.end(); - }); - - st.end(); - }); - - t.test('exceptions', function (st) { - st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); - - st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); - st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); - st.end(); - }); - t.end(); -}); diff --git a/node_modules/es-to-primitive/test/index.js b/node_modules/es-to-primitive/test/index.js deleted file mode 100644 index ad71f39..0000000 --- a/node_modules/es-to-primitive/test/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var toPrimitive = require('../'); -var ES5 = require('../es5'); -var ES6 = require('../es6'); -var ES2015 = require('../es2015'); - -var test = require('tape'); - -test('default export', function (t) { - t.equal(toPrimitive, ES2015, 'default export is ES2015'); - t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method'); - t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method'); - t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method'); - t.end(); -}); - -require('./es5'); -require('./es6'); -require('./es2015'); diff --git a/node_modules/events/.travis.yml b/node_modules/events/.travis.yml deleted file mode 100644 index 54d7e04..0000000 --- a/node_modules/events/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -sudo: false -language: node_js -node_js: - - '0.10' -script: - - npm test - - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then npm run test:browsers; fi -env: - global: - - secure: XcBiD8yReflut9q7leKsigDZ0mI3qTKH+QrNVY8DaqlomJOZw8aOrVuX9Jz12l86ZJ41nbxmKnRNkFzcVr9mbP9YaeTb3DpeOBWmvaoSfud9Wnc16VfXtc1FCcwDhSVcSiM3UtnrmFU5cH+Dw1LPh5PbfylYOS/nJxUvG0FFLqI= - - secure: jNWtEbqhUdQ0xXDHvCYfUbKYeJCi6a7B4LsrcxYCyWWn4NIgncE5x2YbB+FSUUFVYfz0dsn5RKP1oHB99f0laUEo18HBNkrAS/rtyOdVzcpJjbQ6kgSILGjnJD/Ty1B57Rcz3iyev5Y7bLZ6Y1FbDnk/i9/l0faOGz8vTC3Vdkc= diff --git a/node_modules/events/.zuul.yml b/node_modules/events/.zuul.yml deleted file mode 100644 index 216b335..0000000 --- a/node_modules/events/.zuul.yml +++ /dev/null @@ -1,13 +0,0 @@ -ui: mocha-qunit -concurrency: 1 -browsers: - - name: chrome - version: latest - - name: firefox - version: latest - - name: safari - version: 7..latest - - name: iphone - version: latest - - name: ie - version: 8..latest diff --git a/node_modules/events/History.md b/node_modules/events/History.md deleted file mode 100644 index aa9af52..0000000 --- a/node_modules/events/History.md +++ /dev/null @@ -1,58 +0,0 @@ -# 2.1.0 (2018-05-25) - - - add Emitter#rawListeners from Node.js v9.4 - -# 2.0.0 (2018-02-02) - - - Update to events code from node.js 8.x - - Adds `prependListener()` and `prependOnceListener()` - - Adds `eventNames()` method - - (semver major) Unwrap `once()` listeners in `listeners()` - - copy tests from node.js - -Note that this version doubles the gzipped size, jumping from 1.1KB to 2.1KB, -due to new methods and runtime performance improvements. Be aware of that when -upgrading. - -# 1.1.1 (2016-06-22) - - - add more context to errors if they are not instanceof Error - -# 1.1.0 (2015-09-29) - - - add Emitter#listerCount (to match node v4 api) - -# 1.0.2 (2014-08-28) - - - remove un-reachable code - - update devDeps - -## 1.0.1 / 2014-05-11 - - - check for console.trace before using it - -## 1.0.0 / 2013-12-10 - - - Update to latest events code from node.js 0.10 - - copy tests from node.js - -## 0.4.0 / 2011-07-03 ## - - - Switching to graphquire@0.8.0 - -## 0.3.0 / 2011-07-03 ## - - - Switching to URL based module require. - -## 0.2.0 / 2011-06-10 ## - - - Simplified package structure. - - Graphquire for dependency management. - -## 0.1.1 / 2011-05-16 ## - - - Unhandled errors are logged via console.error - -## 0.1.0 / 2011-04-22 ## - - - Initial release diff --git a/node_modules/events/LICENSE b/node_modules/events/LICENSE deleted file mode 100644 index 52ed3b0..0000000 --- a/node_modules/events/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT - -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/events/Readme.md b/node_modules/events/Readme.md deleted file mode 100644 index 4fae922..0000000 --- a/node_modules/events/Readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# Status: [Maintainer Needed](https://github.com/Gozala/events/issues/43) - -# events [![Build Status](https://travis-ci.org/Gozala/events.png?branch=master)](https://travis-ci.org/Gozala/events) - -Node's event emitter for all engines. - -## Install ## - -``` -npm install events -``` - -## Require ## - -```javascript -var EventEmitter = require('events') -``` - -## Usage ## - -See the [node.js event emitter docs](http://nodejs.org/api/events.html) diff --git a/node_modules/events/events.js b/node_modules/events/events.js deleted file mode 100644 index a17bcba..0000000 --- a/node_modules/events/events.js +++ /dev/null @@ -1,523 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var objectCreate = Object.create || objectCreatePolyfill -var objectKeys = Object.keys || objectKeysPolyfill -var bind = Function.prototype.bind || functionBindPolyfill - -function EventEmitter() { - if (!this._events || !Object.prototype.hasOwnProperty.call(this, '_events')) { - this._events = objectCreate(null); - this._eventsCount = 0; - } - - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -var defaultMaxListeners = 10; - -var hasDefineProperty; -try { - var o = {}; - if (Object.defineProperty) Object.defineProperty(o, 'x', { value: 0 }); - hasDefineProperty = o.x === 0; -} catch (err) { hasDefineProperty = false } -if (hasDefineProperty) { - Object.defineProperty(EventEmitter, 'defaultMaxListeners', { - enumerable: true, - get: function() { - return defaultMaxListeners; - }, - set: function(arg) { - // check whether the input is a positive number (whose value is zero or - // greater and not a NaN). - if (typeof arg !== 'number' || arg < 0 || arg !== arg) - throw new TypeError('"defaultMaxListeners" must be a positive number'); - defaultMaxListeners = arg; - } - }); -} else { - EventEmitter.defaultMaxListeners = defaultMaxListeners; -} - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { - if (typeof n !== 'number' || n < 0 || isNaN(n)) - throw new TypeError('"n" argument must be a positive number'); - this._maxListeners = n; - return this; -}; - -function $getMaxListeners(that) { - if (that._maxListeners === undefined) - return EventEmitter.defaultMaxListeners; - return that._maxListeners; -} - -EventEmitter.prototype.getMaxListeners = function getMaxListeners() { - return $getMaxListeners(this); -}; - -// These standalone emit* functions are used to optimize calling of event -// handlers for fast cases because emit() itself often has a variable number of -// arguments and can be deoptimized because of that. These functions always have -// the same number of arguments and thus do not get deoptimized, so the code -// inside them can execute faster. -function emitNone(handler, isFn, self) { - if (isFn) - handler.call(self); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self); - } -} -function emitOne(handler, isFn, self, arg1) { - if (isFn) - handler.call(self, arg1); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1); - } -} -function emitTwo(handler, isFn, self, arg1, arg2) { - if (isFn) - handler.call(self, arg1, arg2); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1, arg2); - } -} -function emitThree(handler, isFn, self, arg1, arg2, arg3) { - if (isFn) - handler.call(self, arg1, arg2, arg3); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1, arg2, arg3); - } -} - -function emitMany(handler, isFn, self, args) { - if (isFn) - handler.apply(self, args); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].apply(self, args); - } -} - -EventEmitter.prototype.emit = function emit(type) { - var er, handler, len, args, i, events; - var doError = (type === 'error'); - - events = this._events; - if (events) - doError = (doError && events.error == null); - else if (!doError) - return false; - - // If there is no 'error' event listener then throw. - if (doError) { - if (arguments.length > 1) - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - // At least give some kind of context to the user - var err = new Error('Unhandled "error" event. (' + er + ')'); - err.context = er; - throw err; - } - return false; - } - - handler = events[type]; - - if (!handler) - return false; - - var isFn = typeof handler === 'function'; - len = arguments.length; - switch (len) { - // fast cases - case 1: - emitNone(handler, isFn, this); - break; - case 2: - emitOne(handler, isFn, this, arguments[1]); - break; - case 3: - emitTwo(handler, isFn, this, arguments[1], arguments[2]); - break; - case 4: - emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]); - break; - // slower - default: - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - emitMany(handler, isFn, this, args); - } - - return true; -}; - -function _addListener(target, type, listener, prepend) { - var m; - var events; - var existing; - - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - - events = target._events; - if (!events) { - events = target._events = objectCreate(null); - target._eventsCount = 0; - } else { - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (events.newListener) { - target.emit('newListener', type, - listener.listener ? listener.listener : listener); - - // Re-assign `events` because a newListener handler could have caused the - // this._events to be assigned to a new object - events = target._events; - } - existing = events[type]; - } - - if (!existing) { - // Optimize the case of one listener. Don't need the extra array object. - existing = events[type] = listener; - ++target._eventsCount; - } else { - if (typeof existing === 'function') { - // Adding the second element, need to change to array. - existing = events[type] = - prepend ? [listener, existing] : [existing, listener]; - } else { - // If we've already got an array, just append. - if (prepend) { - existing.unshift(listener); - } else { - existing.push(listener); - } - } - - // Check for listener leak - if (!existing.warned) { - m = $getMaxListeners(target); - if (m && m > 0 && existing.length > m) { - existing.warned = true; - var w = new Error('Possible EventEmitter memory leak detected. ' + - existing.length + ' "' + String(type) + '" listeners ' + - 'added. Use emitter.setMaxListeners() to ' + - 'increase limit.'); - w.name = 'MaxListenersExceededWarning'; - w.emitter = target; - w.type = type; - w.count = existing.length; - if (typeof console === 'object' && console.warn) { - console.warn('%s: %s', w.name, w.message); - } - } - } - } - - return target; -} - -EventEmitter.prototype.addListener = function addListener(type, listener) { - return _addListener(this, type, listener, false); -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.prependListener = - function prependListener(type, listener) { - return _addListener(this, type, listener, true); - }; - -function onceWrapper() { - if (!this.fired) { - this.target.removeListener(this.type, this.wrapFn); - this.fired = true; - switch (arguments.length) { - case 0: - return this.listener.call(this.target); - case 1: - return this.listener.call(this.target, arguments[0]); - case 2: - return this.listener.call(this.target, arguments[0], arguments[1]); - case 3: - return this.listener.call(this.target, arguments[0], arguments[1], - arguments[2]); - default: - var args = new Array(arguments.length); - for (var i = 0; i < args.length; ++i) - args[i] = arguments[i]; - this.listener.apply(this.target, args); - } - } -} - -function _onceWrap(target, type, listener) { - var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; - var wrapped = bind.call(onceWrapper, state); - wrapped.listener = listener; - state.wrapFn = wrapped; - return wrapped; -} - -EventEmitter.prototype.once = function once(type, listener) { - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - this.on(type, _onceWrap(this, type, listener)); - return this; -}; - -EventEmitter.prototype.prependOnceListener = - function prependOnceListener(type, listener) { - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - this.prependListener(type, _onceWrap(this, type, listener)); - return this; - }; - -// Emits a 'removeListener' event if and only if the listener was removed. -EventEmitter.prototype.removeListener = - function removeListener(type, listener) { - var list, events, position, i, originalListener; - - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - - events = this._events; - if (!events) - return this; - - list = events[type]; - if (!list) - return this; - - if (list === listener || list.listener === listener) { - if (--this._eventsCount === 0) - this._events = objectCreate(null); - else { - delete events[type]; - if (events.removeListener) - this.emit('removeListener', type, list.listener || listener); - } - } else if (typeof list !== 'function') { - position = -1; - - for (i = list.length - 1; i >= 0; i--) { - if (list[i] === listener || list[i].listener === listener) { - originalListener = list[i].listener; - position = i; - break; - } - } - - if (position < 0) - return this; - - if (position === 0) - list.shift(); - else - spliceOne(list, position); - - if (list.length === 1) - events[type] = list[0]; - - if (events.removeListener) - this.emit('removeListener', type, originalListener || listener); - } - - return this; - }; - -EventEmitter.prototype.removeAllListeners = - function removeAllListeners(type) { - var listeners, events, i; - - events = this._events; - if (!events) - return this; - - // not listening for removeListener, no need to emit - if (!events.removeListener) { - if (arguments.length === 0) { - this._events = objectCreate(null); - this._eventsCount = 0; - } else if (events[type]) { - if (--this._eventsCount === 0) - this._events = objectCreate(null); - else - delete events[type]; - } - return this; - } - - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - var keys = objectKeys(events); - var key; - for (i = 0; i < keys.length; ++i) { - key = keys[i]; - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = objectCreate(null); - this._eventsCount = 0; - return this; - } - - listeners = events[type]; - - if (typeof listeners === 'function') { - this.removeListener(type, listeners); - } else if (listeners) { - // LIFO order - for (i = listeners.length - 1; i >= 0; i--) { - this.removeListener(type, listeners[i]); - } - } - - return this; - }; - -function _listeners(target, type, unwrap) { - var events = target._events; - - if (!events) - return []; - - var evlistener = events[type]; - if (!evlistener) - return []; - - if (typeof evlistener === 'function') - return unwrap ? [evlistener.listener || evlistener] : [evlistener]; - - return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); -} - -EventEmitter.prototype.listeners = function listeners(type) { - return _listeners(this, type, true); -}; - -EventEmitter.prototype.rawListeners = function rawListeners(type) { - return _listeners(this, type, false); -}; - -EventEmitter.listenerCount = function(emitter, type) { - if (typeof emitter.listenerCount === 'function') { - return emitter.listenerCount(type); - } else { - return listenerCount.call(emitter, type); - } -}; - -EventEmitter.prototype.listenerCount = listenerCount; -function listenerCount(type) { - var events = this._events; - - if (events) { - var evlistener = events[type]; - - if (typeof evlistener === 'function') { - return 1; - } else if (evlistener) { - return evlistener.length; - } - } - - return 0; -} - -EventEmitter.prototype.eventNames = function eventNames() { - return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; -}; - -// About 1.5x faster than the two-arg version of Array#splice(). -function spliceOne(list, index) { - for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) - list[i] = list[k]; - list.pop(); -} - -function arrayClone(arr, n) { - var copy = new Array(n); - for (var i = 0; i < n; ++i) - copy[i] = arr[i]; - return copy; -} - -function unwrapListeners(arr) { - var ret = new Array(arr.length); - for (var i = 0; i < ret.length; ++i) { - ret[i] = arr[i].listener || arr[i]; - } - return ret; -} - -function objectCreatePolyfill(proto) { - var F = function() {}; - F.prototype = proto; - return new F; -} -function objectKeysPolyfill(obj) { - var keys = []; - for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k)) { - keys.push(k); - } - return k; -} -function functionBindPolyfill(context) { - var fn = this; - return function () { - return fn.apply(context, arguments); - }; -} diff --git a/node_modules/events/package.json b/node_modules/events/package.json deleted file mode 100644 index c859792..0000000 --- a/node_modules/events/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "events@^2.0.0", - "_id": "events@2.1.0", - "_inBundle": false, - "_integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", - "_location": "/events", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "events@^2.0.0", - "name": "events", - "escapedName": "events", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", - "_shasum": "2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5", - "_spec": "events@^2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com", - "url": "http://jeditoolkit.com" - }, - "bugs": { - "url": "http://github.com/Gozala/events/issues/" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node's event emitter for all engines.", - "devDependencies": { - "isarray": "^2.0.2", - "mocha": "^3.5.3", - "object-keys": "^1.0.11", - "zuul": "^3.11.1" - }, - "engines": { - "node": ">=0.4.x" - }, - "homepage": "https://github.com/Gozala/events#readme", - "id": "events", - "keywords": [ - "events", - "eventEmitter", - "eventDispatcher", - "listeners" - ], - "license": "MIT", - "main": "./events.js", - "name": "events", - "repository": { - "type": "git", - "url": "git://github.com/Gozala/events.git", - "web": "https://github.com/Gozala/events" - }, - "scripts": { - "test": "mocha --ui qunit -- tests/index.js", - "test:browsers": "zuul -- tests/index.js" - }, - "version": "2.1.0" -} diff --git a/node_modules/events/tests/add-listeners.js b/node_modules/events/tests/add-listeners.js deleted file mode 100644 index 6682862..0000000 --- a/node_modules/events/tests/add-listeners.js +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var EventEmitter = require('../'); - -{ - var ee = new EventEmitter(); - var events_new_listener_emitted = []; - var listeners_new_listener_emitted = []; - - // Sanity check - assert.strictEqual(ee.addListener, ee.on); - - ee.on('newListener', function(event, listener) { - // Don't track newListener listeners. - if (event === 'newListener') - return; - - events_new_listener_emitted.push(event); - listeners_new_listener_emitted.push(listener); - }); - - var hello = common.mustCall(function(a, b) { - assert.strictEqual('a', a); - assert.strictEqual('b', b); - }); - - ee.once('newListener', function(name, listener) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(listener, hello); - - var listeners = this.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - }); - - ee.on('hello', hello); - ee.once('foo', assert.fail); - - assert.ok(Array.isArray(events_new_listener_emitted)); - assert.strictEqual(events_new_listener_emitted.length, 2); - assert.strictEqual(events_new_listener_emitted[0], 'hello'); - assert.strictEqual(events_new_listener_emitted[1], 'foo'); - - assert.ok(Array.isArray(listeners_new_listener_emitted)); - assert.strictEqual(listeners_new_listener_emitted.length, 2); - assert.strictEqual(listeners_new_listener_emitted[0], hello); - assert.strictEqual(listeners_new_listener_emitted[1], assert.fail); - - ee.emit('hello', 'a', 'b'); -} - -// just make sure that this doesn't throw: -{ - var f = new EventEmitter(); - - f.setMaxListeners(0); -} - -{ - var listen1 = function() {}; - var listen2 = function() {}; - var ee = new EventEmitter(); - - ee.once('newListener', function() { - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - ee.once('newListener', function() { - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - }); - ee.on('hello', listen2); - }); - ee.on('hello', listen1); - // The order of listeners on an event is not always the order in which the - // listeners were added. - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 2); - assert.strictEqual(listeners[0], listen2); - assert.strictEqual(listeners[1], listen1); -} - -// Verify that the listener must be a function -assert.throws(function() { - var ee = new EventEmitter(); - - ee.on('foo', null); -}, /^TypeError: "listener" argument must be a function$/); diff --git a/node_modules/events/tests/check-listener-leaks.js b/node_modules/events/tests/check-listener-leaks.js deleted file mode 100644 index 3cd0aa2..0000000 --- a/node_modules/events/tests/check-listener-leaks.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var events = require('../'); - -// default -{ - var e = new events.EventEmitter(); - - for (var i = 0; i < 10; i++) { - e.on('default', common.mustNotCall()); - } - assert.ok(!e._events['default'].hasOwnProperty('warned')); - e.on('default', common.mustNotCall()); - assert.ok(e._events['default'].warned); - - // specific - e.setMaxListeners(5); - for (var i = 0; i < 5; i++) { - e.on('specific', common.mustNotCall()); - } - assert.ok(!e._events['specific'].hasOwnProperty('warned')); - e.on('specific', common.mustNotCall()); - assert.ok(e._events['specific'].warned); - - // only one - e.setMaxListeners(1); - e.on('only one', common.mustNotCall()); - assert.ok(!e._events['only one'].hasOwnProperty('warned')); - e.on('only one', common.mustNotCall()); - assert.ok(e._events['only one'].hasOwnProperty('warned')); - - // unlimited - e.setMaxListeners(0); - for (var i = 0; i < 1000; i++) { - e.on('unlimited', common.mustNotCall()); - } - assert.ok(!e._events['unlimited'].hasOwnProperty('warned')); -} - -// process-wide -{ - events.EventEmitter.defaultMaxListeners = 42; - var e = new events.EventEmitter(); - - for (var i = 0; i < 42; ++i) { - e.on('fortytwo', common.mustNotCall()); - } - assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); - e.on('fortytwo', common.mustNotCall()); - assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); - delete e._events['fortytwo'].warned; - - events.EventEmitter.defaultMaxListeners = 44; - e.on('fortytwo', common.mustNotCall()); - assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); - e.on('fortytwo', common.mustNotCall()); - assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); -} - -// but _maxListeners still has precedence over defaultMaxListeners -{ - events.EventEmitter.defaultMaxListeners = 42; - var e = new events.EventEmitter(); - e.setMaxListeners(1); - e.on('uno', common.mustNotCall()); - assert.ok(!e._events['uno'].hasOwnProperty('warned')); - e.on('uno', common.mustNotCall()); - assert.ok(e._events['uno'].hasOwnProperty('warned')); - - // chainable - assert.strictEqual(e, e.setMaxListeners(1)); -} diff --git a/node_modules/events/tests/common.js b/node_modules/events/tests/common.js deleted file mode 100644 index cdd5aea..0000000 --- a/node_modules/events/tests/common.js +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); - -var noop = function() {}; - -var mustCallChecks = []; - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = filter(mustCallChecks, function(context) { - if ('minimum' in context) { - context.messageSegment = 'at least ' + context.minimum; - return context.actual < context.minimum; - } else { - context.messageSegment = 'exactly ' + context.exact; - return context.actual !== context.exact; - } - }); - - for (var i = 0; i < failed.length; i++) { - var context = failed[i]; - console.log('Mismatched %s function calls. Expected %s, actual %d.', - context.name, - context.messageSegment, - context.actual); - // IE8 has no .stack - if (context.stack) console.log(context.stack.split('\n').slice(2).join('\n')); - } - - assert.strictEqual(failed.length, 0); -} - -exports.mustCall = function(fn, exact) { - return _mustCallInner(fn, exact, 'exact'); -}; - -function _mustCallInner(fn, criteria, field) { - if (typeof criteria == 'undefined') criteria = 1; - - if (typeof fn === 'number') { - criteria = fn; - fn = noop; - } else if (fn === undefined) { - fn = noop; - } - - if (typeof criteria !== 'number') - throw new TypeError('Invalid ' + field + ' value: ' + criteria); - - var context = { - actual: 0, - stack: (new Error()).stack, - name: fn.name || '' - }; - - context[field] = criteria; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) after(function() { runCallChecks(0); }); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -} - -exports.mustNotCall = function(msg) { - return function mustNotCall() { - assert.fail(msg || 'function should not have been called'); - }; -}; - -function filter(arr, fn) { - if (arr.filter) return arr.filter(fn); - var filtered = []; - for (var i = 0; i < arr.length; i++) { - if (fn(arr[i], i, arr)) filtered.push(arr[i]); - } - return filtered -} diff --git a/node_modules/events/tests/index.js b/node_modules/events/tests/index.js deleted file mode 100644 index f71bc98..0000000 --- a/node_modules/events/tests/index.js +++ /dev/null @@ -1,25 +0,0 @@ - -require('./legacy-compat'); - -// we do this to easily wrap each file in a mocha test -// and also have browserify be able to statically analyze this file -var orig_require = require; -var require = function(file) { - test(file, function() { - orig_require(file); - }); -}; - -require('./add-listeners.js'); -require('./check-listener-leaks.js'); -require('./listener-count.js'); -require('./listeners-side-effects.js'); -require('./listeners.js'); -require('./max-listeners.js'); -require('./modify-in-emit.js'); -require('./num-args.js'); -require('./once.js'); -require('./set-max-listeners-side-effects.js'); -require('./subclass.js'); -require('./remove-all-listeners.js'); -require('./remove-listeners.js'); diff --git a/node_modules/events/tests/legacy-compat.js b/node_modules/events/tests/legacy-compat.js deleted file mode 100644 index a402be6..0000000 --- a/node_modules/events/tests/legacy-compat.js +++ /dev/null @@ -1,16 +0,0 @@ -// sigh... life is hard -if (!global.console) { - console = {} -} - -var fns = ['log', 'error', 'trace']; -for (var i=0 ; ifoo should not be emitted'); -} - -e.once('foo', remove); -e.removeListener('foo', remove); -e.emit('foo'); - -e.once('e', common.mustCall(function() { - e.emit('e'); -})); - -e.once('e', common.mustCall()); - -e.emit('e'); - -// Verify that the listener must be a function -assert.throws(function() { - var ee = new EventEmitter(); - - ee.once('foo', null); -}, /^TypeError: "listener" argument must be a function$/); - -{ - // once() has different code paths based on the number of arguments being - // emitted. Verify that all of the cases are covered. - var maxArgs = 4; - - for (var i = 0; i <= maxArgs; ++i) { - var ee = new EventEmitter(); - var args = ['foo']; - - for (var j = 0; j < i; ++j) - args.push(j); - - ee.once('foo', common.mustCall(function() { - var params = Array.prototype.slice.call(arguments); - var restArgs = args.slice(1); - assert.ok(Array.isArray(params)); - assert.strictEqual(params.length, restArgs.length); - for (var index = 0; index < params.length; index++) { - var param = params[index]; - assert.strictEqual(param, restArgs[index]); - } - })); - - EventEmitter.prototype.emit.apply(ee, args); - } -} diff --git a/node_modules/events/tests/remove-all-listeners.js b/node_modules/events/tests/remove-all-listeners.js deleted file mode 100644 index df29998..0000000 --- a/node_modules/events/tests/remove-all-listeners.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var events = require('../'); - -var after_checks = []; -after(function() { - for (var i = 0 ; i < after_checks.length ; ++i) { - after_checks[i](); - } -}); - -function expect(expected) { - var actual = []; - after_checks.push(function() { - var sortedActual = actual.sort(); - var sortedExpected = expected.sort(); - assert.strictEqual(sortedActual.length, sortedExpected.length); - for (var index = 0; index < sortedActual.length; index++) { - var value = sortedActual[index]; - assert.strictEqual(value, sortedExpected[index]); - } - }); - function listener(name) { - actual.push(name); - } - return common.mustCall(listener, expected.length); -} - -{ - var ee = new events.EventEmitter(); - var noop = common.mustNotCall(); - ee.on('foo', noop); - ee.on('bar', noop); - ee.on('baz', noop); - ee.on('baz', noop); - var fooListeners = ee.listeners('foo'); - var barListeners = ee.listeners('bar'); - var bazListeners = ee.listeners('baz'); - ee.on('removeListener', expect(['bar', 'baz', 'baz'])); - ee.removeAllListeners('bar'); - ee.removeAllListeners('baz'); - - var listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], noop); - - listeners = ee.listeners('bar'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - listeners = ee.listeners('baz'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - // After calling removeAllListeners(), - // the old listeners array should stay unchanged. - assert.strictEqual(fooListeners.length, 1); - assert.strictEqual(fooListeners[0], noop); - assert.strictEqual(barListeners.length, 1); - assert.strictEqual(barListeners[0], noop); - assert.strictEqual(bazListeners.length, 2); - assert.strictEqual(bazListeners[0], noop); - assert.strictEqual(bazListeners[1], noop); - // After calling removeAllListeners(), - // new listeners arrays is different from the old. - assert.notStrictEqual(ee.listeners('bar'), barListeners); - assert.notStrictEqual(ee.listeners('baz'), bazListeners); -} - -{ - var ee = new events.EventEmitter(); - ee.on('foo', common.mustNotCall()); - ee.on('bar', common.mustNotCall()); - // Expect LIFO order - ee.on('removeListener', expect(['foo', 'bar', 'removeListener'])); - ee.on('removeListener', expect(['foo', 'bar'])); - ee.removeAllListeners(); - - var listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - listeners = ee.listeners('bar'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new events.EventEmitter(); - ee.on('removeListener', common.mustNotCall()); - // Check for regression where removeAllListeners() throws when - // there exists a 'removeListener' listener, but there exists - // no listeners for the provided event type. - assert.doesNotThrow(function () { ee.removeAllListeners(ee, 'foo') }); -} - -{ - var ee = new events.EventEmitter(); - var expectLength = 2; - ee.on('removeListener', function() { - assert.strictEqual(expectLength--, this.listeners('baz').length); - }); - ee.on('baz', common.mustNotCall()); - ee.on('baz', common.mustNotCall()); - ee.on('baz', common.mustNotCall()); - assert.strictEqual(ee.listeners('baz').length, expectLength + 1); - ee.removeAllListeners('baz'); - assert.strictEqual(ee.listeners('baz').length, 0); -} - -{ - var ee = new events.EventEmitter(); - assert.strictEqual(ee, ee.removeAllListeners()); -} - -{ - var ee = new events.EventEmitter(); - ee._events = undefined; - assert.strictEqual(ee, ee.removeAllListeners()); -} diff --git a/node_modules/events/tests/remove-listeners.js b/node_modules/events/tests/remove-listeners.js deleted file mode 100644 index 6cccd96..0000000 --- a/node_modules/events/tests/remove-listeners.js +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var EventEmitter = require('../'); - -var listener1 = function listener1() {}; -var listener2 = function listener2() {}; - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener1); - })); - ee.removeListener('hello', listener1); - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('removeListener', common.mustNotCall()); - ee.removeListener('hello', listener2); - - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener1); -} - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('hello', listener2); - - var listeners; - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener2); - })); - ee.removeListener('hello', listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener2); - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - })); - ee.removeListener('hello', listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new EventEmitter(); - - function remove1() { - assert.fail('remove1 should not have been called'); - } - - function remove2() { - assert.fail('remove2 should not have been called'); - } - - ee.on('removeListener', common.mustCall(function(name, cb) { - if (cb !== remove1) return; - this.removeListener('quux', remove2); - this.emit('quux'); - }, 2)); - ee.on('quux', remove1); - ee.on('quux', remove2); - ee.removeListener('quux', remove1); -} - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('hello', listener2); - - var listeners; - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener2); - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - })); - ee.removeListener('hello', listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - })); - ee.removeListener('hello', listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new EventEmitter(); - var listener3 = common.mustCall(function() { - ee.removeListener('hello', listener4); - }, 2); - var listener4 = common.mustCall(); - - ee.on('hello', listener3); - ee.on('hello', listener4); - - // listener4 will still be called although it is removed by listener 3. - ee.emit('hello'); - // This is so because the interal listener array at time of emit - // was [listener3,listener4] - - // Interal listener array [listener3] - ee.emit('hello'); -} - -{ - var ee = new EventEmitter(); - - ee.once('hello', listener1); - ee.on('removeListener', common.mustCall(function(eventName, listener) { - assert.strictEqual(eventName, 'hello'); - assert.strictEqual(listener, listener1); - })); - ee.emit('hello'); -} - -{ - var ee = new EventEmitter(); - - assert.strictEqual(ee, ee.removeListener('foo', function() {})); -} - -// Verify that the removed listener must be a function -assert.throws(function() { - var ee = new EventEmitter(); - - ee.removeListener('foo', null); -}, /^TypeError: "listener" argument must be a function$/); - -{ - var ee = new EventEmitter(); - var listener = function() {}; - ee._events = undefined; - var e = ee.removeListener('foo', listener); - assert.strictEqual(e, ee); -} - -{ - var ee = new EventEmitter(); - - ee.on('foo', listener1); - ee.on('foo', listener2); - var listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 2); - assert.strictEqual(listeners[0], listener1); - assert.strictEqual(listeners[1], listener2); - - ee.removeListener('foo', listener1); - assert.strictEqual(ee._events.foo, listener2); - - ee.on('foo', listener1); - listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 2); - assert.strictEqual(listeners[0], listener2); - assert.strictEqual(listeners[1], listener1); - - ee.removeListener('foo', listener1); - assert.strictEqual(ee._events.foo, listener2); -} diff --git a/node_modules/events/tests/set-max-listeners-side-effects.js b/node_modules/events/tests/set-max-listeners-side-effects.js deleted file mode 100644 index 99471db..0000000 --- a/node_modules/events/tests/set-max-listeners-side-effects.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -require('./common'); -var assert = require('assert'); -var events = require('../'); -var objectKeys = require('object-keys'); - -var e = new events.EventEmitter(); - -if (Object.create) assert.ok(!(e._events instanceof Object)); -assert.strictEqual(objectKeys(e._events).length, 0); -e.setMaxListeners(5); -assert.strictEqual(objectKeys(e._events).length, 0); diff --git a/node_modules/events/tests/subclass.js b/node_modules/events/tests/subclass.js deleted file mode 100644 index 6c2ae64..0000000 --- a/node_modules/events/tests/subclass.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var EventEmitter = require('../').EventEmitter; -var util = require('util'); -var objectKeys = require('object-keys'); - -var after_checks = []; -after(function() { - for (var i = 0 ; i < after_checks.length ; ++i) { - after_checks[i](); - } -}); - -util.inherits(MyEE, EventEmitter); - -function MyEE(cb) { - this.once(1, cb); - this.emit(1); - this.removeAllListeners(); - EventEmitter.call(this); -} - -var myee = new MyEE(common.mustCall()); - - -util.inherits(ErrorEE, EventEmitter); -function ErrorEE() { - this.emit('error', new Error('blerg')); -} - -assert.throws(function() { - new ErrorEE(); -}, /blerg/); - -after_checks.push(function() { - if (Object.create) assert.ok(!(myee._events instanceof Object)); - assert.strictEqual(objectKeys(myee._events).length, 0); -}); - - -function MyEE2() { - EventEmitter.call(this); -} - -MyEE2.prototype = new EventEmitter(); - -var ee1 = new MyEE2(); -var ee2 = new MyEE2(); - -ee1.on('x', function() {}); - -assert.strictEqual(ee2.listenerCount('x'), 0); diff --git a/node_modules/evp_bytestokey/LICENSE b/node_modules/evp_bytestokey/LICENSE deleted file mode 100644 index f06007a..0000000 --- a/node_modules/evp_bytestokey/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 crypto-browserify contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/evp_bytestokey/README.md b/node_modules/evp_bytestokey/README.md deleted file mode 100644 index 36da238..0000000 --- a/node_modules/evp_bytestokey/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# EVP\_BytesToKey -[![NPM Package](https://img.shields.io/npm/v/evp_bytestokey.svg?style=flat-square)](https://www.npmjs.org/package/evp_bytestokey) -[![Build Status](https://img.shields.io/travis/crypto-browserify/EVP_BytesToKey.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/EVP_BytesToKey) -[![Dependency status](https://img.shields.io/david/crypto-browserify/EVP_BytesToKey.svg?style=flat-square)](https://david-dm.org/crypto-browserify/EVP_BytesToKey#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -The insecure [key derivation algorithm from OpenSSL.][1] - -**WARNING: DO NOT USE, except for compatibility reasons.** - -MD5 is insecure. - -Use at least `scrypt` or `pbkdf2-hmac-sha256` instead. - - -## API -`EVP_BytesToKey(password, salt, keyLen, ivLen)` - -* `password` - `Buffer`, password used to derive the key data. -* `salt` - 8 byte `Buffer` or `null`, salt is used as a salt in the derivation. -* `keyBits` - `number`, key length in **bits**. -* `ivLen` - `number`, iv length in bytes. - -*Returns*: `{ key: Buffer, iv: Buffer }` - - -## Examples -MD5 with `aes-256-cbc`: - -```js -const crypto = require('crypto') -const EVP_BytesToKey = require('evp_bytestokey') - -const result = EVP_BytesToKey( - 'my-secret-password', - null, - 32, - 16 -) -// => -// { key: , -// iv: } - -const cipher = crypto.createCipheriv('aes-256-cbc', result.key, result.iv) -``` - -## LICENSE [MIT](LICENSE) - -[1]: https://wiki.openssl.org/index.php/Manual:EVP_BytesToKey(3) -[2]: https://nodejs.org/api/crypto.html#crypto_class_hash diff --git a/node_modules/evp_bytestokey/index.js b/node_modules/evp_bytestokey/index.js deleted file mode 100644 index f9d4757..0000000 --- a/node_modules/evp_bytestokey/index.js +++ /dev/null @@ -1,45 +0,0 @@ -var Buffer = require('safe-buffer').Buffer -var MD5 = require('md5.js') - -/* eslint-disable camelcase */ -function EVP_BytesToKey (password, salt, keyBits, ivLen) { - if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary') - if (salt) { - if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary') - if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length') - } - - var keyLen = keyBits / 8 - var key = Buffer.alloc(keyLen) - var iv = Buffer.alloc(ivLen || 0) - var tmp = Buffer.alloc(0) - - while (keyLen > 0 || ivLen > 0) { - var hash = new MD5() - hash.update(tmp) - hash.update(password) - if (salt) hash.update(salt) - tmp = hash.digest() - - var used = 0 - - if (keyLen > 0) { - var keyStart = key.length - keyLen - used = Math.min(keyLen, tmp.length) - tmp.copy(key, keyStart, 0, used) - keyLen -= used - } - - if (used < tmp.length && ivLen > 0) { - var ivStart = iv.length - ivLen - var length = Math.min(ivLen, tmp.length - used) - tmp.copy(iv, ivStart, used, used + length) - ivLen -= length - } - } - - tmp.fill(0) - return { key: key, iv: iv } -} - -module.exports = EVP_BytesToKey diff --git a/node_modules/evp_bytestokey/package.json b/node_modules/evp_bytestokey/package.json deleted file mode 100644 index 80be6c6..0000000 --- a/node_modules/evp_bytestokey/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "evp_bytestokey@^1.0.0", - "_id": "evp_bytestokey@1.0.3", - "_inBundle": false, - "_integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "_location": "/evp_bytestokey", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "evp_bytestokey@^1.0.0", - "name": "evp_bytestokey", - "escapedName": "evp_bytestokey", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/browserify-aes", - "/browserify-cipher", - "/parse-asn1" - ], - "_resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "_shasum": "7fcbdb198dc71959432efe13842684e0525acb02", - "_spec": "evp_bytestokey@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify-cipher", - "author": { - "name": "Calvin Metcalf", - "email": "calvin.metcalf@gmail.com" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/EVP_BytesToKey/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Kirill Fomichev", - "email": "fanatid@ya.ru" - } - ], - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - }, - "deprecated": false, - "description": "The insecure key derivation algorithm from OpenSSL", - "devDependencies": { - "bindings": "^1.2.1", - "nan": "^2.4.0", - "nyc": "^8.1.0", - "standard": "^8.0.0", - "tape": "^4.6.0" - }, - "files": [ - "index.js" - ], - "gypfile": false, - "homepage": "https://github.com/crypto-browserify/EVP_BytesToKey", - "keywords": [ - "crypto", - "openssl" - ], - "license": "MIT", - "main": "index.js", - "name": "evp_bytestokey", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/EVP_BytesToKey.git" - }, - "scripts": { - "coverage": "nyc tape test/*.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "test:prepare": "node-gyp rebuild", - "unit": "tape test/*.js" - }, - "version": "1.0.3" -} diff --git a/node_modules/fast-safe-stringify/.travis.yml b/node_modules/fast-safe-stringify/.travis.yml deleted file mode 100644 index 2b06d25..0000000 --- a/node_modules/fast-safe-stringify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -sudo: false -node_js: -- '4' -- '6' -- '8' -- '9' -- '10' diff --git a/node_modules/fast-safe-stringify/CHANGELOG.md b/node_modules/fast-safe-stringify/CHANGELOG.md deleted file mode 100644 index 55f2d08..0000000 --- a/node_modules/fast-safe-stringify/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## v.2.0.0 - -Features - -- Added stable-stringify (see documentation) -- Support replacer -- Support spacer -- toJSON support without forceDecirc property -- Improved performance - -Breaking changes - -- Manipulating the input value in a `toJSON` function is not possible anymore in - all cases (see documentation) -- Dropped support for e.g. IE8 and Node.js < 4 diff --git a/node_modules/fast-safe-stringify/LICENSE b/node_modules/fast-safe-stringify/LICENSE deleted file mode 100644 index d310c2d..0000000 --- a/node_modules/fast-safe-stringify/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements -Copyright (c) 2017 David Mark Clements & Matteo Collina -Copyright (c) 2018 David Mark Clements, Matteo Collina & Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/fast-safe-stringify/benchmark.js b/node_modules/fast-safe-stringify/benchmark.js deleted file mode 100644 index 7ba5e9f..0000000 --- a/node_modules/fast-safe-stringify/benchmark.js +++ /dev/null @@ -1,137 +0,0 @@ -const Benchmark = require('benchmark') -const suite = new Benchmark.Suite() -const { inspect } = require('util') -const jsonStringifySafe = require('json-stringify-safe') -const fastSafeStringify = require('./') - -const array = new Array(10).fill(0).map((_, i) => i) -const obj = { foo: array } -const circ = JSON.parse(JSON.stringify(obj)) -circ.o = { obj: circ, array } -const circGetters = JSON.parse(JSON.stringify(obj)) -Object.assign(circGetters, { get o () { return { obj: circGetters, array } } }) - -const deep = require('./package.json') -deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.array = array - -const deepCirc = JSON.parse(JSON.stringify(deep)) -deepCirc.deep.deep.deep.circ = deepCirc -deepCirc.deep.deep.circ = deepCirc -deepCirc.deep.circ = deepCirc -deepCirc.array = array - -const deepCircGetters = JSON.parse(JSON.stringify(deep)) -for (let i = 0; i < 10; i++) { - deepCircGetters[i.toString()] = { - deep: { - deep: { - get circ () { return deep.deep }, - deep: { get circ () { return deep.deep.deep } } - }, - get circ () { return deep } - }, - get array () { return array } - } -} - -const deepCircNonCongifurableGetters = JSON.parse(JSON.stringify(deep)) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters, 'array', { - get: () => array, - enumerable: true, - configurable: false -}) - -suite.add('util.inspect: simple object ', function () { - inspect(obj, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular ', function () { - inspect(circ, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular getters ', function () { - inspect(circGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep ', function () { - inspect(deep, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep circular ', function () { - inspect(deepCirc, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: large deep circular getters ', function () { - inspect(deepCircGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep non-conf circular getters', function () { - inspect(deepCircNonCongifurableGetters, { showHidden: false, depth: null }) -}) - -suite.add('\njson-stringify-safe: simple object ', function () { - jsonStringifySafe(obj) -}) -suite.add('json-stringify-safe: circular ', function () { - jsonStringifySafe(circ) -}) -suite.add('json-stringify-safe: circular getters ', function () { - jsonStringifySafe(circGetters) -}) -suite.add('json-stringify-safe: deep ', function () { - jsonStringifySafe(deep) -}) -suite.add('json-stringify-safe: deep circular ', function () { - jsonStringifySafe(deepCirc) -}) -suite.add('json-stringify-safe: large deep circular getters ', function () { - jsonStringifySafe(deepCircGetters) -}) -suite.add('json-stringify-safe: deep non-conf circular getters', function () { - jsonStringifySafe(deepCircNonCongifurableGetters) -}) - -suite.add('\nfast-safe-stringify: simple object ', function () { - fastSafeStringify(obj) -}) -suite.add('fast-safe-stringify: circular ', function () { - fastSafeStringify(circ) -}) -suite.add('fast-safe-stringify: circular getters ', function () { - fastSafeStringify(circGetters) -}) -suite.add('fast-safe-stringify: deep ', function () { - fastSafeStringify(deep) -}) -suite.add('fast-safe-stringify: deep circular ', function () { - fastSafeStringify(deepCirc) -}) -suite.add('fast-safe-stringify: large deep circular getters ', function () { - fastSafeStringify(deepCircGetters) -}) -suite.add('fast-safe-stringify: deep non-conf circular getters', function () { - fastSafeStringify(deepCircNonCongifurableGetters) -}) - -// add listeners -suite.on('cycle', function (event) { - console.log(String(event.target)) -}) - -suite.on('complete', function () { - console.log('\nFastest is ' + this.filter('fastest').map('name')) -}) - -suite.run({ delay: 1, minSamples: 150 }) diff --git a/node_modules/fast-safe-stringify/index.d.ts b/node_modules/fast-safe-stringify/index.d.ts deleted file mode 100644 index 56f6865..0000000 --- a/node_modules/fast-safe-stringify/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare function stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; - -declare namespace stringify { - export function stable(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; - export function stableStringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; -} - -export default stringify; diff --git a/node_modules/fast-safe-stringify/index.js b/node_modules/fast-safe-stringify/index.js deleted file mode 100644 index 670698d..0000000 --- a/node_modules/fast-safe-stringify/index.js +++ /dev/null @@ -1,161 +0,0 @@ -module.exports = stringify -stringify.default = stringify -stringify.stable = deterministicStringify -stringify.stableStringify = deterministicStringify - -var arr = [] -var replacerStack = [] - -// Regular stringify -function stringify (obj, replacer, spacer) { - decirc(obj, '', [], undefined) - var res - if (replacerStack.length === 0) { - res = JSON.stringify(obj, replacer, spacer) - } else { - res = JSON.stringify(obj, replaceGetterValues(replacer), spacer) - } - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - return res -} -function decirc (val, k, stack, parent) { - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: '[Circular]' }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k]) - } - } else { - parent[k] = '[Circular]' - arr.push([parent, k, val]) - } - return - } - } - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - decirc(val[i], i, stack, val) - } - } else { - var keys = Object.keys(val) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - decirc(val[key], key, stack, val) - } - } - stack.pop() - } -} - -// Stable-stringify -function compareFunction (a, b) { - if (a < b) { - return -1 - } - if (a > b) { - return 1 - } - return 0 -} - -function deterministicStringify (obj, replacer, spacer) { - var tmp = deterministicDecirc(obj, '', [], undefined) || obj - var res - if (replacerStack.length === 0) { - res = JSON.stringify(tmp, replacer, spacer) - } else { - res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer) - } - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - return res -} - -function deterministicDecirc (val, k, stack, parent) { - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: '[Circular]' }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k]) - } - } else { - parent[k] = '[Circular]' - arr.push([parent, k, val]) - } - return - } - } - if (typeof val.toJSON === 'function') { - return - } - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - deterministicDecirc(val[i], i, stack, val) - } - } else { - // Create a temporary object in the required way - var tmp = {} - var keys = Object.keys(val).sort(compareFunction) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - deterministicDecirc(val[key], key, stack, val) - tmp[key] = val[key] - } - if (parent !== undefined) { - arr.push([parent, k, val]) - parent[k] = tmp - } else { - return tmp - } - } - stack.pop() - } -} - -// wraps replacer function to handle values we couldn't replace -// and mark them as [Circular] -function replaceGetterValues (replacer) { - replacer = replacer !== undefined ? replacer : function (k, v) { return v } - return function (key, val) { - if (replacerStack.length > 0) { - for (var i = 0; i < replacerStack.length; i++) { - var part = replacerStack[i] - if (part[1] === key && part[0] === val) { - val = '[Circular]' - replacerStack.splice(i, 1) - break - } - } - } - return replacer.call(this, key, val) - } -} diff --git a/node_modules/fast-safe-stringify/package.json b/node_modules/fast-safe-stringify/package.json deleted file mode 100644 index 0b645f6..0000000 --- a/node_modules/fast-safe-stringify/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "fast-safe-stringify@^2.0.7", - "_id": "fast-safe-stringify@2.0.7", - "_inBundle": false, - "_integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", - "_location": "/fast-safe-stringify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fast-safe-stringify@^2.0.7", - "name": "fast-safe-stringify", - "escapedName": "fast-safe-stringify", - "rawSpec": "^2.0.7", - "saveSpec": null, - "fetchSpec": "^2.0.7" - }, - "_requiredBy": [ - "/shasum-object" - ], - "_resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "_shasum": "124aa885899261f68aedb42a7c080de9da608743", - "_spec": "fast-safe-stringify@^2.0.7", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/shasum-object", - "author": { - "name": "David Mark Clements" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/fast-safe-stringify/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Ruben Bridgewater" - }, - { - "name": "Matteo Collina" - }, - { - "name": "Ben Gourley" - }, - { - "name": "Gabriel Lesperance" - }, - { - "name": "Alex Liu" - }, - { - "name": "Christoph Walcher" - }, - { - "name": "Nicholas Young" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Safely and quickly serialize JavaScript objects", - "devDependencies": { - "benchmark": "^2.1.4", - "clone": "^2.1.0", - "json-stringify-safe": "^5.0.1", - "standard": "^11.0.0", - "tap": "^12.0.0" - }, - "homepage": "https://github.com/davidmarkclements/fast-safe-stringify#readme", - "keywords": [ - "stable", - "stringify", - "JSON", - "JSON.stringify", - "safe", - "serialize" - ], - "license": "MIT", - "main": "index.js", - "name": "fast-safe-stringify", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/fast-safe-stringify.git" - }, - "scripts": { - "benchmark": "node benchmark.js", - "test": "standard && tap --no-esm test.js test-stable.js" - }, - "typings": "index", - "version": "2.0.7" -} diff --git a/node_modules/fast-safe-stringify/readme.md b/node_modules/fast-safe-stringify/readme.md deleted file mode 100644 index 51ed1fb..0000000 --- a/node_modules/fast-safe-stringify/readme.md +++ /dev/null @@ -1,154 +0,0 @@ -# fast-safe-stringify - -Safe and fast serialization alternative to [JSON.stringify][]. - -Gracefully handles circular structures instead of throwing. - -Provides a deterministic ("stable") version as well that will also gracefully -handle circular structures. See the example below for further information. - -## Usage - -The same as [JSON.stringify][]. - -`stringify(value[, replacer[, space]])` - -```js -const safeStringify = require('fast-safe-stringify') -const o = { a: 1 } -o.o = o - -console.log(safeStringify(o)) -// '{"a":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON - -function replacer(key, value) { - console.log('Key:', JSON.stringify(key), 'Value:', JSON.stringify(value)) - // Remove the circular structure - if (value === '[Circular]') { - return - } - return value -} -const serialized = safeStringify(o, replacer, 2) -// Key: "" Value: {"a":1,"o":"[Circular]"} -// Key: "a" Value: 1 -// Key: "o" Value: "[Circular]" -console.log(serialized) -// { -// "a": 1 -// } -``` - -Using the deterministic version also works the same: - -```js -const safeStringify = require('fast-safe-stringify') -const o = { b: 1, a: 0 } -o.o = o - -console.log(safeStringify(o)) -// '{"b":1,"a":0,"o":"[Circular]"}' -console.log(safeStringify.stableStringify(o)) -// '{"a":0,"b":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON -``` - -A faster and side-effect free implementation is available in the -[safe-stable-stringify][] module. However it is still considered experimental -due to a new and more complex implementation. - -## Differences to JSON.stringify - -In general the behavior is identical to [JSON.stringify][]. The [`replacer`][] -and [`space`][] options are also available. - -A few exceptions exist to [JSON.stringify][] while using [`toJSON`][] or -[`replacer`][]: - -### Regular safe stringify - -- Manipulating a circular structure of the passed in value in a `toJSON` or the - `replacer` is not possible! It is possible for any other value and property. - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -### Deterministic ("stable") safe stringify - -- Manipulating the input object either in a [`toJSON`][] or the [`replacer`][] - function will not have any effect on the output. The output entirely relies on - the shape the input value had at the point passed to the stringify function! - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -A side effect free variation without these limitations can be found as well -([`safe-stable-stringify`][]). It is also faster than the current -implementation. It is still considered experimental due to a new and more -complex implementation. - -## Benchmarks - -Although not JSON, the Node.js `util.inspect` method can be used for similar -purposes (e.g. logging) and also handles circular references. - -Here we compare `fast-safe-stringify` with some alternatives: -(Lenovo T450s with a i7-5600U CPU using Node.js 8.9.4) - -```md -fast-safe-stringify: simple object x 1,121,497 ops/sec ±0.75% (97 runs sampled) -fast-safe-stringify: circular x 560,126 ops/sec ±0.64% (96 runs sampled) -fast-safe-stringify: deep x 32,472 ops/sec ±0.57% (95 runs sampled) -fast-safe-stringify: deep circular x 32,513 ops/sec ±0.80% (92 runs sampled) - -util.inspect: simple object x 272,837 ops/sec ±1.48% (90 runs sampled) -util.inspect: circular x 116,896 ops/sec ±1.19% (95 runs sampled) -util.inspect: deep x 19,382 ops/sec ±0.66% (92 runs sampled) -util.inspect: deep circular x 18,717 ops/sec ±0.63% (96 runs sampled) - -json-stringify-safe: simple object x 233,621 ops/sec ±0.97% (94 runs sampled) -json-stringify-safe: circular x 110,409 ops/sec ±1.85% (95 runs sampled) -json-stringify-safe: deep x 8,705 ops/sec ±0.87% (96 runs sampled) -json-stringify-safe: deep circular x 8,336 ops/sec ±2.20% (93 runs sampled) -``` - -For stable stringify comparisons, see the performance benchmarks in the -[`safe-stable-stringify`][] readme. - -## Protip - -Whether `fast-safe-stringify` or alternatives are used: if the use case -consists of deeply nested objects without circular references the following -pattern will give best results. -Shallow or one level nested objects on the other hand will slow down with it. -It is entirely dependant on the use case. - -```js -const stringify = require('fast-safe-stringify') - -function tryJSONStringify (obj) { - try { return JSON.stringify(obj) } catch (_) {} -} - -const serializedString = tryJSONStringify(deep) || stringify(deep) -``` - -## Acknowledgements - -Sponsored by [nearForm](http://nearform.com) - -## License - -MIT - -[`replacer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20replacer%20parameter -[`safe-stable-stringify`]: https://github.com/BridgeAR/safe-stable-stringify -[`space`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument -[`toJSON`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior -[benchmark]: https://github.com/epoberezkin/fast-json-stable-stringify/blob/67f688f7441010cfef91a6147280cc501701e83b/benchmark -[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify diff --git a/node_modules/fast-safe-stringify/test-stable.js b/node_modules/fast-safe-stringify/test-stable.js deleted file mode 100644 index 93d8bc4..0000000 --- a/node_modules/fast-safe-stringify/test-stable.js +++ /dev/null @@ -1,311 +0,0 @@ -const test = require('tap').test -const fss = require('./').stable -const clone = require('clone') -const s = JSON.stringify - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s( - { circle: '[Circular]', name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - - const expected = s( - { circle: '[Circular]', name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s( - { id: { circle: '[Circular]' }, name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.dinklage = fixture.child - const expected = s({ - child: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - child: { - actor: { dinklage: '[Circular]' }, name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - hand: ['[Circular]', '[Circular]'], name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { dinklage: '[Circular]', name: 'Tyrion Lannister' }, - { headey: '[Circular]', name: 'Cersei Lannister' } - ] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { bastards: '[Circular]', name: 'Jon Snow' }, - { bastards: '[Circular]', name: 'Ramsay Bolton' } - ]) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - childA: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - childB: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - - // check if the fixture has not been modified - assert.deepEqual(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overriden `toJSON` property - TestObject.prototype.toJSON = function () { return { special: 'case' } } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.is(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - var circle = { some: 'data' } - circle.circle = circle - var a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - var o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - // TODO: This is a known limitation of the current implementation. - // The ideal result would be: - // - // b: 2, - // baz: { - // circle: '[Circular]', - // some: 'data' - // } - // - b: '[Redacted]', - baz: '[Redacted]' - } - }) - const actual = fss(o) - assert.is(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { return fixture }, - enumerable: true - }) - - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { return fixture.child } - }, - get self () { return fixture } - } - - const expected = s({ - child: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister', - self: '[Circular]' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) diff --git a/node_modules/fast-safe-stringify/test.js b/node_modules/fast-safe-stringify/test.js deleted file mode 100644 index 7da5821..0000000 --- a/node_modules/fast-safe-stringify/test.js +++ /dev/null @@ -1,304 +0,0 @@ -const test = require('tap').test -const fss = require('./') -const clone = require('clone') -const s = JSON.stringify - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s( - { name: 'Tywin Lannister', circle: '[Circular]' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - const expected = s( - { name: 'Tywin Lannister', circle: '[Circular]' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s( - { name: 'Tywin Lannister', id: { circle: '[Circular]' } } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.dinklage = fixture.child - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', actor: { dinklage: '[Circular]' } - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - name: 'Tywin Lannister', hand: ['[Circular]', '[Circular]'] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { name: 'Tyrion Lannister', dinklage: '[Circular]' }, - { name: 'Cersei Lannister', headey: '[Circular]' } - ] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { name: 'Jon Snow', bastards: '[Circular]' }, - { name: 'Ramsay Bolton', bastards: '[Circular]' } - ]) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - name: 'Tywin Lannister', - childA: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - }, - childB: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - - // check if the fixture has not been modified - assert.deepEqual(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overriden `toJSON` property - TestObject.prototype.toJSON = function () { return { special: 'case' } } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.is(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - const circle = { some: 'data' } - circle.circle = circle - const a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - const o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - b: 2, - baz: { - some: 'data', - circle: '[Circular]' - } - } - }) - const actual = fss(o) - assert.is(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { return fixture }, - enumerable: true - }) - - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference are replaced instead of marked', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { return fixture.child } - }, - get self () { return fixture } - } - - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - }, - self: '[Circular]' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) diff --git a/node_modules/for-each/.editorconfig b/node_modules/for-each/.editorconfig deleted file mode 100644 index ac29ade..0000000 --- a/node_modules/for-each/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 120 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/for-each/.eslintrc b/node_modules/for-each/.eslintrc deleted file mode 100644 index 2b8ea2a..0000000 --- a/node_modules/for-each/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "eqeqeq": [2, "allow-null"], - "func-name-matching": 0, - "indent": [2, 4], - "max-nested-callbacks": [2, 3], - "max-params": [2, 3], - "max-statements": [2, 14], - "no-invalid-this": [1], - "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], - } -} diff --git a/node_modules/for-each/.travis.yml b/node_modules/for-each/.travis.yml deleted file mode 100644 index e9e54bd..0000000 --- a/node_modules/for-each/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "8" - - "7" - - "6" - - "5" - - "4" - - "iojs" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: PRETEST=true - - node_js: "node" - env: POSTTEST=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/for-each/LICENSE b/node_modules/for-each/LICENSE deleted file mode 100644 index 53f19aa..0000000 --- a/node_modules/for-each/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/for-each/README.md b/node_modules/for-each/README.md deleted file mode 100644 index 16dfbb6..0000000 --- a/node_modules/for-each/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# for-each [![build status][1]][2] - -[![browser support][3]][4] - -A better forEach. - -## Example - -Like `Array.prototype.forEach` but works on objects. - -```js -var forEach = require("for-each") - -forEach({ key: "value" }, function (value, key, object) { - /* code */ -}) -``` - -As a bonus, it's also a perfectly function shim/polyfill for arrays too! - -```js -var forEach = require("for-each") - -forEach([1, 2, 3], function (value, index, array) { - /* code */ -}) -``` - -## Installation - -`npm install for-each` - -## Contributors - - - Raynos - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Raynos/for-each.png - [2]: http://travis-ci.org/Raynos/for-each - [3]: https://ci.testling.com/Raynos/for-each.png - [4]: https://ci.testling.com/Raynos/for-each - diff --git a/node_modules/for-each/index.js b/node_modules/for-each/index.js deleted file mode 100644 index 609ef9f..0000000 --- a/node_modules/for-each/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -var isCallable = require('is-callable'); - -var toStr = Object.prototype.toString; -var hasOwnProperty = Object.prototype.hasOwnProperty; - -var forEachArray = function forEachArray(array, iterator, receiver) { - for (var i = 0, len = array.length; i < len; i++) { - if (hasOwnProperty.call(array, i)) { - if (receiver == null) { - iterator(array[i], i, array); - } else { - iterator.call(receiver, array[i], i, array); - } - } - } -}; - -var forEachString = function forEachString(string, iterator, receiver) { - for (var i = 0, len = string.length; i < len; i++) { - // no such thing as a sparse string. - if (receiver == null) { - iterator(string.charAt(i), i, string); - } else { - iterator.call(receiver, string.charAt(i), i, string); - } - } -}; - -var forEachObject = function forEachObject(object, iterator, receiver) { - for (var k in object) { - if (hasOwnProperty.call(object, k)) { - if (receiver == null) { - iterator(object[k], k, object); - } else { - iterator.call(receiver, object[k], k, object); - } - } - } -}; - -var forEach = function forEach(list, iterator, thisArg) { - if (!isCallable(iterator)) { - throw new TypeError('iterator must be a function'); - } - - var receiver; - if (arguments.length >= 3) { - receiver = thisArg; - } - - if (toStr.call(list) === '[object Array]') { - forEachArray(list, iterator, receiver); - } else if (typeof list === 'string') { - forEachString(list, iterator, receiver); - } else { - forEachObject(list, iterator, receiver); - } -}; - -module.exports = forEach; diff --git a/node_modules/for-each/package.json b/node_modules/for-each/package.json deleted file mode 100644 index 8992df0..0000000 --- a/node_modules/for-each/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_from": "for-each@~0.3.3", - "_id": "for-each@0.3.3", - "_inBundle": false, - "_integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "_location": "/for-each", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "for-each@~0.3.3", - "name": "for-each", - "escapedName": "for-each", - "rawSpec": "~0.3.3", - "saveSpec": null, - "fetchSpec": "~0.3.3" - }, - "_requiredBy": [ - "/tape" - ], - "_resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "_shasum": "69b447e88a0a5d32c3e7084f3f1710034b21376e", - "_spec": "for-each@~0.3.3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/tape", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/for-each/issues", - "email": "raynos2@gmail.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "dependencies": { - "is-callable": "^1.1.3" - }, - "deprecated": false, - "description": "A better forEach", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "eslint": "^4.19.1", - "nsp": "^3.2.1", - "tape": "^4.9.0" - }, - "homepage": "https://github.com/Raynos/for-each", - "keywords": [], - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/for-each/raw/master/LICENSE" - } - ], - "main": "index", - "name": "for-each", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/for-each.git" - }, - "scripts": { - "lint": "eslint *.js test/*.js", - "posttest": "npm run security", - "pretest": "npm run lint", - "security": "nsp check", - "test": "npm run tests-only", - "tests-only": "node test/test" - }, - "testling": { - "files": "test/test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "0.3.3" -} diff --git a/node_modules/for-each/test/.eslintrc b/node_modules/for-each/test/.eslintrc deleted file mode 100644 index a6c04b9..0000000 --- a/node_modules/for-each/test/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": 0, - "no-magic-numbers": 0, - } -} diff --git a/node_modules/for-each/test/test.js b/node_modules/for-each/test/test.js deleted file mode 100644 index 8c93787..0000000 --- a/node_modules/for-each/test/test.js +++ /dev/null @@ -1,182 +0,0 @@ -'use strict'; - -/* globals window */ - -var test = require('tape'); -var forEach = require('../'); - -test('forEach calls each iterator', function (t) { - var count = 0; - t.plan(4); - forEach({ a: 1, b: 2 }, function (value, key) { - if (count === 0) { - t.equal(value, 1); - t.equal(key, 'a'); - } else { - t.equal(value, 2); - t.equal(key, 'b'); - } - count += 1; - }); -}); - -test('forEach calls iterator with correct this value', function (t) { - var thisValue = {}; - - t.plan(1); - - forEach([0], function () { - t.equal(this, thisValue); - }, thisValue); -}); - -test('second argument: iterator', function (t) { - var arr = []; - t['throws'](function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t['throws'](function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t['throws'](function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t['throws'](function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t['throws'](function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t['throws'](function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t['throws'](function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t['throws'](function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - forEach([], function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function F() { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - forEach({}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan((str.length * 2) + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - st.end(); - }); - t.end(); -}); diff --git a/node_modules/fs.realpath/LICENSE b/node_modules/fs.realpath/LICENSE deleted file mode 100644 index 5bd884c..0000000 --- a/node_modules/fs.realpath/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----- - -This library bundles a version of the `fs.realpath` and `fs.realpathSync` -methods from Node.js v0.10 under the terms of the Node.js MIT license. - -Node's license follows, also included at the header of `old.js` which contains -the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fs.realpath/README.md b/node_modules/fs.realpath/README.md deleted file mode 100644 index a42ceac..0000000 --- a/node_modules/fs.realpath/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# fs.realpath - -A backwards-compatible fs.realpath for Node v6 and above - -In Node v6, the JavaScript implementation of fs.realpath was replaced -with a faster (but less resilient) native implementation. That raises -new and platform-specific errors and cannot handle long or excessively -symlink-looping paths. - -This module handles those cases by detecting the new errors and -falling back to the JavaScript implementation. On versions of Node -prior to v6, it has no effect. - -## USAGE - -```js -var rp = require('fs.realpath') - -// async version -rp.realpath(someLongAndLoopingPath, function (er, real) { - // the ELOOP was handled, but it was a bit slower -}) - -// sync version -var real = rp.realpathSync(someLongAndLoopingPath) - -// monkeypatch at your own risk! -// This replaces the fs.realpath/fs.realpathSync builtins -rp.monkeypatch() - -// un-do the monkeypatching -rp.unmonkeypatch() -``` diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js deleted file mode 100644 index b09c7c7..0000000 --- a/node_modules/fs.realpath/index.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = require('fs') -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = require('./old.js') - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js deleted file mode 100644 index b40305e..0000000 --- a/node_modules/fs.realpath/old.js +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = require('path'); -var isWindows = process.platform === 'win32'; -var fs = require('fs'); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json deleted file mode 100644 index 89b4c6d..0000000 --- a/node_modules/fs.realpath/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "fs.realpath@^1.0.0", - "_id": "fs.realpath@1.0.0", - "_inBundle": false, - "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "_location": "/fs.realpath", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fs.realpath@^1.0.0", - "name": "fs.realpath", - "escapedName": "fs.realpath", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", - "_spec": "fs.realpath@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/fs.realpath/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "devDependencies": {}, - "files": [ - "old.js", - "index.js" - ], - "homepage": "https://github.com/isaacs/fs.realpath#readme", - "keywords": [ - "realpath", - "fs", - "polyfill" - ], - "license": "ISC", - "main": "index.js", - "name": "fs.realpath", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "scripts": { - "test": "tap test/*.js --cov" - }, - "version": "1.0.0" -} diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig deleted file mode 100644 index ac29ade..0000000 --- a/node_modules/function-bind/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 120 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc deleted file mode 100644 index 9b33d8e..0000000 --- a/node_modules/function-bind/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "indent": [2, 4], - "max-nested-callbacks": [2, 3], - "max-params": [2, 3], - "max-statements": [2, 20], - "no-new-func": [1], - "strict": [0] - } -} diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json deleted file mode 100644 index 8c44794..0000000 --- a/node_modules/function-bind/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 8 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore deleted file mode 100644 index dbb555f..0000000 --- a/node_modules/function-bind/.npmignore +++ /dev/null @@ -1,22 +0,0 @@ -# gitignore -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript -coverage -node_modules - -# Only apps should have lockfiles -npm-shrinkwrap.json -package-lock.json -yarn.lock diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml deleted file mode 100644 index 85f70d2..0000000 --- a/node_modules/function-bind/.travis.yml +++ /dev/null @@ -1,168 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "8.4" - - "7.10" - - "6.11" - - "5.12" - - "4.8" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: PRETEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d23..0000000 --- a/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md deleted file mode 100644 index 81862a0..0000000 --- a/node_modules/function-bind/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# function-bind - - - - - -Implementation of function.prototype.bind - -## Example - -I mainly do this for unit tests I run on phantomjs. -PhantomJS does not have Function.prototype.bind :( - -```js -Function.prototype.bind = require("function-bind") -``` - -## Installation - -`npm install function-bind` - -## Contributors - - - Raynos - -## MIT Licenced - - [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg - [travis-url]: https://travis-ci.org/Raynos/function-bind - [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg - [npm-url]: https://npmjs.org/package/function-bind - [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png - [6]: https://coveralls.io/r/Raynos/function-bind - [7]: https://gemnasium.com/Raynos/function-bind.png - [8]: https://gemnasium.com/Raynos/function-bind - [deps-svg]: https://david-dm.org/Raynos/function-bind.svg - [deps-url]: https://david-dm.org/Raynos/function-bind - [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg - [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies - [11]: https://ci.testling.com/Raynos/function-bind.png - [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js deleted file mode 100644 index cc4daec..0000000 --- a/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b96..0000000 --- a/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json deleted file mode 100644 index f011552..0000000 --- a/node_modules/function-bind/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_from": "function-bind@^1.1.1", - "_id": "function-bind@1.1.1", - "_inBundle": false, - "_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "_location": "/function-bind", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "function-bind@^1.1.1", - "name": "function-bind", - "escapedName": "function-bind", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/has" - ], - "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "_shasum": "a56899d3ea3c9bab874bb9773b7c5ede92f4895d", - "_spec": "function-bind@^1.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/has", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Implementation of Function.prototype.bind", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.5.0", - "jscs": "^3.0.7", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/Raynos/function-bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "license": "MIT", - "main": "index", - "name": "function-bind", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/function-bind.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "eslint": "eslint *.js */*.js", - "jscs": "jscs *.js */*.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run coverage -- --quiet", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.1" -} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc deleted file mode 100644 index 8a56d5b..0000000 --- a/node_modules/function-bind/test/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": 0, - "no-magic-numbers": 0, - } -} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce..0000000 --- a/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/get-assigned-identifiers/.travis.yml b/node_modules/get-assigned-identifiers/.travis.yml deleted file mode 100644 index 989f791..0000000 --- a/node_modules/get-assigned-identifiers/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 8 - - 6 - - 4 -cache: - directories: - - ~/.npm diff --git a/node_modules/get-assigned-identifiers/CHANGELOG.md b/node_modules/get-assigned-identifiers/CHANGELOG.md deleted file mode 100644 index fe525db..0000000 --- a/node_modules/get-assigned-identifiers/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# get-destructure-identifiers change log - -All notable changes to this project will be documented in this file. - -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.2.0 / 2018-02-08 - -* support object rest destructuring `{...a} = b` - -## 1.1.0 / 2017-12-02 - -* support import declarations - -## 1.0.0 / 2017-11-11 - -* initial release diff --git a/node_modules/get-assigned-identifiers/LICENSE.md b/node_modules/get-assigned-identifiers/LICENSE.md deleted file mode 100644 index 04361d9..0000000 --- a/node_modules/get-assigned-identifiers/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -# [Apache License 2.0](https://spdx.org/licenses/Apache-2.0) - -Copyright 2017 Renée Kooi - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -> http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/get-assigned-identifiers/README.md b/node_modules/get-assigned-identifiers/README.md deleted file mode 100644 index 06957e4..0000000 --- a/node_modules/get-assigned-identifiers/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# get-assigned-identifiers - -get a list of identifiers that are initialised by a JavaScript AST node. - -[![npm][npm-image]][npm-url] -[![travis][travis-image]][travis-url] -[![standard][standard-image]][standard-url] - -[npm-image]: https://img.shields.io/npm/v/get-assigned-identifiers.svg?style=flat-square -[npm-url]: https://www.npmjs.com/package/get-assigned-identifiers -[travis-image]: https://img.shields.io/travis/goto-bus-stop/get-assigned-identifiers.svg?style=flat-square -[travis-url]: https://travis-ci.org/goto-bus-stop/get-assigned-identifiers -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square -[standard-url]: http://npm.im/standard - -## Install - -``` -npm install get-assigned-identifiers -``` - -## Usage - -```js -var getAssignedIdentifiers = require('get-assigned-identifiers') - -var ast = parse(` - var { a, b: [ c,, ...x ], d } = whatever() -`) -var node = ast.body[0].declarations[0].id -getAssignedIdentifiers(node) -// → [{ name: 'a' }, { name: 'c' }, { name: 'x' }, { name: 'd' }] -``` - -## API - -### `getAssignedIdentifiers(node)` - -Return an array of AST Nodes referencing identifiers that are initialised by the `node`, taking into account destructuring. - -If `node` is not an identifier or destructuring node, this returns an empty array. - -## License - -[Apache-2.0](LICENSE.md) diff --git a/node_modules/get-assigned-identifiers/index.js b/node_modules/get-assigned-identifiers/index.js deleted file mode 100644 index 5933f83..0000000 --- a/node_modules/get-assigned-identifiers/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var assert = require('assert') - -/** - * Get a list of all identifiers that are initialised by this (possibly destructuring) - * node. - * - * eg with input: - * - * var { a: [b, ...c], d } = xyz - * - * this returns the nodes for 'b', 'c', and 'd' - */ -module.exports = function getAssignedIdentifiers (node, identifiers) { - assert.equal(typeof node, 'object', 'get-assigned-identifiers: node must be object') - assert.equal(typeof node.type, 'string', 'get-assigned-identifiers: node must have a type') - - identifiers = identifiers || [] - - if (node.type === 'ImportDeclaration') { - node.specifiers.forEach(function (el) { - getAssignedIdentifiers(el, identifiers) - }) - } - - if (node.type === 'ImportDefaultSpecifier' || node.type === 'ImportNamespaceSpecifier' || node.type === 'ImportSpecifier') { - node = node.local - } - - if (node.type === 'RestElement') { - node = node.argument - } - - if (node.type === 'ArrayPattern') { - node.elements.forEach(function (el) { - // `el` might be `null` in case of `[x,,y] = whatever` - if (el) { - getAssignedIdentifiers(el, identifiers) - } - }) - } - - if (node.type === 'ObjectPattern') { - node.properties.forEach(function (prop) { - if (prop.type === 'Property') { - getAssignedIdentifiers(prop.value, identifiers) - } else if (prop.type === 'RestElement') { - getAssignedIdentifiers(prop, identifiers) - } - }) - } - - if (node.type === 'Identifier') { - identifiers.push(node) - } - - return identifiers -} diff --git a/node_modules/get-assigned-identifiers/package.json b/node_modules/get-assigned-identifiers/package.json deleted file mode 100644 index e2bc73c..0000000 --- a/node_modules/get-assigned-identifiers/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "get-assigned-identifiers@^1.2.0", - "_id": "get-assigned-identifiers@1.2.0", - "_inBundle": false, - "_integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "_location": "/get-assigned-identifiers", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "get-assigned-identifiers@^1.2.0", - "name": "get-assigned-identifiers", - "escapedName": "get-assigned-identifiers", - "rawSpec": "^1.2.0", - "saveSpec": null, - "fetchSpec": "^1.2.0" - }, - "_requiredBy": [ - "/undeclared-identifiers" - ], - "_resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "_shasum": "6dbf411de648cbaf8d9169ebb0d2d576191e2ff1", - "_spec": "get-assigned-identifiers@^1.2.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/undeclared-identifiers", - "author": { - "name": "Renée Kooi", - "email": "renee@kooi.me" - }, - "bugs": { - "url": "https://github.com/goto-bus-stop/get-assigned-identifiers/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "get a list of identifiers that are initialised by a JavaScript AST node.", - "devDependencies": { - "acorn": "^5.4.1", - "standard": "^10.0.3", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/goto-bus-stop/get-assigned-identifiers", - "keywords": [ - "ast", - "bindings", - "destructuring", - "identifiers", - "javascript", - "names", - "node" - ], - "license": "Apache-2.0", - "main": "index.js", - "name": "get-assigned-identifiers", - "repository": { - "type": "git", - "url": "git+https://github.com/goto-bus-stop/get-assigned-identifiers.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "version": "1.2.0" -} diff --git a/node_modules/get-assigned-identifiers/test/index.js b/node_modules/get-assigned-identifiers/test/index.js deleted file mode 100644 index 3fbb2dd..0000000 --- a/node_modules/get-assigned-identifiers/test/index.js +++ /dev/null @@ -1,122 +0,0 @@ -var test = require('tape') -var assert = require('assert') -var parse = require('acorn').parse -var getAssignedIdentifiers = require('../') - -function getName (node) { - assert.equal(node.type, 'Identifier', 'Returned node must be an Identifier') - return node.name -} - -test('example', function (t) { - t.plan(1) - - var ast = parse(` - var { a, b: [ c,, ...x ], d } = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ - 'a', - 'c', - 'x', - 'd' - ]) -}) - -test('simple identifiers', function (t) { - t.plan(1) - var ast = parse(` - var xyz = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'xyz' ]) -}) - -test('array destructuring', function (t) { - t.plan(1) - var ast = parse(` - var [a, b, c] = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'a', 'b', 'c' ]) -}) - -test('array destructuring with rest element', function (t) { - t.plan(1) - var ast = parse(` - var [a, b, ...rest] = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'a', 'b', 'rest' ]) -}) - -test('array destructuring with holes', function (t) { - t.plan(1) - var ast = parse(` - var [a, b,,,,,, boop] = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'a', 'b', 'boop' ]) -}) - -test('nested array destructuring', function (t) { - t.plan(1) - var ast = parse(` - var [a, [[[b]], ...c], boop] = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'a', 'b', 'c', 'boop' ]) -}) - -test('object destructuring', function (t) { - t.plan(1) - var ast = parse(` - var {a, b} = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'a', 'b' ]) -}) - -test('object destructuring with different names', function (t) { - t.plan(1) - var ast = parse(` - var {a: b, b: lol} = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'b', 'lol' ]) -}) - -test('nested object destructuring', function (t) { - t.plan(1) - var ast = parse(` - var {a: {b}, b: lol, c: { - d, e: { f: g } - }} = whatever() - `) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'b', 'lol', 'd', 'g' ]) -}) - -test('object rest destructuring', function (t) { - t.plan(1) - var ast = parse(` - var {a, ...b} = whatever() - `, { ecmaVersion: 9 }) - var node = ast.body[0].declarations[0].id - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'a', 'b' ]) -}) - -test('import declarations', function (t) { - t.plan(2) - var ast = parse(` - import x, { y, z as a } from 'module' - `, { sourceType: 'module' }) - var node = ast.body[0] - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'x', 'y', 'a' ]) - - ast = parse(` - import * as ns from 'module' - `, { sourceType: 'module' }) - node = ast.body[0] - t.deepEqual(getAssignedIdentifiers(node).map(getName), [ 'ns' ]) -}) diff --git a/node_modules/glob/LICENSE b/node_modules/glob/LICENSE deleted file mode 100644 index 42ca266..0000000 --- a/node_modules/glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -## Glob Logo - -Glob's logo created by Tanya Brassie , licensed -under a Creative Commons Attribution-ShareAlike 4.0 International License -https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md deleted file mode 100644 index 0916a48..0000000 --- a/node_modules/glob/README.md +++ /dev/null @@ -1,375 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `absolute` Set to true to always receive absolute paths for matched - files. Unlike `realpath`, this also affects the values returned in - the `match` event. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Glob Logo -Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` - -![](oh-my-glob.gif) diff --git a/node_modules/glob/changelog.md b/node_modules/glob/changelog.md deleted file mode 100644 index 4163677..0000000 --- a/node_modules/glob/changelog.md +++ /dev/null @@ -1,67 +0,0 @@ -## 7.0 - -- Raise error if `options.cwd` is specified, and not a directory - -## 6.0 - -- Remove comment and negation pattern support -- Ignore patterns are always in `dot:true` mode - -## 5.0 - -- Deprecate comment and negation patterns -- Fix regression in `mark` and `nodir` options from making all cache - keys absolute path. -- Abort if `fs.readdir` returns an error that's unexpected -- Don't emit `match` events for ignored items -- Treat ENOTSUP like ENOTDIR in readdir - -## 4.5 - -- Add `options.follow` to always follow directory symlinks in globstar -- Add `options.realpath` to call `fs.realpath` on all results -- Always cache based on absolute path - -## 4.4 - -- Add `options.ignore` -- Fix handling of broken symlinks - -## 4.3 - -- Bump minimatch to 2.x -- Pass all tests on Windows - -## 4.2 - -- Add `glob.hasMagic` function -- Add `options.nodir` flag - -## 4.1 - -- Refactor sync and async implementations for performance -- Throw if callback provided to sync glob function -- Treat symbolic links in globstar results the same as Bash 4.3 - -## 4.0 - -- Use `^` for dependency versions (bumped major because this breaks - older npm versions) -- Ensure callbacks are only ever called once -- switch to ISC license - -## 3.x - -- Rewrite in JavaScript -- Add support for setting root, cwd, and windows support -- Cache many fs calls -- Add globstar support -- emit match events - -## 2.x - -- Use `glob.h` and `fnmatch.h` from NetBSD - -## 1.x - -- `glob.h` static binding. diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js deleted file mode 100644 index 66651bb..0000000 --- a/node_modules/glob/common.js +++ /dev/null @@ -1,240 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js deleted file mode 100644 index 58dec0f..0000000 --- a/node_modules/glob/glob.js +++ /dev/null @@ -1,790 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json deleted file mode 100644 index 2e7f06b..0000000 --- a/node_modules/glob/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "glob@^7.1.0", - "_id": "glob@7.1.6", - "_inBundle": false, - "_integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "_location": "/glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob@^7.1.0", - "name": "glob", - "escapedName": "glob", - "rawSpec": "^7.1.0", - "saveSpec": null, - "fetchSpec": "^7.1.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "_shasum": "141f33b81a7c2492e125594307480c46679278a6", - "_spec": "glob@^7.1.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "bundleDependencies": false, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "deprecated": false, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^12.0.1", - "tick": "0.0.6" - }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "name": "glob", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "7.1.6" -} diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js deleted file mode 100644 index c952134..0000000 --- a/node_modules/glob/sync.js +++ /dev/null @@ -1,486 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc deleted file mode 100644 index 2d9a66a..0000000 --- a/node_modules/has-symbols/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "multiline-comment-style": 0, - } -} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml deleted file mode 100644 index 04cf87e..0000000 --- a/node_modules/has-symbols/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/has-symbols -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.github/workflows/rebase.yml b/node_modules/has-symbols/.github/workflows/rebase.yml deleted file mode 100644 index 436cb79..0000000 --- a/node_modules/has-symbols/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/has-symbols/.travis.yml b/node_modules/has-symbols/.travis.yml deleted file mode 100644 index 2d1c1d2..0000000 --- a/node_modules/has-symbols/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml - - ljharb/travis-ci:node/coverage.yml -matrix: - allow_failures: - - env: COVERAGE=true diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md deleted file mode 100644 index 4dcac04..0000000 --- a/node_modules/has-symbols/CHANGELOG.md +++ /dev/null @@ -1,34 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - -## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-17 - -### Commits - -- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) -- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) -- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) -- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) -- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) -- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) -- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) - -## v1.0.0 - 2016-09-19 - -### Commits - -- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) -- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) -- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) -- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) -- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE deleted file mode 100644 index df31cbf..0000000 --- a/node_modules/has-symbols/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md deleted file mode 100644 index b27b31a..0000000 --- a/node_modules/has-symbols/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# has-symbols [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Determine if the JS environment has Symbol support. Supports spec, or shams. - -## Example - -```js -var hasSymbols = require('has-symbols'); - -hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. - -var hasSymbolsKinda = require('has-symbols/shams'); -hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. -``` - -## Supported Symbol shams - - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/has-symbols -[2]: http://versionbadg.es/ljharb/has-symbols.svg -[3]: https://travis-ci.org/ljharb/has-symbols.svg -[4]: https://travis-ci.org/ljharb/has-symbols -[5]: https://david-dm.org/ljharb/has-symbols.svg -[6]: https://david-dm.org/ljharb/has-symbols -[7]: https://david-dm.org/ljharb/has-symbols/dev-status.svg -[8]: https://david-dm.org/ljharb/has-symbols#info=devDependencies -[9]: https://ci.testling.com/ljharb/has-symbols.png -[10]: https://ci.testling.com/ljharb/has-symbols -[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/has-symbols.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/has-symbols.svg -[downloads-url]: http://npm-stat.com/charts.html?package=has-symbols diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js deleted file mode 100644 index f72159e..0000000 --- a/node_modules/has-symbols/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var origSymbol = global.Symbol; -var hasSymbolSham = require('./shams'); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json deleted file mode 100644 index 8059b46..0000000 --- a/node_modules/has-symbols/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_from": "has-symbols@^1.0.1", - "_id": "has-symbols@1.0.1", - "_inBundle": false, - "_integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "_location": "/has-symbols", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has-symbols@^1.0.1", - "name": "has-symbols", - "escapedName": "has-symbols", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/es-abstract", - "/is-symbol" - ], - "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "_shasum": "9f5214758a44196c406d9bd76cebf81ec2dd31e8", - "_spec": "has-symbols@^1.0.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/es-abstract", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - }, - "bugs": { - "url": "https://github.com/ljharb/has-symbols/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.1", - "auto-changelog": "^1.16.2", - "core-js": "^2.6.10", - "eslint": "^6.6.0", - "get-own-property-symbols": "^0.9.4", - "safe-publish-latest": "^1.1.4", - "tape": "^4.11.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/has-symbols#readme", - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "license": "MIT", - "main": "index.js", - "name": "has-symbols", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/has-symbols.git" - }, - "scripts": { - "lint": "eslint *.js", - "posttest": "npx aud", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", - "test:staging": "node --harmony --es-staging test", - "test:stock": "node test", - "tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.1" -} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js deleted file mode 100644 index 9f80f79..0000000 --- a/node_modules/has-symbols/shams.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js deleted file mode 100644 index fc32aff..0000000 --- a/node_modules/has-symbols/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('../'); -var runSymbolTests = require('./tests'); - -test('interface', function (t) { - t.equal(typeof hasSymbols, 'function', 'is a function'); - t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); - t.end(); -}); - -test('Symbols are supported', { skip: !hasSymbols() }, function (t) { - runSymbolTests(t); - t.end(); -}); - -test('Symbols are not supported', { skip: hasSymbols() }, function (t) { - t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); - t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js deleted file mode 100644 index df5365c..0000000 --- a/node_modules/has-symbols/test/shams/core-js.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - require('core-js/fn/symbol'); - require('core-js/fn/symbol/to-string-tag'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js deleted file mode 100644 index 9191b24..0000000 --- a/node_modules/has-symbols/test/shams/get-own-property-symbols.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - - require('get-own-property-symbols'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js deleted file mode 100644 index 93ff0ea..0000000 --- a/node_modules/has-symbols/test/tests.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -module.exports = function runSymbolTests(t) { - t.equal(typeof Symbol, 'function', 'global Symbol is a function'); - - if (typeof Symbol !== 'function') { return false }; - - t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); - - /* - t.equal( - Symbol.prototype.toString.call(Symbol('foo')), - Symbol.prototype.toString.call(Symbol('foo')), - 'two symbols with the same description stringify the same' - ); - */ - - var foo = Symbol('foo'); - - /* - t.notEqual( - String(foo), - String(Symbol('bar')), - 'two symbols with different descriptions do not stringify the same' - ); - */ - - t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); - // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); - - t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - t.notEqual(typeof sym, 'string', 'Symbol is not a string'); - t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } - - t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); - t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { - configurable: true, - enumerable: true, - value: 42, - writable: true - }, 'property descriptor is correct'); -}; diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT deleted file mode 100644 index ae7014d..0000000 --- a/node_modules/has/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Thiago de Arruda - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has/README.md b/node_modules/has/README.md deleted file mode 100644 index 635e3a4..0000000 --- a/node_modules/has/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# has - -> Object.prototype.hasOwnProperty.call shortcut - -## Installation - -```sh -npm install --save has -``` - -## Usage - -```js -var has = require('has'); - -has({}, 'hasOwnProperty'); // false -has(Object.prototype, 'hasOwnProperty'); // true -``` diff --git a/node_modules/has/package.json b/node_modules/has/package.json deleted file mode 100644 index 501046c..0000000 --- a/node_modules/has/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "has@^1.0.0", - "_id": "has@1.0.3", - "_inBundle": false, - "_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "_location": "/has", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has@^1.0.0", - "name": "has", - "escapedName": "has", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "_shasum": "722d7cbfc1f6aa8241f16dd814e011e1f41e8796", - "_spec": "has@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Thiago de Arruda", - "email": "tpadilha84@gmail.com" - }, - "bugs": { - "url": "https://github.com/tarruda/has/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": { - "function-bind": "^1.1.1" - }, - "deprecated": false, - "description": "Object.prototype.hasOwnProperty.call shortcut", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "eslint": "^4.19.1", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4.0" - }, - "homepage": "https://github.com/tarruda/has", - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" - } - ], - "main": "./src", - "name": "has", - "repository": { - "type": "git", - "url": "git://github.com/tarruda/has.git" - }, - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "tape test" - }, - "version": "1.0.3" -} diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js deleted file mode 100644 index dd92dd9..0000000 --- a/node_modules/has/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js deleted file mode 100644 index 43d480b..0000000 --- a/node_modules/has/test/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var test = require('tape'); -var has = require('../'); - -test('has', function (t) { - t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); - t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); - t.end(); -}); diff --git a/node_modules/hash-base/LICENSE b/node_modules/hash-base/LICENSE deleted file mode 100644 index 6f02ae8..0000000 --- a/node_modules/hash-base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Kirill Fomichev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/hash-base/README.md b/node_modules/hash-base/README.md deleted file mode 100644 index 83ae2ed..0000000 --- a/node_modules/hash-base/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# hash-base - -[![NPM Package](https://img.shields.io/npm/v/hash-base.svg?style=flat-square)](https://www.npmjs.org/package/hash-base) -[![Build Status](https://img.shields.io/travis/crypto-browserify/hash-base.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/hash-base) -[![Dependency status](https://img.shields.io/david/crypto-browserify/hash-base.svg?style=flat-square)](https://david-dm.org/crypto-browserify/hash-base#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -Abstract base class to inherit from if you want to create streams implementing the same API as node crypto [Hash][1] (for [Cipher][2] / [Decipher][3] check [crypto-browserify/cipher-base][4]). - -## Example - -```js -const HashBase = require('hash-base') -const inherits = require('inherits') - -// our hash function is XOR sum of all bytes -function MyHash () { - HashBase.call(this, 1) // in bytes - - this._sum = 0x00 -} - -inherits(MyHash, HashBase) - -MyHash.prototype._update = function () { - for (let i = 0; i < this._block.length; ++i) this._sum ^= this._block[i] -} - -MyHash.prototype._digest = function () { - return this._sum -} - -const data = Buffer.from([ 0x00, 0x42, 0x01 ]) -const hash = new MyHash().update(data).digest() -console.log(hash) // => 67 -``` -You also can check [source code](index.js) or [crypto-browserify/md5.js][5] - -## LICENSE - -MIT - -[1]: https://nodejs.org/api/crypto.html#crypto_class_hash -[2]: https://nodejs.org/api/crypto.html#crypto_class_cipher -[3]: https://nodejs.org/api/crypto.html#crypto_class_decipher -[4]: https://github.com/crypto-browserify/cipher-base -[5]: https://github.com/crypto-browserify/md5.js diff --git a/node_modules/hash-base/index.js b/node_modules/hash-base/index.js deleted file mode 100644 index bf788da..0000000 --- a/node_modules/hash-base/index.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict' -var Buffer = require('safe-buffer').Buffer -var Transform = require('stream').Transform -var inherits = require('inherits') - -function throwIfNotStringOrBuffer (val, prefix) { - if (!Buffer.isBuffer(val) && typeof val !== 'string') { - throw new TypeError(prefix + ' must be a string or a buffer') - } -} - -function HashBase (blockSize) { - Transform.call(this) - - this._block = Buffer.allocUnsafe(blockSize) - this._blockSize = blockSize - this._blockOffset = 0 - this._length = [0, 0, 0, 0] - - this._finalized = false -} - -inherits(HashBase, Transform) - -HashBase.prototype._transform = function (chunk, encoding, callback) { - var error = null - try { - this.update(chunk, encoding) - } catch (err) { - error = err - } - - callback(error) -} - -HashBase.prototype._flush = function (callback) { - var error = null - try { - this.push(this.digest()) - } catch (err) { - error = err - } - - callback(error) -} - -HashBase.prototype.update = function (data, encoding) { - throwIfNotStringOrBuffer(data, 'Data') - if (this._finalized) throw new Error('Digest already called') - if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding) - - // consume data - var block = this._block - var offset = 0 - while (this._blockOffset + data.length - offset >= this._blockSize) { - for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++] - this._update() - this._blockOffset = 0 - } - while (offset < data.length) block[this._blockOffset++] = data[offset++] - - // update length - for (var j = 0, carry = data.length * 8; carry > 0; ++j) { - this._length[j] += carry - carry = (this._length[j] / 0x0100000000) | 0 - if (carry > 0) this._length[j] -= 0x0100000000 * carry - } - - return this -} - -HashBase.prototype._update = function () { - throw new Error('_update is not implemented') -} - -HashBase.prototype.digest = function (encoding) { - if (this._finalized) throw new Error('Digest already called') - this._finalized = true - - var digest = this._digest() - if (encoding !== undefined) digest = digest.toString(encoding) - - // reset state - this._block.fill(0) - this._blockOffset = 0 - for (var i = 0; i < 4; ++i) this._length[i] = 0 - - return digest -} - -HashBase.prototype._digest = function () { - throw new Error('_digest is not implemented') -} - -module.exports = HashBase diff --git a/node_modules/hash-base/package.json b/node_modules/hash-base/package.json deleted file mode 100644 index 5109d56..0000000 --- a/node_modules/hash-base/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "hash-base@^3.0.0", - "_id": "hash-base@3.0.4", - "_inBundle": false, - "_integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "_location": "/hash-base", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "hash-base@^3.0.0", - "name": "hash-base", - "escapedName": "hash-base", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/md5.js", - "/ripemd160" - ], - "_resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "_shasum": "5fc8686847ecd73499403319a6b0a3f3f6ae4918", - "_spec": "hash-base@^3.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/md5.js", - "author": { - "name": "Kirill Fomichev", - "email": "fanatid@ya.ru", - "url": "https://github.com/fanatid" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/hash-base/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "deprecated": false, - "description": "abstract base class for hash-streams", - "devDependencies": { - "nyc": "^8.3.2", - "standard": "*", - "tape": "^4.2.0" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/crypto-browserify/hash-base", - "keywords": [ - "hash", - "stream" - ], - "license": "MIT", - "main": "index.js", - "name": "hash-base", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/hash-base.git" - }, - "scripts": { - "coverage": "nyc node test/*.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "node test/*.js" - }, - "version": "3.0.4" -} diff --git a/node_modules/hash.js/.eslintrc.js b/node_modules/hash.js/.eslintrc.js deleted file mode 100644 index 614f8fc..0000000 --- a/node_modules/hash.js/.eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - 'env': { - 'browser': true, - 'commonjs': true, - 'node': true, - 'es6': true - }, - 'parserOptions': { - 'ecmaVersion': 8 - }, - 'extends': 'eslint:recommended', - 'rules': { - 'indent': [ - 'error', - 2, - { - 'FunctionDeclaration': { - 'parameters': 'first' - }, - 'FunctionExpression': { - 'parameters': 'first' - }, - 'CallExpression': { - 'arguments': 'first' - } - } - ], - 'linebreak-style': [ - 'error', - 'unix' - ], - 'quotes': [ - 'error', - 'single' - ], - 'semi': [ - 'error', - 'always' - ] - } -}; diff --git a/node_modules/hash.js/.travis.yml b/node_modules/hash.js/.travis.yml deleted file mode 100644 index 5406edc..0000000 --- a/node_modules/hash.js/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -sudo: false -language: node_js -node_js: - - "6" - - "8" - - "10" - - "stable" -branches: - only: - - master diff --git a/node_modules/hash.js/README.md b/node_modules/hash.js/README.md deleted file mode 100644 index 006d3bb..0000000 --- a/node_modules/hash.js/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.svg)](http://travis-ci.org/indutny/hash.js) - -Just a bike-shed. - -## Install - -```sh -npm install hash.js -``` - -## Usage - -```js -var hash = require('hash.js') -hash.sha256().update('abc').digest('hex') -``` - -## Selective hash usage - -```js -var sha512 = require('hash.js/lib/hash/sha/512'); -sha512().update('abc').digest('hex'); -``` - -#### LICENSE - -This software is licensed under the MIT License. - -Copyright Fedor Indutny, 2014. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/hash.js/lib/hash.d.ts b/node_modules/hash.js/lib/hash.d.ts deleted file mode 100644 index abbb5c5..0000000 --- a/node_modules/hash.js/lib/hash.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -declare var hash: Hash; - -declare module "hash.js" { - export = hash; -} - -interface BlockHash { - hmacStrength: number - padLength: number - endian: 'big' | 'little' -} - -interface MessageDigest { - blockSize: number - outSize: number - update(msg: any, enc?: 'hex'): T - digest(): number[] - digest(enc: 'hex'): string -} - -interface Hash { - hmac: HmacConstructor - ripemd: RipemdSet - ripemd160: Ripemd160Constructor - sha: ShaSet - sha1: Sha1Constructor - sha224: Sha224Constructor - sha256: Sha256Constructor - sha384: Sha384Constructor - sha512: Sha512Constructor - utils: Utils -} - -interface Utils { - toArray(msg: any, enc: 'hex'): Array - toHex(msg: any): string -} - -interface RipemdSet { - ripemd160: Ripemd160Constructor -} - -interface ShaSet { - sha1: Sha1Constructor - sha224: Sha224Constructor - sha256: Sha256Constructor - sha384: Sha384Constructor - sha512: Sha512Constructor -} - -interface HmacConstructor { (hash: BlockHash, key: any, enc?: 'hex'): Hmac } -interface Ripemd160Constructor { (): Ripemd160 } -interface Sha1Constructor { (): Sha1; } -interface Sha224Constructor { (): Sha224; } -interface Sha256Constructor { (): Sha256; } -interface Sha384Constructor { (): Sha384; } -interface Sha512Constructor { (): Sha512; } - -interface Hmac extends MessageDigest { - blockSize: 512 - outSize: 160 -} - -interface Ripemd160 extends BlockHash, MessageDigest { - blockSize: 512 - hmacStrength: 192 - outSize: 160 - padLength: 64 - endian: 'little' -} - -interface Sha1 extends BlockHash, MessageDigest { - blockSize: 512 - hmacStrength: 80 - outSize: 160 - padLength: 64 - endian: 'big' -} -interface Sha224 extends BlockHash, MessageDigest { - blockSize: 512 - hmacStrength: 192 - outSize: 224 - padLength: 64 - endian: 'big' -} -interface Sha256 extends BlockHash, MessageDigest { - blockSize: 512 - hmacStrength: 192 - outSize: 256 - padLength: 64 - endian: 'big' -} -interface Sha384 extends BlockHash, MessageDigest { - blockSize: 1024 - hmacStrength: 192 - outSize: 384 - padLength: 128 - endian: 'big' -} -interface Sha512 extends BlockHash, MessageDigest { - blockSize: 1024 - hmacStrength: 192 - outSize: 512 - padLength: 128 - endian: 'big' -} diff --git a/node_modules/hash.js/lib/hash.js b/node_modules/hash.js/lib/hash.js deleted file mode 100644 index f59b673..0000000 --- a/node_modules/hash.js/lib/hash.js +++ /dev/null @@ -1,15 +0,0 @@ -var hash = exports; - -hash.utils = require('./hash/utils'); -hash.common = require('./hash/common'); -hash.sha = require('./hash/sha'); -hash.ripemd = require('./hash/ripemd'); -hash.hmac = require('./hash/hmac'); - -// Proxy hash functions to the main object -hash.sha1 = hash.sha.sha1; -hash.sha256 = hash.sha.sha256; -hash.sha224 = hash.sha.sha224; -hash.sha384 = hash.sha.sha384; -hash.sha512 = hash.sha.sha512; -hash.ripemd160 = hash.ripemd.ripemd160; diff --git a/node_modules/hash.js/lib/hash/common.js b/node_modules/hash.js/lib/hash/common.js deleted file mode 100644 index c49f476..0000000 --- a/node_modules/hash.js/lib/hash/common.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var assert = require('minimalistic-assert'); - -function BlockHash() { - this.pending = null; - this.pendingTotal = 0; - this.blockSize = this.constructor.blockSize; - this.outSize = this.constructor.outSize; - this.hmacStrength = this.constructor.hmacStrength; - this.padLength = this.constructor.padLength / 8; - this.endian = 'big'; - - this._delta8 = this.blockSize / 8; - this._delta32 = this.blockSize / 32; -} -exports.BlockHash = BlockHash; - -BlockHash.prototype.update = function update(msg, enc) { - // Convert message to array, pad it, and join into 32bit blocks - msg = utils.toArray(msg, enc); - if (!this.pending) - this.pending = msg; - else - this.pending = this.pending.concat(msg); - this.pendingTotal += msg.length; - - // Enough data, try updating - if (this.pending.length >= this._delta8) { - msg = this.pending; - - // Process pending data in blocks - var r = msg.length % this._delta8; - this.pending = msg.slice(msg.length - r, msg.length); - if (this.pending.length === 0) - this.pending = null; - - msg = utils.join32(msg, 0, msg.length - r, this.endian); - for (var i = 0; i < msg.length; i += this._delta32) - this._update(msg, i, i + this._delta32); - } - - return this; -}; - -BlockHash.prototype.digest = function digest(enc) { - this.update(this._pad()); - assert(this.pending === null); - - return this._digest(enc); -}; - -BlockHash.prototype._pad = function pad() { - var len = this.pendingTotal; - var bytes = this._delta8; - var k = bytes - ((len + this.padLength) % bytes); - var res = new Array(k + this.padLength); - res[0] = 0x80; - for (var i = 1; i < k; i++) - res[i] = 0; - - // Append length - len <<= 3; - if (this.endian === 'big') { - for (var t = 8; t < this.padLength; t++) - res[i++] = 0; - - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = (len >>> 24) & 0xff; - res[i++] = (len >>> 16) & 0xff; - res[i++] = (len >>> 8) & 0xff; - res[i++] = len & 0xff; - } else { - res[i++] = len & 0xff; - res[i++] = (len >>> 8) & 0xff; - res[i++] = (len >>> 16) & 0xff; - res[i++] = (len >>> 24) & 0xff; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - res[i++] = 0; - - for (t = 8; t < this.padLength; t++) - res[i++] = 0; - } - - return res; -}; diff --git a/node_modules/hash.js/lib/hash/hmac.js b/node_modules/hash.js/lib/hash/hmac.js deleted file mode 100644 index faff12d..0000000 --- a/node_modules/hash.js/lib/hash/hmac.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var assert = require('minimalistic-assert'); - -function Hmac(hash, key, enc) { - if (!(this instanceof Hmac)) - return new Hmac(hash, key, enc); - this.Hash = hash; - this.blockSize = hash.blockSize / 8; - this.outSize = hash.outSize / 8; - this.inner = null; - this.outer = null; - - this._init(utils.toArray(key, enc)); -} -module.exports = Hmac; - -Hmac.prototype._init = function init(key) { - // Shorten key, if needed - if (key.length > this.blockSize) - key = new this.Hash().update(key).digest(); - assert(key.length <= this.blockSize); - - // Add padding to key - for (var i = key.length; i < this.blockSize; i++) - key.push(0); - - for (i = 0; i < key.length; i++) - key[i] ^= 0x36; - this.inner = new this.Hash().update(key); - - // 0x36 ^ 0x5c = 0x6a - for (i = 0; i < key.length; i++) - key[i] ^= 0x6a; - this.outer = new this.Hash().update(key); -}; - -Hmac.prototype.update = function update(msg, enc) { - this.inner.update(msg, enc); - return this; -}; - -Hmac.prototype.digest = function digest(enc) { - this.outer.update(this.inner.digest()); - return this.outer.digest(enc); -}; diff --git a/node_modules/hash.js/lib/hash/ripemd.js b/node_modules/hash.js/lib/hash/ripemd.js deleted file mode 100644 index 2dcdff2..0000000 --- a/node_modules/hash.js/lib/hash/ripemd.js +++ /dev/null @@ -1,146 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var common = require('./common'); - -var rotl32 = utils.rotl32; -var sum32 = utils.sum32; -var sum32_3 = utils.sum32_3; -var sum32_4 = utils.sum32_4; -var BlockHash = common.BlockHash; - -function RIPEMD160() { - if (!(this instanceof RIPEMD160)) - return new RIPEMD160(); - - BlockHash.call(this); - - this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; - this.endian = 'little'; -} -utils.inherits(RIPEMD160, BlockHash); -exports.ripemd160 = RIPEMD160; - -RIPEMD160.blockSize = 512; -RIPEMD160.outSize = 160; -RIPEMD160.hmacStrength = 192; -RIPEMD160.padLength = 64; - -RIPEMD160.prototype._update = function update(msg, start) { - var A = this.h[0]; - var B = this.h[1]; - var C = this.h[2]; - var D = this.h[3]; - var E = this.h[4]; - var Ah = A; - var Bh = B; - var Ch = C; - var Dh = D; - var Eh = E; - for (var j = 0; j < 80; j++) { - var T = sum32( - rotl32( - sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), - s[j]), - E); - A = E; - E = D; - D = rotl32(C, 10); - C = B; - B = T; - T = sum32( - rotl32( - sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), - sh[j]), - Eh); - Ah = Eh; - Eh = Dh; - Dh = rotl32(Ch, 10); - Ch = Bh; - Bh = T; - } - T = sum32_3(this.h[1], C, Dh); - this.h[1] = sum32_3(this.h[2], D, Eh); - this.h[2] = sum32_3(this.h[3], E, Ah); - this.h[3] = sum32_3(this.h[4], A, Bh); - this.h[4] = sum32_3(this.h[0], B, Ch); - this.h[0] = T; -}; - -RIPEMD160.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'little'); - else - return utils.split32(this.h, 'little'); -}; - -function f(j, x, y, z) { - if (j <= 15) - return x ^ y ^ z; - else if (j <= 31) - return (x & y) | ((~x) & z); - else if (j <= 47) - return (x | (~y)) ^ z; - else if (j <= 63) - return (x & z) | (y & (~z)); - else - return x ^ (y | (~z)); -} - -function K(j) { - if (j <= 15) - return 0x00000000; - else if (j <= 31) - return 0x5a827999; - else if (j <= 47) - return 0x6ed9eba1; - else if (j <= 63) - return 0x8f1bbcdc; - else - return 0xa953fd4e; -} - -function Kh(j) { - if (j <= 15) - return 0x50a28be6; - else if (j <= 31) - return 0x5c4dd124; - else if (j <= 47) - return 0x6d703ef3; - else if (j <= 63) - return 0x7a6d76e9; - else - return 0x00000000; -} - -var r = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -]; - -var rh = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -]; - -var s = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -]; - -var sh = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -]; diff --git a/node_modules/hash.js/lib/hash/sha.js b/node_modules/hash.js/lib/hash/sha.js deleted file mode 100644 index f34a38d..0000000 --- a/node_modules/hash.js/lib/hash/sha.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -exports.sha1 = require('./sha/1'); -exports.sha224 = require('./sha/224'); -exports.sha256 = require('./sha/256'); -exports.sha384 = require('./sha/384'); -exports.sha512 = require('./sha/512'); diff --git a/node_modules/hash.js/lib/hash/sha/1.js b/node_modules/hash.js/lib/hash/sha/1.js deleted file mode 100644 index fcdfa29..0000000 --- a/node_modules/hash.js/lib/hash/sha/1.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var common = require('../common'); -var shaCommon = require('./common'); - -var rotl32 = utils.rotl32; -var sum32 = utils.sum32; -var sum32_5 = utils.sum32_5; -var ft_1 = shaCommon.ft_1; -var BlockHash = common.BlockHash; - -var sha1_K = [ - 0x5A827999, 0x6ED9EBA1, - 0x8F1BBCDC, 0xCA62C1D6 -]; - -function SHA1() { - if (!(this instanceof SHA1)) - return new SHA1(); - - BlockHash.call(this); - this.h = [ - 0x67452301, 0xefcdab89, 0x98badcfe, - 0x10325476, 0xc3d2e1f0 ]; - this.W = new Array(80); -} - -utils.inherits(SHA1, BlockHash); -module.exports = SHA1; - -SHA1.blockSize = 512; -SHA1.outSize = 160; -SHA1.hmacStrength = 80; -SHA1.padLength = 64; - -SHA1.prototype._update = function _update(msg, start) { - var W = this.W; - - for (var i = 0; i < 16; i++) - W[i] = msg[start + i]; - - for(; i < W.length; i++) - W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); - - var a = this.h[0]; - var b = this.h[1]; - var c = this.h[2]; - var d = this.h[3]; - var e = this.h[4]; - - for (i = 0; i < W.length; i++) { - var s = ~~(i / 20); - var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); - e = d; - d = c; - c = rotl32(b, 30); - b = a; - a = t; - } - - this.h[0] = sum32(this.h[0], a); - this.h[1] = sum32(this.h[1], b); - this.h[2] = sum32(this.h[2], c); - this.h[3] = sum32(this.h[3], d); - this.h[4] = sum32(this.h[4], e); -}; - -SHA1.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; diff --git a/node_modules/hash.js/lib/hash/sha/224.js b/node_modules/hash.js/lib/hash/sha/224.js deleted file mode 100644 index c69882d..0000000 --- a/node_modules/hash.js/lib/hash/sha/224.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var SHA256 = require('./256'); - -function SHA224() { - if (!(this instanceof SHA224)) - return new SHA224(); - - SHA256.call(this); - this.h = [ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; -} -utils.inherits(SHA224, SHA256); -module.exports = SHA224; - -SHA224.blockSize = 512; -SHA224.outSize = 224; -SHA224.hmacStrength = 192; -SHA224.padLength = 64; - -SHA224.prototype._digest = function digest(enc) { - // Just truncate output - if (enc === 'hex') - return utils.toHex32(this.h.slice(0, 7), 'big'); - else - return utils.split32(this.h.slice(0, 7), 'big'); -}; - diff --git a/node_modules/hash.js/lib/hash/sha/256.js b/node_modules/hash.js/lib/hash/sha/256.js deleted file mode 100644 index 6dbd6a0..0000000 --- a/node_modules/hash.js/lib/hash/sha/256.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var common = require('../common'); -var shaCommon = require('./common'); -var assert = require('minimalistic-assert'); - -var sum32 = utils.sum32; -var sum32_4 = utils.sum32_4; -var sum32_5 = utils.sum32_5; -var ch32 = shaCommon.ch32; -var maj32 = shaCommon.maj32; -var s0_256 = shaCommon.s0_256; -var s1_256 = shaCommon.s1_256; -var g0_256 = shaCommon.g0_256; -var g1_256 = shaCommon.g1_256; - -var BlockHash = common.BlockHash; - -var sha256_K = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -]; - -function SHA256() { - if (!(this instanceof SHA256)) - return new SHA256(); - - BlockHash.call(this); - this.h = [ - 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, - 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 - ]; - this.k = sha256_K; - this.W = new Array(64); -} -utils.inherits(SHA256, BlockHash); -module.exports = SHA256; - -SHA256.blockSize = 512; -SHA256.outSize = 256; -SHA256.hmacStrength = 192; -SHA256.padLength = 64; - -SHA256.prototype._update = function _update(msg, start) { - var W = this.W; - - for (var i = 0; i < 16; i++) - W[i] = msg[start + i]; - for (; i < W.length; i++) - W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); - - var a = this.h[0]; - var b = this.h[1]; - var c = this.h[2]; - var d = this.h[3]; - var e = this.h[4]; - var f = this.h[5]; - var g = this.h[6]; - var h = this.h[7]; - - assert(this.k.length === W.length); - for (i = 0; i < W.length; i++) { - var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); - var T2 = sum32(s0_256(a), maj32(a, b, c)); - h = g; - g = f; - f = e; - e = sum32(d, T1); - d = c; - c = b; - b = a; - a = sum32(T1, T2); - } - - this.h[0] = sum32(this.h[0], a); - this.h[1] = sum32(this.h[1], b); - this.h[2] = sum32(this.h[2], c); - this.h[3] = sum32(this.h[3], d); - this.h[4] = sum32(this.h[4], e); - this.h[5] = sum32(this.h[5], f); - this.h[6] = sum32(this.h[6], g); - this.h[7] = sum32(this.h[7], h); -}; - -SHA256.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; diff --git a/node_modules/hash.js/lib/hash/sha/384.js b/node_modules/hash.js/lib/hash/sha/384.js deleted file mode 100644 index 01df256..0000000 --- a/node_modules/hash.js/lib/hash/sha/384.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -var SHA512 = require('./512'); - -function SHA384() { - if (!(this instanceof SHA384)) - return new SHA384(); - - SHA512.call(this); - this.h = [ - 0xcbbb9d5d, 0xc1059ed8, - 0x629a292a, 0x367cd507, - 0x9159015a, 0x3070dd17, - 0x152fecd8, 0xf70e5939, - 0x67332667, 0xffc00b31, - 0x8eb44a87, 0x68581511, - 0xdb0c2e0d, 0x64f98fa7, - 0x47b5481d, 0xbefa4fa4 ]; -} -utils.inherits(SHA384, SHA512); -module.exports = SHA384; - -SHA384.blockSize = 1024; -SHA384.outSize = 384; -SHA384.hmacStrength = 192; -SHA384.padLength = 128; - -SHA384.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h.slice(0, 12), 'big'); - else - return utils.split32(this.h.slice(0, 12), 'big'); -}; diff --git a/node_modules/hash.js/lib/hash/sha/512.js b/node_modules/hash.js/lib/hash/sha/512.js deleted file mode 100644 index c371a25..0000000 --- a/node_modules/hash.js/lib/hash/sha/512.js +++ /dev/null @@ -1,330 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var common = require('../common'); -var assert = require('minimalistic-assert'); - -var rotr64_hi = utils.rotr64_hi; -var rotr64_lo = utils.rotr64_lo; -var shr64_hi = utils.shr64_hi; -var shr64_lo = utils.shr64_lo; -var sum64 = utils.sum64; -var sum64_hi = utils.sum64_hi; -var sum64_lo = utils.sum64_lo; -var sum64_4_hi = utils.sum64_4_hi; -var sum64_4_lo = utils.sum64_4_lo; -var sum64_5_hi = utils.sum64_5_hi; -var sum64_5_lo = utils.sum64_5_lo; - -var BlockHash = common.BlockHash; - -var sha512_K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function SHA512() { - if (!(this instanceof SHA512)) - return new SHA512(); - - BlockHash.call(this); - this.h = [ - 0x6a09e667, 0xf3bcc908, - 0xbb67ae85, 0x84caa73b, - 0x3c6ef372, 0xfe94f82b, - 0xa54ff53a, 0x5f1d36f1, - 0x510e527f, 0xade682d1, - 0x9b05688c, 0x2b3e6c1f, - 0x1f83d9ab, 0xfb41bd6b, - 0x5be0cd19, 0x137e2179 ]; - this.k = sha512_K; - this.W = new Array(160); -} -utils.inherits(SHA512, BlockHash); -module.exports = SHA512; - -SHA512.blockSize = 1024; -SHA512.outSize = 512; -SHA512.hmacStrength = 192; -SHA512.padLength = 128; - -SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { - var W = this.W; - - // 32 x 32bit words - for (var i = 0; i < 32; i++) - W[i] = msg[start + i]; - for (; i < W.length; i += 2) { - var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 - var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); - var c1_hi = W[i - 14]; // i - 7 - var c1_lo = W[i - 13]; - var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 - var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); - var c3_hi = W[i - 32]; // i - 16 - var c3_lo = W[i - 31]; - - W[i] = sum64_4_hi( - c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo); - W[i + 1] = sum64_4_lo( - c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo); - } -}; - -SHA512.prototype._update = function _update(msg, start) { - this._prepareBlock(msg, start); - - var W = this.W; - - var ah = this.h[0]; - var al = this.h[1]; - var bh = this.h[2]; - var bl = this.h[3]; - var ch = this.h[4]; - var cl = this.h[5]; - var dh = this.h[6]; - var dl = this.h[7]; - var eh = this.h[8]; - var el = this.h[9]; - var fh = this.h[10]; - var fl = this.h[11]; - var gh = this.h[12]; - var gl = this.h[13]; - var hh = this.h[14]; - var hl = this.h[15]; - - assert(this.k.length === W.length); - for (var i = 0; i < W.length; i += 2) { - var c0_hi = hh; - var c0_lo = hl; - var c1_hi = s1_512_hi(eh, el); - var c1_lo = s1_512_lo(eh, el); - var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); - var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); - var c3_hi = this.k[i]; - var c3_lo = this.k[i + 1]; - var c4_hi = W[i]; - var c4_lo = W[i + 1]; - - var T1_hi = sum64_5_hi( - c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo, - c4_hi, c4_lo); - var T1_lo = sum64_5_lo( - c0_hi, c0_lo, - c1_hi, c1_lo, - c2_hi, c2_lo, - c3_hi, c3_lo, - c4_hi, c4_lo); - - c0_hi = s0_512_hi(ah, al); - c0_lo = s0_512_lo(ah, al); - c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); - c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); - - var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); - var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); - - hh = gh; - hl = gl; - - gh = fh; - gl = fl; - - fh = eh; - fl = el; - - eh = sum64_hi(dh, dl, T1_hi, T1_lo); - el = sum64_lo(dl, dl, T1_hi, T1_lo); - - dh = ch; - dl = cl; - - ch = bh; - cl = bl; - - bh = ah; - bl = al; - - ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); - al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); - } - - sum64(this.h, 0, ah, al); - sum64(this.h, 2, bh, bl); - sum64(this.h, 4, ch, cl); - sum64(this.h, 6, dh, dl); - sum64(this.h, 8, eh, el); - sum64(this.h, 10, fh, fl); - sum64(this.h, 12, gh, gl); - sum64(this.h, 14, hh, hl); -}; - -SHA512.prototype._digest = function digest(enc) { - if (enc === 'hex') - return utils.toHex32(this.h, 'big'); - else - return utils.split32(this.h, 'big'); -}; - -function ch64_hi(xh, xl, yh, yl, zh) { - var r = (xh & yh) ^ ((~xh) & zh); - if (r < 0) - r += 0x100000000; - return r; -} - -function ch64_lo(xh, xl, yh, yl, zh, zl) { - var r = (xl & yl) ^ ((~xl) & zl); - if (r < 0) - r += 0x100000000; - return r; -} - -function maj64_hi(xh, xl, yh, yl, zh) { - var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); - if (r < 0) - r += 0x100000000; - return r; -} - -function maj64_lo(xh, xl, yh, yl, zh, zl) { - var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); - if (r < 0) - r += 0x100000000; - return r; -} - -function s0_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 28); - var c1_hi = rotr64_hi(xl, xh, 2); // 34 - var c2_hi = rotr64_hi(xl, xh, 7); // 39 - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function s0_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 28); - var c1_lo = rotr64_lo(xl, xh, 2); // 34 - var c2_lo = rotr64_lo(xl, xh, 7); // 39 - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function s1_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 14); - var c1_hi = rotr64_hi(xh, xl, 18); - var c2_hi = rotr64_hi(xl, xh, 9); // 41 - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function s1_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 14); - var c1_lo = rotr64_lo(xh, xl, 18); - var c2_lo = rotr64_lo(xl, xh, 9); // 41 - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function g0_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 1); - var c1_hi = rotr64_hi(xh, xl, 8); - var c2_hi = shr64_hi(xh, xl, 7); - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function g0_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 1); - var c1_lo = rotr64_lo(xh, xl, 8); - var c2_lo = shr64_lo(xh, xl, 7); - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} - -function g1_512_hi(xh, xl) { - var c0_hi = rotr64_hi(xh, xl, 19); - var c1_hi = rotr64_hi(xl, xh, 29); // 61 - var c2_hi = shr64_hi(xh, xl, 6); - - var r = c0_hi ^ c1_hi ^ c2_hi; - if (r < 0) - r += 0x100000000; - return r; -} - -function g1_512_lo(xh, xl) { - var c0_lo = rotr64_lo(xh, xl, 19); - var c1_lo = rotr64_lo(xl, xh, 29); // 61 - var c2_lo = shr64_lo(xh, xl, 6); - - var r = c0_lo ^ c1_lo ^ c2_lo; - if (r < 0) - r += 0x100000000; - return r; -} diff --git a/node_modules/hash.js/lib/hash/sha/common.js b/node_modules/hash.js/lib/hash/sha/common.js deleted file mode 100644 index d41b464..0000000 --- a/node_modules/hash.js/lib/hash/sha/common.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var utils = require('../utils'); -var rotr32 = utils.rotr32; - -function ft_1(s, x, y, z) { - if (s === 0) - return ch32(x, y, z); - if (s === 1 || s === 3) - return p32(x, y, z); - if (s === 2) - return maj32(x, y, z); -} -exports.ft_1 = ft_1; - -function ch32(x, y, z) { - return (x & y) ^ ((~x) & z); -} -exports.ch32 = ch32; - -function maj32(x, y, z) { - return (x & y) ^ (x & z) ^ (y & z); -} -exports.maj32 = maj32; - -function p32(x, y, z) { - return x ^ y ^ z; -} -exports.p32 = p32; - -function s0_256(x) { - return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); -} -exports.s0_256 = s0_256; - -function s1_256(x) { - return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); -} -exports.s1_256 = s1_256; - -function g0_256(x) { - return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); -} -exports.g0_256 = g0_256; - -function g1_256(x) { - return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); -} -exports.g1_256 = g1_256; diff --git a/node_modules/hash.js/lib/hash/utils.js b/node_modules/hash.js/lib/hash/utils.js deleted file mode 100644 index 7487f8e..0000000 --- a/node_modules/hash.js/lib/hash/utils.js +++ /dev/null @@ -1,278 +0,0 @@ -'use strict'; - -var assert = require('minimalistic-assert'); -var inherits = require('inherits'); - -exports.inherits = inherits; - -function isSurrogatePair(msg, i) { - if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) { - return false; - } - if (i < 0 || i + 1 >= msg.length) { - return false; - } - return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00; -} - -function toArray(msg, enc) { - if (Array.isArray(msg)) - return msg.slice(); - if (!msg) - return []; - var res = []; - if (typeof msg === 'string') { - if (!enc) { - // Inspired by stringToUtf8ByteArray() in closure-library by Google - // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 - // Apache License 2.0 - // https://github.com/google/closure-library/blob/master/LICENSE - var p = 0; - for (var i = 0; i < msg.length; i++) { - var c = msg.charCodeAt(i); - if (c < 128) { - res[p++] = c; - } else if (c < 2048) { - res[p++] = (c >> 6) | 192; - res[p++] = (c & 63) | 128; - } else if (isSurrogatePair(msg, i)) { - c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF); - res[p++] = (c >> 18) | 240; - res[p++] = ((c >> 12) & 63) | 128; - res[p++] = ((c >> 6) & 63) | 128; - res[p++] = (c & 63) | 128; - } else { - res[p++] = (c >> 12) | 224; - res[p++] = ((c >> 6) & 63) | 128; - res[p++] = (c & 63) | 128; - } - } - } else if (enc === 'hex') { - msg = msg.replace(/[^a-z0-9]+/ig, ''); - if (msg.length % 2 !== 0) - msg = '0' + msg; - for (i = 0; i < msg.length; i += 2) - res.push(parseInt(msg[i] + msg[i + 1], 16)); - } - } else { - for (i = 0; i < msg.length; i++) - res[i] = msg[i] | 0; - } - return res; -} -exports.toArray = toArray; - -function toHex(msg) { - var res = ''; - for (var i = 0; i < msg.length; i++) - res += zero2(msg[i].toString(16)); - return res; -} -exports.toHex = toHex; - -function htonl(w) { - var res = (w >>> 24) | - ((w >>> 8) & 0xff00) | - ((w << 8) & 0xff0000) | - ((w & 0xff) << 24); - return res >>> 0; -} -exports.htonl = htonl; - -function toHex32(msg, endian) { - var res = ''; - for (var i = 0; i < msg.length; i++) { - var w = msg[i]; - if (endian === 'little') - w = htonl(w); - res += zero8(w.toString(16)); - } - return res; -} -exports.toHex32 = toHex32; - -function zero2(word) { - if (word.length === 1) - return '0' + word; - else - return word; -} -exports.zero2 = zero2; - -function zero8(word) { - if (word.length === 7) - return '0' + word; - else if (word.length === 6) - return '00' + word; - else if (word.length === 5) - return '000' + word; - else if (word.length === 4) - return '0000' + word; - else if (word.length === 3) - return '00000' + word; - else if (word.length === 2) - return '000000' + word; - else if (word.length === 1) - return '0000000' + word; - else - return word; -} -exports.zero8 = zero8; - -function join32(msg, start, end, endian) { - var len = end - start; - assert(len % 4 === 0); - var res = new Array(len / 4); - for (var i = 0, k = start; i < res.length; i++, k += 4) { - var w; - if (endian === 'big') - w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; - else - w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; - res[i] = w >>> 0; - } - return res; -} -exports.join32 = join32; - -function split32(msg, endian) { - var res = new Array(msg.length * 4); - for (var i = 0, k = 0; i < msg.length; i++, k += 4) { - var m = msg[i]; - if (endian === 'big') { - res[k] = m >>> 24; - res[k + 1] = (m >>> 16) & 0xff; - res[k + 2] = (m >>> 8) & 0xff; - res[k + 3] = m & 0xff; - } else { - res[k + 3] = m >>> 24; - res[k + 2] = (m >>> 16) & 0xff; - res[k + 1] = (m >>> 8) & 0xff; - res[k] = m & 0xff; - } - } - return res; -} -exports.split32 = split32; - -function rotr32(w, b) { - return (w >>> b) | (w << (32 - b)); -} -exports.rotr32 = rotr32; - -function rotl32(w, b) { - return (w << b) | (w >>> (32 - b)); -} -exports.rotl32 = rotl32; - -function sum32(a, b) { - return (a + b) >>> 0; -} -exports.sum32 = sum32; - -function sum32_3(a, b, c) { - return (a + b + c) >>> 0; -} -exports.sum32_3 = sum32_3; - -function sum32_4(a, b, c, d) { - return (a + b + c + d) >>> 0; -} -exports.sum32_4 = sum32_4; - -function sum32_5(a, b, c, d, e) { - return (a + b + c + d + e) >>> 0; -} -exports.sum32_5 = sum32_5; - -function sum64(buf, pos, ah, al) { - var bh = buf[pos]; - var bl = buf[pos + 1]; - - var lo = (al + bl) >>> 0; - var hi = (lo < al ? 1 : 0) + ah + bh; - buf[pos] = hi >>> 0; - buf[pos + 1] = lo; -} -exports.sum64 = sum64; - -function sum64_hi(ah, al, bh, bl) { - var lo = (al + bl) >>> 0; - var hi = (lo < al ? 1 : 0) + ah + bh; - return hi >>> 0; -} -exports.sum64_hi = sum64_hi; - -function sum64_lo(ah, al, bh, bl) { - var lo = al + bl; - return lo >>> 0; -} -exports.sum64_lo = sum64_lo; - -function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { - var carry = 0; - var lo = al; - lo = (lo + bl) >>> 0; - carry += lo < al ? 1 : 0; - lo = (lo + cl) >>> 0; - carry += lo < cl ? 1 : 0; - lo = (lo + dl) >>> 0; - carry += lo < dl ? 1 : 0; - - var hi = ah + bh + ch + dh + carry; - return hi >>> 0; -} -exports.sum64_4_hi = sum64_4_hi; - -function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { - var lo = al + bl + cl + dl; - return lo >>> 0; -} -exports.sum64_4_lo = sum64_4_lo; - -function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var carry = 0; - var lo = al; - lo = (lo + bl) >>> 0; - carry += lo < al ? 1 : 0; - lo = (lo + cl) >>> 0; - carry += lo < cl ? 1 : 0; - lo = (lo + dl) >>> 0; - carry += lo < dl ? 1 : 0; - lo = (lo + el) >>> 0; - carry += lo < el ? 1 : 0; - - var hi = ah + bh + ch + dh + eh + carry; - return hi >>> 0; -} -exports.sum64_5_hi = sum64_5_hi; - -function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var lo = al + bl + cl + dl + el; - - return lo >>> 0; -} -exports.sum64_5_lo = sum64_5_lo; - -function rotr64_hi(ah, al, num) { - var r = (al << (32 - num)) | (ah >>> num); - return r >>> 0; -} -exports.rotr64_hi = rotr64_hi; - -function rotr64_lo(ah, al, num) { - var r = (ah << (32 - num)) | (al >>> num); - return r >>> 0; -} -exports.rotr64_lo = rotr64_lo; - -function shr64_hi(ah, al, num) { - return ah >>> num; -} -exports.shr64_hi = shr64_hi; - -function shr64_lo(ah, al, num) { - var r = (ah << (32 - num)) | (al >>> num); - return r >>> 0; -} -exports.shr64_lo = shr64_lo; diff --git a/node_modules/hash.js/package.json b/node_modules/hash.js/package.json deleted file mode 100644 index 1e07ca7..0000000 --- a/node_modules/hash.js/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "hash.js@^1.0.0", - "_id": "hash.js@1.1.7", - "_inBundle": false, - "_integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "_location": "/hash.js", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "hash.js@^1.0.0", - "name": "hash.js", - "escapedName": "hash.js", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/elliptic", - "/hmac-drbg" - ], - "_resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "_shasum": "0babca538e8d4ee4a0f8988d68866537a003cf42", - "_spec": "hash.js@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/elliptic", - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "bugs": { - "url": "https://github.com/indutny/hash.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - }, - "deprecated": false, - "description": "Various hash functions that could be run by both browser and node", - "devDependencies": { - "eslint": "^4.19.1", - "mocha": "^5.2.0" - }, - "homepage": "https://github.com/indutny/hash.js", - "keywords": [ - "hash", - "sha256", - "sha224", - "hmac" - ], - "license": "MIT", - "main": "lib/hash.js", - "name": "hash.js", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/hash.js.git" - }, - "scripts": { - "lint": "eslint lib/*.js lib/**/*.js lib/**/**/*.js test/*.js", - "test": "mocha --reporter=spec test/*-test.js && npm run lint" - }, - "typings": "lib/hash.d.ts", - "version": "1.1.7" -} diff --git a/node_modules/hash.js/test/hash-test.js b/node_modules/hash.js/test/hash-test.js deleted file mode 100644 index f6ca564..0000000 --- a/node_modules/hash.js/test/hash-test.js +++ /dev/null @@ -1,140 +0,0 @@ -'use strict'; -/* global describe it */ - -var assert = require('assert'); -var crypto = require('crypto'); -var hash = require('../'); - -describe('Hash', function() { - function test(fn, cases) { - for (var i = 0; i < cases.length; i++) { - var msg = cases[i][0]; - var res = cases[i][1]; - var enc = cases[i][2]; - - var dgst = fn().update(msg, enc).digest('hex'); - assert.equal(dgst, res); - - // Split message - dgst = fn().update(msg.slice(0, 2), enc) - .update(msg.slice(2), enc) - .digest('hex'); - assert.equal(dgst, res); - } - } - - it('should support sha256', function() { - assert.equal(hash.sha256.blockSize, 512); - assert.equal(hash.sha256.outSize, 256); - - test(hash.sha256, [ - [ 'abc', - 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1' ], - [ 'deadbeef', - '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953', - 'hex' ], - ]); - }); - - it('should support sha224', function() { - assert.equal(hash.sha224.blockSize, 512); - assert.equal(hash.sha224.outSize, 224); - - test(hash.sha224, [ - [ 'abc', - '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525' ], - [ 'deadbeef', - '55b9eee5f60cc362ddc07676f620372611e22272f60fdbec94f243f8', - 'hex' ], - ]); - }); - - it('should support ripemd160', function() { - assert.equal(hash.ripemd160.blockSize, 512); - assert.equal(hash.ripemd160.outSize, 160); - - test(hash.ripemd160, [ - [ '', '9c1185a5c5e9fc54612808977ee8f548b2258d31'], - [ 'abc', - '8eb208f7e05d987a9b044a8e98c6b087f15a0bfc' ], - [ 'message digest', - '5d0689ef49d2fae572b881b123a85ffa21595f36' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '12a053384a9c0c88e405a06c27dcf49ada62eb2b' ], - [ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', - 'b0e20b6e3116640286ed3a87a5713079b21f5189' ], - ]); - }); - - it('should support sha1', function() { - assert.equal(hash.sha1.blockSize, 512); - assert.equal(hash.sha1.outSize, 160); - - test(hash.sha1, [ - [ '', - 'da39a3ee5e6b4b0d3255bfef95601890afd80709' ], - [ 'abc', - 'a9993e364706816aba3e25717850c26c9cd0d89d' ], - [ 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', - '84983e441c3bd26ebaae4aa1f95129e5e54670f1' ], - [ 'deadbeef', - 'd78f8bb992a56a597f6c7a1fb918bb78271367eb', - 'hex' ], - ]); - }); - - it('should support sha512', function() { - assert.equal(hash.sha512.blockSize, 1024); - assert.equal(hash.sha512.outSize, 512); - - test(hash.sha512, [ - [ 'abc', - 'ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a' + - '2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f' - ], - [ - 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + - 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', - '8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018' + - '501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909' - ] - ]); - }); - - it('should support sha384', function() { - assert.equal(hash.sha384.blockSize, 1024); - assert.equal(hash.sha384.outSize, 384); - - test(hash.sha384, [ - [ 'abc', - 'cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed' + - '8086072ba1e7cc2358baeca134c825a7' - ], - [ - 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn' + - 'hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu', - '09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712' + - 'fcc7c71a557e2db966c3e9fa91746039' - ] - ]); - }); - - it('handles utf8 in strings just like crypto', function() { - const algorithm = 'sha256'; - test(hash[algorithm], [ - 'hello', // one byte per character - 'привет', // two bytes per character - '您好', // three bytes per character - '👋', // four bytes per character - 'hello привет 您好 👋!!!' // mixed character lengths - ].map(str => [str, crypto - .createHash(algorithm) - .update(str) - .digest('hex')])); - }); - -}); diff --git a/node_modules/hash.js/test/hmac-test.js b/node_modules/hash.js/test/hmac-test.js deleted file mode 100644 index 6fe18e3..0000000 --- a/node_modules/hash.js/test/hmac-test.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -/* global describe it */ - -var assert = require('assert'); -var hash = require('../'); - -describe('Hmac', function() { - describe('mixed test vector', function() { - test({ - name: 'nist 1', - key: '00010203 04050607 08090A0B 0C0D0E0F' + - '10111213 14151617 18191A1B 1C1D1E1F 20212223 24252627' + - '28292A2B 2C2D2E2F 30313233 34353637 38393A3B 3C3D3E3F', - msg: 'Sample message for keylen=blocklen', - res: '8bb9a1db9806f20df7f77b82138c7914d174d59e13dc4d0169c9057b133e1d62' - }); - test({ - name: 'nist 2', - key: '00010203 04050607' + - '08090A0B 0C0D0E0F 10111213 14151617 18191A1B 1C1D1E1F', - msg: 'Sample message for keylen= (this.minEntropy / 8), - 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); - this._init(entropy, nonce, pers); -} -module.exports = HmacDRBG; - -HmacDRBG.prototype._init = function init(entropy, nonce, pers) { - var seed = entropy.concat(nonce).concat(pers); - - this.K = new Array(this.outLen / 8); - this.V = new Array(this.outLen / 8); - for (var i = 0; i < this.V.length; i++) { - this.K[i] = 0x00; - this.V[i] = 0x01; - } - - this._update(seed); - this._reseed = 1; - this.reseedInterval = 0x1000000000000; // 2^48 -}; - -HmacDRBG.prototype._hmac = function hmac() { - return new hash.hmac(this.hash, this.K); -}; - -HmacDRBG.prototype._update = function update(seed) { - var kmac = this._hmac() - .update(this.V) - .update([ 0x00 ]); - if (seed) - kmac = kmac.update(seed); - this.K = kmac.digest(); - this.V = this._hmac().update(this.V).digest(); - if (!seed) - return; - - this.K = this._hmac() - .update(this.V) - .update([ 0x01 ]) - .update(seed) - .digest(); - this.V = this._hmac().update(this.V).digest(); -}; - -HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { - // Optional entropy enc - if (typeof entropyEnc !== 'string') { - addEnc = add; - add = entropyEnc; - entropyEnc = null; - } - - entropy = utils.toArray(entropy, entropyEnc); - add = utils.toArray(add, addEnc); - - assert(entropy.length >= (this.minEntropy / 8), - 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); - - this._update(entropy.concat(add || [])); - this._reseed = 1; -}; - -HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { - if (this._reseed > this.reseedInterval) - throw new Error('Reseed is required'); - - // Optional encoding - if (typeof enc !== 'string') { - addEnc = add; - add = enc; - enc = null; - } - - // Optional additional data - if (add) { - add = utils.toArray(add, addEnc || 'hex'); - this._update(add); - } - - var temp = []; - while (temp.length < len) { - this.V = this._hmac().update(this.V).digest(); - temp = temp.concat(this.V); - } - - var res = temp.slice(0, len); - this._update(add); - this._reseed++; - return utils.encode(res, enc); -}; diff --git a/node_modules/hmac-drbg/package.json b/node_modules/hmac-drbg/package.json deleted file mode 100644 index a511de8..0000000 --- a/node_modules/hmac-drbg/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "hmac-drbg@^1.0.0", - "_id": "hmac-drbg@1.0.1", - "_inBundle": false, - "_integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "_location": "/hmac-drbg", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "hmac-drbg@^1.0.0", - "name": "hmac-drbg", - "escapedName": "hmac-drbg", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/elliptic" - ], - "_resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "_shasum": "d2745701025a6c775a6c545793ed502fc0c649a1", - "_spec": "hmac-drbg@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/elliptic", - "author": { - "name": "Fedor Indutny", - "email": "fedor@indutny.com" - }, - "bugs": { - "url": "https://github.com/indutny/hmac-drbg/issues" - }, - "bundleDependencies": false, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - }, - "deprecated": false, - "description": "Deterministic random bit generator (hmac)", - "devDependencies": { - "mocha": "^3.2.0" - }, - "homepage": "https://github.com/indutny/hmac-drbg#readme", - "keywords": [ - "hmac", - "drbg", - "prng" - ], - "license": "MIT", - "main": "lib/hmac-drbg.js", - "name": "hmac-drbg", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/indutny/hmac-drbg.git" - }, - "scripts": { - "test": "mocha --reporter=spec test/*-test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/hmac-drbg/test/drbg-test.js b/node_modules/hmac-drbg/test/drbg-test.js deleted file mode 100644 index 14fd28a..0000000 --- a/node_modules/hmac-drbg/test/drbg-test.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const HmacDRBG = require('../'); -const hash = require('hash.js'); - -describe('Hmac_DRBG', () => { - it('should support hmac-drbg-sha256', () => { - function doDrbg(opt) { - const drbg = HmacDRBG({ - hash: hash.sha256, - entropy: opt.entropy, - entropyEnc: 'utf8', - nonce: opt.nonce, - nonceEnc: 'utf8', - pers: opt.pers, - persEnc: 'utf8' - }); - return drbg.generate(opt.size, 'hex'); - } - - const test = [ - { - entropy: 'totally random0123456789', - nonce: 'secret nonce', - pers: 'my drbg', - size: 32, - res: '018ec5f8e08c41e5ac974eb129ac297c5388ee1864324fa13d9b15cf98d9a157' - }, - { - entropy: 'totally random0123456789', - nonce: 'secret nonce', - pers: null, - size: 32, - res: 'ed5d61ecf0ef38258e62f03bbb49f19f2cd07ba5145a840d83b134d5963b3633' - } - ]; - for (let i = 0; i < test.length; i++) - assert.equal(doDrbg(test[i]), test[i].res); - }); - - describe('NIST vector', function() { - require('./fixtures/hmac-drbg-nist.json').forEach(function (opt) { - it('should not fail at ' + opt.name, function() { - const drbg = HmacDRBG({ - hash: hash.sha256, - entropy: opt.entropy, - nonce: opt.nonce, - pers: opt.pers - }); - - let last; - for (let i = 0; i < opt.add.length; i++) { - let add = opt.add[i]; - last = drbg.generate(opt.expected.length / 2, 'hex', add); - } - assert.equal(last, opt.expected); - }); - }); - }); - - describe('reseeding', function() { - it('should reseed', function() { - const entropy = 'totally random string with many chars that I typed ' + - 'in agony'; - const nonce = 'nonce'; - const pers = 'pers'; - - const original = HmacDRBG({ - hash: hash.sha256, - entropy, - nonce, - pers - }); - const reseeded = HmacDRBG({ - hash: hash.sha256, - entropy, - nonce, - pers - }); - - assert.strictEqual(original.generate(32, 'hex'), - reseeded.generate(32, 'hex')); - - reseeded.reseed('another absolutely random string'); - - assert.notEqual(original.generate(32, 'hex'), - reseeded.generate(32, 'hex')); - }); - }); -}); diff --git a/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json b/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json deleted file mode 100644 index fce148a..0000000 --- a/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json +++ /dev/null @@ -1,332 +0,0 @@ -[ - { - "name": "0", - "entropy": "ca851911349384bffe89de1cbdc46e6831e44d34a4fb935ee285dd14b71a7488", - "nonce": "659ba96c601dc69fc902940805ec0ca8", - "pers": null, - "add": [ - null, - null - ], - "expected": "e528e9abf2dece54d47c7e75e5fe302149f817ea9fb4bee6f4199697d04d5b89d54fbb978a15b5c443c9ec21036d2460b6f73ebad0dc2aba6e624abf07745bc107694bb7547bb0995f70de25d6b29e2d3011bb19d27676c07162c8b5ccde0668961df86803482cb37ed6d5c0bb8d50cf1f50d476aa0458bdaba806f48be9dcb8" - }, - { - "name": "1", - "entropy": "79737479ba4e7642a221fcfd1b820b134e9e3540a35bb48ffae29c20f5418ea3", - "nonce": "3593259c092bef4129bc2c6c9e19f343", - "pers": null, - "add": [ - null, - null - ], - "expected": "cf5ad5984f9e43917aa9087380dac46e410ddc8a7731859c84e9d0f31bd43655b924159413e2293b17610f211e09f770f172b8fb693a35b85d3b9e5e63b1dc252ac0e115002e9bedfb4b5b6fd43f33b8e0eafb2d072e1a6fee1f159df9b51e6c8da737e60d5032dd30544ec51558c6f080bdbdab1de8a939e961e06b5f1aca37" - }, - { - "name": "2", - "entropy": "b340907445b97a8b589264de4a17c0bea11bb53ad72f9f33297f05d2879d898d", - "nonce": "65cb27735d83c0708f72684ea58f7ee5", - "pers": null, - "add": [ - null, - null - ], - "expected": "75183aaaf3574bc68003352ad655d0e9ce9dd17552723b47fab0e84ef903694a32987eeddbdc48efd24195dbdac8a46ba2d972f5808f23a869e71343140361f58b243e62722088fe10a98e43372d252b144e00c89c215a76a121734bdc485486f65c0b16b8963524a3a70e6f38f169c12f6cbdd169dd48fe4421a235847a23ff" - }, - { - "name": "3", - "entropy": "8e159f60060a7d6a7e6fe7c9f769c30b98acb1240b25e7ee33f1da834c0858e7", - "nonce": "c39d35052201bdcce4e127a04f04d644", - "pers": null, - "add": [ - null, - null - ], - "expected": "62910a77213967ea93d6457e255af51fc79d49629af2fccd81840cdfbb4910991f50a477cbd29edd8a47c4fec9d141f50dfde7c4d8fcab473eff3cc2ee9e7cc90871f180777a97841597b0dd7e779eff9784b9cc33689fd7d48c0dcd341515ac8fecf5c55a6327aea8d58f97220b7462373e84e3b7417a57e80ce946d6120db5" - }, - { - "name": "4", - "entropy": "74755f196305f7fb6689b2fe6835dc1d81484fc481a6b8087f649a1952f4df6a", - "nonce": "c36387a544a5f2b78007651a7b74b749", - "pers": null, - "add": [ - null, - null - ], - "expected": "b2896f3af4375dab67e8062d82c1a005ef4ed119d13a9f18371b1b873774418684805fd659bfd69964f83a5cfe08667ddad672cafd16befffa9faed49865214f703951b443e6dca22edb636f3308380144b9333de4bcb0735710e4d9266786342fc53babe7bdbe3c01a3addb7f23c63ce2834729fabbd419b47beceb4a460236" - }, - { - "name": "5", - "entropy": "4b222718f56a3260b3c2625a4cf80950b7d6c1250f170bd5c28b118abdf23b2f", - "nonce": "7aed52d0016fcaef0b6492bc40bbe0e9", - "pers": null, - "add": [ - null, - null - ], - "expected": "a6da029b3665cd39fd50a54c553f99fed3626f4902ffe322dc51f0670dfe8742ed48415cf04bbad5ed3b23b18b7892d170a7dcf3ef8052d5717cb0c1a8b3010d9a9ea5de70ae5356249c0e098946030c46d9d3d209864539444374d8fbcae068e1d6548fa59e6562e6b2d1acbda8da0318c23752ebc9be0c1c1c5b3cf66dd967" - }, - { - "name": "6", - "entropy": "b512633f27fb182a076917e39888ba3ff35d23c3742eb8f3c635a044163768e0", - "nonce": "e2c39b84629a3de5c301db5643af1c21", - "pers": null, - "add": [ - null, - null - ], - "expected": "fb931d0d0194a97b48d5d4c231fdad5c61aedf1c3a55ac24983ecbf38487b1c93396c6b86ff3920cfa8c77e0146de835ea5809676e702dee6a78100da9aa43d8ec0bf5720befa71f82193205ac2ea403e8d7e0e6270b366dc4200be26afd9f63b7e79286a35c688c57cbff55ac747d4c28bb80a2b2097b3b62ea439950d75dff" - }, - { - "name": "7", - "entropy": "aae3ffc8605a975befefcea0a7a286642bc3b95fb37bd0eb0585a4cabf8b3d1e", - "nonce": "9504c3c0c4310c1c0746a036c91d9034", - "pers": null, - "add": [ - null, - null - ], - "expected": "2819bd3b0d216dad59ddd6c354c4518153a2b04374b07c49e64a8e4d055575dfbc9a8fcde68bd257ff1ba5c6000564b46d6dd7ecd9c5d684fd757df62d85211575d3562d7814008ab5c8bc00e7b5a649eae2318665b55d762de36eba00c2906c0e0ec8706edb493e51ca5eb4b9f015dc932f262f52a86b11c41e9a6d5b3bd431" - }, - { - "name": "8", - "entropy": "b9475210b79b87180e746df704b3cbc7bf8424750e416a7fbb5ce3ef25a82cc6", - "nonce": "24baf03599c10df6ef44065d715a93f7", - "pers": null, - "add": [ - null, - null - ], - "expected": "ae12d784f796183c50db5a1a283aa35ed9a2b685dacea97c596ff8c294906d1b1305ba1f80254eb062b874a8dfffa3378c809ab2869aa51a4e6a489692284a25038908a347342175c38401193b8afc498077e10522bec5c70882b7f760ea5946870bd9fc72961eedbe8bff4fd58c7cc1589bb4f369ed0d3bf26c5bbc62e0b2b2" - }, - { - "name": "9", - "entropy": "27838eb44ceccb4e36210703ebf38f659bc39dd3277cd76b7a9bcd6bc964b628", - "nonce": "39cfe0210db2e7b0eb52a387476e7ea1", - "pers": null, - "add": [ - null, - null - ], - "expected": "e5e72a53605d2aaa67832f97536445ab774dd9bff7f13a0d11fd27bf6593bfb52309f2d4f09d147192199ea584503181de87002f4ee085c7dc18bf32ce5315647a3708e6f404d6588c92b2dda599c131aa350d18c747b33dc8eda15cf40e95263d1231e1b4b68f8d829f86054d49cfdb1b8d96ab0465110569c8583a424a099a" - }, - { - "name": "10", - "entropy": "d7129e4f47008ad60c9b5d081ff4ca8eb821a6e4deb91608bf4e2647835373a5", - "nonce": "a72882773f78c2fc4878295840a53012", - "pers": null, - "add": [ - null, - null - ], - "expected": "0cbf48585c5de9183b7ff76557f8fc9ebcfdfde07e588a8641156f61b7952725bbee954f87e9b937513b16bba0f2e523d095114658e00f0f3772175acfcb3240a01de631c19c5a834c94cc58d04a6837f0d2782fa53d2f9f65178ee9c837222494c799e64c60406069bd319549b889fa00a0032dd7ba5b1cc9edbf58de82bfcd" - }, - { - "name": "11", - "entropy": "67fe5e300c513371976c80de4b20d4473889c9f1214bce718bc32d1da3ab7532", - "nonce": "e256d88497738a33923aa003a8d7845c", - "pers": null, - "add": [ - null, - null - ], - "expected": "b44660d64ef7bcebc7a1ab71f8407a02285c7592d755ae6766059e894f694373ed9c776c0cfc8594413eefb400ed427e158d687e28da3ecc205e0f7370fb089676bbb0fa591ec8d916c3d5f18a3eb4a417120705f3e2198154cd60648dbfcfc901242e15711cacd501b2c2826abe870ba32da785ed6f1fdc68f203d1ab43a64f" - }, - { - "name": "12", - "entropy": "de8142541255c46d66efc6173b0fe3ffaf5936c897a3ce2e9d5835616aafa2cb", - "nonce": "d01f9002c407127bc3297a561d89b81d", - "pers": null, - "add": [ - null, - null - ], - "expected": "64d1020929d74716446d8a4e17205d0756b5264867811aa24d0d0da8644db25d5cde474143c57d12482f6bf0f31d10af9d1da4eb6d701bdd605a8db74fb4e77f79aaa9e450afda50b18d19fae68f03db1d7b5f1738d2fdce9ad3ee9461b58ee242daf7a1d72c45c9213eca34e14810a9fca5208d5c56d8066bab1586f1513de7" - }, - { - "name": "13", - "entropy": "4a8e0bd90bdb12f7748ad5f147b115d7385bb1b06aee7d8b76136a25d779bcb7", - "nonce": "7f3cce4af8c8ce3c45bdf23c6b181a00", - "pers": null, - "add": [ - null, - null - ], - "expected": "320c7ca4bbeb7af977bc054f604b5086a3f237aa5501658112f3e7a33d2231f5536d2c85c1dad9d9b0bf7f619c81be4854661626839c8c10ae7fdc0c0b571be34b58d66da553676167b00e7d8e49f416aacb2926c6eb2c66ec98bffae20864cf92496db15e3b09e530b7b9648be8d3916b3c20a3a779bec7d66da63396849aaf" - }, - { - "name": "14", - "entropy": "451ed024bc4b95f1025b14ec3616f5e42e80824541dc795a2f07500f92adc665", - "nonce": "2f28e6ee8de5879db1eccd58c994e5f0", - "pers": null, - "add": [ - null, - null - ], - "expected": "3fb637085ab75f4e95655faae95885166a5fbb423bb03dbf0543be063bcd48799c4f05d4e522634d9275fe02e1edd920e26d9accd43709cb0d8f6e50aa54a5f3bdd618be23cf73ef736ed0ef7524b0d14d5bef8c8aec1cf1ed3e1c38a808b35e61a44078127c7cb3a8fd7addfa50fcf3ff3bc6d6bc355d5436fe9b71eb44f7fd" - }, - { - "name": "0 with additional data", - "entropy": "d3cc4d1acf3dde0c4bd2290d262337042dc632948223d3a2eaab87da44295fbd", - "nonce": "0109b0e729f457328aa18569a9224921", - "pers": null, - "add": [ - "3c311848183c9a212a26f27f8c6647e40375e466a0857cc39c4e47575d53f1f6", - "fcb9abd19ccfbccef88c9c39bfb3dd7b1c12266c9808992e305bc3cff566e4e4" - ], - "expected": "9c7b758b212cd0fcecd5daa489821712e3cdea4467b560ef5ddc24ab47749a1f1ffdbbb118f4e62fcfca3371b8fbfc5b0646b83e06bfbbab5fac30ea09ea2bc76f1ea568c9be0444b2cc90517b20ca825f2d0eccd88e7175538b85d90ab390183ca6395535d34473af6b5a5b88f5a59ee7561573337ea819da0dcc3573a22974" - }, - { - "name": "1 with additional data", - "entropy": "f97a3cfd91faa046b9e61b9493d436c4931f604b22f1081521b3419151e8ff06", - "nonce": "11f3a7d43595357d58120bd1e2dd8aed", - "pers": null, - "add": [ - "517289afe444a0fe5ed1a41dbbb5eb17150079bdd31e29cf2ff30034d8268e3b", - "88028d29ef80b4e6f0fe12f91d7449fe75062682e89c571440c0c9b52c42a6e0" - ], - "expected": "c6871cff0824fe55ea7689a52229886730450e5d362da5bf590dcf9acd67fed4cb32107df5d03969a66b1f6494fdf5d63d5b4d0d34ea7399a07d0116126d0d518c7c55ba46e12f62efc8fe28a51c9d428e6d371d7397ab319fc73ded4722e5b4f30004032a6128df5e7497ecf82ca7b0a50e867ef6728a4f509a8c859087039c" - }, - { - "name": "2 with additional data", - "entropy": "0f2f23d64f481cabec7abb01db3aabf125c3173a044b9bf26844300b69dcac8b", - "nonce": "9a5ae13232b43aa19cfe8d7958b4b590", - "pers": null, - "add": [ - "ec4c7a62acab73385f567da10e892ff395a0929f959231a5628188ce0c26e818", - "6b97b8c6b6bb8935e676c410c17caa8042aa3145f856d0a32b641e4ae5298648" - ], - "expected": "7480a361058bd9afa3db82c9d7586e42269102013f6ec5c269b6d05f17987847748684766b44918fd4b65e1648622fc0e0954178b0279dfc9fa99b66c6f53e51c4860131e9e0644287a4afe4ca8e480417e070db68008a97c3397e4b320b5d1a1d7e1d18a95cfedd7d1e74997052bf649d132deb9ec53aae7dafdab55e6dae93" - }, - { - "name": "3 with additional data", - "entropy": "53c56660c78481be9c63284e005fcc14fbc7fb27732c9bf1366d01a426765a31", - "nonce": "dc7a14d0eb5b0b3534e717a0b3c64614", - "pers": null, - "add": [ - "3aa848706ecb877f5bedf4ffc332d57c22e08747a47e75cff6f0fd1316861c95", - "9a401afa739b8f752fddacd291e0b854f5eff4a55b515e20cb319852189d3722" - ], - "expected": "5c0eb420e0bf41ce9323e815310e4e8303cd677a8a8b023f31f0d79f0ca15aeb636099a369fd074d69889865eac1b72ab3cbfebdb8cf460b00072802e2ec648b1349a5303be4ccaadd729f1a9ea17482fd026aaeb93f1602bc1404b9853adde40d6c34b844cf148bc088941ecfc1642c8c0b9778e45f3b07e06e21ee2c9e0300" - }, - { - "name": "4 with additional data", - "entropy": "f63c804404902db334c54bb298fc271a21d7acd9f770278e089775710bf4fdd7", - "nonce": "3e45009ea9cb2a36ba1aa4bf39178200", - "pers": null, - "add": [ - "d165a13dc8cc43f3f0952c3f5d3de4136954d983683d4a3e6d2dc4c89bf23423", - "75106bc86d0336df85097f6af8e80e2da59046a03fa65b06706b8bbc7ffc6785" - ], - "expected": "6363139bba32c22a0f5cd23ca6d437b5669b7d432f786b8af445471bee0b2d24c9d5f2f93717cbe00d1f010cc3b9c515fc9f7336d53d4d26ba5c0d76a90186663c8582eb739c7b6578a3328bf68dc2cec2cd89b3a90201f6993adcc854df0f5c6974d0f5570765a15fe03dbce28942dd2fd16ba2027e68abac83926969349af8" - }, - { - "name": "5 with additional data", - "entropy": "2aaca9147da66c176615726b69e3e851cc3537f5f279fe7344233d8e44cfc99d", - "nonce": "4e171f080af9a6081bee9f183ac9e340", - "pers": null, - "add": [ - "d75a2a6eb66c3833e50f5ec3d2e434cf791448d618026d0c360806d120ded669", - "b643b74c15b37612e6577ed7ca2a4c67a78d560af9eb50a4108fca742e87b8d6" - ], - "expected": "501dcdc977f4ba856f24eaa4968b374bebb3166b280334cb510232c31ebffde10fa47b7840ef3fe3b77725c2272d3a1d4219baf23e0290c622271edcced58838cf428f0517425d2e19e0d8c89377eecfc378245f283236fafa466c914b99672ceafab369e8889a0c866d8bd639db9fb797254262c6fd44cfa9045ad6340a60ef" - }, - { - "name": "6 with additional data", - "entropy": "a2e4cd48a5cf918d6f55942d95fcb4e8465cdc4f77b7c52b6fae5b16a25ca306", - "nonce": "bef036716440db6e6d333d9d760b7ca8", - "pers": null, - "add": [ - "bfa591c7287f3f931168f95e38869441d1f9a11035ad8ea625bb61b9ea17591c", - "c00c735463bca215adc372cb892b05e939bf669583341c06d4e31d0e5b363a37" - ], - "expected": "e7d136af69926a5421d4266ee0420fd729f2a4f7c295d3c966bdfa05268180b508b8a2852d1b3a06fd2ab3e13c54005123ef319f42d0c6d3a575e6e7e1496cb28aacadbcf83740fba8f35fcee04bb2ed8a51db3d3362b01094a62fb57e33c99a432f29fce6676cffbbcc05107e794e75e44a02d5e6d9d748c5fbff00a0178d65" - }, - { - "name": "7 with additional data", - "entropy": "95a67771cba69011a79776e713145d309edae56fad5fd6d41d83eaff89df6e5e", - "nonce": "be5b5164e31ecc51ba6f7c3c5199eb33", - "pers": null, - "add": [ - "065f693b229a7c4fd373cd15b3807552dd9bf98c5485cef361949d4e7d774b53", - "9afb62406f0e812c4f156d58b19a656c904813c1b4a45a0029ae7f50731f8014" - ], - "expected": "f61b61a6e79a41183e8ed6647899d2dc85cdaf5c3abf5c7f3bf37685946dc28f4923dc842f2d4326bd6ce0d50a84cb3ba869d72a36e246910eba6512ba36cd7ed3a5437c9245b00a344308c792b668b458d3c3e16dee2fbec41867da31084d46d8ec168de2148ef64fc5b72069abf5a6ada1ead2b7146bb793ff1c9c3690fa56" - }, - { - "name": "8 with additional data", - "entropy": "a459e1815cbca4514ec8094d5ab2414a557ba6fe10e613c345338d0521e4bf90", - "nonce": "62221392e2552e76cd0d36df6e6068eb", - "pers": null, - "add": [ - "0a3642b02b23b3ef62c701a63401124022f5b896de86dab6e6c7451497aa1dcc", - "c80514865901371c45ba92d9f95d50bb7c9dd1768cb3dfbc45b968da94965c6e" - ], - "expected": "464e6977b8adaef307c9623e41c357013249c9ffd77f405f3925cebb69f151ce8fbb6a277164002aee7858fc224f6499042aa1e6322deee9a5d133c31d640e12a7487c731ba03ad866a24675badb1d79220c40be689f79c2a0be93cb4dada3e0eac4ab140cb91998b6f11953e68f2319b050c40f71c34de9905ae41b2de1c2f6" - }, - { - "name": "9 with additional data", - "entropy": "252c2cad613e002478162861880979ee4e323025eebb6fb2e0aa9f200e28e0a1", - "nonce": "d001bc9a8f2c8c242e4369df0c191989", - "pers": null, - "add": [ - "9bcfc61cb2bc000034bb3db980eb47c76fb5ecdd40553eff113368d639b947fd", - "8b0565c767c2610ee0014582e9fbecb96e173005b60e9581503a6dca5637a26e" - ], - "expected": "e96c15fe8a60692b0a7d67171e0195ff6e1c87aab844221e71700d1bbee75feea695f6a740c9760bbe0e812ecf4061d8f0955bc0195e18c4fd1516ebca50ba6a6db86881737dbab8321707675479b87611db6af2c97ea361a5484555ead454defb1a64335de964fc803d40f3a6f057893d2afc25725754f4f00abc51920743dc" - }, - { - "name": "10 with additional data", - "entropy": "8be0ca6adc8b3870c9d69d6021bc1f1d8eb9e649073d35ee6c5aa0b7e56ad8a5", - "nonce": "9d1265f7d51fdb65377f1e6edd6ae0e4", - "pers": null, - "add": [ - "da86167ac997c406bb7979f423986a84ec6614d6caa7afc10aff0699a9b2cf7f", - "e4baa3c555950b53e2bfdba480cb4c94b59381bac1e33947e0c22e838a9534cf" - ], - "expected": "64384ecc4ea6b458efc227ca697eac5510092265520c0a0d8a0ccf9ed3ca9d58074671188c6a7ad16d0b050cdc072c125d7298d3a31d9f044a9ee40da0089a84fea28cc7f05f1716db952fad29a0e779635cb7a912a959be67be2f0a4170aace2981802e2ff6467e5b46f0ffbff3b42ba5935fd553c82482ac266acf1cd247d7" - }, - { - "name": "11 with additional data", - "entropy": "d43a75b6adf26d60322284cb12ac38327792442aa8f040f60a2f331b33ac4a8f", - "nonce": "0682f8b091f811afacaacaec9b04d279", - "pers": null, - "add": [ - "7fd3b8f512940da7de5d80199d9a7b42670c04a945775a3dba869546cbb9bc65", - "2575db20bc7aafc2a90a5dabab760db851d754777bc9f05616af1858b24ff3da" - ], - "expected": "0da7a8dc73c163014bf0841913d3067806456bbca6d5de92b85534c6545467313648d71ef17c923d090dc92cff8d4d1a9a2bb63e001dc2e8ab1a597999be3d6cf70ff63fee9985801395fbd4f4990430c4259fcae4fa1fcd73dc3187ccc102d04af7c07532885e5a226fc42809c48f22eecf4f6ab996ae4fcb144786957d9f41" - }, - { - "name": "12 with additional data", - "entropy": "64352f236af5d32067a529a8fd05ba00a338c9de306371a0b00c36e610a48d18", - "nonce": "df99ed2c7608c870624b962a5dc68acd", - "pers": null, - "add": [ - "da416335e7aaf60cf3d06fb438735ce796aad09034f8969c8f8c3f81e32fef24", - "a28c07c21a2297311adf172c19e83ca0a87731bdffb80548978d2d1cd82cf8a3" - ], - "expected": "132b9f25868729e3853d3c51f99a3b5fae6d4204bea70890daf62e042b776a526c8fb831b80a6d5d3f153237df1fd39b6fd9137963f5516d9cdd4e3f9195c46e9972c15d3edc6606e3368bde1594977fb88d0ca6e6f5f3d057ccadc7d7dab77dfc42658a1e972aa446b20d418286386a52dfc1c714d2ac548713268b0b709729" - }, - { - "name": "13 with additional data", - "entropy": "282f4d2e05a2cd30e9087f5633089389449f04bac11df718c90bb351cd3653a5", - "nonce": "90a7daf3c0de9ea286081efc4a684dfb", - "pers": null, - "add": [ - "2630b4ccc7271cc379cb580b0aaede3d3aa8c1c7ba002cf791f0752c3d739007", - "c31d69de499f1017be44e3d4fa77ecebc6a9b9934749fcf136f267b29115d2cc" - ], - "expected": "c899094520e0197c37b91dd50778e20a5b950decfb308d39f1db709447ae48f6101d9abe63a783fbb830eec1d359a5f61a2013728966d349213ee96382614aa4135058a967627183810c6622a2158cababe3b8ab99169c89e362108bf5955b4ffc47440f87e4bad0d36bc738e737e072e64d8842e7619f1be0af1141f05afe2d" - }, - { - "name": "14 with additional data", - "entropy": "13c752b9e745ce77bbc7c0dbda982313d3fe66f903e83ebd8dbe4ff0c11380e9", - "nonce": "f1a533095d6174164bd7c82532464ae7", - "pers": null, - "add": [ - "4f53db89b9ba7fc00767bc751fb8f3c103fe0f76acd6d5c7891ab15b2b7cf67c", - "582c2a7d34679088cca6bd28723c99aac07db46c332dc0153d1673256903b446" - ], - "expected": "6311f4c0c4cd1f86bd48349abb9eb930d4f63df5e5f7217d1d1b91a71d8a6938b0ad2b3e897bd7e3d8703db125fab30e03464fad41e5ddf5bf9aeeb5161b244468cfb26a9d956931a5412c97d64188b0da1bd907819c686f39af82e91cfeef0cbffb5d1e229e383bed26d06412988640706815a6e820796876f416653e464961" - } -] diff --git a/node_modules/htmlescape/.npmignore b/node_modules/htmlescape/.npmignore deleted file mode 100644 index e2a6af8..0000000 --- a/node_modules/htmlescape/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/.gitignore -/CHANGELOG.md -/LICENSE -/test diff --git a/node_modules/htmlescape/CHANGELOG.md b/node_modules/htmlescape/CHANGELOG.md deleted file mode 100644 index d03d620..0000000 --- a/node_modules/htmlescape/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -1.0.0 / 2014-09-29 -================== - - * No more API changes - -0.0.1 / 2014-09-28 -================== - - * Initial release diff --git a/node_modules/htmlescape/LICENSE b/node_modules/htmlescape/LICENSE deleted file mode 100644 index bdff13e..0000000 --- a/node_modules/htmlescape/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Andres Suarez - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/htmlescape/README.md b/node_modules/htmlescape/README.md deleted file mode 100644 index 870ba16..0000000 --- a/node_modules/htmlescape/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# htmlescape - -Properly escape JSON for usage as an object literal inside of a ` -``` diff --git a/node_modules/htmlescape/htmlescape.js b/node_modules/htmlescape/htmlescape.js deleted file mode 100644 index 5f0ce6c..0000000 --- a/node_modules/htmlescape/htmlescape.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Properly escape JSON for usage as an object literal inside of a ` - - -

Open in Console

- - diff --git a/node_modules/pact-lang-api/load.js b/node_modules/pact-lang-api/load.js deleted file mode 100755 index 09862a9..0000000 --- a/node_modules/pact-lang-api/load.js +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env node -var fs = require('fs'); -var nacl = require('tweetnacl'); -var pact = require('./pact-lang-api.js'); - -var args = {}; -var key = undefined; -process.argv.slice(2).forEach(function (v,i,a) { - if (key) { - args[key] = v; key = undefined; - } else { - if (v[0]='-') { key = v.slice(1); } - } -}); -var usage = "\nload.js: create JSON for loading Pact code \n\n\ -Arguments: [-cf codefile] [-c code] -n nonce -s sk -p pk [-df datafile] [-d data] [-t to -f from]\n\n\ - codefile filepath containing pact code to load \n\ - code pact code to execute \n\ - datafile filepath containing JSON data to accompany pact code load \n\ - data JSON string of data to accompany pact code load \n\ - nonce nonce value for data payload \n\ - sk secret key \n\ - pk public key \n\ - to Private message sender entity \n\ - from Private message recipient JSON list \n\ -"; - -function die(msg) { - console.error("ERROR: " + msg); - process.exit(1); -} -function dieu(msg) { die(msg + "\n\n" + usage); } - -function read(fp,cb) { - fs.readFile(fp,'utf8',function(err,data) { - if (err) { die(err); } - cb(data); - }); -} -function go(code,data) { - var kp = { publicKey: args.p, secretKey: args.s}; - var addy; - if (args.t && args.f) { - addy = { "from": args.f, "to": JSON.parse(args.t) }; - } - var msg = pact.simple.exec.createCommand(kp,args.n,code,JSON.parse(data),addy); - console.log(JSON.stringify(msg)); -} - -if (!args.cf && !args.c) { dieu("Missing code or codefile argument"); } -if (!args.n) { dieu("Missing nonce argument"); } -if (!args.s) { dieu("Missing sk argument"); } -if (!args.p) { dieu("Missing pk argument"); } -if ((args.t && !args.f) || (!args.t && args.f)) { dieu("Must provide both TO and FROM when formatting private payload"); } - -function doData(code) { - if (args.df) { - read(args.df,function(data) { - go(code,data); - }); - } else { - if (args.d) { - go(code,args.d); - } else { - go(code,"{}"); - } - } -} - -if (args.cf) { - read(args.cf,doData); -} else { - doData(args.c); -} diff --git a/node_modules/pact-lang-api/package.json b/node_modules/pact-lang-api/package.json deleted file mode 100644 index 352c211..0000000 --- a/node_modules/pact-lang-api/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "pact-lang-api", - "_id": "pact-lang-api@3.2.0", - "_inBundle": false, - "_integrity": "sha512-6UlpMT+Bm9gdBpfrWMHkWkP71KxkBAJE7ukfd81bb5jdxrzm7tR7LfhpInN/+/7aMFSdvUX8hJNg8sEdHd33yQ==", - "_location": "/pact-lang-api", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "pact-lang-api", - "name": "pact-lang-api", - "escapedName": "pact-lang-api", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/pact-lang-api/-/pact-lang-api-3.2.0.tgz", - "_shasum": "68571a3dc00b2d4dec36a34d5f830713a964697a", - "_spec": "pact-lang-api", - "_where": "/Users/heekyun/Kadena/transfer", - "author": { - "name": "Will Martino" - }, - "bundleDependencies": false, - "dependencies": { - "base64-url": "^2.2.1", - "blakejs": "^1.0.1", - "blue-tape": "^1.0.0", - "browserify": "^16.2.3", - "node-fetch": "^2.6.0", - "tape": "^4.11.0", - "tweetnacl": "^0.14.5" - }, - "deprecated": false, - "description": "hashing and signing functions needed to interact with Pact 3.0 and greater", - "license": "BSD3", - "main": "pact-lang-api.js", - "name": "pact-lang-api", - "repository": { - "type": "git", - "url": "github.com/kadena-io/pact" - }, - "scripts": { - "build": "browserify pact-lang-api.js -o pact-lang-api.min.js && browserify pact-lang-api-global.js -o pact-lang-api-global.min.js", - "start:pact": "rm -Rf ./log && mkdir log && pact --serve server.conf", - "test": "tape ./test/*.test.js" - }, - "version": "3.2.0" -} diff --git a/node_modules/pact-lang-api/pact-lang-api-global.js b/node_modules/pact-lang-api/pact-lang-api-global.js deleted file mode 100644 index c68c30a..0000000 --- a/node_modules/pact-lang-api/pact-lang-api-global.js +++ /dev/null @@ -1,3 +0,0 @@ -var Pact = window.Pact || {}; -Pact = require('./pact-lang-api.js'); -window.Pact = Pact; diff --git a/node_modules/pact-lang-api/pact-lang-api-global.min.js b/node_modules/pact-lang-api/pact-lang-api-global.min.js deleted file mode 100644 index 453aca8..0000000 --- a/node_modules/pact-lang-api/pact-lang-api-global.min.js +++ /dev/null @@ -1,5720 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk( - uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) - )) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} - -},{}],2:[function(require,module,exports){ -(function (Buffer){ -'use strict' - -module.exports = { - unescape: unescape, - escape: escape, - encode: encode, - decode: decode -} - -function unescape (str) { - return (str + '==='.slice((str.length + 3) % 4)) - .replace(/-/g, '+') - .replace(/_/g, '/') -} - -function escape (str) { - return str.replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=/g, '') -} - -function encode (str, encoding) { - return escape(Buffer.from(str, encoding || 'utf8').toString('base64')) -} - -function decode (str, encoding) { - return Buffer.from(unescape(str), 'base64').toString(encoding || 'utf8') -} - -}).call(this,require("buffer").Buffer) -},{"buffer":8}],3:[function(require,module,exports){ -// Blake2B in pure Javascript -// Adapted from the reference implementation in RFC7693 -// Ported to Javascript by DC - https://github.com/dcposch - -var util = require('./util') - -// 64-bit unsigned addition -// Sets v[a,a+1] += v[b,b+1] -// v should be a Uint32Array -function ADD64AA (v, a, b) { - var o0 = v[a] + v[b] - var o1 = v[a + 1] + v[b + 1] - if (o0 >= 0x100000000) { - o1++ - } - v[a] = o0 - v[a + 1] = o1 -} - -// 64-bit unsigned addition -// Sets v[a,a+1] += b -// b0 is the low 32 bits of b, b1 represents the high 32 bits -function ADD64AC (v, a, b0, b1) { - var o0 = v[a] + b0 - if (b0 < 0) { - o0 += 0x100000000 - } - var o1 = v[a + 1] + b1 - if (o0 >= 0x100000000) { - o1++ - } - v[a] = o0 - v[a + 1] = o1 -} - -// Little-endian byte access -function B2B_GET32 (arr, i) { - return (arr[i] ^ - (arr[i + 1] << 8) ^ - (arr[i + 2] << 16) ^ - (arr[i + 3] << 24)) -} - -// G Mixing function -// The ROTRs are inlined for speed -function B2B_G (a, b, c, d, ix, iy) { - var x0 = m[ix] - var x1 = m[ix + 1] - var y0 = m[iy] - var y1 = m[iy + 1] - - ADD64AA(v, a, b) // v[a,a+1] += v[b,b+1] ... in JS we must store a uint64 as two uint32s - ADD64AC(v, a, x0, x1) // v[a, a+1] += x ... x0 is the low 32 bits of x, x1 is the high 32 bits - - // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated to the right by 32 bits - var xor0 = v[d] ^ v[a] - var xor1 = v[d + 1] ^ v[a + 1] - v[d] = xor1 - v[d + 1] = xor0 - - ADD64AA(v, c, d) - - // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 24 bits - xor0 = v[b] ^ v[c] - xor1 = v[b + 1] ^ v[c + 1] - v[b] = (xor0 >>> 24) ^ (xor1 << 8) - v[b + 1] = (xor1 >>> 24) ^ (xor0 << 8) - - ADD64AA(v, a, b) - ADD64AC(v, a, y0, y1) - - // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated right by 16 bits - xor0 = v[d] ^ v[a] - xor1 = v[d + 1] ^ v[a + 1] - v[d] = (xor0 >>> 16) ^ (xor1 << 16) - v[d + 1] = (xor1 >>> 16) ^ (xor0 << 16) - - ADD64AA(v, c, d) - - // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 63 bits - xor0 = v[b] ^ v[c] - xor1 = v[b + 1] ^ v[c + 1] - v[b] = (xor1 >>> 31) ^ (xor0 << 1) - v[b + 1] = (xor0 >>> 31) ^ (xor1 << 1) -} - -// Initialization Vector -var BLAKE2B_IV32 = new Uint32Array([ - 0xF3BCC908, 0x6A09E667, 0x84CAA73B, 0xBB67AE85, - 0xFE94F82B, 0x3C6EF372, 0x5F1D36F1, 0xA54FF53A, - 0xADE682D1, 0x510E527F, 0x2B3E6C1F, 0x9B05688C, - 0xFB41BD6B, 0x1F83D9AB, 0x137E2179, 0x5BE0CD19 -]) - -var SIGMA8 = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3, - 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4, - 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8, - 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13, - 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9, - 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11, - 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10, - 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5, - 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 -] - -// These are offsets into a uint64 buffer. -// Multiply them all by 2 to make them offsets into a uint32 buffer, -// because this is Javascript and we don't have uint64s -var SIGMA82 = new Uint8Array(SIGMA8.map(function (x) { return x * 2 })) - -// Compression function. 'last' flag indicates last block. -// Note we're representing 16 uint64s as 32 uint32s -var v = new Uint32Array(32) -var m = new Uint32Array(32) -function blake2bCompress (ctx, last) { - var i = 0 - - // init work variables - for (i = 0; i < 16; i++) { - v[i] = ctx.h[i] - v[i + 16] = BLAKE2B_IV32[i] - } - - // low 64 bits of offset - v[24] = v[24] ^ ctx.t - v[25] = v[25] ^ (ctx.t / 0x100000000) - // high 64 bits not supported, offset may not be higher than 2**53-1 - - // last block flag set ? - if (last) { - v[28] = ~v[28] - v[29] = ~v[29] - } - - // get little-endian words - for (i = 0; i < 32; i++) { - m[i] = B2B_GET32(ctx.b, 4 * i) - } - - // twelve rounds of mixing - // uncomment the DebugPrint calls to log the computation - // and match the RFC sample documentation - // util.debugPrint(' m[16]', m, 64) - for (i = 0; i < 12; i++) { - // util.debugPrint(' (i=' + (i < 10 ? ' ' : '') + i + ') v[16]', v, 64) - B2B_G(0, 8, 16, 24, SIGMA82[i * 16 + 0], SIGMA82[i * 16 + 1]) - B2B_G(2, 10, 18, 26, SIGMA82[i * 16 + 2], SIGMA82[i * 16 + 3]) - B2B_G(4, 12, 20, 28, SIGMA82[i * 16 + 4], SIGMA82[i * 16 + 5]) - B2B_G(6, 14, 22, 30, SIGMA82[i * 16 + 6], SIGMA82[i * 16 + 7]) - B2B_G(0, 10, 20, 30, SIGMA82[i * 16 + 8], SIGMA82[i * 16 + 9]) - B2B_G(2, 12, 22, 24, SIGMA82[i * 16 + 10], SIGMA82[i * 16 + 11]) - B2B_G(4, 14, 16, 26, SIGMA82[i * 16 + 12], SIGMA82[i * 16 + 13]) - B2B_G(6, 8, 18, 28, SIGMA82[i * 16 + 14], SIGMA82[i * 16 + 15]) - } - // util.debugPrint(' (i=12) v[16]', v, 64) - - for (i = 0; i < 16; i++) { - ctx.h[i] = ctx.h[i] ^ v[i] ^ v[i + 16] - } - // util.debugPrint('h[8]', ctx.h, 64) -} - -// Creates a BLAKE2b hashing context -// Requires an output length between 1 and 64 bytes -// Takes an optional Uint8Array key -function blake2bInit (outlen, key) { - if (outlen === 0 || outlen > 64) { - throw new Error('Illegal output length, expected 0 < length <= 64') - } - if (key && key.length > 64) { - throw new Error('Illegal key, expected Uint8Array with 0 < length <= 64') - } - - // state, 'param block' - var ctx = { - b: new Uint8Array(128), - h: new Uint32Array(16), - t: 0, // input count - c: 0, // pointer within buffer - outlen: outlen // output length in bytes - } - - // initialize hash state - for (var i = 0; i < 16; i++) { - ctx.h[i] = BLAKE2B_IV32[i] - } - var keylen = key ? key.length : 0 - ctx.h[0] ^= 0x01010000 ^ (keylen << 8) ^ outlen - - // key the hash, if applicable - if (key) { - blake2bUpdate(ctx, key) - // at the end - ctx.c = 128 - } - - return ctx -} - -// Updates a BLAKE2b streaming hash -// Requires hash context and Uint8Array (byte array) -function blake2bUpdate (ctx, input) { - for (var i = 0; i < input.length; i++) { - if (ctx.c === 128) { // buffer full ? - ctx.t += ctx.c // add counters - blake2bCompress(ctx, false) // compress (not last) - ctx.c = 0 // counter to zero - } - ctx.b[ctx.c++] = input[i] - } -} - -// Completes a BLAKE2b streaming hash -// Returns a Uint8Array containing the message digest -function blake2bFinal (ctx) { - ctx.t += ctx.c // mark last block offset - - while (ctx.c < 128) { // fill up with zeros - ctx.b[ctx.c++] = 0 - } - blake2bCompress(ctx, true) // final block flag = 1 - - // little endian convert and store - var out = new Uint8Array(ctx.outlen) - for (var i = 0; i < ctx.outlen; i++) { - out[i] = ctx.h[i >> 2] >> (8 * (i & 3)) - } - return out -} - -// Computes the BLAKE2B hash of a string or byte array, and returns a Uint8Array -// -// Returns a n-byte Uint8Array -// -// Parameters: -// - input - the input bytes, as a string, Buffer or Uint8Array -// - key - optional key Uint8Array, up to 64 bytes -// - outlen - optional output length in bytes, default 64 -function blake2b (input, key, outlen) { - // preprocess inputs - outlen = outlen || 64 - input = util.normalizeInput(input) - - // do the math - var ctx = blake2bInit(outlen, key) - blake2bUpdate(ctx, input) - return blake2bFinal(ctx) -} - -// Computes the BLAKE2B hash of a string or byte array -// -// Returns an n-byte hash in hex, all lowercase -// -// Parameters: -// - input - the input bytes, as a string, Buffer, or Uint8Array -// - key - optional key Uint8Array, up to 64 bytes -// - outlen - optional output length in bytes, default 64 -function blake2bHex (input, key, outlen) { - var output = blake2b(input, key, outlen) - return util.toHex(output) -} - -module.exports = { - blake2b: blake2b, - blake2bHex: blake2bHex, - blake2bInit: blake2bInit, - blake2bUpdate: blake2bUpdate, - blake2bFinal: blake2bFinal -} - -},{"./util":6}],4:[function(require,module,exports){ -// BLAKE2s hash function in pure Javascript -// Adapted from the reference implementation in RFC7693 -// Ported to Javascript by DC - https://github.com/dcposch - -var util = require('./util') - -// Little-endian byte access. -// Expects a Uint8Array and an index -// Returns the little-endian uint32 at v[i..i+3] -function B2S_GET32 (v, i) { - return v[i] ^ (v[i + 1] << 8) ^ (v[i + 2] << 16) ^ (v[i + 3] << 24) -} - -// Mixing function G. -function B2S_G (a, b, c, d, x, y) { - v[a] = v[a] + v[b] + x - v[d] = ROTR32(v[d] ^ v[a], 16) - v[c] = v[c] + v[d] - v[b] = ROTR32(v[b] ^ v[c], 12) - v[a] = v[a] + v[b] + y - v[d] = ROTR32(v[d] ^ v[a], 8) - v[c] = v[c] + v[d] - v[b] = ROTR32(v[b] ^ v[c], 7) -} - -// 32-bit right rotation -// x should be a uint32 -// y must be between 1 and 31, inclusive -function ROTR32 (x, y) { - return (x >>> y) ^ (x << (32 - y)) -} - -// Initialization Vector. -var BLAKE2S_IV = new Uint32Array([ - 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, - 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19]) - -var SIGMA = new Uint8Array([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3, - 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4, - 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8, - 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13, - 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9, - 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11, - 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10, - 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5, - 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0]) - -// Compression function. "last" flag indicates last block -var v = new Uint32Array(16) -var m = new Uint32Array(16) -function blake2sCompress (ctx, last) { - var i = 0 - for (i = 0; i < 8; i++) { // init work variables - v[i] = ctx.h[i] - v[i + 8] = BLAKE2S_IV[i] - } - - v[12] ^= ctx.t // low 32 bits of offset - v[13] ^= (ctx.t / 0x100000000) // high 32 bits - if (last) { // last block flag set ? - v[14] = ~v[14] - } - - for (i = 0; i < 16; i++) { // get little-endian words - m[i] = B2S_GET32(ctx.b, 4 * i) - } - - // ten rounds of mixing - // uncomment the DebugPrint calls to log the computation - // and match the RFC sample documentation - // util.debugPrint(' m[16]', m, 32) - for (i = 0; i < 10; i++) { - // util.debugPrint(' (i=' + i + ') v[16]', v, 32) - B2S_G(0, 4, 8, 12, m[SIGMA[i * 16 + 0]], m[SIGMA[i * 16 + 1]]) - B2S_G(1, 5, 9, 13, m[SIGMA[i * 16 + 2]], m[SIGMA[i * 16 + 3]]) - B2S_G(2, 6, 10, 14, m[SIGMA[i * 16 + 4]], m[SIGMA[i * 16 + 5]]) - B2S_G(3, 7, 11, 15, m[SIGMA[i * 16 + 6]], m[SIGMA[i * 16 + 7]]) - B2S_G(0, 5, 10, 15, m[SIGMA[i * 16 + 8]], m[SIGMA[i * 16 + 9]]) - B2S_G(1, 6, 11, 12, m[SIGMA[i * 16 + 10]], m[SIGMA[i * 16 + 11]]) - B2S_G(2, 7, 8, 13, m[SIGMA[i * 16 + 12]], m[SIGMA[i * 16 + 13]]) - B2S_G(3, 4, 9, 14, m[SIGMA[i * 16 + 14]], m[SIGMA[i * 16 + 15]]) - } - // util.debugPrint(' (i=10) v[16]', v, 32) - - for (i = 0; i < 8; i++) { - ctx.h[i] ^= v[i] ^ v[i + 8] - } - // util.debugPrint('h[8]', ctx.h, 32) -} - -// Creates a BLAKE2s hashing context -// Requires an output length between 1 and 32 bytes -// Takes an optional Uint8Array key -function blake2sInit (outlen, key) { - if (!(outlen > 0 && outlen <= 32)) { - throw new Error('Incorrect output length, should be in [1, 32]') - } - var keylen = key ? key.length : 0 - if (key && !(keylen > 0 && keylen <= 32)) { - throw new Error('Incorrect key length, should be in [1, 32]') - } - - var ctx = { - h: new Uint32Array(BLAKE2S_IV), // hash state - b: new Uint32Array(64), // input block - c: 0, // pointer within block - t: 0, // input count - outlen: outlen // output length in bytes - } - ctx.h[0] ^= 0x01010000 ^ (keylen << 8) ^ outlen - - if (keylen > 0) { - blake2sUpdate(ctx, key) - ctx.c = 64 // at the end - } - - return ctx -} - -// Updates a BLAKE2s streaming hash -// Requires hash context and Uint8Array (byte array) -function blake2sUpdate (ctx, input) { - for (var i = 0; i < input.length; i++) { - if (ctx.c === 64) { // buffer full ? - ctx.t += ctx.c // add counters - blake2sCompress(ctx, false) // compress (not last) - ctx.c = 0 // counter to zero - } - ctx.b[ctx.c++] = input[i] - } -} - -// Completes a BLAKE2s streaming hash -// Returns a Uint8Array containing the message digest -function blake2sFinal (ctx) { - ctx.t += ctx.c // mark last block offset - while (ctx.c < 64) { // fill up with zeros - ctx.b[ctx.c++] = 0 - } - blake2sCompress(ctx, true) // final block flag = 1 - - // little endian convert and store - var out = new Uint8Array(ctx.outlen) - for (var i = 0; i < ctx.outlen; i++) { - out[i] = (ctx.h[i >> 2] >> (8 * (i & 3))) & 0xFF - } - return out -} - -// Computes the BLAKE2S hash of a string or byte array, and returns a Uint8Array -// -// Returns a n-byte Uint8Array -// -// Parameters: -// - input - the input bytes, as a string, Buffer, or Uint8Array -// - key - optional key Uint8Array, up to 32 bytes -// - outlen - optional output length in bytes, default 64 -function blake2s (input, key, outlen) { - // preprocess inputs - outlen = outlen || 32 - input = util.normalizeInput(input) - - // do the math - var ctx = blake2sInit(outlen, key) - blake2sUpdate(ctx, input) - return blake2sFinal(ctx) -} - -// Computes the BLAKE2S hash of a string or byte array -// -// Returns an n-byte hash in hex, all lowercase -// -// Parameters: -// - input - the input bytes, as a string, Buffer, or Uint8Array -// - key - optional key Uint8Array, up to 32 bytes -// - outlen - optional output length in bytes, default 64 -function blake2sHex (input, key, outlen) { - var output = blake2s(input, key, outlen) - return util.toHex(output) -} - -module.exports = { - blake2s: blake2s, - blake2sHex: blake2sHex, - blake2sInit: blake2sInit, - blake2sUpdate: blake2sUpdate, - blake2sFinal: blake2sFinal -} - -},{"./util":6}],5:[function(require,module,exports){ -var b2b = require('./blake2b') -var b2s = require('./blake2s') - -module.exports = { - blake2b: b2b.blake2b, - blake2bHex: b2b.blake2bHex, - blake2bInit: b2b.blake2bInit, - blake2bUpdate: b2b.blake2bUpdate, - blake2bFinal: b2b.blake2bFinal, - blake2s: b2s.blake2s, - blake2sHex: b2s.blake2sHex, - blake2sInit: b2s.blake2sInit, - blake2sUpdate: b2s.blake2sUpdate, - blake2sFinal: b2s.blake2sFinal -} - -},{"./blake2b":3,"./blake2s":4}],6:[function(require,module,exports){ -(function (Buffer){ -var ERROR_MSG_INPUT = 'Input must be an string, Buffer or Uint8Array' - -// For convenience, let people hash a string, not just a Uint8Array -function normalizeInput (input) { - var ret - if (input instanceof Uint8Array) { - ret = input - } else if (input instanceof Buffer) { - ret = new Uint8Array(input) - } else if (typeof (input) === 'string') { - ret = new Uint8Array(Buffer.from(input, 'utf8')) - } else { - throw new Error(ERROR_MSG_INPUT) - } - return ret -} - -// Converts a Uint8Array to a hexadecimal string -// For example, toHex([255, 0, 255]) returns "ff00ff" -function toHex (bytes) { - return Array.prototype.map.call(bytes, function (n) { - return (n < 16 ? '0' : '') + n.toString(16) - }).join('') -} - -// Converts any value in [0...2^32-1] to an 8-character hex string -function uint32ToHex (val) { - return (0x100000000 + val).toString(16).substring(1) -} - -// For debugging: prints out hash state in the same format as the RFC -// sample computation exactly, so that you can diff -function debugPrint (label, arr, size) { - var msg = '\n' + label + ' = ' - for (var i = 0; i < arr.length; i += 2) { - if (size === 32) { - msg += uint32ToHex(arr[i]).toUpperCase() - msg += ' ' - msg += uint32ToHex(arr[i + 1]).toUpperCase() - } else if (size === 64) { - msg += uint32ToHex(arr[i + 1]).toUpperCase() - msg += uint32ToHex(arr[i]).toUpperCase() - } else throw new Error('Invalid size ' + size) - if (i % 6 === 4) { - msg += '\n' + new Array(label.length + 4).join(' ') - } else if (i < arr.length - 2) { - msg += ' ' - } - } - console.log(msg) -} - -// For performance testing: generates N bytes of input, hashes M times -// Measures and prints MB/second hash performance each time -function testSpeed (hashFn, N, M) { - var startMs = new Date().getTime() - - var input = new Uint8Array(N) - for (var i = 0; i < N; i++) { - input[i] = i % 256 - } - var genMs = new Date().getTime() - console.log('Generated random input in ' + (genMs - startMs) + 'ms') - startMs = genMs - - for (i = 0; i < M; i++) { - var hashHex = hashFn(input) - var hashMs = new Date().getTime() - var ms = hashMs - startMs - startMs = hashMs - console.log('Hashed in ' + ms + 'ms: ' + hashHex.substring(0, 20) + '...') - console.log(Math.round(N / (1 << 20) / (ms / 1000) * 100) / 100 + ' MB PER SECOND') - } -} - -module.exports = { - normalizeInput: normalizeInput, - toHex: toHex, - debugPrint: debugPrint, - testSpeed: testSpeed -} - -}).call(this,require("buffer").Buffer) -},{"buffer":8}],7:[function(require,module,exports){ - -},{}],8:[function(require,module,exports){ -(function (Buffer){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var customInspectSymbol = - (typeof Symbol === 'function' && typeof Symbol.for === 'function') - ? Symbol.for('nodejs.util.inspect.custom') - : null - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -var K_MAX_LENGTH = 0x7fffffff -exports.kMaxLength = K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - var arr = new Uint8Array(1) - var proto = { foo: function () { return 42 } } - Object.setPrototypeOf(proto, Uint8Array.prototype) - Object.setPrototypeOf(arr, proto) - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - var buf = new Uint8Array(length) - Object.setPrototypeOf(buf, Buffer.prototype) - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) - } - return allocUnsafe(arg) - } - return from(arg, encodingOrOffset, length) -} - -// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 -if (typeof Symbol !== 'undefined' && Symbol.species != null && - Buffer[Symbol.species] === Buffer) { - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true, - enumerable: false, - writable: false - }) -} - -Buffer.poolSize = 8192 // not used by this implementation - -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - if (ArrayBuffer.isView(value)) { - return fromArrayLike(value) - } - - if (value == null) { - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } - - var valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) - } - - var b = fromObject(value) - if (b) return b - - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from( - value[Symbol.toPrimitive]('string'), encodingOrOffset, length - ) - } - - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} - -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) -Object.setPrototypeOf(Buffer, Uint8Array) - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} - -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) - } - return createBuffer(size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} - -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - var length = byteLength(string, encoding) | 0 - var buf = createBuffer(length) - - var actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - var buf = createBuffer(length) - for (var i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - var buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } - - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(buf, Buffer.prototype) - - return buf -} - -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - var buf = createBuffer(len) - - if (buf.length === 0) { - return buf - } - - obj.copy(buf, 0, 0, len) - return buf - } - - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) - } - return fromArrayLike(obj) - } - - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} - -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} - -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (isInstance(buf, Uint8Array)) { - buf = Buffer.from(buf) - } - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) - } - - var len = string.length - var mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} -if (customInspectSymbol) { - Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - var strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += hexSliceLookupTable[buf[i]] - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(newBuf, Buffer.prototype) - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (var i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code - } - } - } else if (typeof val === 'number') { - val = val & 255 - } else if (typeof val === 'boolean') { - val = Number(val) - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - var len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') - } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} - -// Create lookup table for `toString('hex')` -// See: https://github.com/feross/buffer/issues/219 -var hexSliceLookupTable = (function () { - var alphabet = '0123456789abcdef' - var table = new Array(256) - for (var i = 0; i < 16; ++i) { - var i16 = i * 16 - for (var j = 0; j < 16; ++j) { - table[i16 + j] = alphabet[i] + alphabet[j] - } - } - return table -})() - -}).call(this,require("buffer").Buffer) -},{"base64-js":1,"buffer":8,"ieee754":9}],9:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],10:[function(require,module,exports){ -(function (global){ -"use strict"; - -// ref: https://github.com/tc39/proposal-global -var getGlobal = function () { - // the only reliable means to get the global object is - // `Function('return this')()` - // However, this causes CSP violations in Chrome apps. - if (typeof self !== 'undefined') { return self; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - throw new Error('unable to locate global object'); -} - -var global = getGlobal(); - -module.exports = exports = global.fetch; - -// Needed for TypeScript and Webpack. -exports.default = global.fetch.bind(global); - -exports.Headers = global.Headers; -exports.Request = global.Request; -exports.Response = global.Response; -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],11:[function(require,module,exports){ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function ts64(x, i, h, l) { - x[i] = (h >> 24) & 0xff; - x[i+1] = (h >> 16) & 0xff; - x[i+2] = (h >> 8) & 0xff; - x[i+3] = h & 0xff; - x[i+4] = (l >> 24) & 0xff; - x[i+5] = (l >> 16) & 0xff; - x[i+6] = (l >> 8) & 0xff; - x[i+7] = l & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core_salsa20(o, p, k, c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - x0 = x0 + j0 | 0; - x1 = x1 + j1 | 0; - x2 = x2 + j2 | 0; - x3 = x3 + j3 | 0; - x4 = x4 + j4 | 0; - x5 = x5 + j5 | 0; - x6 = x6 + j6 | 0; - x7 = x7 + j7 | 0; - x8 = x8 + j8 | 0; - x9 = x9 + j9 | 0; - x10 = x10 + j10 | 0; - x11 = x11 + j11 | 0; - x12 = x12 + j12 | 0; - x13 = x13 + j13 | 0; - x14 = x14 + j14 | 0; - x15 = x15 + j15 | 0; - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x1 >>> 0 & 0xff; - o[ 5] = x1 >>> 8 & 0xff; - o[ 6] = x1 >>> 16 & 0xff; - o[ 7] = x1 >>> 24 & 0xff; - - o[ 8] = x2 >>> 0 & 0xff; - o[ 9] = x2 >>> 8 & 0xff; - o[10] = x2 >>> 16 & 0xff; - o[11] = x2 >>> 24 & 0xff; - - o[12] = x3 >>> 0 & 0xff; - o[13] = x3 >>> 8 & 0xff; - o[14] = x3 >>> 16 & 0xff; - o[15] = x3 >>> 24 & 0xff; - - o[16] = x4 >>> 0 & 0xff; - o[17] = x4 >>> 8 & 0xff; - o[18] = x4 >>> 16 & 0xff; - o[19] = x4 >>> 24 & 0xff; - - o[20] = x5 >>> 0 & 0xff; - o[21] = x5 >>> 8 & 0xff; - o[22] = x5 >>> 16 & 0xff; - o[23] = x5 >>> 24 & 0xff; - - o[24] = x6 >>> 0 & 0xff; - o[25] = x6 >>> 8 & 0xff; - o[26] = x6 >>> 16 & 0xff; - o[27] = x6 >>> 24 & 0xff; - - o[28] = x7 >>> 0 & 0xff; - o[29] = x7 >>> 8 & 0xff; - o[30] = x7 >>> 16 & 0xff; - o[31] = x7 >>> 24 & 0xff; - - o[32] = x8 >>> 0 & 0xff; - o[33] = x8 >>> 8 & 0xff; - o[34] = x8 >>> 16 & 0xff; - o[35] = x8 >>> 24 & 0xff; - - o[36] = x9 >>> 0 & 0xff; - o[37] = x9 >>> 8 & 0xff; - o[38] = x9 >>> 16 & 0xff; - o[39] = x9 >>> 24 & 0xff; - - o[40] = x10 >>> 0 & 0xff; - o[41] = x10 >>> 8 & 0xff; - o[42] = x10 >>> 16 & 0xff; - o[43] = x10 >>> 24 & 0xff; - - o[44] = x11 >>> 0 & 0xff; - o[45] = x11 >>> 8 & 0xff; - o[46] = x11 >>> 16 & 0xff; - o[47] = x11 >>> 24 & 0xff; - - o[48] = x12 >>> 0 & 0xff; - o[49] = x12 >>> 8 & 0xff; - o[50] = x12 >>> 16 & 0xff; - o[51] = x12 >>> 24 & 0xff; - - o[52] = x13 >>> 0 & 0xff; - o[53] = x13 >>> 8 & 0xff; - o[54] = x13 >>> 16 & 0xff; - o[55] = x13 >>> 24 & 0xff; - - o[56] = x14 >>> 0 & 0xff; - o[57] = x14 >>> 8 & 0xff; - o[58] = x14 >>> 16 & 0xff; - o[59] = x14 >>> 24 & 0xff; - - o[60] = x15 >>> 0 & 0xff; - o[61] = x15 >>> 8 & 0xff; - o[62] = x15 >>> 16 & 0xff; - o[63] = x15 >>> 24 & 0xff; -} - -function core_hsalsa20(o,p,k,c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x5 >>> 0 & 0xff; - o[ 5] = x5 >>> 8 & 0xff; - o[ 6] = x5 >>> 16 & 0xff; - o[ 7] = x5 >>> 24 & 0xff; - - o[ 8] = x10 >>> 0 & 0xff; - o[ 9] = x10 >>> 8 & 0xff; - o[10] = x10 >>> 16 & 0xff; - o[11] = x10 >>> 24 & 0xff; - - o[12] = x15 >>> 0 & 0xff; - o[13] = x15 >>> 8 & 0xff; - o[14] = x15 >>> 16 & 0xff; - o[15] = x15 >>> 24 & 0xff; - - o[16] = x6 >>> 0 & 0xff; - o[17] = x6 >>> 8 & 0xff; - o[18] = x6 >>> 16 & 0xff; - o[19] = x6 >>> 24 & 0xff; - - o[20] = x7 >>> 0 & 0xff; - o[21] = x7 >>> 8 & 0xff; - o[22] = x7 >>> 16 & 0xff; - o[23] = x7 >>> 24 & 0xff; - - o[24] = x8 >>> 0 & 0xff; - o[25] = x8 >>> 8 & 0xff; - o[26] = x8 >>> 16 & 0xff; - o[27] = x8 >>> 24 & 0xff; - - o[28] = x9 >>> 0 & 0xff; - o[29] = x9 >>> 8 & 0xff; - o[30] = x9 >>> 16 & 0xff; - o[31] = x9 >>> 24 & 0xff; -} - -function crypto_core_salsa20(out,inp,k,c) { - core_salsa20(out,inp,k,c); -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core_hsalsa20(out,inp,k,c); -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = x[i]; - } - return 0; -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20(c,cpos,d,sn,s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); -} - -/* -* Port of Andrew Moon's Poly1305-donna-16. Public domain. -* https://github.com/floodyberry/poly1305-donna -*/ - -var poly1305 = function(key) { - this.buffer = new Uint8Array(16); - this.r = new Uint16Array(10); - this.h = new Uint16Array(10); - this.pad = new Uint16Array(8); - this.leftover = 0; - this.fin = 0; - - var t0, t1, t2, t3, t4, t5, t6, t7; - - t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; - t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; - t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; - this.r[5] = ((t4 >>> 1)) & 0x1ffe; - t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; - t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - this.r[9] = ((t7 >>> 5)) & 0x007f; - - this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; - this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; - this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; - this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; - this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; - this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; - this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; - this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; -}; - -poly1305.prototype.blocks = function(m, mpos, bytes) { - var hibit = this.fin ? 0 : (1 << 11); - var t0, t1, t2, t3, t4, t5, t6, t7, c; - var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; - - var h0 = this.h[0], - h1 = this.h[1], - h2 = this.h[2], - h3 = this.h[3], - h4 = this.h[4], - h5 = this.h[5], - h6 = this.h[6], - h7 = this.h[7], - h8 = this.h[8], - h9 = this.h[9]; - - var r0 = this.r[0], - r1 = this.r[1], - r2 = this.r[2], - r3 = this.r[3], - r4 = this.r[4], - r5 = this.r[5], - r6 = this.r[6], - r7 = this.r[7], - r8 = this.r[8], - r9 = this.r[9]; - - while (bytes >= 16) { - t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; - t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; - t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; - h5 += ((t4 >>> 1)) & 0x1fff; - t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; - t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - h9 += ((t7 >>> 5)) | hibit; - - c = 0; - - d0 = c; - d0 += h0 * r0; - d0 += h1 * (5 * r9); - d0 += h2 * (5 * r8); - d0 += h3 * (5 * r7); - d0 += h4 * (5 * r6); - c = (d0 >>> 13); d0 &= 0x1fff; - d0 += h5 * (5 * r5); - d0 += h6 * (5 * r4); - d0 += h7 * (5 * r3); - d0 += h8 * (5 * r2); - d0 += h9 * (5 * r1); - c += (d0 >>> 13); d0 &= 0x1fff; - - d1 = c; - d1 += h0 * r1; - d1 += h1 * r0; - d1 += h2 * (5 * r9); - d1 += h3 * (5 * r8); - d1 += h4 * (5 * r7); - c = (d1 >>> 13); d1 &= 0x1fff; - d1 += h5 * (5 * r6); - d1 += h6 * (5 * r5); - d1 += h7 * (5 * r4); - d1 += h8 * (5 * r3); - d1 += h9 * (5 * r2); - c += (d1 >>> 13); d1 &= 0x1fff; - - d2 = c; - d2 += h0 * r2; - d2 += h1 * r1; - d2 += h2 * r0; - d2 += h3 * (5 * r9); - d2 += h4 * (5 * r8); - c = (d2 >>> 13); d2 &= 0x1fff; - d2 += h5 * (5 * r7); - d2 += h6 * (5 * r6); - d2 += h7 * (5 * r5); - d2 += h8 * (5 * r4); - d2 += h9 * (5 * r3); - c += (d2 >>> 13); d2 &= 0x1fff; - - d3 = c; - d3 += h0 * r3; - d3 += h1 * r2; - d3 += h2 * r1; - d3 += h3 * r0; - d3 += h4 * (5 * r9); - c = (d3 >>> 13); d3 &= 0x1fff; - d3 += h5 * (5 * r8); - d3 += h6 * (5 * r7); - d3 += h7 * (5 * r6); - d3 += h8 * (5 * r5); - d3 += h9 * (5 * r4); - c += (d3 >>> 13); d3 &= 0x1fff; - - d4 = c; - d4 += h0 * r4; - d4 += h1 * r3; - d4 += h2 * r2; - d4 += h3 * r1; - d4 += h4 * r0; - c = (d4 >>> 13); d4 &= 0x1fff; - d4 += h5 * (5 * r9); - d4 += h6 * (5 * r8); - d4 += h7 * (5 * r7); - d4 += h8 * (5 * r6); - d4 += h9 * (5 * r5); - c += (d4 >>> 13); d4 &= 0x1fff; - - d5 = c; - d5 += h0 * r5; - d5 += h1 * r4; - d5 += h2 * r3; - d5 += h3 * r2; - d5 += h4 * r1; - c = (d5 >>> 13); d5 &= 0x1fff; - d5 += h5 * r0; - d5 += h6 * (5 * r9); - d5 += h7 * (5 * r8); - d5 += h8 * (5 * r7); - d5 += h9 * (5 * r6); - c += (d5 >>> 13); d5 &= 0x1fff; - - d6 = c; - d6 += h0 * r6; - d6 += h1 * r5; - d6 += h2 * r4; - d6 += h3 * r3; - d6 += h4 * r2; - c = (d6 >>> 13); d6 &= 0x1fff; - d6 += h5 * r1; - d6 += h6 * r0; - d6 += h7 * (5 * r9); - d6 += h8 * (5 * r8); - d6 += h9 * (5 * r7); - c += (d6 >>> 13); d6 &= 0x1fff; - - d7 = c; - d7 += h0 * r7; - d7 += h1 * r6; - d7 += h2 * r5; - d7 += h3 * r4; - d7 += h4 * r3; - c = (d7 >>> 13); d7 &= 0x1fff; - d7 += h5 * r2; - d7 += h6 * r1; - d7 += h7 * r0; - d7 += h8 * (5 * r9); - d7 += h9 * (5 * r8); - c += (d7 >>> 13); d7 &= 0x1fff; - - d8 = c; - d8 += h0 * r8; - d8 += h1 * r7; - d8 += h2 * r6; - d8 += h3 * r5; - d8 += h4 * r4; - c = (d8 >>> 13); d8 &= 0x1fff; - d8 += h5 * r3; - d8 += h6 * r2; - d8 += h7 * r1; - d8 += h8 * r0; - d8 += h9 * (5 * r9); - c += (d8 >>> 13); d8 &= 0x1fff; - - d9 = c; - d9 += h0 * r9; - d9 += h1 * r8; - d9 += h2 * r7; - d9 += h3 * r6; - d9 += h4 * r5; - c = (d9 >>> 13); d9 &= 0x1fff; - d9 += h5 * r4; - d9 += h6 * r3; - d9 += h7 * r2; - d9 += h8 * r1; - d9 += h9 * r0; - c += (d9 >>> 13); d9 &= 0x1fff; - - c = (((c << 2) + c)) | 0; - c = (c + d0) | 0; - d0 = c & 0x1fff; - c = (c >>> 13); - d1 += c; - - h0 = d0; - h1 = d1; - h2 = d2; - h3 = d3; - h4 = d4; - h5 = d5; - h6 = d6; - h7 = d7; - h8 = d8; - h9 = d9; - - mpos += 16; - bytes -= 16; - } - this.h[0] = h0; - this.h[1] = h1; - this.h[2] = h2; - this.h[3] = h3; - this.h[4] = h4; - this.h[5] = h5; - this.h[6] = h6; - this.h[7] = h7; - this.h[8] = h8; - this.h[9] = h9; -}; - -poly1305.prototype.finish = function(mac, macpos) { - var g = new Uint16Array(10); - var c, mask, f, i; - - if (this.leftover) { - i = this.leftover; - this.buffer[i++] = 1; - for (; i < 16; i++) this.buffer[i] = 0; - this.fin = 1; - this.blocks(this.buffer, 0, 16); - } - - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - for (i = 2; i < 10; i++) { - this.h[i] += c; - c = this.h[i] >>> 13; - this.h[i] &= 0x1fff; - } - this.h[0] += (c * 5); - c = this.h[0] >>> 13; - this.h[0] &= 0x1fff; - this.h[1] += c; - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - this.h[2] += c; - - g[0] = this.h[0] + 5; - c = g[0] >>> 13; - g[0] &= 0x1fff; - for (i = 1; i < 10; i++) { - g[i] = this.h[i] + c; - c = g[i] >>> 13; - g[i] &= 0x1fff; - } - g[9] -= (1 << 13); - - mask = (c ^ 1) - 1; - for (i = 0; i < 10; i++) g[i] &= mask; - mask = ~mask; - for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; - - this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; - this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; - this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; - this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; - this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; - this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; - this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; - this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; - - f = this.h[0] + this.pad[0]; - this.h[0] = f & 0xffff; - for (i = 1; i < 8; i++) { - f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; - this.h[i] = f & 0xffff; - } - - mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; - mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; - mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; - mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; - mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; - mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; - mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; - mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; - mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; - mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; - mac[macpos+10] = (this.h[5] >>> 0) & 0xff; - mac[macpos+11] = (this.h[5] >>> 8) & 0xff; - mac[macpos+12] = (this.h[6] >>> 0) & 0xff; - mac[macpos+13] = (this.h[6] >>> 8) & 0xff; - mac[macpos+14] = (this.h[7] >>> 0) & 0xff; - mac[macpos+15] = (this.h[7] >>> 8) & 0xff; -}; - -poly1305.prototype.update = function(m, mpos, bytes) { - var i, want; - - if (this.leftover) { - want = (16 - this.leftover); - if (want > bytes) - want = bytes; - for (i = 0; i < want; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - bytes -= want; - mpos += want; - this.leftover += want; - if (this.leftover < 16) - return; - this.blocks(this.buffer, 0, 16); - this.leftover = 0; - } - - if (bytes >= 16) { - want = bytes - (bytes % 16); - this.blocks(m, mpos, want); - mpos += want; - bytes -= want; - } - - if (bytes) { - for (i = 0; i < bytes; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - this.leftover += bytes; - } -}; - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s = new poly1305(k); - s.update(m, mpos, n); - s.finish(out, outpos); - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var i, v, c = 1; - for (i = 0; i < 16; i++) { - v = o[i] + c + 65535; - c = Math.floor(v / 65536); - o[i] = v - c * 65536; - } - o[0] += c-1 + 37 * (c-1); -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; -} - -function Z(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; -} - -function M(o, a, b) { - var v, c, - t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, - t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, - t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, - t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, - b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11], - b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - - v = a[0]; - t0 += v * b0; - t1 += v * b1; - t2 += v * b2; - t3 += v * b3; - t4 += v * b4; - t5 += v * b5; - t6 += v * b6; - t7 += v * b7; - t8 += v * b8; - t9 += v * b9; - t10 += v * b10; - t11 += v * b11; - t12 += v * b12; - t13 += v * b13; - t14 += v * b14; - t15 += v * b15; - v = a[1]; - t1 += v * b0; - t2 += v * b1; - t3 += v * b2; - t4 += v * b3; - t5 += v * b4; - t6 += v * b5; - t7 += v * b6; - t8 += v * b7; - t9 += v * b8; - t10 += v * b9; - t11 += v * b10; - t12 += v * b11; - t13 += v * b12; - t14 += v * b13; - t15 += v * b14; - t16 += v * b15; - v = a[2]; - t2 += v * b0; - t3 += v * b1; - t4 += v * b2; - t5 += v * b3; - t6 += v * b4; - t7 += v * b5; - t8 += v * b6; - t9 += v * b7; - t10 += v * b8; - t11 += v * b9; - t12 += v * b10; - t13 += v * b11; - t14 += v * b12; - t15 += v * b13; - t16 += v * b14; - t17 += v * b15; - v = a[3]; - t3 += v * b0; - t4 += v * b1; - t5 += v * b2; - t6 += v * b3; - t7 += v * b4; - t8 += v * b5; - t9 += v * b6; - t10 += v * b7; - t11 += v * b8; - t12 += v * b9; - t13 += v * b10; - t14 += v * b11; - t15 += v * b12; - t16 += v * b13; - t17 += v * b14; - t18 += v * b15; - v = a[4]; - t4 += v * b0; - t5 += v * b1; - t6 += v * b2; - t7 += v * b3; - t8 += v * b4; - t9 += v * b5; - t10 += v * b6; - t11 += v * b7; - t12 += v * b8; - t13 += v * b9; - t14 += v * b10; - t15 += v * b11; - t16 += v * b12; - t17 += v * b13; - t18 += v * b14; - t19 += v * b15; - v = a[5]; - t5 += v * b0; - t6 += v * b1; - t7 += v * b2; - t8 += v * b3; - t9 += v * b4; - t10 += v * b5; - t11 += v * b6; - t12 += v * b7; - t13 += v * b8; - t14 += v * b9; - t15 += v * b10; - t16 += v * b11; - t17 += v * b12; - t18 += v * b13; - t19 += v * b14; - t20 += v * b15; - v = a[6]; - t6 += v * b0; - t7 += v * b1; - t8 += v * b2; - t9 += v * b3; - t10 += v * b4; - t11 += v * b5; - t12 += v * b6; - t13 += v * b7; - t14 += v * b8; - t15 += v * b9; - t16 += v * b10; - t17 += v * b11; - t18 += v * b12; - t19 += v * b13; - t20 += v * b14; - t21 += v * b15; - v = a[7]; - t7 += v * b0; - t8 += v * b1; - t9 += v * b2; - t10 += v * b3; - t11 += v * b4; - t12 += v * b5; - t13 += v * b6; - t14 += v * b7; - t15 += v * b8; - t16 += v * b9; - t17 += v * b10; - t18 += v * b11; - t19 += v * b12; - t20 += v * b13; - t21 += v * b14; - t22 += v * b15; - v = a[8]; - t8 += v * b0; - t9 += v * b1; - t10 += v * b2; - t11 += v * b3; - t12 += v * b4; - t13 += v * b5; - t14 += v * b6; - t15 += v * b7; - t16 += v * b8; - t17 += v * b9; - t18 += v * b10; - t19 += v * b11; - t20 += v * b12; - t21 += v * b13; - t22 += v * b14; - t23 += v * b15; - v = a[9]; - t9 += v * b0; - t10 += v * b1; - t11 += v * b2; - t12 += v * b3; - t13 += v * b4; - t14 += v * b5; - t15 += v * b6; - t16 += v * b7; - t17 += v * b8; - t18 += v * b9; - t19 += v * b10; - t20 += v * b11; - t21 += v * b12; - t22 += v * b13; - t23 += v * b14; - t24 += v * b15; - v = a[10]; - t10 += v * b0; - t11 += v * b1; - t12 += v * b2; - t13 += v * b3; - t14 += v * b4; - t15 += v * b5; - t16 += v * b6; - t17 += v * b7; - t18 += v * b8; - t19 += v * b9; - t20 += v * b10; - t21 += v * b11; - t22 += v * b12; - t23 += v * b13; - t24 += v * b14; - t25 += v * b15; - v = a[11]; - t11 += v * b0; - t12 += v * b1; - t13 += v * b2; - t14 += v * b3; - t15 += v * b4; - t16 += v * b5; - t17 += v * b6; - t18 += v * b7; - t19 += v * b8; - t20 += v * b9; - t21 += v * b10; - t22 += v * b11; - t23 += v * b12; - t24 += v * b13; - t25 += v * b14; - t26 += v * b15; - v = a[12]; - t12 += v * b0; - t13 += v * b1; - t14 += v * b2; - t15 += v * b3; - t16 += v * b4; - t17 += v * b5; - t18 += v * b6; - t19 += v * b7; - t20 += v * b8; - t21 += v * b9; - t22 += v * b10; - t23 += v * b11; - t24 += v * b12; - t25 += v * b13; - t26 += v * b14; - t27 += v * b15; - v = a[13]; - t13 += v * b0; - t14 += v * b1; - t15 += v * b2; - t16 += v * b3; - t17 += v * b4; - t18 += v * b5; - t19 += v * b6; - t20 += v * b7; - t21 += v * b8; - t22 += v * b9; - t23 += v * b10; - t24 += v * b11; - t25 += v * b12; - t26 += v * b13; - t27 += v * b14; - t28 += v * b15; - v = a[14]; - t14 += v * b0; - t15 += v * b1; - t16 += v * b2; - t17 += v * b3; - t18 += v * b4; - t19 += v * b5; - t20 += v * b6; - t21 += v * b7; - t22 += v * b8; - t23 += v * b9; - t24 += v * b10; - t25 += v * b11; - t26 += v * b12; - t27 += v * b13; - t28 += v * b14; - t29 += v * b15; - v = a[15]; - t15 += v * b0; - t16 += v * b1; - t17 += v * b2; - t18 += v * b3; - t19 += v * b4; - t20 += v * b5; - t21 += v * b6; - t22 += v * b7; - t23 += v * b8; - t24 += v * b9; - t25 += v * b10; - t26 += v * b11; - t27 += v * b12; - t28 += v * b13; - t29 += v * b14; - t30 += v * b15; - - t0 += 38 * t16; - t1 += 38 * t17; - t2 += 38 * t18; - t3 += 38 * t19; - t4 += 38 * t20; - t5 += 38 * t21; - t6 += 38 * t22; - t7 += 38 * t23; - t8 += 38 * t24; - t9 += 38 * t25; - t10 += 38 * t26; - t11 += 38 * t27; - t12 += 38 * t28; - t13 += 38 * t29; - t14 += 38 * t30; - // t15 left as is - - // first car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - // second car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - o[ 0] = t0; - o[ 1] = t1; - o[ 2] = t2; - o[ 3] = t3; - o[ 4] = t4; - o[ 5] = t5; - o[ 6] = t6; - o[ 7] = t7; - o[ 8] = t8; - o[ 9] = t9; - o[10] = t10; - o[11] = t11; - o[12] = t12; - o[13] = t13; - o[14] = t14; - o[15] = t15; -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function crypto_hashblocks_hl(hh, hl, m, n) { - var wh = new Int32Array(16), wl = new Int32Array(16), - bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, - bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, - th, tl, i, j, h, l, a, b, c, d; - - var ah0 = hh[0], - ah1 = hh[1], - ah2 = hh[2], - ah3 = hh[3], - ah4 = hh[4], - ah5 = hh[5], - ah6 = hh[6], - ah7 = hh[7], - - al0 = hl[0], - al1 = hl[1], - al2 = hl[2], - al3 = hl[3], - al4 = hl[4], - al5 = hl[5], - al6 = hl[6], - al7 = hl[7]; - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) { - j = 8 * i + pos; - wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; - wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; - } - for (i = 0; i < 80; i++) { - bh0 = ah0; - bh1 = ah1; - bh2 = ah2; - bh3 = ah3; - bh4 = ah4; - bh5 = ah5; - bh6 = ah6; - bh7 = ah7; - - bl0 = al0; - bl1 = al1; - bl2 = al2; - bl3 = al3; - bl4 = al4; - bl5 = al5; - bl6 = al6; - bl7 = al7; - - // add - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma1 - h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); - l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Ch - h = (ah4 & ah5) ^ (~ah4 & ah6); - l = (al4 & al5) ^ (~al4 & al6); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // K - h = K[i*2]; - l = K[i*2+1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // w - h = wh[i%16]; - l = wl[i%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - th = c & 0xffff | d << 16; - tl = a & 0xffff | b << 16; - - // add - h = th; - l = tl; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma0 - h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); - l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Maj - h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); - l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh7 = (c & 0xffff) | (d << 16); - bl7 = (a & 0xffff) | (b << 16); - - // add - h = bh3; - l = bl3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = th; - l = tl; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh3 = (c & 0xffff) | (d << 16); - bl3 = (a & 0xffff) | (b << 16); - - ah1 = bh0; - ah2 = bh1; - ah3 = bh2; - ah4 = bh3; - ah5 = bh4; - ah6 = bh5; - ah7 = bh6; - ah0 = bh7; - - al1 = bl0; - al2 = bl1; - al3 = bl2; - al4 = bl3; - al5 = bl4; - al6 = bl5; - al7 = bl6; - al0 = bl7; - - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - // add - h = wh[j]; - l = wl[j]; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = wh[(j+9)%16]; - l = wl[(j+9)%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma0 - th = wh[(j+1)%16]; - tl = wl[(j+1)%16]; - h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); - l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma1 - th = wh[(j+14)%16]; - tl = wl[(j+14)%16]; - h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); - l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - wh[j] = (c & 0xffff) | (d << 16); - wl[j] = (a & 0xffff) | (b << 16); - } - } - } - - // add - h = ah0; - l = al0; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[0]; - l = hl[0]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[0] = ah0 = (c & 0xffff) | (d << 16); - hl[0] = al0 = (a & 0xffff) | (b << 16); - - h = ah1; - l = al1; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[1]; - l = hl[1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[1] = ah1 = (c & 0xffff) | (d << 16); - hl[1] = al1 = (a & 0xffff) | (b << 16); - - h = ah2; - l = al2; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[2]; - l = hl[2]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[2] = ah2 = (c & 0xffff) | (d << 16); - hl[2] = al2 = (a & 0xffff) | (b << 16); - - h = ah3; - l = al3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[3]; - l = hl[3]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[3] = ah3 = (c & 0xffff) | (d << 16); - hl[3] = al3 = (a & 0xffff) | (b << 16); - - h = ah4; - l = al4; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[4]; - l = hl[4]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[4] = ah4 = (c & 0xffff) | (d << 16); - hl[4] = al4 = (a & 0xffff) | (b << 16); - - h = ah5; - l = al5; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[5]; - l = hl[5]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[5] = ah5 = (c & 0xffff) | (d << 16); - hl[5] = al5 = (a & 0xffff) | (b << 16); - - h = ah6; - l = al6; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[6]; - l = hl[6]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[6] = ah6 = (c & 0xffff) | (d << 16); - hl[6] = al6 = (a & 0xffff) | (b << 16); - - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[7]; - l = hl[7]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[7] = ah7 = (c & 0xffff) | (d << 16); - hl[7] = al7 = (a & 0xffff) | (b << 16); - - pos += 128; - n -= 128; - } - - return n; -} - -function crypto_hash(out, m, n) { - var hh = new Int32Array(8), - hl = new Int32Array(8), - x = new Uint8Array(256), - i, b = n; - - hh[0] = 0x6a09e667; - hh[1] = 0xbb67ae85; - hh[2] = 0x3c6ef372; - hh[3] = 0xa54ff53a; - hh[4] = 0x510e527f; - hh[5] = 0x9b05688c; - hh[6] = 0x1f83d9ab; - hh[7] = 0x5be0cd19; - - hl[0] = 0xf3bcc908; - hl[1] = 0x84caa73b; - hl[2] = 0xfe94f82b; - hl[3] = 0x5f1d36f1; - hl[4] = 0xade682d1; - hl[5] = 0x2b3e6c1f; - hl[6] = 0xfb41bd6b; - hl[7] = 0x137e2179; - - crypto_hashblocks_hl(hh, hl, m, n); - n %= 128; - - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, (b / 0x20000000) | 0, b << 3); - crypto_hashblocks_hl(hh, hl, x, n); - - for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); - -},{"crypto":7}],12:[function(require,module,exports){ -var Pact = window.Pact || {}; -Pact = require('./pact-lang-api.js'); -window.Pact = Pact; - -},{"./pact-lang-api.js":13}],13:[function(require,module,exports){ -(function (Buffer){ -/** pact-lang-api.js - * Exports functions to support Pact API calls. - * Author: Will Martino, Hee Kyun Yun, Stuart Popejoy - * Supports: Pact API 3.0 v1 - */ - -const blake = require("blakejs"); -const nacl = require("tweetnacl"); -const base64url = require("base64-url"); -const fetch = require("node-fetch"); - -/** - * Convert binary to hex. - * @param s {Uint8Array} - binary value - * @return {string} hex string - */ -var binToHex = function(s) { - var constructor = s.constructor.name || null; - - if (constructor !== "Uint8Array") { - throw new TypeError("Expected Uint8Array"); - } - - return Buffer.from(s).toString("hex"); -}; - -/** - * Convert hex string to binary. - * @param s {string} - hex string - * @return {Uint8Array} binary value - */ -var hexToBin = function(h) { - if (typeof h !== "string") { - throw new TypeError("Expected string: " + h); - } - return new Uint8Array(Buffer.from(h, "hex")); -}; - -/** - * Perform blake2b256 hashing. - */ -var hashBin = function(s) { - return blake.blake2b(s, null, 32); -}; - -/** - * Perform blake2b256 hashing, encoded as unescaped base64url. - */ -var hash = function(s) { - return base64UrlEncode(hashBin(s)); -}; - -/** - * Hash string as unescaped base64url. - */ -var base64UrlEncode = function(s) { - return base64url.escape(base64url.encode(s)); -}; - -/** - * Generate a random ED25519 keypair. - * @return {object} with "publicKey" and "secretKey" fields. - */ -var genKeyPair = function() { - var kp = nacl.sign.keyPair(); - var pubKey = binToHex(kp.publicKey); - var secKey = binToHex(kp.secretKey).slice(0, 64); - return { publicKey: pubKey, secretKey: secKey }; -}; - -var toTweetNaclSecretKey = function(keyPair) { - if ( - !keyPair.hasOwnProperty("publicKey") || - !keyPair.hasOwnProperty("secretKey") - ) { - throw new TypeError( - "Invalid KeyPair: expected to find keys of name 'secretKey' and 'publicKey': " + - JSON.stringify(keyPair) - ); - } - return hexToBin(keyPair.secretKey + keyPair.publicKey); -}; - -/** - * Sign data using key pair. - * @param msg - some data to be passed to blake2b256. - * @param keyPair - signing ED25519 keypair - * @return {object} with "hash", "sig" (signature in hex format), and "pubKey" public key value. - */ -var sign = function(msg, keyPair) { - if ( - !keyPair.hasOwnProperty("publicKey") || - !keyPair.hasOwnProperty("secretKey") - ) { - throw new TypeError( - "Invalid KeyPair: expected to find keys of name 'secretKey' and 'publicKey': " + - JSON.stringify(keyPair) - ); - } - var hshBin = hashBin(msg); - var hsh = base64UrlEncode(hshBin); - var sigBin = nacl.sign.detached(hshBin, toTweetNaclSecretKey(keyPair)); - return { hash: hsh, sig: binToHex(sigBin), pubKey: keyPair.publicKey }; -}; - -var pullSig = function(s) { - if (!s.hasOwnProperty("sig")) { - throw new TypeError( - "Expected to find keys of name 'sig' in " + JSON.stringify(s) - ); - } - return { sig: s.sig }; -}; - -var pullAndCheckHashs = function(sigs) { - var hsh = sigs[0].hash; - for (var i = 1; i < sigs.length; i++) { - if (sigs[i].hash !== hsh) { - throw new Error( - "Sigs for different hashes found: " + JSON.stringify(sigs) - ); - } - } - return hsh; -}; - -/** - * Prepare an ExecMsg pact command for use in send or local execution. - * To use in send, wrap result with 'mkSingleCommand'. - * @param keyPairs {array or object} - array or single ED25519 keypair and/or clist (list of `cap` in mkCap) - * @param nonce {string} - nonce value for ensuring unique hash - * @param pactCode {string} - pact code to execute - * @param envData {object} - JSON message data for command - * @param meta {object} - public meta information, see mkMeta - * @return valid pact API command for send or local use. - */ -var prepareExecCmd = function(keyPairs, nonce=new Date().toISOString(), pactCode, - envData, meta=mkMeta("","",0,0,0,0), networkId=null) { - - enforceType(nonce, "string", "nonce"); - enforceType(pactCode, "string", "pactCode"); - var kpArray = asArray(keyPairs); - var signers = kpArray.map(mkSigner); - var cmdJSON = { - networkId: networkId, - payload: { - exec: { - data: envData || {}, - code: pactCode - } - }, - signers: signers, - meta: meta, - nonce: JSON.stringify(nonce) - }; - var cmd = JSON.stringify(cmdJSON); - var sigs = kpArray.map(function(kp) { - return sign(cmd, kp); - }); - return mkSingleCmd(sigs, cmd); -}; - -/** - * Prepare an ContMsg pact command for use in send or local execution. - * To use in send, wrap result with 'mkSingleCommand'. - * @param keyPairs {array or object} - array or single ED25519 keypair - * @param nonce {string} - nonce value for ensuring unique hash - default to current time - * @param step {number} - the step on which pacts the command is sent to - required - * @param proof {string} - JSON message of SPV proof - not required - * @param rollback {bool} - Bool of cont message - required - * @param pactId {string} - pactId of the cont Msg - required - * @param envData {object} - JSON message data for command - not required - * @param meta {object} - public meta information, see mkMeta - * @return valid pact API Cont command for send or local use. - */ -var prepareContCmd = function(keyPairs, nonce=new Date().toISOString(), - proof, pactId, rollback, step, envData, - meta=mkMeta("","",0,0,0,0), networkId=null) { - - enforceType(nonce, "string", "nonce"); - var kpArray = asArray(keyPairs); - var signers = kpArray.map(mkSigner); - var cmdJSON = { - networkId: networkId, - payload: { - cont: { - proof: proof || null, - pactId: pactId, - rollback: rollback, - step: step, - data: envData || {}, - } - }, - signers: signers, - meta: meta, - nonce: JSON.stringify(nonce) - }; - var cmd = JSON.stringify(cmdJSON); - var sigs = kpArray.map(function(kp) { - return sign(cmd, kp); - }); - return mkSingleCmd(sigs, cmd); -}; - -/** - * Makes a single command given signed data. - * @param sigs {array} - array of signature objects, see 'sign' - * @param cmd {string} - stringified JSON blob used to create hash - * @return valid Pact API command for send or local use. - */ -var mkSingleCmd = function(sigs, cmd) { - enforceArray(sigs, "sigs"); - enforceType(cmd, "string", "cmd"); - return { - hash: pullAndCheckHashs(sigs), - sigs: sigs.map(pullSig), - cmd: cmd - }; -}; - -/** - * Makes outer wrapper for a 'send' endpoint. - * @param {array or object} cmds - one or an array of commands, see mkSingleCmd - */ -var mkPublicSend = function(cmds) { - return { cmds: asArray(cmds) }; -}; - -/** - * Make an ED25519 "signer" array element for inclusion in a Pact payload. - * @param {object} kp - a ED25519 keypair and/or clist (list of `cap` in mkCap) - * @return {object} an object with pubKey, addr and scheme fields. - */ -var mkSigner = function(kp) { - return { - clist: kp.clist ? asArray(kp.clist) : [], - pubKey: kp.publicKey - }; -}; - -var asArray = function(singleOrArray) { - if (Array.isArray(singleOrArray)) { - return singleOrArray; - } else { - return [singleOrArray]; - } -}; - -var enforceType = function(val, type, msg) { - if (typeof val !== type) { - throw new TypeError( - msg + " must be a " + type + ": " + JSON.stringify(val) - ); - } -}; - -var enforceArray = function(val, msg) { - if (!Array.isArray(val)) { - throw new TypeError(msg + " must be an array: " + JSON.stringify(val)); - } -}; - -/** - * Make a full 'send' endpoint exec command. See 'prepareExecCmd' for parameters. - */ -var simpleExecCommand = function(keyPairs, nonce, pactCode, envData, meta, networkId) { - return mkPublicSend(prepareExecCmd(keyPairs, nonce, pactCode, envData, meta, networkId)); -}; - -/** - * Make a full 'send' endpoint cont command. See 'prepareContCmd' for parameters. - */ -var simpleContCommand = function(keyPairs, nonce, step, pactId, rollback, envData, meta, proof) { - return mkPublicSend(prepareContCmd(keyPairs, nonce, proof, pactId, rollback, step, envData, meta)); -}; - -var unique = function(arr) { - var n = {}, - r = []; - for (var i = 0; i < arr.length; i++) { - if (!n[arr[i]]) { - n[arr[i]] = true; - r.push(arr[i]); - } - } - return r; -}; - -/** - * Given an exec 'send' message, prepare a message for 'poll' endpoint. - * @param execMsg {object} JSON with "cmds" field, see 'mkPublicSend' - * @return {object} with "requestKeys" for polling. - */ -var simplePollRequestFromExec = function(execMsg) { - var cmds = - execMsg.cmds || - TypeError("expected key 'cmds' in object: " + JSON.stringify(execMsg)); - var rks = []; - if ( - !cmds.every(function(v) { - return v.hasOwnProperty("hash"); - }) - ) { - throw new TypeError( - 'maleformed object, expected "hash" key in every cmd: ' + - JSON.stringify(execMsg) - ); - } else { - rks = unique( - cmds.map(function(v) { - return v.hash; - }) - ); - } - return { requestKeys: rks }; -}; - -/** - * Given an exec 'send' message, prepare a message for 'listen' endpoint. - * @param execMsg {object} JSON with "cmds" field, see 'mkPublicSend'. Only takes first element. - * @return {object} with "requestKey" for polling. - */ -var simpleListenRequestFromExec = function(execMsg) { - var cmds = - execMsg.cmds || - TypeError("expected key 'cmds' in object: " + JSON.stringify(execMsg)); - var rks = []; - if ( - !cmds.every(function(v) { - return v.hasOwnProperty("hash"); - }) - ) { - throw new TypeError( - 'maleformed object, expected "hash" key in every cmd: ' + - JSON.stringify(execMsg) - ); - } else { - rks = unique( - cmds.map(function(v) { - return v.hash; - }) - ); - } - return { listen: rks[0] }; -}; - -/** - * Variadic function to form a lisp s-expression application. - * Encases arguments in parens and intercalates with a space. - */ -var mkExp = function(pgmName) { - enforceType(pgmName, "string", "pgmName"); - return ( - "(" + - pgmName + - " " + - Array.prototype.slice - .call(arguments, 1) - .map(JSON.stringify) - .join(" ") + - ")" - ); -}; - -/** - * Prepare a chainweb-style public meta payload. - * @param sender {string} gas account - * @param chainId {string} chain identifier - * @param gasPrice {number} desired gas price - * @param gasLimit {number} desired gas limit - * @param creationTime {number} desired tx's time created in UNIX epoch time as seconds - * @param ttl {number} desired tx's time to live as seconds - * @return {object} of arguments, type-checked and properly named. - */ -var mkMeta = function(sender, chainId, gasPrice, gasLimit, creationTime, ttl) { - enforceType(sender, "string", "sender"); - enforceType(chainId, "string", "chainId"); - enforceType(gasPrice, "number", "gasPrice"); - enforceType(gasLimit, "number", "gasLimit"); - enforceType(creationTime, "number", "creationTime"); - enforceType(ttl, "number", "ttl"); - return { - creationTime: creationTime, - ttl: ttl, - gasLimit: gasLimit, - chainId: chainId, - gasPrice: gasPrice, - sender: sender - }; -}; - -/** - * Formats ExecCmd into api request object - */ -var mkReq = function(cmd) { - return { - headers: { - "Content-Type": "application/json" - }, - method: "POST", - body: JSON.stringify(cmd) - }; -}; - - - - /** - * A execCmd Object to Execute in send or local. - * @typedef {Object} cmd to `/send` endpoint - * @property type {string} - type of command - "cont" or "exec", default to "exec" - * @property pactCode {string} - pact code to execute in "exec" command - required for "exec" - * @property nonce {string} - nonce value to ensure unique hash - default to current time - * @property envData {object} - JSON message data for command - not required - * @property meta {object} - public meta information, see mkMeta - * @property networkId {object} network identifier of where the cmd is executed. - */ - - /** - * A contCmd to Execute in send - * @typedef {Object} cmd to `/send` endpoint - * @property type {string} - type of command - "cont" or "exec", default to "exec" - * @property pactId {string} - pactId the cont command - required for "cont" - * @property nonce {string} - nonce value to ensure unique hash - default to current time - * @property step {number} - the step of the mutli-step transaction - required for "cont" - * @property proof {string} - JSON message of SPV proof - required for cross-chain transaction - * @property rollback {bool} - boolean value of rollback - required for "cont" - * @property envData {object} - JSON message data for command - not required - * @property meta {object} - public meta information, see mkMeta - * @property networkId {object} network identifier of where the cmd is executed. - */ - -/** - * Sends Pact command to a running Pact server and retrieves tx result. - * @param {[execCmd or contCmd] or execCmd or contCmt} cmd or a list of cmds to execute - * @param {string} apiHost host running Pact server - * @return {object} Request key of the tx received from pact server. - */ -const fetchSend = async function(sendCmd, apiHost){ - if (!apiHost) throw new Error(`Pact.fetch.send(): No apiHost provided`); - const sendCmds = asArray(sendCmd).map(cmd => { - if (cmd.type === "cont") { - return prepareContCmd( cmd.keyPairs, cmd.nonce, cmd.proof, cmd.pactId, - cmd.rollback, cmd.step, cmd.envData, cmd.meta, - cmd.networkId ) - } else { - return prepareExecCmd( cmd.keyPairs, cmd.nonce, cmd.pactCode, - cmd.envData, cmd.meta, cmd.networkId ) - } - }) - const txRes = await fetch(`${apiHost}/api/v1/send`, mkReq(mkPublicSend(sendCmds))); - const tx = await txRes.json(); - return tx; -}; - -/** - * A SPV Command Object to Execute in Pact Server. - * @typedef {Object} spvCmd - * @property requestKey {string} pactId of the cross-chain transaction - * @property targetChainId {string} chainId of target chain of the cross-chain transaction - */ - -/** - * Sends request to /spv to fetch SPV proof. - * @param {spvCmd} spvCmd see spvCmd - * @param {string} apiHost host running Pact server - * @return {string} SPV proof received from Pact server. - */ -const fetchSPV = async function(spvCmd, apiHost){ - if (!apiHost) throw new Error(`Pact.fetch.spv(): No apiHost provided`); - enforceType(spvCmd.targetChainId, "string", "targetChainId"); - enforceType(spvCmd.requestKey, "string", "requestKey"); - const txRes = await fetch(`${apiHost}/spv`, mkReq(spvCmd)); - const tx = await txRes.json(); - return tx; -}; - -/** - * Sends Local Pact command to a local Pact server and retrieves local tx result. - * @param {execCmd} localCmd a single cmd to execute locally - * @param {string} apiHost host running Pact server - * @return {object} tx result received from pact server. - */ -const fetchLocal = async function(localCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.local(): No apiHost provided`); - const {keyPairs, nonce, pactCode, envData, meta} = localCmd - const cmd = prepareExecCmd(keyPairs, nonce, pactCode, envData, meta); - const txRes = await fetch(`${apiHost}/api/v1/local`, mkReq(cmd)); - const tx = await txRes.json(); - return tx; -}; - -/** - * Poll result of Pact command to a running Pact server and retrieves tx result. - * @param {{requestKeys: []}} pollCmd request Keys of txs to poll. - * @param {string} apiHost host running Pact server - * @return {object} Array of tx request keys and tx results from pact server. - */ -const fetchPoll = async function(pollCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.poll(): No apiHost provided`); - const res = await fetch(`${apiHost}/api/v1/poll`, mkReq(pollCmd)); - const resJSON = await res.json(); - return resJSON; -}; - -/** - * Listen result of Pact command to a running Pact server and retrieves tx result. - * @param {{listenCmd: }} listenCmd reqest key of tx to listen. - * @param {string} apiHost host running Pact server - * @return {object} Object containing tx result from pact server - */ - const fetchListen = async function(listenCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.listen(): No apiHost provided`); - const res = await fetch(`${apiHost}/api/v1/listen`, mkReq(listenCmd)); - const resJSON = await res.json(); - return resJSON; - }; - -/** - Signing API functions to interact with Chainweaver wallet (https://github.com/kadena-io/chainweaver) and its signing API. - */ - -/** - * Prepares a capability object to be signed with keyPairs using signing API. - * @param role {string} role of the pact capability - * @param description {string} description of the pact capability - * @param name {string} name of pact capability to be signed - * @param args {array} array of arguments used in pact capability, default to empty array. - * @return {object} A properly formatted cap object required in signingCmd - */ -var mkCap = function(role, description, name, args=[]) { - enforceType(role, "string", "role"); - enforceType(description, "string", "description"); - enforceType(name, "string", "name of capability"); - enforceType(args, "object", "arguments to capability"); - return { - role: role, - description: description, - cap: { - name: name, - args: args - } - }; -}; - -/** - * A signingCmd Object to be sent to signing API - * @typedef {Object} signingCmd - cmd to be sent to signing API - * @property pactCode {string} - Pact code to execute - required - * @property caps {array or object} - Pact capability to be signed, see mkCap - required - * @property envData {object} - JSON message data for command - optional - * @property sender {string} - sender field in meta, see mkMeta - optional - * @property chainId {string} - chainId field in meta, see mkMeta - optional - * @property gasLimit {number} - gasLimit field in meta, see mkMeta - optional - * @property nonce {string} - nonce value for ensuring unique hash - optional - **/ - -/** - * Sends parameters of Pact Command to the Chainweaver signing API and retrieves a signed Pact Command. - * @param signingCmd - cmd to be sent to signing API - * @return {object} valid pact ExecCmd for send or local use. - **/ - const signWallet = async function (signingCmd){ - if (!signingCmd.pactCode) throw new Error(`Pact.wallet.sign(): No Pact Code provided`); - if (!signingCmd.caps) throw new Error(`Pact.wallet.sign(): No Caps provided`); - enforceType(signingCmd.pactCode, "string", "pactCode"); - enforceType(signingCmd.caps, "object", "caps"); - if (signingCmd.envData) enforceType(signingCmd.envData, "object", "envData"); - if (signingCmd.sender) enforceType(signingCmd.sender, "string", "sender"); - if (signingCmd.chainId) enforceType(signingCmd.chainId, "string", "chainId"); - if (signingCmd.gasLimit) enforceType(signingCmd.gasLimit, "number", "gasLimit"); - if (signingCmd.nonce) enforceType(signingCmd.nonce, "string", "nonce"); - if (signingCmd.ttl) enforceType(signingCmd.ttl, "number", "ttl"); - - const cmd = { - code: signingCmd.pactCode, - caps: asArray(signingCmd.caps), - data: signingCmd.envData, - sender: signingCmd.sender, - chainId: signingCmd.chainId, - gasLimit: signingCmd.gasLimit, - nonce: signingCmd.nonce, - ttl: signingCmd.ttl - } - const res = await fetch('http://127.0.0.1:9467/v1/sign', mkReq(cmd)) - const resJSON = await res.json(); - return resJSON.body; - } - -/** - * Sends a signed Pact ExecCmd to a running Pact server and retrieves tx result. - * @param {signedCmd} valid pact API command for send or local use. - * @param {string} apiHost host running Pact server - * @return {object} Request key of the tx received from pact server. - */ -const sendSigned = async function (signedCmd, apiHost) { - const cmd = { - "cmds": [ signedCmd ] - } - const txRes = await fetch(`${apiHost}/api/v1/send`, mkReq(cmd)); - const tx = await txRes.json(); - return tx; -} - -module.exports = { - crypto: { - binToHex: binToHex, - hexToBin: hexToBin, - base64UrlEncode: base64UrlEncode, - hash: hash, - genKeyPair: genKeyPair, - sign: sign, - toTweetNaclSecretKey: toTweetNaclSecretKey - }, - api: { - prepareContCmd: prepareContCmd, - prepareExecCmd: prepareExecCmd, - mkSingleCmd: mkSingleCmd, - mkPublicSend: mkPublicSend - }, - lang: { - mkExp: mkExp, - mkMeta: mkMeta, - mkCap: mkCap - }, - simple: { - cont: { - createCommand: simpleContCommand - }, - exec: { - createCommand: simpleExecCommand, - createLocalCommand: prepareExecCmd, - createPollRequest: simplePollRequestFromExec, - createListenRequest: simpleListenRequestFromExec - } - }, - fetch: { - send: fetchSend, - local: fetchLocal, - poll: fetchPoll, - listen: fetchListen, - spv: fetchSPV - }, - wallet: { - sign: signWallet, - sendSigned: sendSigned - } -}; -// - -}).call(this,require("buffer").Buffer) -},{"base64-url":2,"blakejs":5,"buffer":8,"node-fetch":10,"tweetnacl":11}]},{},[12]); diff --git a/node_modules/pact-lang-api/pact-lang-api.js b/node_modules/pact-lang-api/pact-lang-api.js deleted file mode 100644 index db27fce..0000000 --- a/node_modules/pact-lang-api/pact-lang-api.js +++ /dev/null @@ -1,647 +0,0 @@ -/** pact-lang-api.js - * Exports functions to support Pact API calls. - * Author: Will Martino, Hee Kyun Yun, Stuart Popejoy - * Supports: Pact API 3.0 v1 - */ - -const blake = require("blakejs"); -const nacl = require("tweetnacl"); -const base64url = require("base64-url"); -const fetch = require("node-fetch"); - -/** - * Convert binary to hex. - * @param s {Uint8Array} - binary value - * @return {string} hex string - */ -var binToHex = function(s) { - var constructor = s.constructor.name || null; - - if (constructor !== "Uint8Array") { - throw new TypeError("Expected Uint8Array"); - } - - return Buffer.from(s).toString("hex"); -}; - -/** - * Convert hex string to binary. - * @param s {string} - hex string - * @return {Uint8Array} binary value - */ -var hexToBin = function(h) { - if (typeof h !== "string") { - throw new TypeError("Expected string: " + h); - } - return new Uint8Array(Buffer.from(h, "hex")); -}; - -/** - * Perform blake2b256 hashing. - */ -var hashBin = function(s) { - return blake.blake2b(s, null, 32); -}; - -/** - * Perform blake2b256 hashing, encoded as unescaped base64url. - */ -var hash = function(s) { - return base64UrlEncode(hashBin(s)); -}; - -/** - * Hash string as unescaped base64url. - */ -var base64UrlEncode = function(s) { - return base64url.escape(base64url.encode(s)); -}; - -/** - * Generate a random ED25519 keypair. - * @return {object} with "publicKey" and "secretKey" fields. - */ -var genKeyPair = function() { - var kp = nacl.sign.keyPair(); - var pubKey = binToHex(kp.publicKey); - var secKey = binToHex(kp.secretKey).slice(0, 64); - return { publicKey: pubKey, secretKey: secKey }; -}; - -var toTweetNaclSecretKey = function(keyPair) { - if ( - !keyPair.hasOwnProperty("publicKey") || - !keyPair.hasOwnProperty("secretKey") - ) { - throw new TypeError( - "Invalid KeyPair: expected to find keys of name 'secretKey' and 'publicKey': " + - JSON.stringify(keyPair) - ); - } - return hexToBin(keyPair.secretKey + keyPair.publicKey); -}; - -/** - * Sign data using key pair. - * @param msg - some data to be passed to blake2b256. - * @param keyPair - signing ED25519 keypair - * @return {object} with "hash", "sig" (signature in hex format), and "pubKey" public key value. - */ -var sign = function(msg, keyPair) { - if ( - !keyPair.hasOwnProperty("publicKey") || - !keyPair.hasOwnProperty("secretKey") - ) { - throw new TypeError( - "Invalid KeyPair: expected to find keys of name 'secretKey' and 'publicKey': " + - JSON.stringify(keyPair) - ); - } - var hshBin = hashBin(msg); - var hsh = base64UrlEncode(hshBin); - var sigBin = nacl.sign.detached(hshBin, toTweetNaclSecretKey(keyPair)); - return { hash: hsh, sig: binToHex(sigBin), pubKey: keyPair.publicKey }; -}; - -var pullSig = function(s) { - if (!s.hasOwnProperty("sig")) { - throw new TypeError( - "Expected to find keys of name 'sig' in " + JSON.stringify(s) - ); - } - return { sig: s.sig }; -}; - -var pullAndCheckHashs = function(sigs) { - var hsh = sigs[0].hash; - for (var i = 1; i < sigs.length; i++) { - if (sigs[i].hash !== hsh) { - throw new Error( - "Sigs for different hashes found: " + JSON.stringify(sigs) - ); - } - } - return hsh; -}; - -/** - * Prepare an ExecMsg pact command for use in send or local execution. - * To use in send, wrap result with 'mkSingleCommand'. - * @param keyPairs {array or object} - array or single ED25519 keypair and/or clist (list of `cap` in mkCap) - * @param nonce {string} - nonce value for ensuring unique hash - * @param pactCode {string} - pact code to execute - * @param envData {object} - JSON message data for command - * @param meta {object} - public meta information, see mkMeta - * @return valid pact API command for send or local use. - */ -var prepareExecCmd = function(keyPairs, nonce=new Date().toISOString(), pactCode, - envData, meta=mkMeta("","",0,0,0,0), networkId=null) { - - enforceType(nonce, "string", "nonce"); - enforceType(pactCode, "string", "pactCode"); - var kpArray = asArray(keyPairs); - var signers = kpArray.map(mkSigner); - var cmdJSON = { - networkId: networkId, - payload: { - exec: { - data: envData || {}, - code: pactCode - } - }, - signers: signers, - meta: meta, - nonce: JSON.stringify(nonce) - }; - var cmd = JSON.stringify(cmdJSON); - var sigs = kpArray.map(function(kp) { - return sign(cmd, kp); - }); - return mkSingleCmd(sigs, cmd); -}; - -/** - * Prepare an ContMsg pact command for use in send or local execution. - * To use in send, wrap result with 'mkSingleCommand'. - * @param keyPairs {array or object} - array or single ED25519 keypair - * @param nonce {string} - nonce value for ensuring unique hash - default to current time - * @param step {number} - the step on which pacts the command is sent to - required - * @param proof {string} - JSON message of SPV proof - not required - * @param rollback {bool} - Bool of cont message - required - * @param pactId {string} - pactId of the cont Msg - required - * @param envData {object} - JSON message data for command - not required - * @param meta {object} - public meta information, see mkMeta - * @return valid pact API Cont command for send or local use. - */ -var prepareContCmd = function(keyPairs, nonce=new Date().toISOString(), - proof, pactId, rollback, step, envData, - meta=mkMeta("","",0,0,0,0), networkId=null) { - - enforceType(nonce, "string", "nonce"); - var kpArray = asArray(keyPairs); - var signers = kpArray.map(mkSigner); - var cmdJSON = { - networkId: networkId, - payload: { - cont: { - proof: proof || null, - pactId: pactId, - rollback: rollback, - step: step, - data: envData || {}, - } - }, - signers: signers, - meta: meta, - nonce: JSON.stringify(nonce) - }; - var cmd = JSON.stringify(cmdJSON); - var sigs = kpArray.map(function(kp) { - return sign(cmd, kp); - }); - return mkSingleCmd(sigs, cmd); -}; - -/** - * Makes a single command given signed data. - * @param sigs {array} - array of signature objects, see 'sign' - * @param cmd {string} - stringified JSON blob used to create hash - * @return valid Pact API command for send or local use. - */ -var mkSingleCmd = function(sigs, cmd) { - enforceArray(sigs, "sigs"); - enforceType(cmd, "string", "cmd"); - return { - hash: pullAndCheckHashs(sigs), - sigs: sigs.map(pullSig), - cmd: cmd - }; -}; - -/** - * Makes outer wrapper for a 'send' endpoint. - * @param {array or object} cmds - one or an array of commands, see mkSingleCmd - */ -var mkPublicSend = function(cmds) { - return { cmds: asArray(cmds) }; -}; - -/** - * Make an ED25519 "signer" array element for inclusion in a Pact payload. - * @param {object} kp - a ED25519 keypair and/or clist (list of `cap` in mkCap) - * @return {object} an object with pubKey, addr and scheme fields. - */ -var mkSigner = function(kp) { - return { - clist: kp.clist ? asArray(kp.clist) : [], - pubKey: kp.publicKey - }; -}; - -var asArray = function(singleOrArray) { - if (Array.isArray(singleOrArray)) { - return singleOrArray; - } else { - return [singleOrArray]; - } -}; - -var enforceType = function(val, type, msg) { - if (typeof val !== type) { - throw new TypeError( - msg + " must be a " + type + ": " + JSON.stringify(val) - ); - } -}; - -var enforceArray = function(val, msg) { - if (!Array.isArray(val)) { - throw new TypeError(msg + " must be an array: " + JSON.stringify(val)); - } -}; - -/** - * Make a full 'send' endpoint exec command. See 'prepareExecCmd' for parameters. - */ -var simpleExecCommand = function(keyPairs, nonce, pactCode, envData, meta, networkId) { - return mkPublicSend(prepareExecCmd(keyPairs, nonce, pactCode, envData, meta, networkId)); -}; - -/** - * Make a full 'send' endpoint cont command. See 'prepareContCmd' for parameters. - */ -var simpleContCommand = function(keyPairs, nonce, step, pactId, rollback, envData, meta, proof, networkId) { - return mkPublicSend(prepareContCmd(keyPairs, nonce, proof, pactId, rollback, step, envData, meta, networkId)); -}; - -var unique = function(arr) { - var n = {}, - r = []; - for (var i = 0; i < arr.length; i++) { - if (!n[arr[i]]) { - n[arr[i]] = true; - r.push(arr[i]); - } - } - return r; -}; - -/** - * Given an exec 'send' message, prepare a message for 'poll' endpoint. - * @param execMsg {object} JSON with "cmds" field, see 'mkPublicSend' - * @return {object} with "requestKeys" for polling. - */ -var simplePollRequestFromExec = function(execMsg) { - var cmds = - execMsg.cmds || - TypeError("expected key 'cmds' in object: " + JSON.stringify(execMsg)); - var rks = []; - if ( - !cmds.every(function(v) { - return v.hasOwnProperty("hash"); - }) - ) { - throw new TypeError( - 'maleformed object, expected "hash" key in every cmd: ' + - JSON.stringify(execMsg) - ); - } else { - rks = unique( - cmds.map(function(v) { - return v.hash; - }) - ); - } - return { requestKeys: rks }; -}; - -/** - * Given an exec 'send' message, prepare a message for 'listen' endpoint. - * @param execMsg {object} JSON with "cmds" field, see 'mkPublicSend'. Only takes first element. - * @return {object} with "requestKey" for polling. - */ -var simpleListenRequestFromExec = function(execMsg) { - var cmds = - execMsg.cmds || - TypeError("expected key 'cmds' in object: " + JSON.stringify(execMsg)); - var rks = []; - if ( - !cmds.every(function(v) { - return v.hasOwnProperty("hash"); - }) - ) { - throw new TypeError( - 'maleformed object, expected "hash" key in every cmd: ' + - JSON.stringify(execMsg) - ); - } else { - rks = unique( - cmds.map(function(v) { - return v.hash; - }) - ); - } - return { listen: rks[0] }; -}; - -/** - * Variadic function to form a lisp s-expression application. - * Encases arguments in parens and intercalates with a space. - */ -var mkExp = function(pgmName) { - enforceType(pgmName, "string", "pgmName"); - return ( - "(" + - pgmName + - " " + - Array.prototype.slice - .call(arguments, 1) - .map(JSON.stringify) - .join(" ") + - ")" - ); -}; - -/** - * Prepare a chainweb-style public meta payload. - * @param sender {string} gas account - * @param chainId {string} chain identifier - * @param gasPrice {number} desired gas price - * @param gasLimit {number} desired gas limit - * @param creationTime {number} desired tx's time created in UNIX epoch time as seconds - * @param ttl {number} desired tx's time to live as seconds - * @return {object} of arguments, type-checked and properly named. - */ -var mkMeta = function(sender, chainId, gasPrice, gasLimit, creationTime, ttl) { - enforceType(sender, "string", "sender"); - enforceType(chainId, "string", "chainId"); - enforceType(gasPrice, "number", "gasPrice"); - enforceType(gasLimit, "number", "gasLimit"); - enforceType(creationTime, "number", "creationTime"); - enforceType(ttl, "number", "ttl"); - return { - creationTime: creationTime, - ttl: ttl, - gasLimit: gasLimit, - chainId: chainId, - gasPrice: gasPrice, - sender: sender - }; -}; - -/** - * Formats ExecCmd into api request object - */ -var mkReq = function(cmd) { - return { - headers: { - "Content-Type": "application/json" - }, - method: "POST", - body: JSON.stringify(cmd) - }; -}; - - - - /** - * A execCmd Object to Execute in send or local. - * @typedef {Object} cmd to `/send` endpoint - * @property type {string} - type of command - "cont" or "exec", default to "exec" - * @property pactCode {string} - pact code to execute in "exec" command - required for "exec" - * @property nonce {string} - nonce value to ensure unique hash - default to current time - * @property envData {object} - JSON message data for command - not required - * @property meta {object} - public meta information, see mkMeta - * @property networkId {object} network identifier of where the cmd is executed. - */ - - /** - * A contCmd to Execute in send - * @typedef {Object} cmd to `/send` endpoint - * @property type {string} - type of command - "cont" or "exec", default to "exec" - * @property pactId {string} - pactId the cont command - required for "cont" - * @property nonce {string} - nonce value to ensure unique hash - default to current time - * @property step {number} - the step of the mutli-step transaction - required for "cont" - * @property proof {string} - JSON message of SPV proof - required for cross-chain transaction - * @property rollback {bool} - boolean value of rollback - required for "cont" - * @property envData {object} - JSON message data for command - not required - * @property meta {object} - public meta information, see mkMeta - * @property networkId {object} network identifier of where the cmd is executed. - */ - -/** - * Sends Pact command to a running Pact server and retrieves tx result. - * @param {[execCmd or contCmd] or execCmd or contCmt} cmd or a list of cmds to execute - * @param {string} apiHost host running Pact server - * @return {object} Request key of the tx received from pact server. - */ -const fetchSend = async function(sendCmd, apiHost){ - if (!apiHost) throw new Error(`Pact.fetch.send(): No apiHost provided`); - const sendCmds = asArray(sendCmd).map(cmd => { - if (cmd.type === "cont") { - return prepareContCmd( cmd.keyPairs, cmd.nonce, cmd.proof, cmd.pactId, - cmd.rollback, cmd.step, cmd.envData, cmd.meta, - cmd.networkId ) - } else { - return prepareExecCmd( cmd.keyPairs, cmd.nonce, cmd.pactCode, - cmd.envData, cmd.meta, cmd.networkId ) - } - }) - const txRes = await fetch(`${apiHost}/api/v1/send`, mkReq(mkPublicSend(sendCmds))); - const tx = await txRes.json(); - return tx; -}; - -/** - * A SPV Command Object to Execute in Pact Server. - * @typedef {Object} spvCmd - * @property requestKey {string} pactId of the cross-chain transaction - * @property targetChainId {string} chainId of target chain of the cross-chain transaction - */ - -/** - * Sends request to /spv to fetch SPV proof. - * @param {spvCmd} spvCmd see spvCmd - * @param {string} apiHost host running Pact server - * @return {string} SPV proof received from Pact server. - */ -const fetchSPV = async function(spvCmd, apiHost){ - if (!apiHost) throw new Error(`Pact.fetch.spv(): No apiHost provided`); - enforceType(spvCmd.targetChainId, "string", "targetChainId"); - enforceType(spvCmd.requestKey, "string", "requestKey"); - const txRes = await fetch(`${apiHost}/spv`, mkReq(spvCmd)); - const tx = await txRes.json(); - return tx; -}; - -/** - * Sends Local Pact command to a local Pact server and retrieves local tx result. - * @param {execCmd} localCmd a single cmd to execute locally - * @param {string} apiHost host running Pact server - * @return {object} tx result received from pact server. - */ -const fetchLocal = async function(localCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.local(): No apiHost provided`); - const {keyPairs, nonce, pactCode, envData, meta} = localCmd - const cmd = prepareExecCmd(keyPairs, nonce, pactCode, envData, meta); - const txRes = await fetch(`${apiHost}/api/v1/local`, mkReq(cmd)); - const tx = await txRes.json(); - return tx; -}; - -/** - * Poll result of Pact command to a running Pact server and retrieves tx result. - * @param {{requestKeys: []}} pollCmd request Keys of txs to poll. - * @param {string} apiHost host running Pact server - * @return {object} Array of tx request keys and tx results from pact server. - */ -const fetchPoll = async function(pollCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.poll(): No apiHost provided`); - const res = await fetch(`${apiHost}/api/v1/poll`, mkReq(pollCmd)); - const resJSON = await res.json(); - return resJSON; -}; - -/** - * Listen result of Pact command to a running Pact server and retrieves tx result. - * @param {{listenCmd: }} listenCmd reqest key of tx to listen. - * @param {string} apiHost host running Pact server - * @return {object} Object containing tx result from pact server - */ - const fetchListen = async function(listenCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.listen(): No apiHost provided`); - const res = await fetch(`${apiHost}/api/v1/listen`, mkReq(listenCmd)); - const resJSON = await res.json(); - return resJSON; - }; - -/** - Signing API functions to interact with Chainweaver wallet (https://github.com/kadena-io/chainweaver) and its signing API. - */ - -/** - * Prepares a capability object to be signed with keyPairs using signing API. - * @param role {string} role of the pact capability - * @param description {string} description of the pact capability - * @param name {string} name of pact capability to be signed - * @param args {array} array of arguments used in pact capability, default to empty array. - * @return {object} A properly formatted cap object required in signingCmd - */ -var mkCap = function(role, description, name, args=[]) { - enforceType(role, "string", "role"); - enforceType(description, "string", "description"); - enforceType(name, "string", "name of capability"); - enforceType(args, "object", "arguments to capability"); - return { - role: role, - description: description, - cap: { - name: name, - args: args - } - }; -}; - -/** - * A signingCmd Object to be sent to signing API - * @typedef {Object} signingCmd - cmd to be sent to signing API - * @property pactCode {string} - Pact code to execute - required - * @property caps {array or object} - Pact capability to be signed, see mkCap - required - * @property envData {object} - JSON message data for command - optional - * @property sender {string} - sender field in meta, see mkMeta - optional - * @property chainId {string} - chainId field in meta, see mkMeta - optional - * @property gasLimit {number} - gasLimit field in meta, see mkMeta - optional - * @property nonce {string} - nonce value for ensuring unique hash - optional - **/ - -/** - * Sends parameters of Pact Command to the Chainweaver signing API and retrieves a signed Pact Command. - * @param signingCmd - cmd to be sent to signing API - * @return {object} valid pact ExecCmd for send or local use. - **/ - const signWallet = async function (signingCmd){ - if (!signingCmd.pactCode) throw new Error(`Pact.wallet.sign(): No Pact Code provided`); - if (!signingCmd.caps) throw new Error(`Pact.wallet.sign(): No Caps provided`); - enforceType(signingCmd.pactCode, "string", "pactCode"); - enforceType(signingCmd.caps, "object", "caps"); - if (signingCmd.envData) enforceType(signingCmd.envData, "object", "envData"); - if (signingCmd.sender) enforceType(signingCmd.sender, "string", "sender"); - if (signingCmd.chainId) enforceType(signingCmd.chainId, "string", "chainId"); - if (signingCmd.gasLimit) enforceType(signingCmd.gasLimit, "number", "gasLimit"); - if (signingCmd.nonce) enforceType(signingCmd.nonce, "string", "nonce"); - if (signingCmd.ttl) enforceType(signingCmd.ttl, "number", "ttl"); - - const cmd = { - code: signingCmd.pactCode, - caps: asArray(signingCmd.caps), - data: signingCmd.envData, - sender: signingCmd.sender, - chainId: signingCmd.chainId, - gasLimit: signingCmd.gasLimit, - nonce: signingCmd.nonce, - ttl: signingCmd.ttl - } - const res = await fetch('http://127.0.0.1:9467/v1/sign', mkReq(cmd)) - const resJSON = await res.json(); - return resJSON.body; - } - -/** - * Sends a signed Pact ExecCmd to a running Pact server and retrieves tx result. - * @param {signedCmd} valid pact API command for send or local use. - * @param {string} apiHost host running Pact server - * @return {object} Request key of the tx received from pact server. - */ -const sendSigned = async function (signedCmd, apiHost) { - const cmd = { - "cmds": [ signedCmd ] - } - const txRes = await fetch(`${apiHost}/api/v1/send`, mkReq(cmd)); - const tx = await txRes.json(); - return tx; -} - -module.exports = { - crypto: { - binToHex: binToHex, - hexToBin: hexToBin, - base64UrlEncode: base64UrlEncode, - hash: hash, - genKeyPair: genKeyPair, - sign: sign, - toTweetNaclSecretKey: toTweetNaclSecretKey - }, - api: { - prepareContCmd: prepareContCmd, - prepareExecCmd: prepareExecCmd, - mkSingleCmd: mkSingleCmd, - mkPublicSend: mkPublicSend - }, - lang: { - mkExp: mkExp, - mkMeta: mkMeta, - mkCap: mkCap - }, - simple: { - cont: { - createCommand: simpleContCommand - }, - exec: { - createCommand: simpleExecCommand, - createLocalCommand: prepareExecCmd, - createPollRequest: simplePollRequestFromExec, - createListenRequest: simpleListenRequestFromExec - } - }, - fetch: { - send: fetchSend, - local: fetchLocal, - poll: fetchPoll, - listen: fetchListen, - spv: fetchSPV - }, - wallet: { - sign: signWallet, - sendSigned: sendSigned - } -}; diff --git a/node_modules/pact-lang-api/pact-lang-api.min.js b/node_modules/pact-lang-api/pact-lang-api.min.js deleted file mode 100644 index cae9f28..0000000 --- a/node_modules/pact-lang-api/pact-lang-api.min.js +++ /dev/null @@ -1,5715 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk( - uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) - )) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} - -},{}],2:[function(require,module,exports){ -(function (Buffer){ -'use strict' - -module.exports = { - unescape: unescape, - escape: escape, - encode: encode, - decode: decode -} - -function unescape (str) { - return (str + '==='.slice((str.length + 3) % 4)) - .replace(/-/g, '+') - .replace(/_/g, '/') -} - -function escape (str) { - return str.replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=/g, '') -} - -function encode (str, encoding) { - return escape(Buffer.from(str, encoding || 'utf8').toString('base64')) -} - -function decode (str, encoding) { - return Buffer.from(unescape(str), 'base64').toString(encoding || 'utf8') -} - -}).call(this,require("buffer").Buffer) -},{"buffer":8}],3:[function(require,module,exports){ -// Blake2B in pure Javascript -// Adapted from the reference implementation in RFC7693 -// Ported to Javascript by DC - https://github.com/dcposch - -var util = require('./util') - -// 64-bit unsigned addition -// Sets v[a,a+1] += v[b,b+1] -// v should be a Uint32Array -function ADD64AA (v, a, b) { - var o0 = v[a] + v[b] - var o1 = v[a + 1] + v[b + 1] - if (o0 >= 0x100000000) { - o1++ - } - v[a] = o0 - v[a + 1] = o1 -} - -// 64-bit unsigned addition -// Sets v[a,a+1] += b -// b0 is the low 32 bits of b, b1 represents the high 32 bits -function ADD64AC (v, a, b0, b1) { - var o0 = v[a] + b0 - if (b0 < 0) { - o0 += 0x100000000 - } - var o1 = v[a + 1] + b1 - if (o0 >= 0x100000000) { - o1++ - } - v[a] = o0 - v[a + 1] = o1 -} - -// Little-endian byte access -function B2B_GET32 (arr, i) { - return (arr[i] ^ - (arr[i + 1] << 8) ^ - (arr[i + 2] << 16) ^ - (arr[i + 3] << 24)) -} - -// G Mixing function -// The ROTRs are inlined for speed -function B2B_G (a, b, c, d, ix, iy) { - var x0 = m[ix] - var x1 = m[ix + 1] - var y0 = m[iy] - var y1 = m[iy + 1] - - ADD64AA(v, a, b) // v[a,a+1] += v[b,b+1] ... in JS we must store a uint64 as two uint32s - ADD64AC(v, a, x0, x1) // v[a, a+1] += x ... x0 is the low 32 bits of x, x1 is the high 32 bits - - // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated to the right by 32 bits - var xor0 = v[d] ^ v[a] - var xor1 = v[d + 1] ^ v[a + 1] - v[d] = xor1 - v[d + 1] = xor0 - - ADD64AA(v, c, d) - - // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 24 bits - xor0 = v[b] ^ v[c] - xor1 = v[b + 1] ^ v[c + 1] - v[b] = (xor0 >>> 24) ^ (xor1 << 8) - v[b + 1] = (xor1 >>> 24) ^ (xor0 << 8) - - ADD64AA(v, a, b) - ADD64AC(v, a, y0, y1) - - // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated right by 16 bits - xor0 = v[d] ^ v[a] - xor1 = v[d + 1] ^ v[a + 1] - v[d] = (xor0 >>> 16) ^ (xor1 << 16) - v[d + 1] = (xor1 >>> 16) ^ (xor0 << 16) - - ADD64AA(v, c, d) - - // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 63 bits - xor0 = v[b] ^ v[c] - xor1 = v[b + 1] ^ v[c + 1] - v[b] = (xor1 >>> 31) ^ (xor0 << 1) - v[b + 1] = (xor0 >>> 31) ^ (xor1 << 1) -} - -// Initialization Vector -var BLAKE2B_IV32 = new Uint32Array([ - 0xF3BCC908, 0x6A09E667, 0x84CAA73B, 0xBB67AE85, - 0xFE94F82B, 0x3C6EF372, 0x5F1D36F1, 0xA54FF53A, - 0xADE682D1, 0x510E527F, 0x2B3E6C1F, 0x9B05688C, - 0xFB41BD6B, 0x1F83D9AB, 0x137E2179, 0x5BE0CD19 -]) - -var SIGMA8 = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3, - 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4, - 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8, - 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13, - 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9, - 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11, - 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10, - 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5, - 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 -] - -// These are offsets into a uint64 buffer. -// Multiply them all by 2 to make them offsets into a uint32 buffer, -// because this is Javascript and we don't have uint64s -var SIGMA82 = new Uint8Array(SIGMA8.map(function (x) { return x * 2 })) - -// Compression function. 'last' flag indicates last block. -// Note we're representing 16 uint64s as 32 uint32s -var v = new Uint32Array(32) -var m = new Uint32Array(32) -function blake2bCompress (ctx, last) { - var i = 0 - - // init work variables - for (i = 0; i < 16; i++) { - v[i] = ctx.h[i] - v[i + 16] = BLAKE2B_IV32[i] - } - - // low 64 bits of offset - v[24] = v[24] ^ ctx.t - v[25] = v[25] ^ (ctx.t / 0x100000000) - // high 64 bits not supported, offset may not be higher than 2**53-1 - - // last block flag set ? - if (last) { - v[28] = ~v[28] - v[29] = ~v[29] - } - - // get little-endian words - for (i = 0; i < 32; i++) { - m[i] = B2B_GET32(ctx.b, 4 * i) - } - - // twelve rounds of mixing - // uncomment the DebugPrint calls to log the computation - // and match the RFC sample documentation - // util.debugPrint(' m[16]', m, 64) - for (i = 0; i < 12; i++) { - // util.debugPrint(' (i=' + (i < 10 ? ' ' : '') + i + ') v[16]', v, 64) - B2B_G(0, 8, 16, 24, SIGMA82[i * 16 + 0], SIGMA82[i * 16 + 1]) - B2B_G(2, 10, 18, 26, SIGMA82[i * 16 + 2], SIGMA82[i * 16 + 3]) - B2B_G(4, 12, 20, 28, SIGMA82[i * 16 + 4], SIGMA82[i * 16 + 5]) - B2B_G(6, 14, 22, 30, SIGMA82[i * 16 + 6], SIGMA82[i * 16 + 7]) - B2B_G(0, 10, 20, 30, SIGMA82[i * 16 + 8], SIGMA82[i * 16 + 9]) - B2B_G(2, 12, 22, 24, SIGMA82[i * 16 + 10], SIGMA82[i * 16 + 11]) - B2B_G(4, 14, 16, 26, SIGMA82[i * 16 + 12], SIGMA82[i * 16 + 13]) - B2B_G(6, 8, 18, 28, SIGMA82[i * 16 + 14], SIGMA82[i * 16 + 15]) - } - // util.debugPrint(' (i=12) v[16]', v, 64) - - for (i = 0; i < 16; i++) { - ctx.h[i] = ctx.h[i] ^ v[i] ^ v[i + 16] - } - // util.debugPrint('h[8]', ctx.h, 64) -} - -// Creates a BLAKE2b hashing context -// Requires an output length between 1 and 64 bytes -// Takes an optional Uint8Array key -function blake2bInit (outlen, key) { - if (outlen === 0 || outlen > 64) { - throw new Error('Illegal output length, expected 0 < length <= 64') - } - if (key && key.length > 64) { - throw new Error('Illegal key, expected Uint8Array with 0 < length <= 64') - } - - // state, 'param block' - var ctx = { - b: new Uint8Array(128), - h: new Uint32Array(16), - t: 0, // input count - c: 0, // pointer within buffer - outlen: outlen // output length in bytes - } - - // initialize hash state - for (var i = 0; i < 16; i++) { - ctx.h[i] = BLAKE2B_IV32[i] - } - var keylen = key ? key.length : 0 - ctx.h[0] ^= 0x01010000 ^ (keylen << 8) ^ outlen - - // key the hash, if applicable - if (key) { - blake2bUpdate(ctx, key) - // at the end - ctx.c = 128 - } - - return ctx -} - -// Updates a BLAKE2b streaming hash -// Requires hash context and Uint8Array (byte array) -function blake2bUpdate (ctx, input) { - for (var i = 0; i < input.length; i++) { - if (ctx.c === 128) { // buffer full ? - ctx.t += ctx.c // add counters - blake2bCompress(ctx, false) // compress (not last) - ctx.c = 0 // counter to zero - } - ctx.b[ctx.c++] = input[i] - } -} - -// Completes a BLAKE2b streaming hash -// Returns a Uint8Array containing the message digest -function blake2bFinal (ctx) { - ctx.t += ctx.c // mark last block offset - - while (ctx.c < 128) { // fill up with zeros - ctx.b[ctx.c++] = 0 - } - blake2bCompress(ctx, true) // final block flag = 1 - - // little endian convert and store - var out = new Uint8Array(ctx.outlen) - for (var i = 0; i < ctx.outlen; i++) { - out[i] = ctx.h[i >> 2] >> (8 * (i & 3)) - } - return out -} - -// Computes the BLAKE2B hash of a string or byte array, and returns a Uint8Array -// -// Returns a n-byte Uint8Array -// -// Parameters: -// - input - the input bytes, as a string, Buffer or Uint8Array -// - key - optional key Uint8Array, up to 64 bytes -// - outlen - optional output length in bytes, default 64 -function blake2b (input, key, outlen) { - // preprocess inputs - outlen = outlen || 64 - input = util.normalizeInput(input) - - // do the math - var ctx = blake2bInit(outlen, key) - blake2bUpdate(ctx, input) - return blake2bFinal(ctx) -} - -// Computes the BLAKE2B hash of a string or byte array -// -// Returns an n-byte hash in hex, all lowercase -// -// Parameters: -// - input - the input bytes, as a string, Buffer, or Uint8Array -// - key - optional key Uint8Array, up to 64 bytes -// - outlen - optional output length in bytes, default 64 -function blake2bHex (input, key, outlen) { - var output = blake2b(input, key, outlen) - return util.toHex(output) -} - -module.exports = { - blake2b: blake2b, - blake2bHex: blake2bHex, - blake2bInit: blake2bInit, - blake2bUpdate: blake2bUpdate, - blake2bFinal: blake2bFinal -} - -},{"./util":6}],4:[function(require,module,exports){ -// BLAKE2s hash function in pure Javascript -// Adapted from the reference implementation in RFC7693 -// Ported to Javascript by DC - https://github.com/dcposch - -var util = require('./util') - -// Little-endian byte access. -// Expects a Uint8Array and an index -// Returns the little-endian uint32 at v[i..i+3] -function B2S_GET32 (v, i) { - return v[i] ^ (v[i + 1] << 8) ^ (v[i + 2] << 16) ^ (v[i + 3] << 24) -} - -// Mixing function G. -function B2S_G (a, b, c, d, x, y) { - v[a] = v[a] + v[b] + x - v[d] = ROTR32(v[d] ^ v[a], 16) - v[c] = v[c] + v[d] - v[b] = ROTR32(v[b] ^ v[c], 12) - v[a] = v[a] + v[b] + y - v[d] = ROTR32(v[d] ^ v[a], 8) - v[c] = v[c] + v[d] - v[b] = ROTR32(v[b] ^ v[c], 7) -} - -// 32-bit right rotation -// x should be a uint32 -// y must be between 1 and 31, inclusive -function ROTR32 (x, y) { - return (x >>> y) ^ (x << (32 - y)) -} - -// Initialization Vector. -var BLAKE2S_IV = new Uint32Array([ - 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, - 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19]) - -var SIGMA = new Uint8Array([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3, - 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4, - 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8, - 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13, - 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9, - 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11, - 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10, - 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5, - 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0]) - -// Compression function. "last" flag indicates last block -var v = new Uint32Array(16) -var m = new Uint32Array(16) -function blake2sCompress (ctx, last) { - var i = 0 - for (i = 0; i < 8; i++) { // init work variables - v[i] = ctx.h[i] - v[i + 8] = BLAKE2S_IV[i] - } - - v[12] ^= ctx.t // low 32 bits of offset - v[13] ^= (ctx.t / 0x100000000) // high 32 bits - if (last) { // last block flag set ? - v[14] = ~v[14] - } - - for (i = 0; i < 16; i++) { // get little-endian words - m[i] = B2S_GET32(ctx.b, 4 * i) - } - - // ten rounds of mixing - // uncomment the DebugPrint calls to log the computation - // and match the RFC sample documentation - // util.debugPrint(' m[16]', m, 32) - for (i = 0; i < 10; i++) { - // util.debugPrint(' (i=' + i + ') v[16]', v, 32) - B2S_G(0, 4, 8, 12, m[SIGMA[i * 16 + 0]], m[SIGMA[i * 16 + 1]]) - B2S_G(1, 5, 9, 13, m[SIGMA[i * 16 + 2]], m[SIGMA[i * 16 + 3]]) - B2S_G(2, 6, 10, 14, m[SIGMA[i * 16 + 4]], m[SIGMA[i * 16 + 5]]) - B2S_G(3, 7, 11, 15, m[SIGMA[i * 16 + 6]], m[SIGMA[i * 16 + 7]]) - B2S_G(0, 5, 10, 15, m[SIGMA[i * 16 + 8]], m[SIGMA[i * 16 + 9]]) - B2S_G(1, 6, 11, 12, m[SIGMA[i * 16 + 10]], m[SIGMA[i * 16 + 11]]) - B2S_G(2, 7, 8, 13, m[SIGMA[i * 16 + 12]], m[SIGMA[i * 16 + 13]]) - B2S_G(3, 4, 9, 14, m[SIGMA[i * 16 + 14]], m[SIGMA[i * 16 + 15]]) - } - // util.debugPrint(' (i=10) v[16]', v, 32) - - for (i = 0; i < 8; i++) { - ctx.h[i] ^= v[i] ^ v[i + 8] - } - // util.debugPrint('h[8]', ctx.h, 32) -} - -// Creates a BLAKE2s hashing context -// Requires an output length between 1 and 32 bytes -// Takes an optional Uint8Array key -function blake2sInit (outlen, key) { - if (!(outlen > 0 && outlen <= 32)) { - throw new Error('Incorrect output length, should be in [1, 32]') - } - var keylen = key ? key.length : 0 - if (key && !(keylen > 0 && keylen <= 32)) { - throw new Error('Incorrect key length, should be in [1, 32]') - } - - var ctx = { - h: new Uint32Array(BLAKE2S_IV), // hash state - b: new Uint32Array(64), // input block - c: 0, // pointer within block - t: 0, // input count - outlen: outlen // output length in bytes - } - ctx.h[0] ^= 0x01010000 ^ (keylen << 8) ^ outlen - - if (keylen > 0) { - blake2sUpdate(ctx, key) - ctx.c = 64 // at the end - } - - return ctx -} - -// Updates a BLAKE2s streaming hash -// Requires hash context and Uint8Array (byte array) -function blake2sUpdate (ctx, input) { - for (var i = 0; i < input.length; i++) { - if (ctx.c === 64) { // buffer full ? - ctx.t += ctx.c // add counters - blake2sCompress(ctx, false) // compress (not last) - ctx.c = 0 // counter to zero - } - ctx.b[ctx.c++] = input[i] - } -} - -// Completes a BLAKE2s streaming hash -// Returns a Uint8Array containing the message digest -function blake2sFinal (ctx) { - ctx.t += ctx.c // mark last block offset - while (ctx.c < 64) { // fill up with zeros - ctx.b[ctx.c++] = 0 - } - blake2sCompress(ctx, true) // final block flag = 1 - - // little endian convert and store - var out = new Uint8Array(ctx.outlen) - for (var i = 0; i < ctx.outlen; i++) { - out[i] = (ctx.h[i >> 2] >> (8 * (i & 3))) & 0xFF - } - return out -} - -// Computes the BLAKE2S hash of a string or byte array, and returns a Uint8Array -// -// Returns a n-byte Uint8Array -// -// Parameters: -// - input - the input bytes, as a string, Buffer, or Uint8Array -// - key - optional key Uint8Array, up to 32 bytes -// - outlen - optional output length in bytes, default 64 -function blake2s (input, key, outlen) { - // preprocess inputs - outlen = outlen || 32 - input = util.normalizeInput(input) - - // do the math - var ctx = blake2sInit(outlen, key) - blake2sUpdate(ctx, input) - return blake2sFinal(ctx) -} - -// Computes the BLAKE2S hash of a string or byte array -// -// Returns an n-byte hash in hex, all lowercase -// -// Parameters: -// - input - the input bytes, as a string, Buffer, or Uint8Array -// - key - optional key Uint8Array, up to 32 bytes -// - outlen - optional output length in bytes, default 64 -function blake2sHex (input, key, outlen) { - var output = blake2s(input, key, outlen) - return util.toHex(output) -} - -module.exports = { - blake2s: blake2s, - blake2sHex: blake2sHex, - blake2sInit: blake2sInit, - blake2sUpdate: blake2sUpdate, - blake2sFinal: blake2sFinal -} - -},{"./util":6}],5:[function(require,module,exports){ -var b2b = require('./blake2b') -var b2s = require('./blake2s') - -module.exports = { - blake2b: b2b.blake2b, - blake2bHex: b2b.blake2bHex, - blake2bInit: b2b.blake2bInit, - blake2bUpdate: b2b.blake2bUpdate, - blake2bFinal: b2b.blake2bFinal, - blake2s: b2s.blake2s, - blake2sHex: b2s.blake2sHex, - blake2sInit: b2s.blake2sInit, - blake2sUpdate: b2s.blake2sUpdate, - blake2sFinal: b2s.blake2sFinal -} - -},{"./blake2b":3,"./blake2s":4}],6:[function(require,module,exports){ -(function (Buffer){ -var ERROR_MSG_INPUT = 'Input must be an string, Buffer or Uint8Array' - -// For convenience, let people hash a string, not just a Uint8Array -function normalizeInput (input) { - var ret - if (input instanceof Uint8Array) { - ret = input - } else if (input instanceof Buffer) { - ret = new Uint8Array(input) - } else if (typeof (input) === 'string') { - ret = new Uint8Array(Buffer.from(input, 'utf8')) - } else { - throw new Error(ERROR_MSG_INPUT) - } - return ret -} - -// Converts a Uint8Array to a hexadecimal string -// For example, toHex([255, 0, 255]) returns "ff00ff" -function toHex (bytes) { - return Array.prototype.map.call(bytes, function (n) { - return (n < 16 ? '0' : '') + n.toString(16) - }).join('') -} - -// Converts any value in [0...2^32-1] to an 8-character hex string -function uint32ToHex (val) { - return (0x100000000 + val).toString(16).substring(1) -} - -// For debugging: prints out hash state in the same format as the RFC -// sample computation exactly, so that you can diff -function debugPrint (label, arr, size) { - var msg = '\n' + label + ' = ' - for (var i = 0; i < arr.length; i += 2) { - if (size === 32) { - msg += uint32ToHex(arr[i]).toUpperCase() - msg += ' ' - msg += uint32ToHex(arr[i + 1]).toUpperCase() - } else if (size === 64) { - msg += uint32ToHex(arr[i + 1]).toUpperCase() - msg += uint32ToHex(arr[i]).toUpperCase() - } else throw new Error('Invalid size ' + size) - if (i % 6 === 4) { - msg += '\n' + new Array(label.length + 4).join(' ') - } else if (i < arr.length - 2) { - msg += ' ' - } - } - console.log(msg) -} - -// For performance testing: generates N bytes of input, hashes M times -// Measures and prints MB/second hash performance each time -function testSpeed (hashFn, N, M) { - var startMs = new Date().getTime() - - var input = new Uint8Array(N) - for (var i = 0; i < N; i++) { - input[i] = i % 256 - } - var genMs = new Date().getTime() - console.log('Generated random input in ' + (genMs - startMs) + 'ms') - startMs = genMs - - for (i = 0; i < M; i++) { - var hashHex = hashFn(input) - var hashMs = new Date().getTime() - var ms = hashMs - startMs - startMs = hashMs - console.log('Hashed in ' + ms + 'ms: ' + hashHex.substring(0, 20) + '...') - console.log(Math.round(N / (1 << 20) / (ms / 1000) * 100) / 100 + ' MB PER SECOND') - } -} - -module.exports = { - normalizeInput: normalizeInput, - toHex: toHex, - debugPrint: debugPrint, - testSpeed: testSpeed -} - -}).call(this,require("buffer").Buffer) -},{"buffer":8}],7:[function(require,module,exports){ - -},{}],8:[function(require,module,exports){ -(function (Buffer){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var customInspectSymbol = - (typeof Symbol === 'function' && typeof Symbol.for === 'function') - ? Symbol.for('nodejs.util.inspect.custom') - : null - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -var K_MAX_LENGTH = 0x7fffffff -exports.kMaxLength = K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - var arr = new Uint8Array(1) - var proto = { foo: function () { return 42 } } - Object.setPrototypeOf(proto, Uint8Array.prototype) - Object.setPrototypeOf(arr, proto) - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - var buf = new Uint8Array(length) - Object.setPrototypeOf(buf, Buffer.prototype) - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) - } - return allocUnsafe(arg) - } - return from(arg, encodingOrOffset, length) -} - -// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 -if (typeof Symbol !== 'undefined' && Symbol.species != null && - Buffer[Symbol.species] === Buffer) { - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true, - enumerable: false, - writable: false - }) -} - -Buffer.poolSize = 8192 // not used by this implementation - -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - if (ArrayBuffer.isView(value)) { - return fromArrayLike(value) - } - - if (value == null) { - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } - - var valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) - } - - var b = fromObject(value) - if (b) return b - - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from( - value[Symbol.toPrimitive]('string'), encodingOrOffset, length - ) - } - - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} - -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) -Object.setPrototypeOf(Buffer, Uint8Array) - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} - -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) - } - return createBuffer(size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} - -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - var length = byteLength(string, encoding) | 0 - var buf = createBuffer(length) - - var actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - var buf = createBuffer(length) - for (var i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - var buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } - - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(buf, Buffer.prototype) - - return buf -} - -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - var buf = createBuffer(len) - - if (buf.length === 0) { - return buf - } - - obj.copy(buf, 0, 0, len) - return buf - } - - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) - } - return fromArrayLike(obj) - } - - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} - -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} - -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (isInstance(buf, Uint8Array)) { - buf = Buffer.from(buf) - } - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) - } - - var len = string.length - var mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} -if (customInspectSymbol) { - Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - var strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += hexSliceLookupTable[buf[i]] - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(newBuf, Buffer.prototype) - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (var i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code - } - } - } else if (typeof val === 'number') { - val = val & 255 - } else if (typeof val === 'boolean') { - val = Number(val) - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - var len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') - } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} - -// Create lookup table for `toString('hex')` -// See: https://github.com/feross/buffer/issues/219 -var hexSliceLookupTable = (function () { - var alphabet = '0123456789abcdef' - var table = new Array(256) - for (var i = 0; i < 16; ++i) { - var i16 = i * 16 - for (var j = 0; j < 16; ++j) { - table[i16 + j] = alphabet[i] + alphabet[j] - } - } - return table -})() - -}).call(this,require("buffer").Buffer) -},{"base64-js":1,"buffer":8,"ieee754":9}],9:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],10:[function(require,module,exports){ -(function (global){ -"use strict"; - -// ref: https://github.com/tc39/proposal-global -var getGlobal = function () { - // the only reliable means to get the global object is - // `Function('return this')()` - // However, this causes CSP violations in Chrome apps. - if (typeof self !== 'undefined') { return self; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - throw new Error('unable to locate global object'); -} - -var global = getGlobal(); - -module.exports = exports = global.fetch; - -// Needed for TypeScript and Webpack. -exports.default = global.fetch.bind(global); - -exports.Headers = global.Headers; -exports.Request = global.Request; -exports.Response = global.Response; -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],11:[function(require,module,exports){ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function ts64(x, i, h, l) { - x[i] = (h >> 24) & 0xff; - x[i+1] = (h >> 16) & 0xff; - x[i+2] = (h >> 8) & 0xff; - x[i+3] = h & 0xff; - x[i+4] = (l >> 24) & 0xff; - x[i+5] = (l >> 16) & 0xff; - x[i+6] = (l >> 8) & 0xff; - x[i+7] = l & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core_salsa20(o, p, k, c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - x0 = x0 + j0 | 0; - x1 = x1 + j1 | 0; - x2 = x2 + j2 | 0; - x3 = x3 + j3 | 0; - x4 = x4 + j4 | 0; - x5 = x5 + j5 | 0; - x6 = x6 + j6 | 0; - x7 = x7 + j7 | 0; - x8 = x8 + j8 | 0; - x9 = x9 + j9 | 0; - x10 = x10 + j10 | 0; - x11 = x11 + j11 | 0; - x12 = x12 + j12 | 0; - x13 = x13 + j13 | 0; - x14 = x14 + j14 | 0; - x15 = x15 + j15 | 0; - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x1 >>> 0 & 0xff; - o[ 5] = x1 >>> 8 & 0xff; - o[ 6] = x1 >>> 16 & 0xff; - o[ 7] = x1 >>> 24 & 0xff; - - o[ 8] = x2 >>> 0 & 0xff; - o[ 9] = x2 >>> 8 & 0xff; - o[10] = x2 >>> 16 & 0xff; - o[11] = x2 >>> 24 & 0xff; - - o[12] = x3 >>> 0 & 0xff; - o[13] = x3 >>> 8 & 0xff; - o[14] = x3 >>> 16 & 0xff; - o[15] = x3 >>> 24 & 0xff; - - o[16] = x4 >>> 0 & 0xff; - o[17] = x4 >>> 8 & 0xff; - o[18] = x4 >>> 16 & 0xff; - o[19] = x4 >>> 24 & 0xff; - - o[20] = x5 >>> 0 & 0xff; - o[21] = x5 >>> 8 & 0xff; - o[22] = x5 >>> 16 & 0xff; - o[23] = x5 >>> 24 & 0xff; - - o[24] = x6 >>> 0 & 0xff; - o[25] = x6 >>> 8 & 0xff; - o[26] = x6 >>> 16 & 0xff; - o[27] = x6 >>> 24 & 0xff; - - o[28] = x7 >>> 0 & 0xff; - o[29] = x7 >>> 8 & 0xff; - o[30] = x7 >>> 16 & 0xff; - o[31] = x7 >>> 24 & 0xff; - - o[32] = x8 >>> 0 & 0xff; - o[33] = x8 >>> 8 & 0xff; - o[34] = x8 >>> 16 & 0xff; - o[35] = x8 >>> 24 & 0xff; - - o[36] = x9 >>> 0 & 0xff; - o[37] = x9 >>> 8 & 0xff; - o[38] = x9 >>> 16 & 0xff; - o[39] = x9 >>> 24 & 0xff; - - o[40] = x10 >>> 0 & 0xff; - o[41] = x10 >>> 8 & 0xff; - o[42] = x10 >>> 16 & 0xff; - o[43] = x10 >>> 24 & 0xff; - - o[44] = x11 >>> 0 & 0xff; - o[45] = x11 >>> 8 & 0xff; - o[46] = x11 >>> 16 & 0xff; - o[47] = x11 >>> 24 & 0xff; - - o[48] = x12 >>> 0 & 0xff; - o[49] = x12 >>> 8 & 0xff; - o[50] = x12 >>> 16 & 0xff; - o[51] = x12 >>> 24 & 0xff; - - o[52] = x13 >>> 0 & 0xff; - o[53] = x13 >>> 8 & 0xff; - o[54] = x13 >>> 16 & 0xff; - o[55] = x13 >>> 24 & 0xff; - - o[56] = x14 >>> 0 & 0xff; - o[57] = x14 >>> 8 & 0xff; - o[58] = x14 >>> 16 & 0xff; - o[59] = x14 >>> 24 & 0xff; - - o[60] = x15 >>> 0 & 0xff; - o[61] = x15 >>> 8 & 0xff; - o[62] = x15 >>> 16 & 0xff; - o[63] = x15 >>> 24 & 0xff; -} - -function core_hsalsa20(o,p,k,c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x5 >>> 0 & 0xff; - o[ 5] = x5 >>> 8 & 0xff; - o[ 6] = x5 >>> 16 & 0xff; - o[ 7] = x5 >>> 24 & 0xff; - - o[ 8] = x10 >>> 0 & 0xff; - o[ 9] = x10 >>> 8 & 0xff; - o[10] = x10 >>> 16 & 0xff; - o[11] = x10 >>> 24 & 0xff; - - o[12] = x15 >>> 0 & 0xff; - o[13] = x15 >>> 8 & 0xff; - o[14] = x15 >>> 16 & 0xff; - o[15] = x15 >>> 24 & 0xff; - - o[16] = x6 >>> 0 & 0xff; - o[17] = x6 >>> 8 & 0xff; - o[18] = x6 >>> 16 & 0xff; - o[19] = x6 >>> 24 & 0xff; - - o[20] = x7 >>> 0 & 0xff; - o[21] = x7 >>> 8 & 0xff; - o[22] = x7 >>> 16 & 0xff; - o[23] = x7 >>> 24 & 0xff; - - o[24] = x8 >>> 0 & 0xff; - o[25] = x8 >>> 8 & 0xff; - o[26] = x8 >>> 16 & 0xff; - o[27] = x8 >>> 24 & 0xff; - - o[28] = x9 >>> 0 & 0xff; - o[29] = x9 >>> 8 & 0xff; - o[30] = x9 >>> 16 & 0xff; - o[31] = x9 >>> 24 & 0xff; -} - -function crypto_core_salsa20(out,inp,k,c) { - core_salsa20(out,inp,k,c); -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core_hsalsa20(out,inp,k,c); -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = x[i]; - } - return 0; -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20(c,cpos,d,sn,s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); -} - -/* -* Port of Andrew Moon's Poly1305-donna-16. Public domain. -* https://github.com/floodyberry/poly1305-donna -*/ - -var poly1305 = function(key) { - this.buffer = new Uint8Array(16); - this.r = new Uint16Array(10); - this.h = new Uint16Array(10); - this.pad = new Uint16Array(8); - this.leftover = 0; - this.fin = 0; - - var t0, t1, t2, t3, t4, t5, t6, t7; - - t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; - t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; - t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; - this.r[5] = ((t4 >>> 1)) & 0x1ffe; - t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; - t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - this.r[9] = ((t7 >>> 5)) & 0x007f; - - this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; - this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; - this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; - this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; - this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; - this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; - this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; - this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; -}; - -poly1305.prototype.blocks = function(m, mpos, bytes) { - var hibit = this.fin ? 0 : (1 << 11); - var t0, t1, t2, t3, t4, t5, t6, t7, c; - var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; - - var h0 = this.h[0], - h1 = this.h[1], - h2 = this.h[2], - h3 = this.h[3], - h4 = this.h[4], - h5 = this.h[5], - h6 = this.h[6], - h7 = this.h[7], - h8 = this.h[8], - h9 = this.h[9]; - - var r0 = this.r[0], - r1 = this.r[1], - r2 = this.r[2], - r3 = this.r[3], - r4 = this.r[4], - r5 = this.r[5], - r6 = this.r[6], - r7 = this.r[7], - r8 = this.r[8], - r9 = this.r[9]; - - while (bytes >= 16) { - t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; - t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; - t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; - h5 += ((t4 >>> 1)) & 0x1fff; - t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; - t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - h9 += ((t7 >>> 5)) | hibit; - - c = 0; - - d0 = c; - d0 += h0 * r0; - d0 += h1 * (5 * r9); - d0 += h2 * (5 * r8); - d0 += h3 * (5 * r7); - d0 += h4 * (5 * r6); - c = (d0 >>> 13); d0 &= 0x1fff; - d0 += h5 * (5 * r5); - d0 += h6 * (5 * r4); - d0 += h7 * (5 * r3); - d0 += h8 * (5 * r2); - d0 += h9 * (5 * r1); - c += (d0 >>> 13); d0 &= 0x1fff; - - d1 = c; - d1 += h0 * r1; - d1 += h1 * r0; - d1 += h2 * (5 * r9); - d1 += h3 * (5 * r8); - d1 += h4 * (5 * r7); - c = (d1 >>> 13); d1 &= 0x1fff; - d1 += h5 * (5 * r6); - d1 += h6 * (5 * r5); - d1 += h7 * (5 * r4); - d1 += h8 * (5 * r3); - d1 += h9 * (5 * r2); - c += (d1 >>> 13); d1 &= 0x1fff; - - d2 = c; - d2 += h0 * r2; - d2 += h1 * r1; - d2 += h2 * r0; - d2 += h3 * (5 * r9); - d2 += h4 * (5 * r8); - c = (d2 >>> 13); d2 &= 0x1fff; - d2 += h5 * (5 * r7); - d2 += h6 * (5 * r6); - d2 += h7 * (5 * r5); - d2 += h8 * (5 * r4); - d2 += h9 * (5 * r3); - c += (d2 >>> 13); d2 &= 0x1fff; - - d3 = c; - d3 += h0 * r3; - d3 += h1 * r2; - d3 += h2 * r1; - d3 += h3 * r0; - d3 += h4 * (5 * r9); - c = (d3 >>> 13); d3 &= 0x1fff; - d3 += h5 * (5 * r8); - d3 += h6 * (5 * r7); - d3 += h7 * (5 * r6); - d3 += h8 * (5 * r5); - d3 += h9 * (5 * r4); - c += (d3 >>> 13); d3 &= 0x1fff; - - d4 = c; - d4 += h0 * r4; - d4 += h1 * r3; - d4 += h2 * r2; - d4 += h3 * r1; - d4 += h4 * r0; - c = (d4 >>> 13); d4 &= 0x1fff; - d4 += h5 * (5 * r9); - d4 += h6 * (5 * r8); - d4 += h7 * (5 * r7); - d4 += h8 * (5 * r6); - d4 += h9 * (5 * r5); - c += (d4 >>> 13); d4 &= 0x1fff; - - d5 = c; - d5 += h0 * r5; - d5 += h1 * r4; - d5 += h2 * r3; - d5 += h3 * r2; - d5 += h4 * r1; - c = (d5 >>> 13); d5 &= 0x1fff; - d5 += h5 * r0; - d5 += h6 * (5 * r9); - d5 += h7 * (5 * r8); - d5 += h8 * (5 * r7); - d5 += h9 * (5 * r6); - c += (d5 >>> 13); d5 &= 0x1fff; - - d6 = c; - d6 += h0 * r6; - d6 += h1 * r5; - d6 += h2 * r4; - d6 += h3 * r3; - d6 += h4 * r2; - c = (d6 >>> 13); d6 &= 0x1fff; - d6 += h5 * r1; - d6 += h6 * r0; - d6 += h7 * (5 * r9); - d6 += h8 * (5 * r8); - d6 += h9 * (5 * r7); - c += (d6 >>> 13); d6 &= 0x1fff; - - d7 = c; - d7 += h0 * r7; - d7 += h1 * r6; - d7 += h2 * r5; - d7 += h3 * r4; - d7 += h4 * r3; - c = (d7 >>> 13); d7 &= 0x1fff; - d7 += h5 * r2; - d7 += h6 * r1; - d7 += h7 * r0; - d7 += h8 * (5 * r9); - d7 += h9 * (5 * r8); - c += (d7 >>> 13); d7 &= 0x1fff; - - d8 = c; - d8 += h0 * r8; - d8 += h1 * r7; - d8 += h2 * r6; - d8 += h3 * r5; - d8 += h4 * r4; - c = (d8 >>> 13); d8 &= 0x1fff; - d8 += h5 * r3; - d8 += h6 * r2; - d8 += h7 * r1; - d8 += h8 * r0; - d8 += h9 * (5 * r9); - c += (d8 >>> 13); d8 &= 0x1fff; - - d9 = c; - d9 += h0 * r9; - d9 += h1 * r8; - d9 += h2 * r7; - d9 += h3 * r6; - d9 += h4 * r5; - c = (d9 >>> 13); d9 &= 0x1fff; - d9 += h5 * r4; - d9 += h6 * r3; - d9 += h7 * r2; - d9 += h8 * r1; - d9 += h9 * r0; - c += (d9 >>> 13); d9 &= 0x1fff; - - c = (((c << 2) + c)) | 0; - c = (c + d0) | 0; - d0 = c & 0x1fff; - c = (c >>> 13); - d1 += c; - - h0 = d0; - h1 = d1; - h2 = d2; - h3 = d3; - h4 = d4; - h5 = d5; - h6 = d6; - h7 = d7; - h8 = d8; - h9 = d9; - - mpos += 16; - bytes -= 16; - } - this.h[0] = h0; - this.h[1] = h1; - this.h[2] = h2; - this.h[3] = h3; - this.h[4] = h4; - this.h[5] = h5; - this.h[6] = h6; - this.h[7] = h7; - this.h[8] = h8; - this.h[9] = h9; -}; - -poly1305.prototype.finish = function(mac, macpos) { - var g = new Uint16Array(10); - var c, mask, f, i; - - if (this.leftover) { - i = this.leftover; - this.buffer[i++] = 1; - for (; i < 16; i++) this.buffer[i] = 0; - this.fin = 1; - this.blocks(this.buffer, 0, 16); - } - - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - for (i = 2; i < 10; i++) { - this.h[i] += c; - c = this.h[i] >>> 13; - this.h[i] &= 0x1fff; - } - this.h[0] += (c * 5); - c = this.h[0] >>> 13; - this.h[0] &= 0x1fff; - this.h[1] += c; - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - this.h[2] += c; - - g[0] = this.h[0] + 5; - c = g[0] >>> 13; - g[0] &= 0x1fff; - for (i = 1; i < 10; i++) { - g[i] = this.h[i] + c; - c = g[i] >>> 13; - g[i] &= 0x1fff; - } - g[9] -= (1 << 13); - - mask = (c ^ 1) - 1; - for (i = 0; i < 10; i++) g[i] &= mask; - mask = ~mask; - for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; - - this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; - this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; - this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; - this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; - this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; - this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; - this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; - this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; - - f = this.h[0] + this.pad[0]; - this.h[0] = f & 0xffff; - for (i = 1; i < 8; i++) { - f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; - this.h[i] = f & 0xffff; - } - - mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; - mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; - mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; - mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; - mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; - mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; - mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; - mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; - mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; - mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; - mac[macpos+10] = (this.h[5] >>> 0) & 0xff; - mac[macpos+11] = (this.h[5] >>> 8) & 0xff; - mac[macpos+12] = (this.h[6] >>> 0) & 0xff; - mac[macpos+13] = (this.h[6] >>> 8) & 0xff; - mac[macpos+14] = (this.h[7] >>> 0) & 0xff; - mac[macpos+15] = (this.h[7] >>> 8) & 0xff; -}; - -poly1305.prototype.update = function(m, mpos, bytes) { - var i, want; - - if (this.leftover) { - want = (16 - this.leftover); - if (want > bytes) - want = bytes; - for (i = 0; i < want; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - bytes -= want; - mpos += want; - this.leftover += want; - if (this.leftover < 16) - return; - this.blocks(this.buffer, 0, 16); - this.leftover = 0; - } - - if (bytes >= 16) { - want = bytes - (bytes % 16); - this.blocks(m, mpos, want); - mpos += want; - bytes -= want; - } - - if (bytes) { - for (i = 0; i < bytes; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - this.leftover += bytes; - } -}; - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s = new poly1305(k); - s.update(m, mpos, n); - s.finish(out, outpos); - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var i, v, c = 1; - for (i = 0; i < 16; i++) { - v = o[i] + c + 65535; - c = Math.floor(v / 65536); - o[i] = v - c * 65536; - } - o[0] += c-1 + 37 * (c-1); -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; -} - -function Z(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; -} - -function M(o, a, b) { - var v, c, - t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, - t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, - t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, - t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, - b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11], - b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - - v = a[0]; - t0 += v * b0; - t1 += v * b1; - t2 += v * b2; - t3 += v * b3; - t4 += v * b4; - t5 += v * b5; - t6 += v * b6; - t7 += v * b7; - t8 += v * b8; - t9 += v * b9; - t10 += v * b10; - t11 += v * b11; - t12 += v * b12; - t13 += v * b13; - t14 += v * b14; - t15 += v * b15; - v = a[1]; - t1 += v * b0; - t2 += v * b1; - t3 += v * b2; - t4 += v * b3; - t5 += v * b4; - t6 += v * b5; - t7 += v * b6; - t8 += v * b7; - t9 += v * b8; - t10 += v * b9; - t11 += v * b10; - t12 += v * b11; - t13 += v * b12; - t14 += v * b13; - t15 += v * b14; - t16 += v * b15; - v = a[2]; - t2 += v * b0; - t3 += v * b1; - t4 += v * b2; - t5 += v * b3; - t6 += v * b4; - t7 += v * b5; - t8 += v * b6; - t9 += v * b7; - t10 += v * b8; - t11 += v * b9; - t12 += v * b10; - t13 += v * b11; - t14 += v * b12; - t15 += v * b13; - t16 += v * b14; - t17 += v * b15; - v = a[3]; - t3 += v * b0; - t4 += v * b1; - t5 += v * b2; - t6 += v * b3; - t7 += v * b4; - t8 += v * b5; - t9 += v * b6; - t10 += v * b7; - t11 += v * b8; - t12 += v * b9; - t13 += v * b10; - t14 += v * b11; - t15 += v * b12; - t16 += v * b13; - t17 += v * b14; - t18 += v * b15; - v = a[4]; - t4 += v * b0; - t5 += v * b1; - t6 += v * b2; - t7 += v * b3; - t8 += v * b4; - t9 += v * b5; - t10 += v * b6; - t11 += v * b7; - t12 += v * b8; - t13 += v * b9; - t14 += v * b10; - t15 += v * b11; - t16 += v * b12; - t17 += v * b13; - t18 += v * b14; - t19 += v * b15; - v = a[5]; - t5 += v * b0; - t6 += v * b1; - t7 += v * b2; - t8 += v * b3; - t9 += v * b4; - t10 += v * b5; - t11 += v * b6; - t12 += v * b7; - t13 += v * b8; - t14 += v * b9; - t15 += v * b10; - t16 += v * b11; - t17 += v * b12; - t18 += v * b13; - t19 += v * b14; - t20 += v * b15; - v = a[6]; - t6 += v * b0; - t7 += v * b1; - t8 += v * b2; - t9 += v * b3; - t10 += v * b4; - t11 += v * b5; - t12 += v * b6; - t13 += v * b7; - t14 += v * b8; - t15 += v * b9; - t16 += v * b10; - t17 += v * b11; - t18 += v * b12; - t19 += v * b13; - t20 += v * b14; - t21 += v * b15; - v = a[7]; - t7 += v * b0; - t8 += v * b1; - t9 += v * b2; - t10 += v * b3; - t11 += v * b4; - t12 += v * b5; - t13 += v * b6; - t14 += v * b7; - t15 += v * b8; - t16 += v * b9; - t17 += v * b10; - t18 += v * b11; - t19 += v * b12; - t20 += v * b13; - t21 += v * b14; - t22 += v * b15; - v = a[8]; - t8 += v * b0; - t9 += v * b1; - t10 += v * b2; - t11 += v * b3; - t12 += v * b4; - t13 += v * b5; - t14 += v * b6; - t15 += v * b7; - t16 += v * b8; - t17 += v * b9; - t18 += v * b10; - t19 += v * b11; - t20 += v * b12; - t21 += v * b13; - t22 += v * b14; - t23 += v * b15; - v = a[9]; - t9 += v * b0; - t10 += v * b1; - t11 += v * b2; - t12 += v * b3; - t13 += v * b4; - t14 += v * b5; - t15 += v * b6; - t16 += v * b7; - t17 += v * b8; - t18 += v * b9; - t19 += v * b10; - t20 += v * b11; - t21 += v * b12; - t22 += v * b13; - t23 += v * b14; - t24 += v * b15; - v = a[10]; - t10 += v * b0; - t11 += v * b1; - t12 += v * b2; - t13 += v * b3; - t14 += v * b4; - t15 += v * b5; - t16 += v * b6; - t17 += v * b7; - t18 += v * b8; - t19 += v * b9; - t20 += v * b10; - t21 += v * b11; - t22 += v * b12; - t23 += v * b13; - t24 += v * b14; - t25 += v * b15; - v = a[11]; - t11 += v * b0; - t12 += v * b1; - t13 += v * b2; - t14 += v * b3; - t15 += v * b4; - t16 += v * b5; - t17 += v * b6; - t18 += v * b7; - t19 += v * b8; - t20 += v * b9; - t21 += v * b10; - t22 += v * b11; - t23 += v * b12; - t24 += v * b13; - t25 += v * b14; - t26 += v * b15; - v = a[12]; - t12 += v * b0; - t13 += v * b1; - t14 += v * b2; - t15 += v * b3; - t16 += v * b4; - t17 += v * b5; - t18 += v * b6; - t19 += v * b7; - t20 += v * b8; - t21 += v * b9; - t22 += v * b10; - t23 += v * b11; - t24 += v * b12; - t25 += v * b13; - t26 += v * b14; - t27 += v * b15; - v = a[13]; - t13 += v * b0; - t14 += v * b1; - t15 += v * b2; - t16 += v * b3; - t17 += v * b4; - t18 += v * b5; - t19 += v * b6; - t20 += v * b7; - t21 += v * b8; - t22 += v * b9; - t23 += v * b10; - t24 += v * b11; - t25 += v * b12; - t26 += v * b13; - t27 += v * b14; - t28 += v * b15; - v = a[14]; - t14 += v * b0; - t15 += v * b1; - t16 += v * b2; - t17 += v * b3; - t18 += v * b4; - t19 += v * b5; - t20 += v * b6; - t21 += v * b7; - t22 += v * b8; - t23 += v * b9; - t24 += v * b10; - t25 += v * b11; - t26 += v * b12; - t27 += v * b13; - t28 += v * b14; - t29 += v * b15; - v = a[15]; - t15 += v * b0; - t16 += v * b1; - t17 += v * b2; - t18 += v * b3; - t19 += v * b4; - t20 += v * b5; - t21 += v * b6; - t22 += v * b7; - t23 += v * b8; - t24 += v * b9; - t25 += v * b10; - t26 += v * b11; - t27 += v * b12; - t28 += v * b13; - t29 += v * b14; - t30 += v * b15; - - t0 += 38 * t16; - t1 += 38 * t17; - t2 += 38 * t18; - t3 += 38 * t19; - t4 += 38 * t20; - t5 += 38 * t21; - t6 += 38 * t22; - t7 += 38 * t23; - t8 += 38 * t24; - t9 += 38 * t25; - t10 += 38 * t26; - t11 += 38 * t27; - t12 += 38 * t28; - t13 += 38 * t29; - t14 += 38 * t30; - // t15 left as is - - // first car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - // second car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - o[ 0] = t0; - o[ 1] = t1; - o[ 2] = t2; - o[ 3] = t3; - o[ 4] = t4; - o[ 5] = t5; - o[ 6] = t6; - o[ 7] = t7; - o[ 8] = t8; - o[ 9] = t9; - o[10] = t10; - o[11] = t11; - o[12] = t12; - o[13] = t13; - o[14] = t14; - o[15] = t15; -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function crypto_hashblocks_hl(hh, hl, m, n) { - var wh = new Int32Array(16), wl = new Int32Array(16), - bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, - bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, - th, tl, i, j, h, l, a, b, c, d; - - var ah0 = hh[0], - ah1 = hh[1], - ah2 = hh[2], - ah3 = hh[3], - ah4 = hh[4], - ah5 = hh[5], - ah6 = hh[6], - ah7 = hh[7], - - al0 = hl[0], - al1 = hl[1], - al2 = hl[2], - al3 = hl[3], - al4 = hl[4], - al5 = hl[5], - al6 = hl[6], - al7 = hl[7]; - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) { - j = 8 * i + pos; - wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; - wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; - } - for (i = 0; i < 80; i++) { - bh0 = ah0; - bh1 = ah1; - bh2 = ah2; - bh3 = ah3; - bh4 = ah4; - bh5 = ah5; - bh6 = ah6; - bh7 = ah7; - - bl0 = al0; - bl1 = al1; - bl2 = al2; - bl3 = al3; - bl4 = al4; - bl5 = al5; - bl6 = al6; - bl7 = al7; - - // add - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma1 - h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); - l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Ch - h = (ah4 & ah5) ^ (~ah4 & ah6); - l = (al4 & al5) ^ (~al4 & al6); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // K - h = K[i*2]; - l = K[i*2+1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // w - h = wh[i%16]; - l = wl[i%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - th = c & 0xffff | d << 16; - tl = a & 0xffff | b << 16; - - // add - h = th; - l = tl; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma0 - h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); - l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Maj - h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); - l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh7 = (c & 0xffff) | (d << 16); - bl7 = (a & 0xffff) | (b << 16); - - // add - h = bh3; - l = bl3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = th; - l = tl; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh3 = (c & 0xffff) | (d << 16); - bl3 = (a & 0xffff) | (b << 16); - - ah1 = bh0; - ah2 = bh1; - ah3 = bh2; - ah4 = bh3; - ah5 = bh4; - ah6 = bh5; - ah7 = bh6; - ah0 = bh7; - - al1 = bl0; - al2 = bl1; - al3 = bl2; - al4 = bl3; - al5 = bl4; - al6 = bl5; - al7 = bl6; - al0 = bl7; - - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - // add - h = wh[j]; - l = wl[j]; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = wh[(j+9)%16]; - l = wl[(j+9)%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma0 - th = wh[(j+1)%16]; - tl = wl[(j+1)%16]; - h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); - l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma1 - th = wh[(j+14)%16]; - tl = wl[(j+14)%16]; - h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); - l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - wh[j] = (c & 0xffff) | (d << 16); - wl[j] = (a & 0xffff) | (b << 16); - } - } - } - - // add - h = ah0; - l = al0; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[0]; - l = hl[0]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[0] = ah0 = (c & 0xffff) | (d << 16); - hl[0] = al0 = (a & 0xffff) | (b << 16); - - h = ah1; - l = al1; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[1]; - l = hl[1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[1] = ah1 = (c & 0xffff) | (d << 16); - hl[1] = al1 = (a & 0xffff) | (b << 16); - - h = ah2; - l = al2; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[2]; - l = hl[2]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[2] = ah2 = (c & 0xffff) | (d << 16); - hl[2] = al2 = (a & 0xffff) | (b << 16); - - h = ah3; - l = al3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[3]; - l = hl[3]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[3] = ah3 = (c & 0xffff) | (d << 16); - hl[3] = al3 = (a & 0xffff) | (b << 16); - - h = ah4; - l = al4; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[4]; - l = hl[4]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[4] = ah4 = (c & 0xffff) | (d << 16); - hl[4] = al4 = (a & 0xffff) | (b << 16); - - h = ah5; - l = al5; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[5]; - l = hl[5]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[5] = ah5 = (c & 0xffff) | (d << 16); - hl[5] = al5 = (a & 0xffff) | (b << 16); - - h = ah6; - l = al6; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[6]; - l = hl[6]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[6] = ah6 = (c & 0xffff) | (d << 16); - hl[6] = al6 = (a & 0xffff) | (b << 16); - - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[7]; - l = hl[7]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[7] = ah7 = (c & 0xffff) | (d << 16); - hl[7] = al7 = (a & 0xffff) | (b << 16); - - pos += 128; - n -= 128; - } - - return n; -} - -function crypto_hash(out, m, n) { - var hh = new Int32Array(8), - hl = new Int32Array(8), - x = new Uint8Array(256), - i, b = n; - - hh[0] = 0x6a09e667; - hh[1] = 0xbb67ae85; - hh[2] = 0x3c6ef372; - hh[3] = 0xa54ff53a; - hh[4] = 0x510e527f; - hh[5] = 0x9b05688c; - hh[6] = 0x1f83d9ab; - hh[7] = 0x5be0cd19; - - hl[0] = 0xf3bcc908; - hl[1] = 0x84caa73b; - hl[2] = 0xfe94f82b; - hl[3] = 0x5f1d36f1; - hl[4] = 0xade682d1; - hl[5] = 0x2b3e6c1f; - hl[6] = 0xfb41bd6b; - hl[7] = 0x137e2179; - - crypto_hashblocks_hl(hh, hl, m, n); - n %= 128; - - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, (b / 0x20000000) | 0, b << 3); - crypto_hashblocks_hl(hh, hl, x, n); - - for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); - -},{"crypto":7}],12:[function(require,module,exports){ -(function (Buffer){ -/** pact-lang-api.js - * Exports functions to support Pact API calls. - * Author: Will Martino, Hee Kyun Yun, Stuart Popejoy - * Supports: Pact API 3.0 v1 - */ - -const blake = require("blakejs"); -const nacl = require("tweetnacl"); -const base64url = require("base64-url"); -const fetch = require("node-fetch"); - -/** - * Convert binary to hex. - * @param s {Uint8Array} - binary value - * @return {string} hex string - */ -var binToHex = function(s) { - var constructor = s.constructor.name || null; - - if (constructor !== "Uint8Array") { - throw new TypeError("Expected Uint8Array"); - } - - return Buffer.from(s).toString("hex"); -}; - -/** - * Convert hex string to binary. - * @param s {string} - hex string - * @return {Uint8Array} binary value - */ -var hexToBin = function(h) { - if (typeof h !== "string") { - throw new TypeError("Expected string: " + h); - } - return new Uint8Array(Buffer.from(h, "hex")); -}; - -/** - * Perform blake2b256 hashing. - */ -var hashBin = function(s) { - return blake.blake2b(s, null, 32); -}; - -/** - * Perform blake2b256 hashing, encoded as unescaped base64url. - */ -var hash = function(s) { - return base64UrlEncode(hashBin(s)); -}; - -/** - * Hash string as unescaped base64url. - */ -var base64UrlEncode = function(s) { - return base64url.escape(base64url.encode(s)); -}; - -/** - * Generate a random ED25519 keypair. - * @return {object} with "publicKey" and "secretKey" fields. - */ -var genKeyPair = function() { - var kp = nacl.sign.keyPair(); - var pubKey = binToHex(kp.publicKey); - var secKey = binToHex(kp.secretKey).slice(0, 64); - return { publicKey: pubKey, secretKey: secKey }; -}; - -var toTweetNaclSecretKey = function(keyPair) { - if ( - !keyPair.hasOwnProperty("publicKey") || - !keyPair.hasOwnProperty("secretKey") - ) { - throw new TypeError( - "Invalid KeyPair: expected to find keys of name 'secretKey' and 'publicKey': " + - JSON.stringify(keyPair) - ); - } - return hexToBin(keyPair.secretKey + keyPair.publicKey); -}; - -/** - * Sign data using key pair. - * @param msg - some data to be passed to blake2b256. - * @param keyPair - signing ED25519 keypair - * @return {object} with "hash", "sig" (signature in hex format), and "pubKey" public key value. - */ -var sign = function(msg, keyPair) { - if ( - !keyPair.hasOwnProperty("publicKey") || - !keyPair.hasOwnProperty("secretKey") - ) { - throw new TypeError( - "Invalid KeyPair: expected to find keys of name 'secretKey' and 'publicKey': " + - JSON.stringify(keyPair) - ); - } - var hshBin = hashBin(msg); - var hsh = base64UrlEncode(hshBin); - var sigBin = nacl.sign.detached(hshBin, toTweetNaclSecretKey(keyPair)); - return { hash: hsh, sig: binToHex(sigBin), pubKey: keyPair.publicKey }; -}; - -var pullSig = function(s) { - if (!s.hasOwnProperty("sig")) { - throw new TypeError( - "Expected to find keys of name 'sig' in " + JSON.stringify(s) - ); - } - return { sig: s.sig }; -}; - -var pullAndCheckHashs = function(sigs) { - var hsh = sigs[0].hash; - for (var i = 1; i < sigs.length; i++) { - if (sigs[i].hash !== hsh) { - throw new Error( - "Sigs for different hashes found: " + JSON.stringify(sigs) - ); - } - } - return hsh; -}; - -/** - * Prepare an ExecMsg pact command for use in send or local execution. - * To use in send, wrap result with 'mkSingleCommand'. - * @param keyPairs {array or object} - array or single ED25519 keypair and/or clist (list of `cap` in mkCap) - * @param nonce {string} - nonce value for ensuring unique hash - * @param pactCode {string} - pact code to execute - * @param envData {object} - JSON message data for command - * @param meta {object} - public meta information, see mkMeta - * @return valid pact API command for send or local use. - */ -var prepareExecCmd = function(keyPairs, nonce=new Date().toISOString(), pactCode, - envData, meta=mkMeta("","",0,0,0,0), networkId=null) { - - enforceType(nonce, "string", "nonce"); - enforceType(pactCode, "string", "pactCode"); - var kpArray = asArray(keyPairs); - var signers = kpArray.map(mkSigner); - var cmdJSON = { - networkId: networkId, - payload: { - exec: { - data: envData || {}, - code: pactCode - } - }, - signers: signers, - meta: meta, - nonce: JSON.stringify(nonce) - }; - var cmd = JSON.stringify(cmdJSON); - var sigs = kpArray.map(function(kp) { - return sign(cmd, kp); - }); - return mkSingleCmd(sigs, cmd); -}; - -/** - * Prepare an ContMsg pact command for use in send or local execution. - * To use in send, wrap result with 'mkSingleCommand'. - * @param keyPairs {array or object} - array or single ED25519 keypair - * @param nonce {string} - nonce value for ensuring unique hash - default to current time - * @param step {number} - the step on which pacts the command is sent to - required - * @param proof {string} - JSON message of SPV proof - not required - * @param rollback {bool} - Bool of cont message - required - * @param pactId {string} - pactId of the cont Msg - required - * @param envData {object} - JSON message data for command - not required - * @param meta {object} - public meta information, see mkMeta - * @return valid pact API Cont command for send or local use. - */ -var prepareContCmd = function(keyPairs, nonce=new Date().toISOString(), - proof, pactId, rollback, step, envData, - meta=mkMeta("","",0,0,0,0), networkId=null) { - - enforceType(nonce, "string", "nonce"); - var kpArray = asArray(keyPairs); - var signers = kpArray.map(mkSigner); - var cmdJSON = { - networkId: networkId, - payload: { - cont: { - proof: proof || null, - pactId: pactId, - rollback: rollback, - step: step, - data: envData || {}, - } - }, - signers: signers, - meta: meta, - nonce: JSON.stringify(nonce) - }; - var cmd = JSON.stringify(cmdJSON); - var sigs = kpArray.map(function(kp) { - return sign(cmd, kp); - }); - return mkSingleCmd(sigs, cmd); -}; - -/** - * Makes a single command given signed data. - * @param sigs {array} - array of signature objects, see 'sign' - * @param cmd {string} - stringified JSON blob used to create hash - * @return valid Pact API command for send or local use. - */ -var mkSingleCmd = function(sigs, cmd) { - enforceArray(sigs, "sigs"); - enforceType(cmd, "string", "cmd"); - return { - hash: pullAndCheckHashs(sigs), - sigs: sigs.map(pullSig), - cmd: cmd - }; -}; - -/** - * Makes outer wrapper for a 'send' endpoint. - * @param {array or object} cmds - one or an array of commands, see mkSingleCmd - */ -var mkPublicSend = function(cmds) { - return { cmds: asArray(cmds) }; -}; - -/** - * Make an ED25519 "signer" array element for inclusion in a Pact payload. - * @param {object} kp - a ED25519 keypair and/or clist (list of `cap` in mkCap) - * @return {object} an object with pubKey, addr and scheme fields. - */ -var mkSigner = function(kp) { - return { - clist: kp.clist ? asArray(kp.clist) : [], - pubKey: kp.publicKey - }; -}; - -var asArray = function(singleOrArray) { - if (Array.isArray(singleOrArray)) { - return singleOrArray; - } else { - return [singleOrArray]; - } -}; - -var enforceType = function(val, type, msg) { - if (typeof val !== type) { - throw new TypeError( - msg + " must be a " + type + ": " + JSON.stringify(val) - ); - } -}; - -var enforceArray = function(val, msg) { - if (!Array.isArray(val)) { - throw new TypeError(msg + " must be an array: " + JSON.stringify(val)); - } -}; - -/** - * Make a full 'send' endpoint exec command. See 'prepareExecCmd' for parameters. - */ -var simpleExecCommand = function(keyPairs, nonce, pactCode, envData, meta, networkId) { - return mkPublicSend(prepareExecCmd(keyPairs, nonce, pactCode, envData, meta, networkId)); -}; - -/** - * Make a full 'send' endpoint cont command. See 'prepareContCmd' for parameters. - */ -var simpleContCommand = function(keyPairs, nonce, step, pactId, rollback, envData, meta, proof) { - return mkPublicSend(prepareContCmd(keyPairs, nonce, proof, pactId, rollback, step, envData, meta)); -}; - -var unique = function(arr) { - var n = {}, - r = []; - for (var i = 0; i < arr.length; i++) { - if (!n[arr[i]]) { - n[arr[i]] = true; - r.push(arr[i]); - } - } - return r; -}; - -/** - * Given an exec 'send' message, prepare a message for 'poll' endpoint. - * @param execMsg {object} JSON with "cmds" field, see 'mkPublicSend' - * @return {object} with "requestKeys" for polling. - */ -var simplePollRequestFromExec = function(execMsg) { - var cmds = - execMsg.cmds || - TypeError("expected key 'cmds' in object: " + JSON.stringify(execMsg)); - var rks = []; - if ( - !cmds.every(function(v) { - return v.hasOwnProperty("hash"); - }) - ) { - throw new TypeError( - 'maleformed object, expected "hash" key in every cmd: ' + - JSON.stringify(execMsg) - ); - } else { - rks = unique( - cmds.map(function(v) { - return v.hash; - }) - ); - } - return { requestKeys: rks }; -}; - -/** - * Given an exec 'send' message, prepare a message for 'listen' endpoint. - * @param execMsg {object} JSON with "cmds" field, see 'mkPublicSend'. Only takes first element. - * @return {object} with "requestKey" for polling. - */ -var simpleListenRequestFromExec = function(execMsg) { - var cmds = - execMsg.cmds || - TypeError("expected key 'cmds' in object: " + JSON.stringify(execMsg)); - var rks = []; - if ( - !cmds.every(function(v) { - return v.hasOwnProperty("hash"); - }) - ) { - throw new TypeError( - 'maleformed object, expected "hash" key in every cmd: ' + - JSON.stringify(execMsg) - ); - } else { - rks = unique( - cmds.map(function(v) { - return v.hash; - }) - ); - } - return { listen: rks[0] }; -}; - -/** - * Variadic function to form a lisp s-expression application. - * Encases arguments in parens and intercalates with a space. - */ -var mkExp = function(pgmName) { - enforceType(pgmName, "string", "pgmName"); - return ( - "(" + - pgmName + - " " + - Array.prototype.slice - .call(arguments, 1) - .map(JSON.stringify) - .join(" ") + - ")" - ); -}; - -/** - * Prepare a chainweb-style public meta payload. - * @param sender {string} gas account - * @param chainId {string} chain identifier - * @param gasPrice {number} desired gas price - * @param gasLimit {number} desired gas limit - * @param creationTime {number} desired tx's time created in UNIX epoch time as seconds - * @param ttl {number} desired tx's time to live as seconds - * @return {object} of arguments, type-checked and properly named. - */ -var mkMeta = function(sender, chainId, gasPrice, gasLimit, creationTime, ttl) { - enforceType(sender, "string", "sender"); - enforceType(chainId, "string", "chainId"); - enforceType(gasPrice, "number", "gasPrice"); - enforceType(gasLimit, "number", "gasLimit"); - enforceType(creationTime, "number", "creationTime"); - enforceType(ttl, "number", "ttl"); - return { - creationTime: creationTime, - ttl: ttl, - gasLimit: gasLimit, - chainId: chainId, - gasPrice: gasPrice, - sender: sender - }; -}; - -/** - * Formats ExecCmd into api request object - */ -var mkReq = function(cmd) { - return { - headers: { - "Content-Type": "application/json" - }, - method: "POST", - body: JSON.stringify(cmd) - }; -}; - - - - /** - * A execCmd Object to Execute in send or local. - * @typedef {Object} cmd to `/send` endpoint - * @property type {string} - type of command - "cont" or "exec", default to "exec" - * @property pactCode {string} - pact code to execute in "exec" command - required for "exec" - * @property nonce {string} - nonce value to ensure unique hash - default to current time - * @property envData {object} - JSON message data for command - not required - * @property meta {object} - public meta information, see mkMeta - * @property networkId {object} network identifier of where the cmd is executed. - */ - - /** - * A contCmd to Execute in send - * @typedef {Object} cmd to `/send` endpoint - * @property type {string} - type of command - "cont" or "exec", default to "exec" - * @property pactId {string} - pactId the cont command - required for "cont" - * @property nonce {string} - nonce value to ensure unique hash - default to current time - * @property step {number} - the step of the mutli-step transaction - required for "cont" - * @property proof {string} - JSON message of SPV proof - required for cross-chain transaction - * @property rollback {bool} - boolean value of rollback - required for "cont" - * @property envData {object} - JSON message data for command - not required - * @property meta {object} - public meta information, see mkMeta - * @property networkId {object} network identifier of where the cmd is executed. - */ - -/** - * Sends Pact command to a running Pact server and retrieves tx result. - * @param {[execCmd or contCmd] or execCmd or contCmt} cmd or a list of cmds to execute - * @param {string} apiHost host running Pact server - * @return {object} Request key of the tx received from pact server. - */ -const fetchSend = async function(sendCmd, apiHost){ - if (!apiHost) throw new Error(`Pact.fetch.send(): No apiHost provided`); - const sendCmds = asArray(sendCmd).map(cmd => { - if (cmd.type === "cont") { - return prepareContCmd( cmd.keyPairs, cmd.nonce, cmd.proof, cmd.pactId, - cmd.rollback, cmd.step, cmd.envData, cmd.meta, - cmd.networkId ) - } else { - return prepareExecCmd( cmd.keyPairs, cmd.nonce, cmd.pactCode, - cmd.envData, cmd.meta, cmd.networkId ) - } - }) - const txRes = await fetch(`${apiHost}/api/v1/send`, mkReq(mkPublicSend(sendCmds))); - const tx = await txRes.json(); - return tx; -}; - -/** - * A SPV Command Object to Execute in Pact Server. - * @typedef {Object} spvCmd - * @property requestKey {string} pactId of the cross-chain transaction - * @property targetChainId {string} chainId of target chain of the cross-chain transaction - */ - -/** - * Sends request to /spv to fetch SPV proof. - * @param {spvCmd} spvCmd see spvCmd - * @param {string} apiHost host running Pact server - * @return {string} SPV proof received from Pact server. - */ -const fetchSPV = async function(spvCmd, apiHost){ - if (!apiHost) throw new Error(`Pact.fetch.spv(): No apiHost provided`); - enforceType(spvCmd.targetChainId, "string", "targetChainId"); - enforceType(spvCmd.requestKey, "string", "requestKey"); - const txRes = await fetch(`${apiHost}/spv`, mkReq(spvCmd)); - const tx = await txRes.json(); - return tx; -}; - -/** - * Sends Local Pact command to a local Pact server and retrieves local tx result. - * @param {execCmd} localCmd a single cmd to execute locally - * @param {string} apiHost host running Pact server - * @return {object} tx result received from pact server. - */ -const fetchLocal = async function(localCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.local(): No apiHost provided`); - const {keyPairs, nonce, pactCode, envData, meta} = localCmd - const cmd = prepareExecCmd(keyPairs, nonce, pactCode, envData, meta); - const txRes = await fetch(`${apiHost}/api/v1/local`, mkReq(cmd)); - const tx = await txRes.json(); - return tx; -}; - -/** - * Poll result of Pact command to a running Pact server and retrieves tx result. - * @param {{requestKeys: []}} pollCmd request Keys of txs to poll. - * @param {string} apiHost host running Pact server - * @return {object} Array of tx request keys and tx results from pact server. - */ -const fetchPoll = async function(pollCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.poll(): No apiHost provided`); - const res = await fetch(`${apiHost}/api/v1/poll`, mkReq(pollCmd)); - const resJSON = await res.json(); - return resJSON; -}; - -/** - * Listen result of Pact command to a running Pact server and retrieves tx result. - * @param {{listenCmd: }} listenCmd reqest key of tx to listen. - * @param {string} apiHost host running Pact server - * @return {object} Object containing tx result from pact server - */ - const fetchListen = async function(listenCmd, apiHost) { - if (!apiHost) throw new Error(`Pact.fetch.listen(): No apiHost provided`); - const res = await fetch(`${apiHost}/api/v1/listen`, mkReq(listenCmd)); - const resJSON = await res.json(); - return resJSON; - }; - -/** - Signing API functions to interact with Chainweaver wallet (https://github.com/kadena-io/chainweaver) and its signing API. - */ - -/** - * Prepares a capability object to be signed with keyPairs using signing API. - * @param role {string} role of the pact capability - * @param description {string} description of the pact capability - * @param name {string} name of pact capability to be signed - * @param args {array} array of arguments used in pact capability, default to empty array. - * @return {object} A properly formatted cap object required in signingCmd - */ -var mkCap = function(role, description, name, args=[]) { - enforceType(role, "string", "role"); - enforceType(description, "string", "description"); - enforceType(name, "string", "name of capability"); - enforceType(args, "object", "arguments to capability"); - return { - role: role, - description: description, - cap: { - name: name, - args: args - } - }; -}; - -/** - * A signingCmd Object to be sent to signing API - * @typedef {Object} signingCmd - cmd to be sent to signing API - * @property pactCode {string} - Pact code to execute - required - * @property caps {array or object} - Pact capability to be signed, see mkCap - required - * @property envData {object} - JSON message data for command - optional - * @property sender {string} - sender field in meta, see mkMeta - optional - * @property chainId {string} - chainId field in meta, see mkMeta - optional - * @property gasLimit {number} - gasLimit field in meta, see mkMeta - optional - * @property nonce {string} - nonce value for ensuring unique hash - optional - **/ - -/** - * Sends parameters of Pact Command to the Chainweaver signing API and retrieves a signed Pact Command. - * @param signingCmd - cmd to be sent to signing API - * @return {object} valid pact ExecCmd for send or local use. - **/ - const signWallet = async function (signingCmd){ - if (!signingCmd.pactCode) throw new Error(`Pact.wallet.sign(): No Pact Code provided`); - if (!signingCmd.caps) throw new Error(`Pact.wallet.sign(): No Caps provided`); - enforceType(signingCmd.pactCode, "string", "pactCode"); - enforceType(signingCmd.caps, "object", "caps"); - if (signingCmd.envData) enforceType(signingCmd.envData, "object", "envData"); - if (signingCmd.sender) enforceType(signingCmd.sender, "string", "sender"); - if (signingCmd.chainId) enforceType(signingCmd.chainId, "string", "chainId"); - if (signingCmd.gasLimit) enforceType(signingCmd.gasLimit, "number", "gasLimit"); - if (signingCmd.nonce) enforceType(signingCmd.nonce, "string", "nonce"); - if (signingCmd.ttl) enforceType(signingCmd.ttl, "number", "ttl"); - - const cmd = { - code: signingCmd.pactCode, - caps: asArray(signingCmd.caps), - data: signingCmd.envData, - sender: signingCmd.sender, - chainId: signingCmd.chainId, - gasLimit: signingCmd.gasLimit, - nonce: signingCmd.nonce, - ttl: signingCmd.ttl - } - const res = await fetch('http://127.0.0.1:9467/v1/sign', mkReq(cmd)) - const resJSON = await res.json(); - return resJSON.body; - } - -/** - * Sends a signed Pact ExecCmd to a running Pact server and retrieves tx result. - * @param {signedCmd} valid pact API command for send or local use. - * @param {string} apiHost host running Pact server - * @return {object} Request key of the tx received from pact server. - */ -const sendSigned = async function (signedCmd, apiHost) { - const cmd = { - "cmds": [ signedCmd ] - } - const txRes = await fetch(`${apiHost}/api/v1/send`, mkReq(cmd)); - const tx = await txRes.json(); - return tx; -} - -module.exports = { - crypto: { - binToHex: binToHex, - hexToBin: hexToBin, - base64UrlEncode: base64UrlEncode, - hash: hash, - genKeyPair: genKeyPair, - sign: sign, - toTweetNaclSecretKey: toTweetNaclSecretKey - }, - api: { - prepareContCmd: prepareContCmd, - prepareExecCmd: prepareExecCmd, - mkSingleCmd: mkSingleCmd, - mkPublicSend: mkPublicSend - }, - lang: { - mkExp: mkExp, - mkMeta: mkMeta, - mkCap: mkCap - }, - simple: { - cont: { - createCommand: simpleContCommand - }, - exec: { - createCommand: simpleExecCommand, - createLocalCommand: prepareExecCmd, - createPollRequest: simplePollRequestFromExec, - createListenRequest: simpleListenRequestFromExec - } - }, - fetch: { - send: fetchSend, - local: fetchLocal, - poll: fetchPoll, - listen: fetchListen, - spv: fetchSPV - }, - wallet: { - sign: signWallet, - sendSigned: sendSigned - } -}; -// - -}).call(this,require("buffer").Buffer) -},{"base64-url":2,"blakejs":5,"buffer":8,"node-fetch":10,"tweetnacl":11}]},{},[12]); diff --git a/node_modules/pact-lang-api/readme.md b/node_modules/pact-lang-api/readme.md deleted file mode 100644 index 886d5e0..0000000 --- a/node_modules/pact-lang-api/readme.md +++ /dev/null @@ -1,245 +0,0 @@ -# Pact Smart Contract Language API JavaScript wrappers - -This package is here to help make interaction with both Pact's development server & a ScalableBFT cluster running Pact easy. -The API's for each are the same. For information about Pact & ScalableBFT please see [kadena.io](kadena.io) or [github.com/kadena-io/pact](github.com/kadena-io/pact). - -For example usage, see [github.com/kadena-io/pact-todomvc](github.com/kadena-io/pact-todomvc) - -## Import - -`pact-lang-api.js` should work as expected as a regular node dependency. - -`` will import the library and inject it as a top-level definition called `Pact` - -## Functions - -### Crypto - -Converting between binary & hex formats: - -``` -Pact.crypto.binToHex() -> string -Pact.crypto.hexToBin(string) -> Uint8Array -``` - -Hashing (blake2b): - -``` -Pact.crypto.hash(string) -> string -``` - -PPK Signing is done via TweetNacl but with ed25519-donna style keys, represented as hex. -blake2b is used to hash the message (), and TweetNacl then signs the hash. - -``` -Pact.crypto.genKeyPair() -> {"publicKey": , "secretKey": } -Pact.crypto.sign(, keyPair) -> {"hash": , "sig":, "pubKey":} -Pact.crypto.toTweetNaclSecretKey(keyPair) -> -``` - -### Language Expression Construction - -A helper function for constructing native Pact commands. -- `mkExp` takes in Pact function and its arguments and returns a Pact expression. -- `mkMeta` returns meta information of the tx in object format. This is only important for the txs in public blockchain. txs don't need a meta field in private blockchain. - * "sender" represents the gas account, and the tx must be signed with the keyset associated with the gas account. Otherwise, the tx will be rejected. - * "chainId" represents the chain Id that the tx will be sent to. - * "gasPrice" represents the gas price of the tx. - * "gasLimit" represents the gas limit of the tx. - * "creationTime" represents the tx's wait time to be considered a candidate for inclusion into a block in the blockchain. (in seconds) - * "ttl" represents the tx's maximum wait time to be considered a candidate for inclusion into a block in the blockchain. (in seconds) -- `mkCap` prepares a capability object to be signed with keyPairs using signing API. - -``` -Pact.lang.mkExp(, *args) -> - ex: mkExp("todos.edit-todo", 1, "bar") - -> '(todos.edit-todo 1 "bar")' - -Pact.lang.mkMeta( , , , , , ) -> - ex: mkMeta("Bob", "1", 0.0001, 100, 0, 28800) - -> { "sender": "Bob", "chainId": "1", "gasPrice": 0.0001, "gasLimit": 100, "creationTime": 0, "ttl": 28800 } - -Pact.lang.mkCap( , , , ) -> - ex: mkCap("Coin Transfer", "Capability to transfer designated amount of coin from sender to receiver", "coin.TRANSFER", ["Bob", "Kate", 10]) - -> { - "role": "Coin Transfer", - "description": "Capability to transfer designated amount of coin from sender to receiver", - "cap": { - "name": "coin.TRANSFER", - "args": ["Bob", "Kate", 10] - } - } -``` - -NB: `JSON.stringify`, which is used here, generally converts floating point numbers correctly but fails for high precision scientific numbers < 0; you will need to manually convert them. -e.g. `JSON.stringify(.0000001) -> '1e-7'` is incorrect as Pact has infinite precision decimals but does not interpret scientific numbers, so the proper conversion would be `JSON.stringify(.0000001) -> '0.0000001'` - - - -### Simple API Fetch - -Simple fetch functions to make API request to a running Pact Server and retrieve the results. - -``` -* A Command Object to Execute in send or local. -* @typedef {Object} execCmd -* @property pactCode {string} - pact code to execute -* @property keyPairs {array or object} - array or single ED25519 keypair and/or clist(list of `cap` in mkCap) -* @property nonce {string} - nonce value, default at current time -* @property envData {object} - JSON message data including keyset information, defaults to empty obj -* @property meta {object} - meta information, see mkMeta -* @property networkId {object} network identifier of where the cmd is executed. -*/ -``` -``` -## Make API request to execute a command or commands in the public server and retrieve request keys of the txs. - -Pact.fetch.send([], ) -> {"requestKeys": [...]} - - ex: - const cmds = [ - // create an account with single-sig keyset - { - keyPairs: KEY_PAIR, - pactCode: "(accounts.create-account 'account-1 (read-keyset 'account-keyset))", - envData: { - "account-keyset": ["368820f80c324bbc7c2b0610688a7da43e39f91d118732671cd9c7500ff43cca"], - } - }, - // create an account with multi-sig keyset - { - keyPairs: KEY_PAIR, - pactCode: "(accounts.create-account 'account2 (read-keyset 'account-keyset))", - envData: { - "account-keyset": { - "keys": [ - "2d70aa4f697c3a3b8dd6d97745ac074edcfd0eb65c37774cde25135483bea71e", - "4c31dc9ee7f24177f78b6f518012a208326e2af1f37bb0a2405b5056d0cad628" - ], - "pred": "keys-any" - } - } - } - ] - - Pact.fetch.send(cmds, API_HOST) - - // Returns the following as a Promise Value - { "requestKeys": [ "6ue-lrwXaLcDyxDwJ1nuLzOfFtnQ2TaF0_Or_X0KnbE", - "P7qDsrt3evfEjtlQAW_b1ZPS7LpAZynCO8wx99hc5i0" ]} -``` -``` -## Make API request to execute a single command in the local server and retrieve the result of the tx. (Used to execute commands that read DB) -Pact.fetch.local(, ) -> {result} - - ex: - const cmd = { - keyPairs: KEY_PAIR, - pactCode: `(accounts.read-account 'account1)` - }; - - Pact.fetch.local(cmd, API_HOST) - - // Returns the following as a Promise Value - { "status": "success", - "data": { - "keyset": { - "pred": "keys-all", - "keys": ["368820f80c324bbc7c2b0610688a7da43e39f91d118732671cd9c7500ff43cca"] - }, - "balance": 0.0 - } - } -``` -``` -## Make API request to retrieve result of a tx or multiple tx's with request keys. -Pact.fetch.poll({requestKeys: ["..."]}, ) -> [{requestKey: "...", result: {...}}, ...] - - ex: - const cmd = { requestKeys: [ "6ue-lrwXaLcDyxDwJ1nuLzOfFtnQ2TaF0_Or_X0KnbE", - "P7qDsrt3evfEjtlQAW_b1ZPS7LpAZynCO8wx99hc5i0" ]} - - Pact.fetch.poll(cmd, API_HOST) - - // Returns the following as a Promise Value - [{ "reqKey": "6ue-lrwXaLcDyxDwJ1nuLzOfFtnQ2TaF0_Or_X0KnbE", - "result": { - "status": "success", - "data": "Write succeeded" - } - }, - { "reqKey": "P7qDsrt3evfEjtlQAW_b1ZPS7LpAZynCO8wx99hc5i0", - "result": { - "status": "success", - "data": "Write succeeded" - } - }] -``` -``` -## Make API request to retrieve result of a tx with a request key. -Pact.fetch.listen({listen: "..."}, ) -> {status: "...", data: "..."} - - ex: - const cmd = { listen: "6ue-lrwXaLcDyxDwJ1nuLzOfFtnQ2TaF0_Or_X0KnbE" } - - Pact.fetch.listen(cmd, API_HOST) - - // Returns the following as a Promise Value - { "status": "success", - "data": "Write succeeded" } -``` - - -### Chainweaver Signing API Command - -Simple functions to interact with Chainweaver wallet (https://github.com/kadena-io/chainweaver) and its signing API. - -``` - * A signingCmd Object to be sent to the signing API - * @typedef {Object} signingCmd - cmd to be sent to signing API - * @property pactCode {string} - Pact code to execute - required - * @property caps {array or object} - Pact capability to be signed, see mkCap - required - * @property envData {object} - JSON message data for command - optional - * @property sender {string} - sender field in meta, see mkMeta - optional - * @property chainId {string} - chainId field in meta, see mkMeta - optional - * @property gasLimit {number} - gasLimit field in meta, see mkMeta - optional - * @property nonce {string} - nonce value for ensuring unique hash - optional - **/ -``` - -``` -## Sends parameters of Pact Command to the Chainweaver signing API and retrieves a signed Pact Command. -Pact.wallet.sign() -> {} - -## Sends a signed Pact ExecCmd to a running Pact server and retrieves tx result. -Pact.wallet.sendSigned(, ) -> {"requestKeys": [...]} -``` - - -### Simple API Command - -A simplified set of functions for working with the api. - -``` -## Creates a command to send as POST to /api/send -Pact.simple.exec.createCommand([keyPair], , , ) -> {"cmds":[...]} - -## Creates a command to send as POST to /api/local -Pact.simple.exec.createLocalRequest([keyPair], , , ) -> {"hash": "...", sigs: [...], cmd: {...} } - -## Creates a command to send as POST to /api/poll -Pact.simple.exec.createPollRequest({"cmds": [...]}) -> {"requestKeys": [...]} - -## Creates a command to send as POST to /api/listen -Pact.simple.exec.createListenRequest({"cmds": [...]}) -> {"listen": } -``` - -### Low Level API - -Lower level/internal functions to aid in the construction of JSON blobs that the API endpoints expect. -You probably want to use the `Pact.simple` functions instead of these. - -``` -Pact.api.mkSingleCmd([signatures],{cmd-object}) -> {"hash":, "sigs":[signatures], "cmd":cmd} -Pact.api.mkPublicSend([cmd]) -> {"cmds":[cmd]} \\ send as POST to /api/poll -``` diff --git a/node_modules/pact-lang-api/server.conf b/node_modules/pact-lang-api/server.conf deleted file mode 100644 index 0124c93..0000000 --- a/node_modules/pact-lang-api/server.conf +++ /dev/null @@ -1,5 +0,0 @@ -port: 9001 -logDir: log -persistDir: log -pragmas: [] -verbose: true diff --git a/node_modules/pact-lang-api/test/api.test.js b/node_modules/pact-lang-api/test/api.test.js deleted file mode 100644 index 3798bdc..0000000 --- a/node_modules/pact-lang-api/test/api.test.js +++ /dev/null @@ -1,58 +0,0 @@ -var test = require('tape'); -var Pact = require("./../pact-lang-api.js") - -// Import Test Case -var { kp, cmd, nonce, pactCode, envData } = require("./test-case1.js") - -// test Pact.api.prepareExecCmd() -test('Takes in Pact Command fields and outputs signed prepareExecCmd Object', function(t) { - var actual = Pact.api.prepareExecCmd(kp, nonce, pactCode, envData) - var expected = { - hash: 'uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8', - sigs: [{ - sig: '4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03', - }], - cmd: "{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - } - t.deepEqual(actual, expected); - t.end(); -}); - -// test Pact.api.mkSingleCmd() -test('Takes in sign object and cmd object and outputs singleCmd formatted for API requests', function(t) { - var sign = [{ - hash: 'uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8', - sig: '4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03', - pubKey: 'ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d' - }] - - var actual = Pact.api.mkSingleCmd(sign, JSON.stringify(cmd)) - var expected = { - hash: "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8", - sigs: [{ - sig: "4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03" - }], - cmd: "{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - } - - t.deepEqual(actual, expected); - t.end(); -}); - -// test Pact.api.mkPublicSend() -test('Takes in singleCmd object and outputs mkPublicSend formatted specifically for a send request', function(t) { - var singleCmd = { - hash: "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8", - sigs: [{ - sig: "4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03" - }], - cmd: "{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - } - - var actual = Pact.api.mkPublicSend(singleCmd) - var expected = { - cmds: [singleCmd] - }; - t.deepEqual(actual, expected); - t.end(); -}); diff --git a/node_modules/pact-lang-api/test/crypto.test.js b/node_modules/pact-lang-api/test/crypto.test.js deleted file mode 100644 index c50cd84..0000000 --- a/node_modules/pact-lang-api/test/crypto.test.js +++ /dev/null @@ -1,94 +0,0 @@ -var test = require('tape'); -var Pact = require("./../pact-lang-api.js") - -// Import Test Case -var { kp, cmd } = require("./test-case1.js") - -// test Pact.crpyto.binToHex() -test('Takes in Uint8Array binary object and outputs hex string', function (t) { - var binKp = new Uint8Array( [ 134, 147, 230, 65, 174, 43, 190, 158, - 168, 2, 199, 54, 244, 32, 39, 176, - 63, 134, 175, 230, 60, 174, 49, 94, - 113, 105, 201, 196, 150, 193, 115, 50, - 186, 84, 178, 36, 209, 146, 77, 217, - 132, 3, 245, 199, 81, 171, 221, 16, - 222, 108, 216, 27, 1, 33, 128, 11, - 247, 189, 189, 207, 174, 199, 56, 141 ]) - var actual = Pact.crypto.binToHex(binKp) - - var expected = '8693e641ae2bbe9ea802c736f42027b03f86afe63cae315e7169c9c496c17332ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d' - t.equals(actual, expected); - t.end(); -}); - -// test Pact.crpyto.hexToBin() -test('Takes in hex string and outputs Uint8Array binary object', function (t) { - var hexKp = '8693e641ae2bbe9ea802c736f42027b03f86afe63cae315e7169c9c496c17332ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d' - - var actual = Pact.crypto.hexToBin(hexKp) - var expected = new Uint8Array( [ 134, 147, 230, 65, 174, 43, 190, 158, - 168, 2, 199, 54, 244, 32, 39, 176, - 63, 134, 175, 230, 60, 174, 49, 94, - 113, 105, 201, 196, 150, 193, 115, 50, - 186, 84, 178, 36, 209, 146, 77, 217, - 132, 3, 245, 199, 81, 171, 221, 16, - 222, 108, 216, 27, 1, 33, 128, 11, - 247, 189, 189, 207, 174, 199, 56, 141 ]) - t.deepEqual(actual, expected); - t.end(); -}); - -// test Pact.crypto.base64UrlEncode() -test('Takes in hashed Uint8Array binary object and outputs Base 64 URL encoded string', function (t) { - var hshbin = new Uint8Array([ 205, 170, 167, 69, 13, 17, 99, 60, - 83, 113, 200, 237, 98, 128, 111, 66, - 192, 232, 228, 175, 102, 198, 190, 19, - 16, 95, 135, 33, 132, 226, 228, 154 - ]) - - var actual = Pact.crypto.base64UrlEncode(hshbin) - var expected = "zaqnRQ0RYzxTccjtYoBvQsDo5K9mxr4TEF-HIYTi5Jo" - - t.equals(expected, actual); - t.end(); -}); - -// test Pact.crypto.hash() -test('Takes in hex string, outputs blake2b256 hashing encoded as unescaped base64url', function (t) { - - var actual = Pact.crypto.hash(JSON.stringify(cmd)) - var expected = "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8" - - t.equals(actual, expected); - t.end(); -}); - -// test Pact.crypto.sign() -test("Takes in cmd and keypair, returns object with hash and signature", function(t){ - - var actual = Pact.crypto.sign(JSON.stringify(cmd), kp); - var expected = { - hash: 'uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8', - sig: '4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03', - pubKey: 'ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d' - } - - t.deepEqual(actual, expected) - t.end() -}) - -// test Pact.crypto.toTweetNaclSecretKey() -test("Takes in kp Object and returns secretkey in Uint8Array", function(t){ - var actual = Pact.crypto.toTweetNaclSecretKey(kp) - var expected = new Uint8Array([ 134, 147, 230, 65, 174, 43, 190, 158, - 168, 2, 199, 54, 244, 32, 39, 176, - 63, 134, 175, 230, 60, 174, 49, 94, - 113, 105, 201, 196, 150, 193, 115, 50, - 186, 84, 178, 36, 209, 146, 77, 217, - 132, 3, 245, 199, 81, 171, 221, 16, - 222, 108, 216, 27, 1, 33, 128, 11, - 247, 189, 189, 207, 174, 199, 56, 141 ]) - - t.deepEqual(actual, expected) - t.end() -}) diff --git a/node_modules/pact-lang-api/test/fetch.test.js b/node_modules/pact-lang-api/test/fetch.test.js deleted file mode 100644 index bcbe2c3..0000000 --- a/node_modules/pact-lang-api/test/fetch.test.js +++ /dev/null @@ -1,79 +0,0 @@ -const test = require('blue-tape'); -var Pact = require("./../pact-lang-api.js") -var test1 = require("./test-case1.js") - -// Import Test Case -var { kp, cmd, nonce, pactCode, envData, meta, networkId } = require("./test-case1.js") - -var apiHost = "http://localhost:9001" - -// test Pact.fetch.send() -test("Make a send request and retrieve request key", async function(t) { - var cmdObj = { - keyPairs: kp, - nonce: nonce, - pactCode: pactCode, - envData: envData - } - - var actual = await Pact.fetch.send(cmdObj, apiHost); - var expected = { - requestKeys: ['uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8'] - } - - t.deepEqual(actual, expected); -}) - - -// test Pact.fetch.local() -test("Make a local request and retrieve result", async function(t) { - var cmdObj = { - keyPairs: kp, - nonce: nonce, - pactCode: pactCode, - envData: envData - } - - var actual = await Pact.fetch.local(cmdObj, apiHost); - var expected = { - status: 'success', - data: { - time: '2017-10-31T12:00:00Z' - } - } - - t.deepEqual(actual, expected); -}) - -// test Pact.fetch.poll() -test("Make a poll request with a request key and retrieve result", async function(t) { - var pollRq = { requestKeys: ["uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8"] } - - var actual = await Pact.fetch.poll(pollRq, apiHost); - var expected = [{ - reqKey: 'uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8', - result: { - status: 'success', - data: { - time: '2017-10-31T12:00:00Z' - } - } - }] - - t.deepEqual(actual, expected); -}) - -// test Pact.fetch.listen() -test("Make a listen request with a request key and retrieve result", async function(t) { - var listenRq = { listen: "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8" } - - var actual = await Pact.fetch.listen(listenRq, apiHost); - var expected = { - status: 'success', - data: { - time: '2017-10-31T12:00:00Z' - } - } - - t.deepEqual(actual, expected); -}) diff --git a/node_modules/pact-lang-api/test/lang.test.js b/node_modules/pact-lang-api/test/lang.test.js deleted file mode 100644 index 144e026..0000000 --- a/node_modules/pact-lang-api/test/lang.test.js +++ /dev/null @@ -1,27 +0,0 @@ -var test = require('tape'); -var Pact = require("./../pact-lang-api.js") - -//test Pact.lang.mkExp() -test('Takes in Pact function and arguments and outputs Pact code', function(t) { - var actual = Pact.lang.mkExp("+", 2, 3) - var expected = "(+ 2 3)" - - t.equals(actual, expected); - t.end(); -}); - -//test Pact.lang.mkMeta() -test('Takes in meta data and outputs meta object format', function(t) { - var actual = Pact.lang.mkMeta("Bob", "4", 0.00001, 10000, 1570133940, 28800) - var expected = { - creationTime: 1570133940, - ttl: 28800, - gasLimit: 10000, - chainId: '4', - gasPrice: 0.00001, - sender: 'Bob' - } - - t.deepEqual(actual, expected); - t.end(); -}); diff --git a/node_modules/pact-lang-api/test/simple.test.js b/node_modules/pact-lang-api/test/simple.test.js deleted file mode 100644 index 155d3e6..0000000 --- a/node_modules/pact-lang-api/test/simple.test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('tape'); -var Pact = require("./../pact-lang-api.js") - -// Import Test Case -var { kp, cmd, nonce, pactCode, envData } = require("./test-case1.js") - -// test Pact.simple.exec.createCommand() -test('Takes in Pact Command fields and outputs API request JSON for Send Request', function(t) { - var actual = Pact.simple.exec.createCommand(kp, nonce, pactCode, envData) - var expected = { - "cmds": [{ - "hash": "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8", - "sigs": [{ - "sig": "4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03" - }], - "cmd":"{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - }] - } - - - t.deepEqual(actual, expected) - t.end(); -}); - -// test Pact.simple.exec.createLocalCommand() -test('Takes in Pact Command fields and outputs API request JSON for Local Request', function(t) { - var actual = Pact.simple.exec.createLocalCommand(kp, nonce, pactCode, envData) - var expected = { - "hash": "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8", - "sigs": [{ - "sig": "4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03" - }], - "cmd":"{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - } - - t.deepEqual(actual, expected) - t.end() -}) - -// test Pact.simple.exec.createPollRequest() -test('Takes in Send Request JSON and outputs corresponding API request JSON for Poll request', function(t) { - var execMsg = { - "cmds": [{ - "hash": "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8", - "sigs": [{ - "sig": "4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03" - }], - "cmd":"{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - }] - } - - var actual = Pact.simple.exec.createPollRequest(execMsg) - var expected = { - requestKeys: ["uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8"] - } - - t.deepEqual(actual, expected) - t.end() -}) - -// test Pact.simple.exec.createListenRequest() -test('Takes in Send Request JSON and outputs the API request JSON for Listen request of the first command', function(t) { - var execMsg = { - "cmds": [{ - "hash": "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8", - "sigs": [{ - "sig": "4b0ecfbb0e8f3cb291b57abd27028ceaa221950affa39f10efbf4a5fe740d32670e94c3d3949a7e5f4f6ea692052ca110f7cb2e9a8ee2c5eff4251ed84bbfa03" - }], - "cmd":"{\"networkId\":null,\"payload\":{\"exec\":{\"data\":{\"accounts-admin-keyset\":[\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"]},\"code\":\"(define-keyset 'k (read-keyset \\\"accounts-admin-keyset\\\"))\\n(module system 'k\\n (defun get-system-time ()\\n (time \\\"2017-10-31T12:00:00Z\\\")))\\n(get-system-time)\"}},\"signers\":[{\"pubKey\":\"ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d\"}],\"meta\":{\"creationTime\":0,\"ttl\":0,\"gasLimit\":0,\"chainId\":\"\",\"gasPrice\":0,\"sender\":\"\"},\"nonce\":\"\\\"step01\\\"\"}" - }] - } - - - var actual = Pact.simple.exec.createListenRequest(execMsg) - var expected = { - listen: "uolsidh4DWN-D44FoElnosL8e5-cGCGn_0l2Nct5mq8" - } - - t.deepEqual(actual, expected) - t.end() -}) diff --git a/node_modules/pact-lang-api/test/test-case1.js b/node_modules/pact-lang-api/test/test-case1.js deleted file mode 100644 index eff4080..0000000 --- a/node_modules/pact-lang-api/test/test-case1.js +++ /dev/null @@ -1,33 +0,0 @@ -//Test Case 1 - 01-system.yaml code from https://github.com/kadena-io/pact/blob/master/examples/accounts/scripts/01-system.yaml -var kp = { - publicKey: 'ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d', - secretKey: '8693e641ae2bbe9ea802c736f42027b03f86afe63cae315e7169c9c496c17332' -} -var nonce = "step01" -var pactCode = "(define-keyset 'k (read-keyset \"accounts-admin-keyset\"))\n(module system \'k\n (defun get-system-time ()\n (time \"2017-10-31T12:00:00Z\")))\n(get-system-time)" -var envData = { - "accounts-admin-keyset": ["ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d"] -} - -var cmd = { - networkId: null, - payload: { - exec: { - data: envData, - code: pactCode - } - }, - signers: [{ - "pubKey": "ba54b224d1924dd98403f5c751abdd10de6cd81b0121800bf7bdbdcfaec7388d" - }], - meta: { creationTime: 0, ttl: 0, gasLimit: 0, chainId: "", gasPrice: 0, sender: "" }, - nonce: JSON.stringify(nonce) -} - -module.exports = { - cmd: cmd, - kp: kp, - nonce: nonce, - pactCode: pactCode, - envData: envData -} diff --git a/node_modules/pako/CHANGELOG.md b/node_modules/pako/CHANGELOG.md deleted file mode 100644 index 16b75e7..0000000 --- a/node_modules/pako/CHANGELOG.md +++ /dev/null @@ -1,142 +0,0 @@ -1.0.10 / 2019-02-28 ------------------- - -- Fix minified version, #161. - - -1.0.9 / 2019-02-28 ------------------- - -- Fix `new Buffer()` warning, #154. - - -1.0.8 / 2019-01-14 ------------------- - -- Fix raw inflate with dictionary, #155. - - -1.0.7 / 2018-11-29 ------------------- - -- Fixed RangeError in Crome 72, #150. - - -1.0.6 / 2017-09-14 ------------------- - -- Improve @std/esm compatibility. - - -1.0.5 / 2017-03-17 ------------------- - -- Maintenance. More formal `zlib` attribution and related - changes, #93. Thanks to @bastien-roucaries for the help. - - -1.0.4 / 2016-12-15 ------------------- - -- Bump dev dependencies. -- Make sure `err.message` is filled on throw. -- Code examples for utf-16 string encoding & object compression. - - -1.0.3 / 2016-07-25 ------------------- - -- Maintenance: re-release to properly display latest version in npm registry - and badges. Because `npm publish` timestamp used instead of versions. - - -1.0.2 / 2016-07-21 ------------------- - -- Fixed nasty bug in deflate (wrong `d_buf` offset), which could cause - broken data in some rare cases. -- Also released as 0.2.9 to give chance to old dependents, not updated to 1.x - version. - - -1.0.1 / 2016-04-01 ------------------- - -- Added dictionary support. Thanks to @dignifiedquire. - - -1.0.0 / 2016-02-17 ------------------- - -- Maintenance release (semver, coding style). - - -0.2.8 / 2015-09-14 ------------------- - -- Fixed regression after 0.2.4 for edge conditions in inflate wrapper (#65). - Added more tests to cover possible cases. - - -0.2.7 / 2015-06-09 ------------------- - -- Added Z_SYNC_FLUSH support. Thanks to @TinoLange. - - -0.2.6 / 2015-03-24 ------------------- - -- Allow ArrayBuffer input. - - -0.2.5 / 2014-07-19 ------------------- - -- Workaround for Chrome 38.0.2096.0 script parser bug, #30. - - -0.2.4 / 2014-07-07 ------------------- - -- Fixed bug in inflate wrapper, #29 - - -0.2.3 / 2014-06-09 ------------------- - -- Maintenance release, dependencies update. - - -0.2.2 / 2014-06-04 ------------------- - -- Fixed iOS 5.1 Safari issue with `apply(typed_array)`, #26. - - -0.2.1 / 2014-05-01 ------------------- - -- Fixed collision on switch dynamic/fixed tables. - - -0.2.0 / 2014-04-18 ------------------- - -- Added custom gzip headers support. -- Added strings support. -- Improved memory allocations for small chunks. -- ZStream properties rename/cleanup. -- More coverage tests. - - -0.1.1 / 2014-03-20 ------------------- - -- Bugfixes for inflate/deflate. - - -0.1.0 / 2014-03-15 ------------------- - -- First release. diff --git a/node_modules/pako/LICENSE b/node_modules/pako/LICENSE deleted file mode 100644 index a934ef8..0000000 --- a/node_modules/pako/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pako/README.md b/node_modules/pako/README.md deleted file mode 100644 index 0f36843..0000000 --- a/node_modules/pako/README.md +++ /dev/null @@ -1,183 +0,0 @@ -pako -========================================== - -[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako) -[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako) - -> zlib port to javascript, very fast! - -__Why pako is cool:__ - -- Almost as fast in modern JS engines as C implementation (see benchmarks). -- Works in browsers, you can browserify any separate component. -- Chunking support for big blobs. -- Results are binary equal to well known [zlib](http://www.zlib.net/) (now contains ported zlib v1.2.8). - -This project was done to understand how fast JS can be and is it necessary to -develop native C modules for CPU-intensive tasks. Enjoy the result! - - -__Famous projects, using pako:__ - -- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib)) -- [JSZip](http://stuk.github.io/jszip/) -- [mincer](https://github.com/nodeca/mincer) -- [JS-Git](https://github.com/creationix/js-git) and - [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf) - by [@creationix](https://github.com/creationix) - - -__Benchmarks:__ - -``` -node v0.10.26, 1mb sample: - - deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) - deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) - deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) - ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) - deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) - deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) - * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) - inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) - inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) - ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) - inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) - inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) - * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled) - -node v0.11.12, 1mb sample: - - deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) - deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) - deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) - ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) - deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) - deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) - * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) - inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) - inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) - ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) - inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) - inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) - * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) -``` - -zlib's test is partially affected by marshalling (that make sense for inflate only). -You can change deflate level to 0 in benchmark source, to investigate details. -For deflate level 6 results can be considered as correct. - -__Install:__ - -node.js: - -``` -npm install pako -``` - -browser: - -``` -bower install pako -``` - - -Example & API -------------- - -Full docs - http://nodeca.github.io/pako/ - -```javascript -var pako = require('pako'); - -// Deflate -// -var input = new Uint8Array(); -//... fill input data here -var output = pako.deflate(input); - -// Inflate (simple wrapper can throw exception on broken stream) -// -var compressed = new Uint8Array(); -//... fill data to uncompress here -try { - var result = pako.inflate(compressed); -} catch (err) { - console.log(err); -} - -// -// Alternate interface for chunking & without exceptions -// - -var inflator = new pako.Inflate(); - -inflator.push(chunk1, false); -inflator.push(chunk2, false); -... -inflator.push(chunkN, true); // true -> last chunk - -if (inflator.err) { - console.log(inflator.msg); -} - -var output = inflator.result; - -``` - -Sometime you can wish to work with strings. For example, to send -big objects as json to server. Pako detects input data type. You can -force output to be string with option `{ to: 'string' }`. - -```javascript -var pako = require('pako'); - -var test = { my: 'super', puper: [456, 567], awesome: 'pako' }; - -var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' }); - -// -// Here you can do base64 encode, make xhr requests and so on. -// - -var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' })); -``` - - -Notes ------ - -Pako does not contain some specific zlib functions: - -- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`, - `deflatePending`, `deflatePrime`, `deflateTune`. -- __inflate__ - methods `inflateCopy`, `inflateMark`, - `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`. -- High level inflate/deflate wrappers (classes) may not support some flush - modes. Those should work: Z_NO_FLUSH, Z_FINISH, Z_SYNC_FLUSH. - - -Authors -------- - -- Andrey Tupitsin [@anrd83](https://github.com/andr83) -- Vitaly Puzrin [@puzrin](https://github.com/puzrin) - -Personal thanks to: - -- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome - tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/) - tool and his advices. -- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with - testing. - -Original implementation (in C): - -- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler. - - -License -------- - -- MIT - all files, except `/lib/zlib` folder -- ZLIB - `/lib/zlib` content diff --git a/node_modules/pako/dist/pako.js b/node_modules/pako/dist/pako.js deleted file mode 100644 index cf08564..0000000 --- a/node_modules/pako/dist/pako.js +++ /dev/null @@ -1,6818 +0,0 @@ -/* pako 1.0.10 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - -function _has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (_has(source, p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); - -},{}],4:[function(require,module,exports){ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safari -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":3}],5:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],6:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],8:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],10:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":3}],13:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],14:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -/* eslint-disable space-unary-ops */ - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":3}],15:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/":[function(require,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; - -},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") -}); diff --git a/node_modules/pako/dist/pako.min.js b/node_modules/pako/dist/pako.min.js deleted file mode 100644 index ba39731..0000000 --- a/node_modules/pako/dist/pako.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function r(s,o,l){function h(e,t){if(!o[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(d)return d(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,r,s,o,l)}return o[e].exports}for(var d="function"==typeof require&&require,t=0;t>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){"use strict";var l,_=t("../utils/common"),h=t("./trees"),u=t("./adler32"),c=t("./crc32"),i=t("./messages"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,sl&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<>>=v,c-=v),c<15&&(u+=B[i++]<>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<>>=v,c-=v,(v=r-s)>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=30;break}if(8!=(15&h)){t.msg="unknown compression method",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=30;break}a.dmax=1<>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d>>=g,d-=g,0===a.have){t.msg="invalid bit length repeat",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d>>=g)),h>>>=3,d-=3}else{for(B=g+7;d>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg="invalid literal/length code",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg="invalid distance code",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(lu?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;i>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":3}],15:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/":[function(t,e,a){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/node_modules/pako/dist/pako_deflate.js b/node_modules/pako/dist/pako_deflate.js deleted file mode 100644 index baf6674..0000000 --- a/node_modules/pako/dist/pako_deflate.js +++ /dev/null @@ -1,3997 +0,0 @@ -/* pako 1.0.10 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -/* eslint-disable space-unary-ops */ - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":1}],8:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/deflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") -}); diff --git a/node_modules/pako/dist/pako_deflate.min.js b/node_modules/pako/dist/pako_deflate.min.js deleted file mode 100644 index 7792553..0000000 --- a/node_modules/pako/dist/pako_deflate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function i(s,h,l){function o(e,t){if(!h[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(_)return _(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=h[e]={exports:{}};s[e][0].call(r.exports,function(t){return o(s[e][1][t]||t)},r,r.exports,i,s,h,l)}return h[e].exports}for(var _="function"==typeof require&&require,t=0;t>>6:(a<65536?e[i++]=224|a>>>12:(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63),e[i++]=128|a>>>6&63),e[i++]=128|63&a);return e},a.buf2binstring=function(t){return _(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,n=e.length;a>10&1023,h[n++]=56320|1023&r)}return _(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,n){var r=h,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t}},{}],5:[function(t,e,a){"use strict";var l,u=t("../utils/common"),o=t("./trees"),f=t("./adler32"),c=t("./crc32"),n=t("./messages"),_=0,d=4,p=0,g=-2,m=-1,b=4,r=2,v=8,w=9,i=286,s=30,h=19,y=2*i+1,k=15,z=3,x=258,B=x+z+1,A=42,C=113,S=1,j=2,E=3,U=4;function D(t,e){return t.msg=n[e],e}function I(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(u.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function T(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,q(t.strm)}function L(t,e){t.pending_buf[t.pending++]=e}function N(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function R(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+x,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(o[(a=e)+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do{}while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&il&&0!=--r);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,n,r,i,s,h,l,o,_,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-B)){for(u.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;n=t.head[--e],t.head[e]=d<=n?n-d:0,--a;);for(e=a=d;n=t.prev[--e],t.prev[e]=d<=n?n-d:0,--a;);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,o=r,_=void 0,_=s.avail_in,o<_&&(_=o),a=0===_?0:(s.avail_in-=_,u.arraySet(h,s.input,s.next_in,_,l),1===s.state.wrap?s.adler=f(s.adler,h,_,l):2===s.state.wrap&&(s.adler=c(s.adler,h,_,l)),s.next_in+=_,s.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=z)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-z),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=z){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-z,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-z),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===_)return S;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return S;if(t.strstart-t.block_start>=t.w_size-B&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),S)}),new M(4,4,8,4,F),new M(4,5,16,8,F),new M(4,6,32,32,F),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return Q(t,e,v,15,8,0)},a.deflateInit2=Q,a.deflateReset=J,a.deflateResetKeep=G,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g},a.deflate=function(t,e){var a,n,r,i;if(!t||!t.state||5>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=c(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=C);else{var s=v+(n.w_bits-8<<4)<<8;s|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=C,N(n,s),0!==n.strstart&&(N(n,t.adler>>>16),N(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&q(t),n.pending+2<=n.pending_buf_size&&(L(n,255&t.adler),L(n,t.adler>>8&255),t.adler=0,n.status=C)):n.status=C),0!==n.pending){if(q(t),0===t.avail_out)return n.last_flush=-1,p}else if(0===t.avail_in&&I(e)<=I(a)&&e!==d)return D(t,-5);if(666===n.status&&0!==t.avail_in)return D(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==_&&666!==n.status){var h=2===n.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===_)return S;break}if(t.match_length=0,a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):3===n.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=x){if(H(t),t.lookahead<=x&&e===_)return S;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=z&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=z?(a=o._tr_tally(t,1,t.match_length-z),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):l[n.level].func(n,e);if(h!==E&&h!==U||(n.status=666),h===S||h===E)return 0===t.avail_out&&(n.last_flush=-1),p;if(h===j&&(1===e?o._tr_align(n):5!==e&&(o._tr_stored_block(n,0,0,!1),3===e&&(O(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),q(t),0===t.avail_out))return n.last_flush=-1,p}return e!==d?p:n.wrap<=0?1:(2===n.wrap?(L(n,255&t.adler),L(n,t.adler>>8&255),L(n,t.adler>>16&255),L(n,t.adler>>24&255),L(n,255&t.total_in),L(n,t.total_in>>8&255),L(n,t.total_in>>16&255),L(n,t.total_in>>24&255)):(N(n,t.adler>>>16),N(n,65535&t.adler)),q(t),0=a.w_size&&(0===i&&(O(a.head),a.strstart=0,a.block_start=0,a.insert=0),o=new u.Buf8(a.w_size),u.arraySet(o,e,_-a.w_size,a.w_size,0),e=o,_=a.w_size),s=t.avail_in,h=t.next_in,l=t.input,t.avail_in=_,t.next_in=0,t.input=e,H(a);a.lookahead>=z;){for(n=a.strstart,r=a.lookahead-(z-1);a.ins_h=(a.ins_h<>>7)]}function L(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function N(t,e,a){t.bi_valid>r-a?(t.bi_buf|=e<>r-t.bi_valid,t.bi_valid+=a-r):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function F(t,e,a){var n,r,i=new Array(m+1),s=0;for(n=1;n<=m;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=H(i[h]++,h))}}function K(t){var e;for(e=0;e>1;1<=a;a--)G(t,i,a);for(r=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,G(t,i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=m;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;n>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return h;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?Y(t,e,a,n):4===t.strategy||i===r?(N(t,2+(n?1:0),3),J(t,A,C)):(N(t,4+(n?1:0),3),function(t,e,a,n){var r;for(N(t,e-257,5),N(t,a-1,5),N(t,n-4,4),r=0;r>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(j[a]+d+1)]++,t.dyn_dtree[2*T(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;N(t,2,3),R(t,b,A),16===(e=t).bi_valid?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){"use strict";var s=t("./zlib/deflate"),h=t("./utils/common"),l=t("./utils/strings"),r=t("./zlib/messages"),i=t("./zlib/zstream"),o=Object.prototype.toString,_=0,d=-1,u=0,f=8;function c(t){if(!(this instanceof c))return new c(t);this.options=h.assign({level:d,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},t||{});var e=this.options;e.raw&&0= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],6:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":1}],10:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/inflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") -}); diff --git a/node_modules/pako/dist/pako_inflate.min.js b/node_modules/pako/dist/pako_inflate.min.js deleted file mode 100644 index a191a78..0000000 --- a/node_modules/pako/dist/pako_inflate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d="function"==typeof require&&require,e=0;e>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<>>=v,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=w,d-=w,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg="invalid distance code",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; diff --git a/node_modules/pako/lib/inflate.js b/node_modules/pako/lib/inflate.js deleted file mode 100644 index 7535d15..0000000 --- a/node_modules/pako/lib/inflate.js +++ /dev/null @@ -1,423 +0,0 @@ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; diff --git a/node_modules/pako/lib/utils/common.js b/node_modules/pako/lib/utils/common.js deleted file mode 100644 index 58be4be..0000000 --- a/node_modules/pako/lib/utils/common.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - -function _has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (_has(source, p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); diff --git a/node_modules/pako/lib/utils/strings.js b/node_modules/pako/lib/utils/strings.js deleted file mode 100644 index b07a732..0000000 --- a/node_modules/pako/lib/utils/strings.js +++ /dev/null @@ -1,187 +0,0 @@ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safari -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; diff --git a/node_modules/pako/lib/zlib/README b/node_modules/pako/lib/zlib/README deleted file mode 100644 index 88a8752..0000000 --- a/node_modules/pako/lib/zlib/README +++ /dev/null @@ -1,59 +0,0 @@ -Content of this folder follows zlib C sources as close as possible. -That's intended to simplify maintainability and guarantee equal API -and result. - -Key differences: - -- Everything is in JavaScript. -- No platform-dependent blocks. -- Some things like crc32 rewritten to keep size small and make JIT - work better. -- Some code is different due missed features in JS (macros, pointers, - structures, header files) -- Specific API methods are not implemented (see notes in root readme) - -This port is based on zlib 1.2.8. - -This port is under zlib license (see below) with contribution and addition of javascript -port under expat license (see LICENSE at root of project) - -Copyright: -(C) 1995-2013 Jean-loup Gailly and Mark Adler -(C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin - - -From zlib's README -============================================================================= - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate and - zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; they - are too numerous to cite here. - -Copyright notice: - - (C) 1995-2013 Jean-loup Gailly and Mark Adler - -Copyright (c) <''year''> <''copyright holders''> - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu diff --git a/node_modules/pako/lib/zlib/adler32.js b/node_modules/pako/lib/zlib/adler32.js deleted file mode 100644 index d440a98..0000000 --- a/node_modules/pako/lib/zlib/adler32.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; diff --git a/node_modules/pako/lib/zlib/constants.js b/node_modules/pako/lib/zlib/constants.js deleted file mode 100644 index 569b872..0000000 --- a/node_modules/pako/lib/zlib/constants.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; diff --git a/node_modules/pako/lib/zlib/crc32.js b/node_modules/pako/lib/zlib/crc32.js deleted file mode 100644 index 6a96092..0000000 --- a/node_modules/pako/lib/zlib/crc32.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; diff --git a/node_modules/pako/lib/zlib/deflate.js b/node_modules/pako/lib/zlib/deflate.js deleted file mode 100644 index 3145698..0000000 --- a/node_modules/pako/lib/zlib/deflate.js +++ /dev/null @@ -1,1874 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ diff --git a/node_modules/pako/lib/zlib/gzheader.js b/node_modules/pako/lib/zlib/gzheader.js deleted file mode 100644 index 9582cba..0000000 --- a/node_modules/pako/lib/zlib/gzheader.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; diff --git a/node_modules/pako/lib/zlib/inffast.js b/node_modules/pako/lib/zlib/inffast.js deleted file mode 100644 index 4cc958f..0000000 --- a/node_modules/pako/lib/zlib/inffast.js +++ /dev/null @@ -1,345 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; diff --git a/node_modules/pako/lib/zlib/inflate.js b/node_modules/pako/lib/zlib/inflate.js deleted file mode 100644 index 6384844..0000000 --- a/node_modules/pako/lib/zlib/inflate.js +++ /dev/null @@ -1,1556 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ diff --git a/node_modules/pako/lib/zlib/inftrees.js b/node_modules/pako/lib/zlib/inftrees.js deleted file mode 100644 index ec4e4e9..0000000 --- a/node_modules/pako/lib/zlib/inftrees.js +++ /dev/null @@ -1,343 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; diff --git a/node_modules/pako/lib/zlib/messages.js b/node_modules/pako/lib/zlib/messages.js deleted file mode 100644 index 426daec..0000000 --- a/node_modules/pako/lib/zlib/messages.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; diff --git a/node_modules/pako/lib/zlib/trees.js b/node_modules/pako/lib/zlib/trees.js deleted file mode 100644 index aaf15db..0000000 --- a/node_modules/pako/lib/zlib/trees.js +++ /dev/null @@ -1,1222 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -/* eslint-disable space-unary-ops */ - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; diff --git a/node_modules/pako/lib/zlib/zstream.js b/node_modules/pako/lib/zlib/zstream.js deleted file mode 100644 index 122acfe..0000000 --- a/node_modules/pako/lib/zlib/zstream.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; diff --git a/node_modules/pako/package.json b/node_modules/pako/package.json deleted file mode 100644 index 02100f3..0000000 --- a/node_modules/pako/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_from": "pako@~1.0.5", - "_id": "pako@1.0.10", - "_inBundle": false, - "_integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "_location": "/pako", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pako@~1.0.5", - "name": "pako", - "escapedName": "pako", - "rawSpec": "~1.0.5", - "saveSpec": null, - "fetchSpec": "~1.0.5" - }, - "_requiredBy": [ - "/browserify-zlib" - ], - "_resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "_shasum": "4328badb5086a426aa90f541977d4955da5c9732", - "_spec": "pako@~1.0.5", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify-zlib", - "bugs": { - "url": "https://github.com/nodeca/pako/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Andrei Tuputcyn", - "url": "https://github.com/andr83" - }, - { - "name": "Vitaly Puzrin", - "url": "https://github.com/puzrin" - }, - { - "name": "Friedel Ziegelmayer", - "url": "https://github.com/dignifiedquire" - }, - { - "name": "Kirill Efimov", - "url": "https://github.com/Kirill89" - }, - { - "name": "Jean-loup Gailly" - }, - { - "name": "Mark Adler" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "zlib port to javascript - fast, modularized, with browser support", - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "browserify": "^16.2.3", - "buffer-from": "^1.1.1", - "eslint": "^5.9.0", - "istanbul": "^0.4.5", - "mocha": "^5.2.0", - "multiparty": "^4.1.3", - "ndoc": "^5.0.1", - "uglify-js": "=3.4.8", - "zlibjs": "^0.3.1" - }, - "files": [ - "index.js", - "dist/", - "lib/" - ], - "homepage": "https://github.com/nodeca/pako", - "keywords": [ - "zlib", - "deflate", - "inflate", - "gzip" - ], - "license": "(MIT AND Zlib)", - "name": "pako", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/pako.git" - }, - "scripts": { - "test": "make test" - }, - "version": "1.0.10" -} diff --git a/node_modules/parents/.travis.yml b/node_modules/parents/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/node_modules/parents/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/parents/LICENSE b/node_modules/parents/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/parents/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/parents/example/dirname.js b/node_modules/parents/example/dirname.js deleted file mode 100644 index c9d381b..0000000 --- a/node_modules/parents/example/dirname.js +++ /dev/null @@ -1,3 +0,0 @@ -var parents = require('../'); -var dirs = parents(__dirname); -console.dir(dirs); diff --git a/node_modules/parents/example/win32.js b/node_modules/parents/example/win32.js deleted file mode 100644 index 11b85d6..0000000 --- a/node_modules/parents/example/win32.js +++ /dev/null @@ -1,5 +0,0 @@ -var parents = require('../'); -var dir = 'C:\\Program Files\\Maxis\\Sim City 2000\\cities'; - -var dirs = parents(dir, { platform : 'win32' }); -console.dir(dirs); diff --git a/node_modules/parents/index.js b/node_modules/parents/index.js deleted file mode 100644 index 84a9639..0000000 --- a/node_modules/parents/index.js +++ /dev/null @@ -1,48 +0,0 @@ -var pathPlatform = require('path-platform'); - -module.exports = function (cwd, opts) { - if (cwd === undefined) cwd = process.cwd(); - if (!opts) opts = {}; - var platform = opts.platform || process.platform; - - var isWindows = /^win/.test(platform); - var path = isWindows ? pathPlatform.win32 : pathPlatform; - var normalize = !isWindows ? path.normalize : - path.normalize('c:') === 'c:.' ? fixNormalize(path.normalize) : - path.normalize; - var sep = isWindows ? /[\\\/]/ : '/'; - var init = isWindows ? '' : '/'; - - var join = function (x, y) { - var ps = [ x, y ].filter(function (p) { - return p && typeof p === 'string' - }); - - return normalize(ps.join(isWindows ? '\\' : '/')); - }; - - var res = normalize(cwd) - .split(sep) - .reduce(function (acc,dir,ix) { - return acc.concat(join(acc[ix], dir)) - }, [init]) - .slice(1) - .reverse() - ; - if (res[0] === res[1]) return [ res[0] ]; - if (isWindows && /^\\/.test(cwd)) { - return res.slice(0,-1).map(function (d) { - var ch = d.charAt(0) - return ch === '\\' ? d : - ch === '.' ? '\\' + d.slice(1) : - '\\' + d - }); - } - return res; - - function fixNormalize(fn) { - return function(p) { - return fn(p).replace(/:\.$/, ':') - } - } -} diff --git a/node_modules/parents/package.json b/node_modules/parents/package.json deleted file mode 100644 index 015abe2..0000000 --- a/node_modules/parents/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "parents@^1.0.1", - "_id": "parents@1.0.1", - "_inBundle": false, - "_integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "_location": "/parents", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "parents@^1.0.1", - "name": "parents", - "escapedName": "parents", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/browserify", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "_shasum": "fedd4d2bf193a77745fe71e371d73c3307d9c751", - "_spec": "parents@^1.0.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": {}, - "bugs": { - "url": "https://github.com/substack/node-parents/issues" - }, - "bundleDependencies": false, - "dependencies": { - "path-platform": "~0.11.15" - }, - "deprecated": false, - "description": "return all the parent directories for a directory", - "devDependencies": { - "tap": "~0.2.5" - }, - "directories": { - "example": "example", - "test": "test" - }, - "engine": { - "node": ">=0.6" - }, - "homepage": "https://github.com/substack/node-parents", - "keywords": [ - "directory", - "parent", - "path", - "tree" - ], - "license": "MIT", - "main": "index.js", - "name": "parents", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-parents.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/parents/readme.markdown b/node_modules/parents/readme.markdown deleted file mode 100644 index fe3bc1f..0000000 --- a/node_modules/parents/readme.markdown +++ /dev/null @@ -1,75 +0,0 @@ -# parents - -Return all the parent directories of a directory, inclusive of that directory. - -[![build status](https://secure.travis-ci.org/substack/node-parents.png)](http://travis-ci.org/substack/node-parents) - -# example - -## dirname - -``` js -var parents = require('parents'); -var dirs = parents(__dirname); -console.dir(dirs); -``` - -*** - -``` -[ '/home/substack/projects/node-parents/example', - '/home/substack/projects/node-parents', - '/home/substack/projects', - '/home/substack', - '/home', - '/' ] -``` - -## win32 - -``` js -var parents = require('parents'); -var dir = 'C:\\Program Files\\Maxis\\Sim City 2000\\cities'; - -var dirs = parents(dir, { platform : 'win32' }); -console.dir(dirs); -``` - -*** - -``` -[ 'C:\\Program Files\\Maxis\\Sim City 2000\\cities', - 'C:\\Program Files\\Maxis\\Sim City 2000', - 'C:\\Program Files\\Maxis', - 'C:\\Program Files', - 'C:' ] -``` - -# methods - -``` js -var parents = require('parents') -``` - -## parents(dir, opts) - -Return an array of the parent directories of `dir`, including and starting with -`dir`. If a `dir` isn't specified, `process.cwd()` will be used. - -Optionally specify an `opts.platform` to control whether the separator and paths -works the unixy way with `'/'` or the windowsy way where sometimes things use -`'/'` and sometimes they use `'\\'` and also there are leading drive letters and -other exotic features. If `opts.platform` isn't specified, `process.platform` -will be used. Anything that matches `/^win/` will use the windowsy behavior. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install parents -``` - -# licence - -MIT diff --git a/node_modules/parents/test/dirname.js b/node_modules/parents/test/dirname.js deleted file mode 100644 index 317d131..0000000 --- a/node_modules/parents/test/dirname.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tap').test; -var parents = require('../'); - -test('dirname', function (t) { - var dirs = parents('/foo/bar/baz/quux'); - t.same(dirs, [ - '/foo/bar/baz/quux', - '/foo/bar/baz', - '/foo/bar', - '/foo', - '/', - ]); - t.end(); -}); - -test('root', function (t) { - var dirs = parents('/'); - t.same(dirs, [ '/' ]); - t.end(); -}); diff --git a/node_modules/parents/test/win32.js b/node_modules/parents/test/win32.js deleted file mode 100644 index c6f2ece..0000000 --- a/node_modules/parents/test/win32.js +++ /dev/null @@ -1,34 +0,0 @@ -var test = require('tap').test; -var parents = require('../'); - -test('win32', function (t) { - var dir = 'c:\\Program Files\\Maxis\\Sim City 2000\\cities'; - var dirs = parents(dir, { platform : 'win32' }); - t.same(dirs, [ - 'c:\\Program Files\\Maxis\\Sim City 2000\\cities', - 'c:\\Program Files\\Maxis\\Sim City 2000', - 'c:\\Program Files\\Maxis', - 'c:\\Program Files', - 'c:', - ]); - t.end(); -}); - -test('win32 c:', function (t) { - var dirs = parents('c:\\', { platform : 'win32' }); - t.same(dirs, [ 'c:' ]); - t.end(); -}); - -test('win32 network drive', function (t) { - var dirs = parents( - '\\storageserver01\\Active Projects\\ProjectA', - { platform : 'win32' } - ); - t.same(dirs, [ - '\\storageserver01\\Active Projects\\ProjectA', - '\\storageserver01\\Active Projects', - '\\storageserver01' - ]); - t.end(); -}); diff --git a/node_modules/parse-asn1/LICENSE b/node_modules/parse-asn1/LICENSE deleted file mode 100644 index e0efcf2..0000000 --- a/node_modules/parse-asn1/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2017, crypto-browserify contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/parse-asn1/README.md b/node_modules/parse-asn1/README.md deleted file mode 100644 index 9cd4c15..0000000 --- a/node_modules/parse-asn1/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# parse-asn1 - -[![TRAVIS](https://secure.travis-ci.org/crypto-browserify/parse-asn1.png)](http://travis-ci.org/crypto-browserify/parse-asn1) -[![NPM](http://img.shields.io/npm/v/parse-asn1.svg)](https://www.npmjs.org/package/parse-asn1) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -utility library for parsing asn1 files for use with browserify-sign. diff --git a/node_modules/parse-asn1/aesid.json b/node_modules/parse-asn1/aesid.json deleted file mode 100644 index 24f653b..0000000 --- a/node_modules/parse-asn1/aesid.json +++ /dev/null @@ -1,13 +0,0 @@ -{"2.16.840.1.101.3.4.1.1": "aes-128-ecb", -"2.16.840.1.101.3.4.1.2": "aes-128-cbc", -"2.16.840.1.101.3.4.1.3": "aes-128-ofb", -"2.16.840.1.101.3.4.1.4": "aes-128-cfb", -"2.16.840.1.101.3.4.1.21": "aes-192-ecb", -"2.16.840.1.101.3.4.1.22": "aes-192-cbc", -"2.16.840.1.101.3.4.1.23": "aes-192-ofb", -"2.16.840.1.101.3.4.1.24": "aes-192-cfb", -"2.16.840.1.101.3.4.1.41": "aes-256-ecb", -"2.16.840.1.101.3.4.1.42": "aes-256-cbc", -"2.16.840.1.101.3.4.1.43": "aes-256-ofb", -"2.16.840.1.101.3.4.1.44": "aes-256-cfb" -} \ No newline at end of file diff --git a/node_modules/parse-asn1/asn1.js b/node_modules/parse-asn1/asn1.js deleted file mode 100644 index 6cac822..0000000 --- a/node_modules/parse-asn1/asn1.js +++ /dev/null @@ -1,122 +0,0 @@ -// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js -// Fedor, you are amazing. -'use strict' - -var asn1 = require('asn1.js') - -exports.certificate = require('./certificate') - -var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('modulus').int(), - this.key('publicExponent').int(), - this.key('privateExponent').int(), - this.key('prime1').int(), - this.key('prime2').int(), - this.key('exponent1').int(), - this.key('exponent2').int(), - this.key('coefficient').int() - ) -}) -exports.RSAPrivateKey = RSAPrivateKey - -var RSAPublicKey = asn1.define('RSAPublicKey', function () { - this.seq().obj( - this.key('modulus').int(), - this.key('publicExponent').int() - ) -}) -exports.RSAPublicKey = RSAPublicKey - -var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { - this.seq().obj( - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPublicKey').bitstr() - ) -}) -exports.PublicKey = PublicKey - -var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('none').null_().optional(), - this.key('curve').objid().optional(), - this.key('params').seq().obj( - this.key('p').int(), - this.key('q').int(), - this.key('g').int() - ).optional() - ) -}) - -var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { - this.seq().obj( - this.key('version').int(), - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPrivateKey').octstr() - ) -}) -exports.PrivateKey = PrivateKeyInfo -var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { - this.seq().obj( - this.key('algorithm').seq().obj( - this.key('id').objid(), - this.key('decrypt').seq().obj( - this.key('kde').seq().obj( - this.key('id').objid(), - this.key('kdeparams').seq().obj( - this.key('salt').octstr(), - this.key('iters').int() - ) - ), - this.key('cipher').seq().obj( - this.key('algo').objid(), - this.key('iv').octstr() - ) - ) - ), - this.key('subjectPrivateKey').octstr() - ) -}) - -exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo - -var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('p').int(), - this.key('q').int(), - this.key('g').int(), - this.key('pub_key').int(), - this.key('priv_key').int() - ) -}) -exports.DSAPrivateKey = DSAPrivateKey - -exports.DSAparam = asn1.define('DSAparam', function () { - this.int() -}) - -var ECPrivateKey = asn1.define('ECPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').optional().explicit(0).use(ECParameters), - this.key('publicKey').optional().explicit(1).bitstr() - ) -}) -exports.ECPrivateKey = ECPrivateKey - -var ECParameters = asn1.define('ECParameters', function () { - this.choice({ - namedCurve: this.objid() - }) -}) - -exports.signature = asn1.define('signature', function () { - this.seq().obj( - this.key('r').int(), - this.key('s').int() - ) -}) diff --git a/node_modules/parse-asn1/certificate.js b/node_modules/parse-asn1/certificate.js deleted file mode 100644 index 0ee17a2..0000000 --- a/node_modules/parse-asn1/certificate.js +++ /dev/null @@ -1,89 +0,0 @@ -// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js -// thanks to @Rantanen - -'use strict' - -var asn = require('asn1.js') - -var Time = asn.define('Time', function () { - this.choice({ - utcTime: this.utctime(), - generalTime: this.gentime() - }) -}) - -var AttributeTypeValue = asn.define('AttributeTypeValue', function () { - this.seq().obj( - this.key('type').objid(), - this.key('value').any() - ) -}) - -var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('parameters').optional(), - this.key('curve').objid().optional() - ) -}) - -var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () { - this.seq().obj( - this.key('algorithm').use(AlgorithmIdentifier), - this.key('subjectPublicKey').bitstr() - ) -}) - -var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () { - this.setof(AttributeTypeValue) -}) - -var RDNSequence = asn.define('RDNSequence', function () { - this.seqof(RelativeDistinguishedName) -}) - -var Name = asn.define('Name', function () { - this.choice({ - rdnSequence: this.use(RDNSequence) - }) -}) - -var Validity = asn.define('Validity', function () { - this.seq().obj( - this.key('notBefore').use(Time), - this.key('notAfter').use(Time) - ) -}) - -var Extension = asn.define('Extension', function () { - this.seq().obj( - this.key('extnID').objid(), - this.key('critical').bool().def(false), - this.key('extnValue').octstr() - ) -}) - -var TBSCertificate = asn.define('TBSCertificate', function () { - this.seq().obj( - this.key('version').explicit(0).int().optional(), - this.key('serialNumber').int(), - this.key('signature').use(AlgorithmIdentifier), - this.key('issuer').use(Name), - this.key('validity').use(Validity), - this.key('subject').use(Name), - this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo), - this.key('issuerUniqueID').implicit(1).bitstr().optional(), - this.key('subjectUniqueID').implicit(2).bitstr().optional(), - this.key('extensions').explicit(3).seqof(Extension).optional() - ) -}) - -var X509Certificate = asn.define('X509Certificate', function () { - this.seq().obj( - this.key('tbsCertificate').use(TBSCertificate), - this.key('signatureAlgorithm').use(AlgorithmIdentifier), - this.key('signatureValue').bitstr() - ) -}) - -module.exports = X509Certificate diff --git a/node_modules/parse-asn1/fixProc.js b/node_modules/parse-asn1/fixProc.js deleted file mode 100644 index b9c0f52..0000000 --- a/node_modules/parse-asn1/fixProc.js +++ /dev/null @@ -1,31 +0,0 @@ -// adapted from https://github.com/apatil/pemstrip -var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m -var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m -var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m -var evp = require('evp_bytestokey') -var ciphers = require('browserify-aes') -var Buffer = require('safe-buffer').Buffer -module.exports = function (okey, password) { - var key = okey.toString() - var match = key.match(findProc) - var decrypted - if (!match) { - var match2 = key.match(fullRegex) - decrypted = new Buffer(match2[2].replace(/[\r\n]/g, ''), 'base64') - } else { - var suite = 'aes' + match[1] - var iv = Buffer.from(match[2], 'hex') - var cipherText = Buffer.from(match[3].replace(/[\r\n]/g, ''), 'base64') - var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key - var out = [] - var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - decrypted = Buffer.concat(out) - } - var tag = key.match(startRegex)[1] - return { - tag: tag, - data: decrypted - } -} diff --git a/node_modules/parse-asn1/index.js b/node_modules/parse-asn1/index.js deleted file mode 100644 index 8f982b2..0000000 --- a/node_modules/parse-asn1/index.js +++ /dev/null @@ -1,107 +0,0 @@ -var asn1 = require('./asn1') -var aesid = require('./aesid.json') -var fixProc = require('./fixProc') -var ciphers = require('browserify-aes') -var compat = require('pbkdf2') -var Buffer = require('safe-buffer').Buffer -module.exports = parseKeys - -function parseKeys (buffer) { - var password - if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { - password = buffer.passphrase - buffer = buffer.key - } - if (typeof buffer === 'string') { - buffer = Buffer.from(buffer) - } - - var stripped = fixProc(buffer, password) - - var type = stripped.tag - var data = stripped.data - var subtype, ndata - switch (type) { - case 'CERTIFICATE': - ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo - // falls through - case 'PUBLIC KEY': - if (!ndata) { - ndata = asn1.PublicKey.decode(data, 'der') - } - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') - case '1.2.840.10045.2.1': - ndata.subjectPrivateKey = ndata.subjectPublicKey - return { - type: 'ec', - data: ndata - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') - return { - type: 'dsa', - data: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'ENCRYPTED PRIVATE KEY': - data = asn1.EncryptedPrivateKey.decode(data, 'der') - data = decrypt(data, password) - // falls through - case 'PRIVATE KEY': - ndata = asn1.PrivateKey.decode(data, 'der') - subtype = ndata.algorithm.algorithm.join('.') - switch (subtype) { - case '1.2.840.113549.1.1.1': - return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') - case '1.2.840.10045.2.1': - return { - curve: ndata.algorithm.curve, - privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey - } - case '1.2.840.10040.4.1': - ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') - return { - type: 'dsa', - params: ndata.algorithm.params - } - default: throw new Error('unknown key id ' + subtype) - } - throw new Error('unknown key type ' + type) - case 'RSA PUBLIC KEY': - return asn1.RSAPublicKey.decode(data, 'der') - case 'RSA PRIVATE KEY': - return asn1.RSAPrivateKey.decode(data, 'der') - case 'DSA PRIVATE KEY': - return { - type: 'dsa', - params: asn1.DSAPrivateKey.decode(data, 'der') - } - case 'EC PRIVATE KEY': - data = asn1.ECPrivateKey.decode(data, 'der') - return { - curve: data.parameters.value, - privateKey: data.privateKey - } - default: throw new Error('unknown key type ' + type) - } -} -parseKeys.signature = asn1.signature -function decrypt (data, password) { - var salt = data.algorithm.decrypt.kde.kdeparams.salt - var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) - var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] - var iv = data.algorithm.decrypt.cipher.iv - var cipherText = data.subjectPrivateKey - var keylen = parseInt(algo.split('-')[1], 10) / 8 - var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1') - var cipher = ciphers.createDecipheriv(algo, key, iv) - var out = [] - out.push(cipher.update(cipherText)) - out.push(cipher.final()) - return Buffer.concat(out) -} diff --git a/node_modules/parse-asn1/package.json b/node_modules/parse-asn1/package.json deleted file mode 100644 index eb5e9ab..0000000 --- a/node_modules/parse-asn1/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "parse-asn1@^5.0.0", - "_id": "parse-asn1@5.1.5", - "_inBundle": false, - "_integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", - "_location": "/parse-asn1", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "parse-asn1@^5.0.0", - "name": "parse-asn1", - "escapedName": "parse-asn1", - "rawSpec": "^5.0.0", - "saveSpec": null, - "fetchSpec": "^5.0.0" - }, - "_requiredBy": [ - "/browserify-sign", - "/public-encrypt" - ], - "_resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "_shasum": "003271343da58dc94cace494faef3d2147ecea0e", - "_spec": "parse-asn1@^5.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify-sign", - "author": "", - "bugs": { - "url": "https://github.com/crypto-browserify/parse-asn1/issues" - }, - "bundleDependencies": false, - "dependencies": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - }, - "deprecated": false, - "description": "utility library for parsing asn1 files for use with browserify-sign.", - "devDependencies": { - "standard": "^5.0.0", - "tape": "^3.4.0" - }, - "files": [ - "asn1.js", - "aesid.json", - "certificate.js", - "fixProc.js", - "index.js" - ], - "homepage": "https://github.com/crypto-browserify/parse-asn1#readme", - "license": "ISC", - "main": "index.js", - "name": "parse-asn1", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/parse-asn1.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run standard && npm run unit", - "unit": "node ./test" - }, - "version": "5.1.5" -} diff --git a/node_modules/path-browserify/LICENSE b/node_modules/path-browserify/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/path-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/path-browserify/index.js b/node_modules/path-browserify/index.js deleted file mode 100644 index 208658a..0000000 --- a/node_modules/path-browserify/index.js +++ /dev/null @@ -1,302 +0,0 @@ -// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, -// backported and transplited with Babel, with backwards-compat fixes - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -}; - - -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - -exports.sep = '/'; -exports.delimiter = ':'; - -exports.dirname = function (path) { - if (typeof path !== 'string') path = path + ''; - if (path.length === 0) return '.'; - var code = path.charCodeAt(0); - var hasRoot = code === 47 /*/*/; - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47 /*/*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) { - // return '//'; - // Backwards-compat fix: - return '/'; - } - return path.slice(0, end); -}; - -function basename(path) { - if (typeof path !== 'string') path = path + ''; - - var start = 0; - var end = -1; - var matchedSlash = true; - var i; - - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - - if (end === -1) return ''; - return path.slice(start, end); -} - -// Uses a mixed approach for backwards-compatibility, as ext behavior changed -// in new Node.js versions, so only basename() above is backported here -exports.basename = function (path, ext) { - var f = basename(path); - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - -exports.extname = function (path) { - if (typeof path !== 'string') path = path + ''; - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - var preDotState = 0; - for (var i = path.length - 1; i >= 0; --i) { - var code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === 46 /*.*/) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) - startDot = i; - else if (preDotState !== 1) - preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if (startDot === -1 || end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ''; - } - return path.slice(startDot, end); -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; diff --git a/node_modules/path-browserify/package.json b/node_modules/path-browserify/package.json deleted file mode 100644 index 8aead04..0000000 --- a/node_modules/path-browserify/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "path-browserify@~0.0.0", - "_id": "path-browserify@0.0.1", - "_inBundle": false, - "_integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "_location": "/path-browserify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-browserify@~0.0.0", - "name": "path-browserify", - "escapedName": "path-browserify", - "rawSpec": "~0.0.0", - "saveSpec": null, - "fetchSpec": "~0.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "_shasum": "e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a", - "_spec": "path-browserify@~0.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/path-browserify/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "the path module from node core for browsers", - "devDependencies": { - "tape": "~1.0.4" - }, - "homepage": "https://github.com/substack/path-browserify", - "keywords": [ - "path", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "name": "path-browserify", - "repository": { - "type": "git", - "url": "git://github.com/substack/path-browserify.git" - }, - "scripts": { - "test": "node test/test-path.js" - }, - "version": "0.0.1" -} diff --git a/node_modules/path-browserify/readme.markdown b/node_modules/path-browserify/readme.markdown deleted file mode 100644 index 8ae1dd8..0000000 --- a/node_modules/path-browserify/readme.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# path-browserify - -the path module from node core for browsers diff --git a/node_modules/path-browserify/test/test-path.js b/node_modules/path-browserify/test/test-path.js deleted file mode 100644 index 29496e4..0000000 --- a/node_modules/path-browserify/test/test-path.js +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); - -var path = require('.'); - -var isWindows = process.platform === 'win32'; - -// Mock the node.js path -var f = __dirname + '/simple/test-path.js'; - -assert.equal(path.basename(f), 'test-path.js'); -assert.equal(path.basename(f, '.js'), 'test-path'); -assert.equal(path.basename(''), ''); -assert.equal(path.basename('/dir/basename.ext'), 'basename.ext'); -assert.equal(path.basename('/basename.ext'), 'basename.ext'); -assert.equal(path.basename('basename.ext'), 'basename.ext'); -assert.equal(path.basename('basename.ext/'), 'basename.ext'); -assert.equal(path.basename('basename.ext//'), 'basename.ext'); - -if (isWindows) { - // On Windows a backslash acts as a path separator. - assert.equal(path.basename('\\dir\\basename.ext'), 'basename.ext'); - assert.equal(path.basename('\\basename.ext'), 'basename.ext'); - assert.equal(path.basename('basename.ext'), 'basename.ext'); - assert.equal(path.basename('basename.ext\\'), 'basename.ext'); - assert.equal(path.basename('basename.ext\\\\'), 'basename.ext'); - -} else { - // On unix a backslash is just treated as any other character. - assert.equal(path.basename('\\dir\\basename.ext'), '\\dir\\basename.ext'); - assert.equal(path.basename('\\basename.ext'), '\\basename.ext'); - assert.equal(path.basename('basename.ext'), 'basename.ext'); - assert.equal(path.basename('basename.ext\\'), 'basename.ext\\'); - assert.equal(path.basename('basename.ext\\\\'), 'basename.ext\\\\'); -} - -// POSIX filenames may include control characters -// c.f. http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html -if (!isWindows) { - var controlCharFilename = 'Icon' + String.fromCharCode(13); - assert.equal(path.basename('/a/b/' + controlCharFilename), - controlCharFilename); -} - -assert.equal(path.extname(f), '.js'); - -assert.equal(path.dirname(f).substr(-11), - isWindows ? 'test\\simple' : 'test/simple'); -assert.equal(path.dirname('/a/b/'), '/a'); -assert.equal(path.dirname('/a/b'), '/a'); -assert.equal(path.dirname('/a'), '/'); -assert.equal(path.dirname(''), '.'); -assert.equal(path.dirname('/'), '/'); -assert.equal(path.dirname('////'), '/'); - -if (isWindows) { - assert.equal(path.dirname('c:\\'), 'c:\\'); - assert.equal(path.dirname('c:\\foo'), 'c:\\'); - assert.equal(path.dirname('c:\\foo\\'), 'c:\\'); - assert.equal(path.dirname('c:\\foo\\bar'), 'c:\\foo'); - assert.equal(path.dirname('c:\\foo\\bar\\'), 'c:\\foo'); - assert.equal(path.dirname('c:\\foo\\bar\\baz'), 'c:\\foo\\bar'); - assert.equal(path.dirname('\\'), '\\'); - assert.equal(path.dirname('\\foo'), '\\'); - assert.equal(path.dirname('\\foo\\'), '\\'); - assert.equal(path.dirname('\\foo\\bar'), '\\foo'); - assert.equal(path.dirname('\\foo\\bar\\'), '\\foo'); - assert.equal(path.dirname('\\foo\\bar\\baz'), '\\foo\\bar'); - assert.equal(path.dirname('c:'), 'c:'); - assert.equal(path.dirname('c:foo'), 'c:'); - assert.equal(path.dirname('c:foo\\'), 'c:'); - assert.equal(path.dirname('c:foo\\bar'), 'c:foo'); - assert.equal(path.dirname('c:foo\\bar\\'), 'c:foo'); - assert.equal(path.dirname('c:foo\\bar\\baz'), 'c:foo\\bar'); - assert.equal(path.dirname('\\\\unc\\share'), '\\\\unc\\share'); - assert.equal(path.dirname('\\\\unc\\share\\foo'), '\\\\unc\\share\\'); - assert.equal(path.dirname('\\\\unc\\share\\foo\\'), '\\\\unc\\share\\'); - assert.equal(path.dirname('\\\\unc\\share\\foo\\bar'), - '\\\\unc\\share\\foo'); - assert.equal(path.dirname('\\\\unc\\share\\foo\\bar\\'), - '\\\\unc\\share\\foo'); - assert.equal(path.dirname('\\\\unc\\share\\foo\\bar\\baz'), - '\\\\unc\\share\\foo\\bar'); -} - - -assert.equal(path.extname(''), ''); -assert.equal(path.extname('/path/to/file'), ''); -assert.equal(path.extname('/path/to/file.ext'), '.ext'); -assert.equal(path.extname('/path.to/file.ext'), '.ext'); -assert.equal(path.extname('/path.to/file'), ''); -assert.equal(path.extname('/path.to/.file'), ''); -assert.equal(path.extname('/path.to/.file.ext'), '.ext'); -assert.equal(path.extname('/path/to/f.ext'), '.ext'); -assert.equal(path.extname('/path/to/..ext'), '.ext'); -assert.equal(path.extname('file'), ''); -assert.equal(path.extname('file.ext'), '.ext'); -assert.equal(path.extname('.file'), ''); -assert.equal(path.extname('.file.ext'), '.ext'); -assert.equal(path.extname('/file'), ''); -assert.equal(path.extname('/file.ext'), '.ext'); -assert.equal(path.extname('/.file'), ''); -assert.equal(path.extname('/.file.ext'), '.ext'); -assert.equal(path.extname('.path/file.ext'), '.ext'); -assert.equal(path.extname('file.ext.ext'), '.ext'); -assert.equal(path.extname('file.'), '.'); -assert.equal(path.extname('.'), ''); -assert.equal(path.extname('./'), ''); -assert.equal(path.extname('.file.ext'), '.ext'); -assert.equal(path.extname('.file'), ''); -assert.equal(path.extname('.file.'), '.'); -assert.equal(path.extname('.file..'), '.'); -assert.equal(path.extname('..'), ''); -assert.equal(path.extname('../'), ''); -assert.equal(path.extname('..file.ext'), '.ext'); -assert.equal(path.extname('..file'), '.file'); -assert.equal(path.extname('..file.'), '.'); -assert.equal(path.extname('..file..'), '.'); -assert.equal(path.extname('...'), '.'); -assert.equal(path.extname('...ext'), '.ext'); -assert.equal(path.extname('....'), '.'); -assert.equal(path.extname('file.ext/'), '.ext'); -assert.equal(path.extname('file.ext//'), '.ext'); -assert.equal(path.extname('file/'), ''); -assert.equal(path.extname('file//'), ''); -assert.equal(path.extname('file./'), '.'); -assert.equal(path.extname('file.//'), '.'); - -if (isWindows) { - // On windows, backspace is a path separator. - assert.equal(path.extname('.\\'), ''); - assert.equal(path.extname('..\\'), ''); - assert.equal(path.extname('file.ext\\'), '.ext'); - assert.equal(path.extname('file.ext\\\\'), '.ext'); - assert.equal(path.extname('file\\'), ''); - assert.equal(path.extname('file\\\\'), ''); - assert.equal(path.extname('file.\\'), '.'); - assert.equal(path.extname('file.\\\\'), '.'); - -} else { - // On unix, backspace is a valid name component like any other character. - assert.equal(path.extname('.\\'), ''); - assert.equal(path.extname('..\\'), '.\\'); - assert.equal(path.extname('file.ext\\'), '.ext\\'); - assert.equal(path.extname('file.ext\\\\'), '.ext\\\\'); - assert.equal(path.extname('file\\'), ''); - assert.equal(path.extname('file\\\\'), ''); - assert.equal(path.extname('file.\\'), '.\\'); - assert.equal(path.extname('file.\\\\'), '.\\\\'); -} - -// path.join tests -var failures = []; -var joinTests = - // arguments result - [[['.', 'x/b', '..', '/b/c.js'], 'x/b/c.js'], - [['/.', 'x/b', '..', '/b/c.js'], '/x/b/c.js'], - [['/foo', '../../../bar'], '/bar'], - [['foo', '../../../bar'], '../../bar'], - [['foo/', '../../../bar'], '../../bar'], - [['foo/x', '../../../bar'], '../bar'], - [['foo/x', './bar'], 'foo/x/bar'], - [['foo/x/', './bar'], 'foo/x/bar'], - [['foo/x/', '.', 'bar'], 'foo/x/bar'], - [['./'], './'], - [['.', './'], './'], - [['.', '.', '.'], '.'], - [['.', './', '.'], '.'], - [['.', '/./', '.'], '.'], - [['.', '/////./', '.'], '.'], - [['.'], '.'], - [['', '.'], '.'], - [['', 'foo'], 'foo'], - [['foo', '/bar'], 'foo/bar'], - [['', '/foo'], '/foo'], - [['', '', '/foo'], '/foo'], - [['', '', 'foo'], 'foo'], - [['foo', ''], 'foo'], - [['foo/', ''], 'foo/'], - [['foo', '', '/bar'], 'foo/bar'], - [['./', '..', '/foo'], '../foo'], - [['./', '..', '..', '/foo'], '../../foo'], - [['.', '..', '..', '/foo'], '../../foo'], - [['', '..', '..', '/foo'], '../../foo'], - [['/'], '/'], - [['/', '.'], '/'], - [['/', '..'], '/'], - [['/', '..', '..'], '/'], - [[''], '.'], - [['', ''], '.'], - [[' /foo'], ' /foo'], - [[' ', 'foo'], ' /foo'], - [[' ', '.'], ' '], - [[' ', '/'], ' /'], - [[' ', ''], ' '], - [['/', 'foo'], '/foo'], - [['/', '/foo'], '/foo'], - [['/', '//foo'], '/foo'], - [['/', '', '/foo'], '/foo'], - [['', '/', 'foo'], '/foo'], - [['', '/', '/foo'], '/foo'] - ]; - -// Windows-specific join tests -if (isWindows) { - joinTests = joinTests.concat( - [// UNC path expected - [['//foo/bar'], '//foo/bar/'], - [['\\/foo/bar'], '//foo/bar/'], - [['\\\\foo/bar'], '//foo/bar/'], - // UNC path expected - server and share separate - [['//foo', 'bar'], '//foo/bar/'], - [['//foo/', 'bar'], '//foo/bar/'], - [['//foo', '/bar'], '//foo/bar/'], - // UNC path expected - questionable - [['//foo', '', 'bar'], '//foo/bar/'], - [['//foo/', '', 'bar'], '//foo/bar/'], - [['//foo/', '', '/bar'], '//foo/bar/'], - // UNC path expected - even more questionable - [['', '//foo', 'bar'], '//foo/bar/'], - [['', '//foo/', 'bar'], '//foo/bar/'], - [['', '//foo/', '/bar'], '//foo/bar/'], - // No UNC path expected (no double slash in first component) - [['\\', 'foo/bar'], '/foo/bar'], - [['\\', '/foo/bar'], '/foo/bar'], - [['', '/', '/foo/bar'], '/foo/bar'], - // No UNC path expected (no non-slashes in first component - questionable) - [['//', 'foo/bar'], '/foo/bar'], - [['//', '/foo/bar'], '/foo/bar'], - [['\\\\', '/', '/foo/bar'], '/foo/bar'], - [['//'], '/'], - // No UNC path expected (share name missing - questionable). - [['//foo'], '/foo'], - [['//foo/'], '/foo/'], - [['//foo', '/'], '/foo/'], - [['//foo', '', '/'], '/foo/'], - // No UNC path expected (too many leading slashes - questionable) - [['///foo/bar'], '/foo/bar'], - [['////foo', 'bar'], '/foo/bar'], - [['\\\\\\/foo/bar'], '/foo/bar'], - // Drive-relative vs drive-absolute paths. This merely describes the - // status quo, rather than being obviously right - [['c:'], 'c:.'], - [['c:.'], 'c:.'], - [['c:', ''], 'c:.'], - [['', 'c:'], 'c:.'], - [['c:.', '/'], 'c:./'], - [['c:.', 'file'], 'c:file'], - [['c:', '/'], 'c:/'], - [['c:', 'file'], 'c:/file'] - ]); -} - -// Run the join tests. -joinTests.forEach(function(test) { - var actual = path.join.apply(path, test[0]); - var expected = isWindows ? test[1].replace(/\//g, '\\') : test[1]; - var message = 'path.join(' + test[0].map(JSON.stringify).join(',') + ')' + - '\n expect=' + JSON.stringify(expected) + - '\n actual=' + JSON.stringify(actual); - if (actual !== expected) failures.push('\n' + message); - // assert.equal(actual, expected, message); -}); -assert.equal(failures.length, 0, failures.join('')); -var joinThrowTests = [true, false, 7, null, {}, undefined, [], NaN]; -joinThrowTests.forEach(function(test) { - assert.throws(function() { - path.join(test); - }, TypeError); - assert.throws(function() { - path.resolve(test); - }, TypeError); -}); - - -// path normalize tests -if (isWindows) { - assert.equal(path.normalize('./fixtures///b/../b/c.js'), - 'fixtures\\b\\c.js'); - assert.equal(path.normalize('/foo/../../../bar'), '\\bar'); - assert.equal(path.normalize('a//b//../b'), 'a\\b'); - assert.equal(path.normalize('a//b//./c'), 'a\\b\\c'); - assert.equal(path.normalize('a//b//.'), 'a\\b'); - assert.equal(path.normalize('//server/share/dir/file.ext'), - '\\\\server\\share\\dir\\file.ext'); -} else { - assert.equal(path.normalize('./fixtures///b/../b/c.js'), - 'fixtures/b/c.js'); - assert.equal(path.normalize('/foo/../../../bar'), '/bar'); - assert.equal(path.normalize('a//b//../b'), 'a/b'); - assert.equal(path.normalize('a//b//./c'), 'a/b/c'); - assert.equal(path.normalize('a//b//.'), 'a/b'); -} - -// path.resolve tests -if (isWindows) { - // windows - var resolveTests = - // arguments result - [[['c:/blah\\blah', 'd:/games', 'c:../a'], 'c:\\blah\\a'], - [['c:/ignore', 'd:\\a/b\\c/d', '\\e.exe'], 'd:\\e.exe'], - [['c:/ignore', 'c:/some/file'], 'c:\\some\\file'], - [['d:/ignore', 'd:some/dir//'], 'd:\\ignore\\some\\dir'], - [['.'], process.cwd()], - [['//server/share', '..', 'relative\\'], '\\\\server\\share\\relative'], - [['c:/', '//'], 'c:\\'], - [['c:/', '//dir'], 'c:\\dir'], - [['c:/', '//server/share'], '\\\\server\\share\\'], - [['c:/', '//server//share'], '\\\\server\\share\\'], - [['c:/', '///some//dir'], 'c:\\some\\dir'] - ]; -} else { - // Posix - var resolveTests = - // arguments result - [[['/var/lib', '../', 'file/'], '/var/file'], - [['/var/lib', '/../', 'file/'], '/file'], - [['a/b/c/', '../../..'], process.cwd()], - [['.'], process.cwd()], - [['/some/dir', '.', '/absolute/'], '/absolute']]; -} -var failures = []; -resolveTests.forEach(function(test) { - var actual = path.resolve.apply(path, test[0]); - var expected = test[1]; - var message = 'path.resolve(' + test[0].map(JSON.stringify).join(',') + ')' + - '\n expect=' + JSON.stringify(expected) + - '\n actual=' + JSON.stringify(actual); - if (actual !== expected) failures.push('\n' + message); - // assert.equal(actual, expected, message); -}); -assert.equal(failures.length, 0, failures.join('')); - -// path.isAbsolute tests -if (isWindows) { - assert.equal(path.isAbsolute('//server/file'), true); - assert.equal(path.isAbsolute('\\\\server\\file'), true); - assert.equal(path.isAbsolute('C:/Users/'), true); - assert.equal(path.isAbsolute('C:\\Users\\'), true); - assert.equal(path.isAbsolute('C:cwd/another'), false); - assert.equal(path.isAbsolute('C:cwd\\another'), false); - assert.equal(path.isAbsolute('directory/directory'), false); - assert.equal(path.isAbsolute('directory\\directory'), false); -} else { - assert.equal(path.isAbsolute('/home/foo'), true); - assert.equal(path.isAbsolute('/home/foo/..'), true); - assert.equal(path.isAbsolute('bar/'), false); - assert.equal(path.isAbsolute('./baz'), false); -} - -// path.relative tests -if (isWindows) { - // windows - var relativeTests = - // arguments result - [['c:/blah\\blah', 'd:/games', 'd:\\games'], - ['c:/aaaa/bbbb', 'c:/aaaa', '..'], - ['c:/aaaa/bbbb', 'c:/cccc', '..\\..\\cccc'], - ['c:/aaaa/bbbb', 'c:/aaaa/bbbb', ''], - ['c:/aaaa/bbbb', 'c:/aaaa/cccc', '..\\cccc'], - ['c:/aaaa/', 'c:/aaaa/cccc', 'cccc'], - ['c:/', 'c:\\aaaa\\bbbb', 'aaaa\\bbbb'], - ['c:/aaaa/bbbb', 'd:\\', 'd:\\']]; -} else { - // posix - var relativeTests = - // arguments result - [['/var/lib', '/var', '..'], - ['/var/lib', '/bin', '../../bin'], - ['/var/lib', '/var/lib', ''], - ['/var/lib', '/var/apache', '../apache'], - ['/var/', '/var/lib', 'lib'], - ['/', '/var/lib', 'var/lib']]; -} -var failures = []; -relativeTests.forEach(function(test) { - var actual = path.relative(test[0], test[1]); - var expected = test[2]; - var message = 'path.relative(' + - test.slice(0, 2).map(JSON.stringify).join(',') + - ')' + - '\n expect=' + JSON.stringify(expected) + - '\n actual=' + JSON.stringify(actual); - if (actual !== expected) failures.push('\n' + message); -}); -assert.equal(failures.length, 0, failures.join('')); - -// path.sep tests -if (isWindows) { - // windows - assert.equal(path.sep, '\\'); -} else { - // posix - assert.equal(path.sep, '/'); -} - -// path.delimiter tests -if (isWindows) { - // windows - assert.equal(path.delimiter, ';'); -} else { - // posix - assert.equal(path.delimiter, ':'); -} diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js deleted file mode 100644 index 22aa6c3..0000000 --- a/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json deleted file mode 100644 index 11642bc..0000000 --- a/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "path-is-absolute@^1.0.0", - "_id": "path-is-absolute@1.0.1", - "_inBundle": false, - "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "_location": "/path-is-absolute", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-is-absolute@^1.0.0", - "name": "path-is-absolute", - "escapedName": "path-is-absolute", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob", - "/insert-module-globals" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", - "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/glob", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": { - "xo": "^0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "license": "MIT", - "name": "path-is-absolute", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "xo && node test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md deleted file mode 100644 index 8dbdf5f..0000000 --- a/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -const pathIsAbsolute = require('path-is-absolute'); - -// Running on Linux -pathIsAbsolute('/home/foo'); -//=> true -pathIsAbsolute('C:/Users/foo'); -//=> false - -// Running on Windows -pathIsAbsolute('C:/Users/foo'); -//=> true -pathIsAbsolute('/home/foo'); -//=> false - -// Running on any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -pathIsAbsolute.posix('C:/Users/foo'); -//=> false -pathIsAbsolute.win32('C:/Users/foo'); -//=> true -pathIsAbsolute.win32('/home/foo'); -//=> false -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -POSIX specific version. - -### pathIsAbsolute.win32(path) - -Windows specific version. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-parse/.travis.yml b/node_modules/path-parse/.travis.yml deleted file mode 100644 index dae31da..0000000 --- a/node_modules/path-parse/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "0.12" - - "0.11" - - "0.10" - - "0.10.12" - - "0.8" - - "0.6" - - "iojs" diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE deleted file mode 100644 index 810f3db..0000000 --- a/node_modules/path-parse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Javier Blanco - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/path-parse/README.md b/node_modules/path-parse/README.md deleted file mode 100644 index 05097f8..0000000 --- a/node_modules/path-parse/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) - -> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). - -## Install - -``` -$ npm install --save path-parse -``` - -## Usage - -```js -var pathParse = require('path-parse'); - -pathParse('/home/user/dir/file.txt'); -//=> { -// root : "/", -// dir : "/home/user/dir", -// base : "file.txt", -// ext : ".txt", -// name : "file" -// } -``` - -## API - -See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. - -### pathParse(path) - -### pathParse.posix(path) - -The Posix specific version. - -### pathParse.win32(path) - -The Windows specific version. - -## License - -MIT © [Javier Blanco](http://jbgutierrez.info) diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js deleted file mode 100644 index 3b7601f..0000000 --- a/node_modules/path-parse/index.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -var isWindows = process.platform === 'win32'; - -// Regex to split a windows path into three parts: [*, device, slash, -// tail] windows-only -var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - -// Regex to split the tail part of the above into [*, dir, basename, ext] -var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; - -var win32 = {}; - -// Function to split a filename into [root, dir, basename, ext] -function win32SplitPath(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; -} - -win32.parse = function(pathString) { - if (typeof pathString !== 'string') { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, -1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var posix = {}; - - -function posixSplitPath(filename) { - return splitPathRe.exec(filename).slice(1); -} - - -posix.parse = function(pathString) { - if (typeof pathString !== 'string') { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, -1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -if (isWindows) - module.exports = win32.parse; -else /* posix */ - module.exports = posix.parse; - -module.exports.posix = posix.parse; -module.exports.win32 = win32.parse; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json deleted file mode 100644 index e951982..0000000 --- a/node_modules/path-parse/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "path-parse@^1.0.6", - "_id": "path-parse@1.0.6", - "_inBundle": false, - "_integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "_location": "/path-parse", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-parse@^1.0.6", - "name": "path-parse", - "escapedName": "path-parse", - "rawSpec": "^1.0.6", - "saveSpec": null, - "fetchSpec": "^1.0.6" - }, - "_requiredBy": [ - "/resolve" - ], - "_resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "_shasum": "d62dbb5679405d72c4737ec58600e9ddcf06d24c", - "_spec": "path-parse@^1.0.6", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/resolve", - "author": { - "name": "Javier Blanco", - "email": "http://jbgutierrez.info" - }, - "bugs": { - "url": "https://github.com/jbgutierrez/path-parse/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js path.parse() ponyfill", - "homepage": "https://github.com/jbgutierrez/path-parse#readme", - "keywords": [ - "path", - "paths", - "file", - "dir", - "parse", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim" - ], - "license": "MIT", - "main": "index.js", - "name": "path-parse", - "repository": { - "type": "git", - "url": "git+https://github.com/jbgutierrez/path-parse.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.6" -} diff --git a/node_modules/path-parse/test.js b/node_modules/path-parse/test.js deleted file mode 100644 index 0b30c12..0000000 --- a/node_modules/path-parse/test.js +++ /dev/null @@ -1,77 +0,0 @@ -var assert = require('assert'); -var pathParse = require('./index'); - -var winParseTests = [ - [{ root: 'C:\\', dir: 'C:\\path\\dir', base: 'index.html', ext: '.html', name: 'index' }, 'C:\\path\\dir\\index.html'], - [{ root: 'C:\\', dir: 'C:\\another_path\\DIR\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'C:\\another_path\\DIR\\1\\2\\33\\index'], - [{ root: '', dir: 'another_path\\DIR with spaces\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'another_path\\DIR with spaces\\1\\2\\33\\index'], - [{ root: '\\', dir: '\\foo', base: 'C:', ext: '', name: 'C:' }, '\\foo\\C:'], - [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'], - [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, '.\\file'], - - // unc - [{ root: '\\\\server\\share\\', dir: '\\\\server\\share\\', base: 'file_path', ext: '', name: 'file_path' }, '\\\\server\\share\\file_path'], - [{ root: '\\\\server two\\shared folder\\', dir: '\\\\server two\\shared folder\\', base: 'file path.zip', ext: '.zip', name: 'file path' }, '\\\\server two\\shared folder\\file path.zip'], - [{ root: '\\\\teela\\admin$\\', dir: '\\\\teela\\admin$\\', base: 'system32', ext: '', name: 'system32' }, '\\\\teela\\admin$\\system32'], - [{ root: '\\\\?\\UNC\\', dir: '\\\\?\\UNC\\server', base: 'share', ext: '', name: 'share' }, '\\\\?\\UNC\\server\\share'] -]; - -var winSpecialCaseFormatTests = [ - [{dir: 'some\\dir'}, 'some\\dir\\'], - [{base: 'index.html'}, 'index.html'], - [{}, ''] -]; - -var unixParseTests = [ - [{ root: '/', dir: '/home/user/dir', base: 'file.txt', ext: '.txt', name: 'file' }, '/home/user/dir/file.txt'], - [{ root: '/', dir: '/home/user/a dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a dir/another File.zip'], - [{ root: '/', dir: '/home/user/a dir/', base: 'another&File.', ext: '.', name: 'another&File' }, '/home/user/a dir//another&File.'], - [{ root: '/', dir: '/home/user/a$$$dir/', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a$$$dir//another File.zip'], - [{ root: '', dir: 'user/dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, 'user/dir/another File.zip'], - [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'], - [{ root: '', dir: '', base: '.\\file', ext: '', name: '.\\file' }, '.\\file'], - [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, './file'], - [{ root: '', dir: '', base: 'C:\\foo', ext: '', name: 'C:\\foo' }, 'C:\\foo'] -]; - -var unixSpecialCaseFormatTests = [ - [{dir: 'some/dir'}, 'some/dir/'], - [{base: 'index.html'}, 'index.html'], - [{}, ''] -]; - -var errors = [ - {input: null, message: /Parameter 'pathString' must be a string, not/}, - {input: {}, message: /Parameter 'pathString' must be a string, not object/}, - {input: true, message: /Parameter 'pathString' must be a string, not boolean/}, - {input: 1, message: /Parameter 'pathString' must be a string, not number/}, - {input: undefined, message: /Parameter 'pathString' must be a string, not undefined/}, -]; - -checkParseFormat(pathParse.win32, winParseTests); -checkParseFormat(pathParse.posix, unixParseTests); -checkErrors(pathParse.win32); -checkErrors(pathParse.posix); - -function checkErrors(parse) { - errors.forEach(function(errorCase) { - try { - parse(errorCase.input); - } catch(err) { - assert.ok(err instanceof TypeError); - assert.ok( - errorCase.message.test(err.message), - 'expected ' + errorCase.message + ' to match ' + err.message - ); - return; - } - - assert.fail('should have thrown'); - }); -} - -function checkParseFormat(parse, testCases) { - testCases.forEach(function(testCase) { - assert.deepEqual(parse(testCase[1]), testCase[0]); - }); -} diff --git a/node_modules/path-platform/LICENSE b/node_modules/path-platform/LICENSE deleted file mode 100644 index cfa529e..0000000 --- a/node_modules/path-platform/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -MIT -- see https://github.com/joyent/node for license - -This file is pulled directly from Node.js diff --git a/node_modules/path-platform/README.md b/node_modules/path-platform/README.md deleted file mode 100644 index 9892dbd..0000000 --- a/node_modules/path-platform/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# path-platform - -This is a transitional package for those not on 0.12 that provides a compatible -interface to the builtin `path` module, but adds `path.posix` and `path.win32` -so you can `path.posix.normalize` on a win32 platform, or vice versa. diff --git a/node_modules/path-platform/package.json b/node_modules/path-platform/package.json deleted file mode 100644 index 26abb9e..0000000 --- a/node_modules/path-platform/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "path-platform@~0.11.15", - "_id": "path-platform@0.11.15", - "_inBundle": false, - "_integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "_location": "/path-platform", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-platform@~0.11.15", - "name": "path-platform", - "escapedName": "path-platform", - "rawSpec": "~0.11.15", - "saveSpec": null, - "fetchSpec": "~0.11.15" - }, - "_requiredBy": [ - "/parents" - ], - "_resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "_shasum": "e864217f74c36850f0852b78dc7bf7d4a5721bf2", - "_spec": "path-platform@~0.11.15", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/parents", - "author": { - "name": "Timothy J Fontaine", - "email": "tjfontaine@gmail.com", - "url": "http://atxconsulting.com" - }, - "bugs": { - "url": "http://github.com/tjfontaine/node-path-platform/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Provide access to win32 and posix path operations; sourced directly from upstream Node.js", - "engines": { - "node": ">= 0.8.0" - }, - "homepage": "http://github.com/tjfontaine/node-path-platform", - "keywords": [ - "path", - "platform", - "posix", - "win32" - ], - "license": "MIT", - "main": "path.js", - "name": "path-platform", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/tjfontaine/node-path-platform.git" - }, - "version": "0.11.15" -} diff --git a/node_modules/path-platform/path.js b/node_modules/path-platform/path.js deleted file mode 100644 index 0a7a707..0000000 --- a/node_modules/path-platform/path.js +++ /dev/null @@ -1,643 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var isWindows = process.platform === 'win32'; -var util = require('util'); - -var _path = require('path'); - -// we are new enough we already have this from the system, just export the -// system then -if (_path.posix) { - module.exports = _path; - return; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - var res = []; - for (var i = 0; i < parts.length; i++) { - var p = parts[i]; - - // ignore empty parts - if (!p || p === '.') - continue; - - if (p === '..') { - if (res.length && res[res.length - 1] !== '..') { - res.pop(); - } else if (allowAboveRoot) { - res.push('..'); - } - } else { - res.push(p); - } - } - - return res; -} - -// Regex to split a windows path into three parts: [*, device, slash, -// tail] windows-only -var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - -// Regex to split the tail part of the above into [*, dir, basename, ext] -var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; - -var win32 = {}; - -// Function to split a filename into [root, dir, basename, ext] -function win32SplitPath(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; -} - -var normalizeUNCRoot = function(device) { - return '\\\\' + device.replace(/^[\\\/]+/, '').replace(/[\\\/]+/g, '\\'); -}; - -// path.resolve([from ...], to) -win32.resolve = function() { - var resolvedDevice = '', - resolvedTail = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1; i--) { - var path; - if (i >= 0) { - path = arguments[i]; - } else if (!resolvedDevice) { - path = process.cwd(); - } else { - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive. We're sure the device is not - // an unc path at this points, because unc paths are always absolute. - path = process.env['=' + resolvedDevice]; - // Verify that a drive-local cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (!path || path.substr(0, 3).toLowerCase() !== - resolvedDevice.toLowerCase() + '\\') { - path = resolvedDevice + '\\'; - } - } - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = win32.isAbsolute(path), - tail = result[3]; - - if (device && - resolvedDevice && - device.toLowerCase() !== resolvedDevice.toLowerCase()) { - // This path points to another device so it is not applicable - continue; - } - - if (!resolvedDevice) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = tail + '\\' + resolvedTail; - resolvedAbsolute = isAbsolute; - } - - if (resolvedDevice && resolvedAbsolute) { - break; - } - } - - // Convert slashes to backslashes when `resolvedDevice` points to an UNC - // root. Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - resolvedDevice = normalizeUNCRoot(resolvedDevice); - } - - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - - // Normalize the tail path - resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/), - !resolvedAbsolute).join('\\'); - - // If device is a drive letter, we'll normalize to lower case. - if (resolvedDevice && resolvedDevice.charAt(1) === ':') { - resolvedDevice = resolvedDevice[0].toLowerCase() + - resolvedDevice.substr(1); - } - - return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) || - '.'; -}; - - -win32.normalize = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = win32.isAbsolute(path), - tail = result[3], - trailingSlash = /[\\\/]$/.test(tail); - - // If device is a drive letter, we'll normalize to lower case. - if (device && device.charAt(1) === ':') { - device = device[0].toLowerCase() + device.substr(1); - } - - // Normalize the tail path - tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join('\\'); - - if (!tail && !isAbsolute) { - tail = '.'; - } - if (tail && trailingSlash) { - tail += '\\'; - } - - // Convert slashes to backslashes when `device` points to an UNC root. - // Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - device = normalizeUNCRoot(device); - } - - return device + (isAbsolute ? '\\' : '') + tail; -}; - - -win32.isAbsolute = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = !!device && device.charAt(1) !== ':'; - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -win32.join = function() { - function f(p) { - if (!util.isString(p)) { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - } - - var paths = Array.prototype.filter.call(arguments, f); - var joined = paths.join('\\'); - - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\') - if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) { - joined = joined.replace(/^[\\\/]{2,}/, '\\'); - } - - return win32.normalize(joined); -}; - - -// path.relative(from, to) -// it will solve the relative path from 'from' to 'to', for instance: -// from = 'C:\\orandea\\test\\aaa' -// to = 'C:\\orandea\\impl\\bbb' -// The output of the function should be: '..\\..\\impl\\bbb' -win32.relative = function(from, to) { - from = win32.resolve(from); - to = win32.resolve(to); - - // windows is not case sensitive - var lowerFrom = from.toLowerCase(); - var lowerTo = to.toLowerCase(); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var toParts = trim(to.split('\\')); - - var lowerFromParts = trim(lowerFrom.split('\\')); - var lowerToParts = trim(lowerTo.split('\\')); - - var length = Math.min(lowerFromParts.length, lowerToParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (lowerFromParts[i] !== lowerToParts[i]) { - samePartsLength = i; - break; - } - } - - if (samePartsLength == 0) { - return to; - } - - var outputParts = []; - for (var i = samePartsLength; i < lowerFromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('\\'); -}; - - -win32._makeLong = function(path) { - // Note: this will *probably* throw somewhere. - if (!util.isString(path)) - return path; - - if (!path) { - return ''; - } - - var resolvedPath = win32.resolve(path); - - if (/^[a-zA-Z]\:\\/.test(resolvedPath)) { - // path is local filesystem path, which needs to be converted - // to long UNC path. - return '\\\\?\\' + resolvedPath; - } else if (/^\\\\[^?.]/.test(resolvedPath)) { - // path is network UNC path, which needs to be converted - // to long UNC path. - return '\\\\?\\UNC\\' + resolvedPath.substring(2); - } - - return path; -}; - - -win32.dirname = function(path) { - var result = win32SplitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -win32.basename = function(path, ext) { - var f = win32SplitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -win32.extname = function(path) { - return win32SplitPath(path)[3]; -}; - - -win32.format = function(pathObject) { - if (!util.isObject(pathObject)) { - throw new TypeError( - "Parameter 'pathObject' must be an object, not " + typeof pathObject - ); - } - - var root = pathObject.root || ''; - - if (!util.isString(root)) { - throw new TypeError( - "'pathObject.root' must be a string or undefined, not " + - typeof pathObject.root - ); - } - - var dir = pathObject.dir; - var base = pathObject.base || ''; - if (dir.slice(dir.length - 1, dir.length) === win32.sep) { - return dir + base; - } - - if (dir) { - return dir + win32.sep + base; - } - - return base; -}; - - -win32.parse = function(pathString) { - if (!util.isString(pathString)) { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -win32.sep = '\\'; -win32.delimiter = ';'; - - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var posix = {}; - - -function posixSplitPath(filename) { - return splitPathRe.exec(filename).slice(1); -} - - -// path.resolve([from ...], to) -// posix version -posix.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(resolvedPath.split('/'), - !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -posix.normalize = function(path) { - var isAbsolute = posix.isAbsolute(path), - trailingSlash = path.substr(-1) === '/'; - - // Normalize the path - path = normalizeArray(path.split('/'), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -posix.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -posix.join = function() { - var path = ''; - for (var i = 0; i < arguments.length; i++) { - var segment = arguments[i]; - if (!util.isString(segment)) { - throw new TypeError('Arguments to path.join must be strings'); - } - if (segment) { - if (!path) { - path += segment; - } else { - path += '/' + segment; - } - } - } - return posix.normalize(path); -}; - - -// path.relative(from, to) -// posix version -posix.relative = function(from, to) { - from = posix.resolve(from).substr(1); - to = posix.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - - -posix._makeLong = function(path) { - return path; -}; - - -posix.dirname = function(path) { - var result = posixSplitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -posix.basename = function(path, ext) { - var f = posixSplitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -posix.extname = function(path) { - return posixSplitPath(path)[3]; -}; - - -posix.format = function(pathObject) { - if (!util.isObject(pathObject)) { - throw new TypeError( - "Parameter 'pathObject' must be an object, not " + typeof pathObject - ); - } - - var root = pathObject.root || ''; - - if (!util.isString(root)) { - throw new TypeError( - "'pathObject.root' must be a string or undefined, not " + - typeof pathObject.root - ); - } - - var dir = pathObject.dir ? pathObject.dir + posix.sep : ''; - var base = pathObject.base || ''; - return dir + base; -}; - - -posix.parse = function(pathString) { - if (!util.isString(pathString)) { - throw new TypeError( - "Parameter 'pathString' must be a string, not " + typeof pathString - ); - } - var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - - return { - root: allParts[0], - dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1), - base: allParts[2], - ext: allParts[3], - name: allParts[2].slice(0, allParts[2].length - allParts[3].length) - }; -}; - - -posix.sep = '/'; -posix.delimiter = ':'; - - -if (isWindows) - module.exports = win32; -else /* posix */ - module.exports = posix; - -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/pbkdf2/LICENSE b/node_modules/pbkdf2/LICENSE deleted file mode 100644 index a115b52..0000000 --- a/node_modules/pbkdf2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Daniel Cousens - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pbkdf2/README.md b/node_modules/pbkdf2/README.md deleted file mode 100644 index 614934f..0000000 --- a/node_modules/pbkdf2/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# pbkdf2 - -[![NPM Package](https://img.shields.io/npm/v/pbkdf2.svg?style=flat-square)](https://www.npmjs.org/package/pbkdf2) -[![Build Status](https://img.shields.io/travis/crypto-browserify/pbkdf2.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/pbkdf2) -[![Dependency status](https://img.shields.io/david/crypto-browserify/pbkdf2.svg?style=flat-square)](https://david-dm.org/crypto-browserify/pbkdf2#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from `crypto.getHashes()` - - -## Usage - -```js -var pbkdf2 = require('pbkdf2') -var derivedKey = pbkdf2.pbkdf2Sync('password', 'salt', 1, 32, 'sha512') - -... -``` - -For more information on the API, please see the relevant [Node documentation](https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback). - -For high performance, use the `async` variant (`pbkdf2.pbkdf2`), not `pbkdf2.pbkdf2Sync`, this variant has the oppurtunity to use `window.crypto.subtle` when browserified. - - -## Credits - -This module is a derivative of [cryptocoinjs/pbkdf2-sha256](https://github.com/cryptocoinjs/pbkdf2-sha256/), so thanks to [JP Richardson](https://github.com/jprichardson/) for laying the ground work. - -Thank you to [FangDun Cai](https://github.com/fundon) for donating the package name on npm, if you're looking for his previous module it is located at [fundon/pbkdf2](https://github.com/fundon/pbkdf2). diff --git a/node_modules/pbkdf2/browser.js b/node_modules/pbkdf2/browser.js deleted file mode 100644 index ac5fdd8..0000000 --- a/node_modules/pbkdf2/browser.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.pbkdf2 = require('./lib/async') -exports.pbkdf2Sync = require('./lib/sync') diff --git a/node_modules/pbkdf2/index.js b/node_modules/pbkdf2/index.js deleted file mode 100644 index fc2f8d9..0000000 --- a/node_modules/pbkdf2/index.js +++ /dev/null @@ -1,31 +0,0 @@ -var checkParameters = require('./lib/precondition') -var native = require('crypto') - -function nativePBKDF2 (password, salt, iterations, keylen, digest, callback) { - checkParameters(password, salt, iterations, keylen) - - if (typeof digest === 'function') { - callback = digest - digest = 'sha1' - } - if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') - - return native.pbkdf2(password, salt, iterations, keylen, digest, callback) -} - -function nativePBKDF2Sync (password, salt, iterations, keylen, digest) { - checkParameters(password, salt, iterations, keylen) - digest = digest || 'sha1' - return native.pbkdf2Sync(password, salt, iterations, keylen, digest) -} - -/* istanbul ignore next */ -if (!native.pbkdf2Sync || native.pbkdf2Sync.toString().indexOf('keylen, digest') === -1) { - exports.pbkdf2Sync = require('./lib/sync') - exports.pbkdf2 = require('./lib/async') - -// native -} else { - exports.pbkdf2Sync = nativePBKDF2Sync - exports.pbkdf2 = nativePBKDF2 -} diff --git a/node_modules/pbkdf2/lib/async.js b/node_modules/pbkdf2/lib/async.js deleted file mode 100644 index b20da7c..0000000 --- a/node_modules/pbkdf2/lib/async.js +++ /dev/null @@ -1,100 +0,0 @@ -var checkParameters = require('./precondition') -var defaultEncoding = require('./default-encoding') -var sync = require('./sync') -var Buffer = require('safe-buffer').Buffer - -var ZERO_BUF -var subtle = global.crypto && global.crypto.subtle -var toBrowser = { - 'sha': 'SHA-1', - 'sha-1': 'SHA-1', - 'sha1': 'SHA-1', - 'sha256': 'SHA-256', - 'sha-256': 'SHA-256', - 'sha384': 'SHA-384', - 'sha-384': 'SHA-384', - 'sha-512': 'SHA-512', - 'sha512': 'SHA-512' -} -var checks = [] -function checkNative (algo) { - if (global.process && !global.process.browser) { - return Promise.resolve(false) - } - if (!subtle || !subtle.importKey || !subtle.deriveBits) { - return Promise.resolve(false) - } - if (checks[algo] !== undefined) { - return checks[algo] - } - ZERO_BUF = ZERO_BUF || Buffer.alloc(8) - var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo) - .then(function () { - return true - }).catch(function () { - return false - }) - checks[algo] = prom - return prom -} - -function browserPbkdf2 (password, salt, iterations, length, algo) { - return subtle.importKey( - 'raw', password, {name: 'PBKDF2'}, false, ['deriveBits'] - ).then(function (key) { - return subtle.deriveBits({ - name: 'PBKDF2', - salt: salt, - iterations: iterations, - hash: { - name: algo - } - }, key, length << 3) - }).then(function (res) { - return Buffer.from(res) - }) -} - -function resolvePromise (promise, callback) { - promise.then(function (out) { - process.nextTick(function () { - callback(null, out) - }) - }, function (e) { - process.nextTick(function () { - callback(e) - }) - }) -} -module.exports = function (password, salt, iterations, keylen, digest, callback) { - if (typeof digest === 'function') { - callback = digest - digest = undefined - } - - digest = digest || 'sha1' - var algo = toBrowser[digest.toLowerCase()] - - if (!algo || typeof global.Promise !== 'function') { - return process.nextTick(function () { - var out - try { - out = sync(password, salt, iterations, keylen, digest) - } catch (e) { - return callback(e) - } - callback(null, out) - }) - } - - checkParameters(password, salt, iterations, keylen) - if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') - if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding) - if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding) - - resolvePromise(checkNative(algo).then(function (resp) { - if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo) - - return sync(password, salt, iterations, keylen, digest) - }), callback) -} diff --git a/node_modules/pbkdf2/lib/default-encoding.js b/node_modules/pbkdf2/lib/default-encoding.js deleted file mode 100644 index 13b8db9..0000000 --- a/node_modules/pbkdf2/lib/default-encoding.js +++ /dev/null @@ -1,10 +0,0 @@ -var defaultEncoding -/* istanbul ignore next */ -if (process.browser) { - defaultEncoding = 'utf-8' -} else { - var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) - - defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary' -} -module.exports = defaultEncoding diff --git a/node_modules/pbkdf2/lib/precondition.js b/node_modules/pbkdf2/lib/precondition.js deleted file mode 100644 index 683db56..0000000 --- a/node_modules/pbkdf2/lib/precondition.js +++ /dev/null @@ -1,28 +0,0 @@ -var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs - -function checkBuffer (buf, name) { - if (typeof buf !== 'string' && !Buffer.isBuffer(buf)) { - throw new TypeError(name + ' must be a buffer or string') - } -} - -module.exports = function (password, salt, iterations, keylen) { - checkBuffer(password, 'Password') - checkBuffer(salt, 'Salt') - - if (typeof iterations !== 'number') { - throw new TypeError('Iterations not a number') - } - - if (iterations < 0) { - throw new TypeError('Bad iterations') - } - - if (typeof keylen !== 'number') { - throw new TypeError('Key length not a number') - } - - if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */ - throw new TypeError('Bad key length') - } -} diff --git a/node_modules/pbkdf2/lib/sync-browser.js b/node_modules/pbkdf2/lib/sync-browser.js deleted file mode 100644 index 55c8c6d..0000000 --- a/node_modules/pbkdf2/lib/sync-browser.js +++ /dev/null @@ -1,104 +0,0 @@ -var md5 = require('create-hash/md5') -var RIPEMD160 = require('ripemd160') -var sha = require('sha.js') - -var checkParameters = require('./precondition') -var defaultEncoding = require('./default-encoding') -var Buffer = require('safe-buffer').Buffer -var ZEROS = Buffer.alloc(128) -var sizes = { - md5: 16, - sha1: 20, - sha224: 28, - sha256: 32, - sha384: 48, - sha512: 64, - rmd160: 20, - ripemd160: 20 -} - -function Hmac (alg, key, saltLen) { - var hash = getDigest(alg) - var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 - - if (key.length > blocksize) { - key = hash(key) - } else if (key.length < blocksize) { - key = Buffer.concat([key, ZEROS], blocksize) - } - - var ipad = Buffer.allocUnsafe(blocksize + sizes[alg]) - var opad = Buffer.allocUnsafe(blocksize + sizes[alg]) - for (var i = 0; i < blocksize; i++) { - ipad[i] = key[i] ^ 0x36 - opad[i] = key[i] ^ 0x5C - } - - var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4) - ipad.copy(ipad1, 0, 0, blocksize) - this.ipad1 = ipad1 - this.ipad2 = ipad - this.opad = opad - this.alg = alg - this.blocksize = blocksize - this.hash = hash - this.size = sizes[alg] -} - -Hmac.prototype.run = function (data, ipad) { - data.copy(ipad, this.blocksize) - var h = this.hash(ipad) - h.copy(this.opad, this.blocksize) - return this.hash(this.opad) -} - -function getDigest (alg) { - function shaFunc (data) { - return sha(alg).update(data).digest() - } - function rmd160Func (data) { - return new RIPEMD160().update(data).digest() - } - - if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func - if (alg === 'md5') return md5 - return shaFunc -} - -function pbkdf2 (password, salt, iterations, keylen, digest) { - checkParameters(password, salt, iterations, keylen) - - if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding) - if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding) - - digest = digest || 'sha1' - - var hmac = new Hmac(digest, password, salt.length) - - var DK = Buffer.allocUnsafe(keylen) - var block1 = Buffer.allocUnsafe(salt.length + 4) - salt.copy(block1, 0, 0, salt.length) - - var destPos = 0 - var hLen = sizes[digest] - var l = Math.ceil(keylen / hLen) - - for (var i = 1; i <= l; i++) { - block1.writeUInt32BE(i, salt.length) - - var T = hmac.run(block1, hmac.ipad1) - var U = T - - for (var j = 1; j < iterations; j++) { - U = hmac.run(U, hmac.ipad2) - for (var k = 0; k < hLen; k++) T[k] ^= U[k] - } - - T.copy(DK, destPos) - destPos += hLen - } - - return DK -} - -module.exports = pbkdf2 diff --git a/node_modules/pbkdf2/lib/sync.js b/node_modules/pbkdf2/lib/sync.js deleted file mode 100644 index f691e31..0000000 --- a/node_modules/pbkdf2/lib/sync.js +++ /dev/null @@ -1,51 +0,0 @@ -var sizes = { - md5: 16, - sha1: 20, - sha224: 28, - sha256: 32, - sha384: 48, - sha512: 64, - rmd160: 20, - ripemd160: 20 -} - -var createHmac = require('create-hmac') -var checkParameters = require('../lib/precondition') -var defaultEncoding = require('../lib/default-encoding') -var Buffer = require('safe-buffer').Buffer - -function pbkdf2 (password, salt, iterations, keylen, digest) { - checkParameters(password, salt, iterations, keylen) - - if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding) - if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding) - - digest = digest || 'sha1' - - var DK = Buffer.allocUnsafe(keylen) - var block1 = Buffer.allocUnsafe(salt.length + 4) - salt.copy(block1, 0, 0, salt.length) - - var destPos = 0 - var hLen = sizes[digest] - var l = Math.ceil(keylen / hLen) - - for (var i = 1; i <= l; i++) { - block1.writeUInt32BE(i, salt.length) - - var T = createHmac(digest, password).update(block1).digest() - var U = T - - for (var j = 1; j < iterations; j++) { - U = createHmac(digest, password).update(U).digest() - for (var k = 0; k < hLen; k++) T[k] ^= U[k] - } - - T.copy(DK, destPos) - destPos += hLen - } - - return DK -} - -module.exports = pbkdf2 diff --git a/node_modules/pbkdf2/package.json b/node_modules/pbkdf2/package.json deleted file mode 100644 index f57811c..0000000 --- a/node_modules/pbkdf2/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_from": "pbkdf2@^3.0.3", - "_id": "pbkdf2@3.0.17", - "_inBundle": false, - "_integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "_location": "/pbkdf2", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pbkdf2@^3.0.3", - "name": "pbkdf2", - "escapedName": "pbkdf2", - "rawSpec": "^3.0.3", - "saveSpec": null, - "fetchSpec": "^3.0.3" - }, - "_requiredBy": [ - "/crypto-browserify", - "/parse-asn1" - ], - "_resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "_shasum": "976c206530617b14ebb32114239f7b09336e93a6", - "_spec": "pbkdf2@^3.0.3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/crypto-browserify", - "author": { - "name": "Daniel Cousens" - }, - "browser": { - "./index.js": "./browser.js", - "./lib/sync.js": "./lib/sync-browser.js" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/pbkdf2/issues" - }, - "bundleDependencies": false, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "deprecated": false, - "description": "This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from crypto.getHashes()", - "devDependencies": { - "benchmark": "^2.1.4", - "browserify": "*", - "nyc": "^6.4.0", - "standard": "*", - "tape": "^4.5.1" - }, - "engines": { - "node": ">=0.12" - }, - "files": [ - "browser.js", - "index.js", - "lib/" - ], - "homepage": "https://github.com/crypto-browserify/pbkdf2", - "keywords": [ - "pbkdf2", - "kdf", - "salt", - "hash" - ], - "license": "MIT", - "main": "index.js", - "name": "pbkdf2", - "nyc": { - "exclude": [ - "lib/async.js", - "test/bundle.js" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/pbkdf2.git" - }, - "scripts": { - "bench": "node bench/", - "bundle-test": "browserify test/index.js > test/bundle.js", - "coverage": "nyc --check-coverage --branches 95 --functions 95 tape test/*.js", - "coverage-html": "nyc report --reporter=html", - "coverage-report": "nyc report --reporter=lcov", - "lint": "standard", - "prepublish": "npm run test", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "standard": { - "ignore": [ - "test/bundle.js" - ] - }, - "version": "3.0.17" -} diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js deleted file mode 100644 index 3eecf11..0000000 --- a/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -if (typeof process === 'undefined' || - !process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = { nextTick: nextTick }; -} else { - module.exports = process -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} - diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e353..0000000 --- a/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json deleted file mode 100644 index 643af11..0000000 --- a/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_from": "process-nextick-args@~2.0.0", - "_id": "process-nextick-args@2.0.1", - "_inBundle": false, - "_integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "_location": "/process-nextick-args", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "process-nextick-args@~2.0.0", - "name": "process-nextick-args", - "escapedName": "process-nextick-args", - "rawSpec": "~2.0.0", - "saveSpec": null, - "fetchSpec": "~2.0.0" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "_shasum": "7820d9b16120cc55ca9ae7792680ae7dba6d7fe2", - "_spec": "process-nextick-args@~2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/readable-stream", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "name": "process-nextick-args", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md deleted file mode 100644 index ecb432c..0000000 --- a/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var pna = require('process-nextick-args'); - -pna.nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/node_modules/process/.eslintrc b/node_modules/process/.eslintrc deleted file mode 100644 index 1e7aab7..0000000 --- a/node_modules/process/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ -extends: "eslint:recommended", - "env": { - "node": true, - "browser": true, - "es6" : true, - "mocha": true - }, - "rules": { - "indent": [2, 4], - "brace-style": [2, "1tbs"], - "quotes": [2, "single"], - "no-console": 0, - "no-shadow": 0, - "no-use-before-define": [2, "nofunc"], - "no-underscore-dangle": 0, - "no-constant-condition": 0, - "space-after-function-name": 0, - "consistent-return": 0 - } -} diff --git a/node_modules/process/LICENSE b/node_modules/process/LICENSE deleted file mode 100644 index b8c1246..0000000 --- a/node_modules/process/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/process/README.md b/node_modules/process/README.md deleted file mode 100644 index 6570729..0000000 --- a/node_modules/process/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# process - -```require('process');``` just like any other module. - -Works in node.js and browsers via the browser.js shim provided with the module. - -## browser implementation - -The goal of this module is not to be a full-fledged alternative to the builtin process module. This module mostly exists to provide the nextTick functionality and little more. We keep this module lean because it will often be included by default by tools like browserify when it detects a module has used the `process` global. - -It also exposes a "browser" member (i.e. `process.browser`) which is `true` in this implementation but `undefined` in node. This can be used in isomorphic code that adjusts it's behavior depending on which environment it's running in. - -If you are looking to provide other process methods, I suggest you monkey patch them onto the process global in your app. A list of user created patches is below. - -* [hrtime](https://github.com/kumavis/browser-process-hrtime) -* [stdout](https://github.com/kumavis/browser-stdout) - -## package manager notes - -If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. - -See https://gist.github.com/4339901 for details. - -The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. - - diff --git a/node_modules/process/browser.js b/node_modules/process/browser.js deleted file mode 100644 index d059362..0000000 --- a/node_modules/process/browser.js +++ /dev/null @@ -1,184 +0,0 @@ -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // 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 - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // 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. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; diff --git a/node_modules/process/index.js b/node_modules/process/index.js deleted file mode 100644 index 8d8ed7d..0000000 --- a/node_modules/process/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// for now just expose the builtin process global from node.js -module.exports = global.process; diff --git a/node_modules/process/package.json b/node_modules/process/package.json deleted file mode 100644 index 8e31067..0000000 --- a/node_modules/process/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "process@~0.11.0", - "_id": "process@0.11.10", - "_inBundle": false, - "_integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "_location": "/process", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "process@~0.11.0", - "name": "process", - "escapedName": "process", - "rawSpec": "~0.11.0", - "saveSpec": null, - "fetchSpec": "~0.11.0" - }, - "_requiredBy": [ - "/browserify", - "/insert-module-globals", - "/timers-browserify" - ], - "_resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "_shasum": "7332300e840161bda3e69a1d1d91a7d4bc16f182", - "_spec": "process@~0.11.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "browser": "./browser.js", - "bugs": { - "url": "https://github.com/shtylman/node-process/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "process information for node.js and browsers", - "devDependencies": { - "mocha": "2.2.1", - "zuul": "^3.10.3" - }, - "engines": { - "node": ">= 0.6.0" - }, - "homepage": "https://github.com/shtylman/node-process#readme", - "keywords": [ - "process" - ], - "license": "MIT", - "main": "./index.js", - "name": "process", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-process.git" - }, - "scripts": { - "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js", - "test": "mocha test.js" - }, - "version": "0.11.10" -} diff --git a/node_modules/process/test.js b/node_modules/process/test.js deleted file mode 100644 index 8ba579c..0000000 --- a/node_modules/process/test.js +++ /dev/null @@ -1,199 +0,0 @@ -var assert = require('assert'); -var ourProcess = require('./browser'); -describe('test against our process', function () { - test(ourProcess); -}); -if (!process.browser) { - describe('test against node', function () { - test(process); - }); - vmtest(); -} -function test (ourProcess) { - describe('test arguments', function () { - it ('works', function (done) { - var order = 0; - - - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'first one works'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'recursive one is 4th'); - }, 3); - }, 0); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'second one starts'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'this is third'); - ourProcess.nextTick(function (num) { - assert.equal(num, order++, 'this is last'); - done(); - }, 5); - }, 4); - }, 1); - ourProcess.nextTick(function (num) { - - assert.equal(num, order++, '3rd schedualed happens after the error'); - }, 2); - }); - }); -if (!process.browser) { - describe('test errors', function (t) { - it ('works', function (done) { - var order = 0; - process.removeAllListeners('uncaughtException'); - process.once('uncaughtException', function(err) { - assert.equal(2, order++, 'error is third'); - ourProcess.nextTick(function () { - assert.equal(5, order++, 'schedualed in error is last'); - done(); - }); - }); - ourProcess.nextTick(function () { - assert.equal(0, order++, 'first one works'); - ourProcess.nextTick(function () { - assert.equal(4, order++, 'recursive one is 4th'); - }); - }); - ourProcess.nextTick(function () { - assert.equal(1, order++, 'second one starts'); - throw(new Error('an error is thrown')); - }); - ourProcess.nextTick(function () { - assert.equal(3, order++, '3rd schedualed happens after the error'); - }); - }); - }); -} - describe('rename globals', function (t) { - var oldTimeout = setTimeout; - var oldClear = clearTimeout; - - it('clearTimeout', function (done){ - - var ok = true; - clearTimeout = function () { - ok = false; - } - var ran = false; - function cleanup() { - clearTimeout = oldClear; - var err; - try { - assert.ok(ok, 'fake clearTimeout ran'); - assert.ok(ran, 'should have run'); - } catch (e) { - err = e; - } - done(err); - } - setTimeout(cleanup, 1000); - ourProcess.nextTick(function () { - ran = true; - }); - }); - it('just setTimeout', function (done){ - - - setTimeout = function () { - setTimeout = oldTimeout; - try { - assert.ok(false, 'fake setTimeout called') - } catch (e) { - done(e); - } - - } - - ourProcess.nextTick(function () { - setTimeout = oldTimeout; - done(); - }); - }); - }); -} -function vmtest() { - var vm = require('vm'); - var fs = require('fs'); - var process = fs.readFileSync('./browser.js', {encoding: 'utf8'}); - - - describe('should work in vm in strict mode with no globals', function () { - it('should parse', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'this.works = process.browser;'; - var script = new vm.Script(str); - var context = { - works: false - }; - script.runInNewContext(context); - assert.ok(context.works); - done(); - }); - it('setTimeout throws error', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'try {process.nextTick(function () {})} catch (e){this.works = e;}'; - var script = new vm.Script(str); - var context = { - works: false - }; - script.runInNewContext(context); - assert.ok(context.works); - done(); - }); - it('should generally work', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - setTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs setTimeout', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - hiddenSetTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs clearTimeout', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var clearTimeout = hiddenClearTimeout;process.nextTick(function () {assert.ok(true);done();})'; - var script = new vm.Script(str); - var context = { - hiddenClearTimeout: clearTimeout, - setTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - it('late defs setTimeout and then redefine', function (done) { - var str = '"use strict";var module = {exports:{}};'; - str += process; - str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {setTimeout = function (){throw new Error("foo")};hiddenSetTimeout(function(){process.nextTick(function (){assert.ok(true);done();});});});'; - var script = new vm.Script(str); - var context = { - clearTimeout: clearTimeout, - hiddenSetTimeout: setTimeout, - done: done, - assert: assert - }; - script.runInNewContext(context); - }); - }); -} diff --git a/node_modules/public-encrypt/.travis.yml b/node_modules/public-encrypt/.travis.yml deleted file mode 100644 index 1b72666..0000000 --- a/node_modules/public-encrypt/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - - iojs \ No newline at end of file diff --git a/node_modules/public-encrypt/LICENSE b/node_modules/public-encrypt/LICENSE deleted file mode 100644 index c9ddc0f..0000000 --- a/node_modules/public-encrypt/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/public-encrypt/browser.js b/node_modules/public-encrypt/browser.js deleted file mode 100644 index 4032f68..0000000 --- a/node_modules/public-encrypt/browser.js +++ /dev/null @@ -1,10 +0,0 @@ -exports.publicEncrypt = require('./publicEncrypt') -exports.privateDecrypt = require('./privateDecrypt') - -exports.privateEncrypt = function privateEncrypt (key, buf) { - return exports.publicEncrypt(key, buf, true) -} - -exports.publicDecrypt = function publicDecrypt (key, buf) { - return exports.privateDecrypt(key, buf, true) -} diff --git a/node_modules/public-encrypt/index.js b/node_modules/public-encrypt/index.js deleted file mode 100644 index 6ff4014..0000000 --- a/node_modules/public-encrypt/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var crypto = require('crypto') -if (typeof crypto.publicEncrypt !== 'function') { - crypto = require('./browser') -} -exports.publicEncrypt = crypto.publicEncrypt -exports.privateDecrypt = crypto.privateDecrypt - -if (typeof crypto.privateEncrypt !== 'function') { - exports.privateEncrypt = require('./browser').privateEncrypt -} else { - exports.privateEncrypt = crypto.privateEncrypt -} - -if (typeof crypto.publicDecrypt !== 'function') { - exports.publicDecrypt = require('./browser').publicDecrypt -} else { - exports.publicDecrypt = crypto.publicDecrypt -} diff --git a/node_modules/public-encrypt/mgf.js b/node_modules/public-encrypt/mgf.js deleted file mode 100644 index b966f31..0000000 --- a/node_modules/public-encrypt/mgf.js +++ /dev/null @@ -1,19 +0,0 @@ -var createHash = require('create-hash') -var Buffer = require('safe-buffer').Buffer - -module.exports = function (seed, len) { - var t = Buffer.alloc(0) - var i = 0 - var c - while (t.length < len) { - c = i2ops(i++) - t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]) - } - return t.slice(0, len) -} - -function i2ops (c) { - var out = Buffer.allocUnsafe(4) - out.writeUInt32BE(c, 0) - return out -} diff --git a/node_modules/public-encrypt/package.json b/node_modules/public-encrypt/package.json deleted file mode 100644 index 012320a..0000000 --- a/node_modules/public-encrypt/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "public-encrypt@^4.0.0", - "_id": "public-encrypt@4.0.3", - "_inBundle": false, - "_integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "_location": "/public-encrypt", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "public-encrypt@^4.0.0", - "name": "public-encrypt", - "escapedName": "public-encrypt", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/crypto-browserify" - ], - "_resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "_shasum": "4fcc9d77a07e48ba7527e7cbe0de33d0701331e0", - "_spec": "public-encrypt@^4.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/crypto-browserify", - "author": { - "name": "Calvin Metcalf" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/publicEncrypt/issues" - }, - "bundleDependencies": false, - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "deprecated": false, - "description": "browserify version of publicEncrypt & privateDecrypt", - "devDependencies": { - "standard": "^12.0.0", - "tap-spec": "^2.1.2", - "tape": "^3.0.3" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/crypto-browserify/publicEncrypt", - "license": "MIT", - "main": "index.js", - "name": "public-encrypt", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/publicEncrypt.git" - }, - "scripts": { - "lint": "standard", - "test": "node test/index.js | tspec" - }, - "version": "4.0.3" -} diff --git a/node_modules/public-encrypt/privateDecrypt.js b/node_modules/public-encrypt/privateDecrypt.js deleted file mode 100644 index 8fc6dfe..0000000 --- a/node_modules/public-encrypt/privateDecrypt.js +++ /dev/null @@ -1,105 +0,0 @@ -var parseKeys = require('parse-asn1') -var mgf = require('./mgf') -var xor = require('./xor') -var BN = require('bn.js') -var crt = require('browserify-rsa') -var createHash = require('create-hash') -var withPublic = require('./withPublic') -var Buffer = require('safe-buffer').Buffer - -module.exports = function privateDecrypt (privateKey, enc, reverse) { - var padding - if (privateKey.padding) { - padding = privateKey.padding - } else if (reverse) { - padding = 1 - } else { - padding = 4 - } - - var key = parseKeys(privateKey) - var k = key.modulus.byteLength() - if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) { - throw new Error('decryption error') - } - var msg - if (reverse) { - msg = withPublic(new BN(enc), key) - } else { - msg = crt(enc, key) - } - var zBuffer = Buffer.alloc(k - msg.length) - msg = Buffer.concat([zBuffer, msg], k) - if (padding === 4) { - return oaep(key, msg) - } else if (padding === 1) { - return pkcs1(key, msg, reverse) - } else if (padding === 3) { - return msg - } else { - throw new Error('unknown padding') - } -} - -function oaep (key, msg) { - var k = key.modulus.byteLength() - var iHash = createHash('sha1').update(Buffer.alloc(0)).digest() - var hLen = iHash.length - if (msg[0] !== 0) { - throw new Error('decryption error') - } - var maskedSeed = msg.slice(1, hLen + 1) - var maskedDb = msg.slice(hLen + 1) - var seed = xor(maskedSeed, mgf(maskedDb, hLen)) - var db = xor(maskedDb, mgf(seed, k - hLen - 1)) - if (compare(iHash, db.slice(0, hLen))) { - throw new Error('decryption error') - } - var i = hLen - while (db[i] === 0) { - i++ - } - if (db[i++] !== 1) { - throw new Error('decryption error') - } - return db.slice(i) -} - -function pkcs1 (key, msg, reverse) { - var p1 = msg.slice(0, 2) - var i = 2 - var status = 0 - while (msg[i++] !== 0) { - if (i >= msg.length) { - status++ - break - } - } - var ps = msg.slice(2, i - 1) - - if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) { - status++ - } - if (ps.length < 8) { - status++ - } - if (status) { - throw new Error('decryption error') - } - return msg.slice(i) -} -function compare (a, b) { - a = Buffer.from(a) - b = Buffer.from(b) - var dif = 0 - var len = a.length - if (a.length !== b.length) { - dif++ - len = Math.min(a.length, b.length) - } - var i = -1 - while (++i < len) { - dif += (a[i] ^ b[i]) - } - return dif -} diff --git a/node_modules/public-encrypt/publicEncrypt.js b/node_modules/public-encrypt/publicEncrypt.js deleted file mode 100644 index 122aa76..0000000 --- a/node_modules/public-encrypt/publicEncrypt.js +++ /dev/null @@ -1,88 +0,0 @@ -var parseKeys = require('parse-asn1') -var randomBytes = require('randombytes') -var createHash = require('create-hash') -var mgf = require('./mgf') -var xor = require('./xor') -var BN = require('bn.js') -var withPublic = require('./withPublic') -var crt = require('browserify-rsa') -var Buffer = require('safe-buffer').Buffer - -module.exports = function publicEncrypt (publicKey, msg, reverse) { - var padding - if (publicKey.padding) { - padding = publicKey.padding - } else if (reverse) { - padding = 1 - } else { - padding = 4 - } - var key = parseKeys(publicKey) - var paddedMsg - if (padding === 4) { - paddedMsg = oaep(key, msg) - } else if (padding === 1) { - paddedMsg = pkcs1(key, msg, reverse) - } else if (padding === 3) { - paddedMsg = new BN(msg) - if (paddedMsg.cmp(key.modulus) >= 0) { - throw new Error('data too long for modulus') - } - } else { - throw new Error('unknown padding') - } - if (reverse) { - return crt(paddedMsg, key) - } else { - return withPublic(paddedMsg, key) - } -} - -function oaep (key, msg) { - var k = key.modulus.byteLength() - var mLen = msg.length - var iHash = createHash('sha1').update(Buffer.alloc(0)).digest() - var hLen = iHash.length - var hLen2 = 2 * hLen - if (mLen > k - hLen2 - 2) { - throw new Error('message too long') - } - var ps = Buffer.alloc(k - mLen - hLen2 - 2) - var dblen = k - hLen - 1 - var seed = randomBytes(hLen) - var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen)) - var maskedSeed = xor(seed, mgf(maskedDb, hLen)) - return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k)) -} -function pkcs1 (key, msg, reverse) { - var mLen = msg.length - var k = key.modulus.byteLength() - if (mLen > k - 11) { - throw new Error('message too long') - } - var ps - if (reverse) { - ps = Buffer.alloc(k - mLen - 3, 0xff) - } else { - ps = nonZero(k - mLen - 3) - } - return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k)) -} -function nonZero (len) { - var out = Buffer.allocUnsafe(len) - var i = 0 - var cache = randomBytes(len * 2) - var cur = 0 - var num - while (i < len) { - if (cur === cache.length) { - cache = randomBytes(len * 2) - cur = 0 - } - num = cache[cur++] - if (num) { - out[i++] = num - } - } - return out -} diff --git a/node_modules/public-encrypt/readme.md b/node_modules/public-encrypt/readme.md deleted file mode 100644 index 96fe944..0000000 --- a/node_modules/public-encrypt/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -publicEncrypt -=== - -[![Build Status](https://travis-ci.org/crypto-browserify/publicEncrypt.svg)](https://travis-ci.org/crypto-browserify/publicEncrypt) - -publicEncrypt/privateDecrypt for browserify - -[Blog post about the moving parts that have gone into this.](http://calvinmetcalf.com/post/109301244759/porting-nodejs-crypto-to-the-browser-part-3) diff --git a/node_modules/public-encrypt/test/1024.priv b/node_modules/public-encrypt/test/1024.priv deleted file mode 100644 index 7206216..0000000 --- a/node_modules/public-encrypt/test/1024.priv +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKulUTZ8B1qccZ8c -DXRGSY08gW8KvLlcxxxGC4gZHNT3CBUF8n5R4KE30aZyYZ/rtsQZu05juZJxaJ0q -mbe75dlQ5d+Xc9BMXeQg/MpTZw5TAN7OIdGYYpFBe+1PLZ6wEfjkYrMqMUcfq2Lq -hTLdAbvBJnuRcYZLqmBeOQ8FTrKrAgMBAAECgYEAnkHRbEPU3/WISSQrP36iyCb2 -S/SBZwKkzmvCrBxDWhPeDswp9c/2JY76rNWfLzy8iXgUG8WUzvHje61Qh3gmBcKe -bUaTGl4Vy8Ha1YBADo5RfRrdm0FE4tvgvu/TkqFqpBBZweu54285hk5zlG7n/D7Y -dnNXUpu5MlNb5x3gW0kCQQDUL//cwcXUxY/evaJP4jSe+ZwEQZo+zXRLiPUulBoV -aw28CVMuxdgwqAo1X1IKefPeUaf7RQu8gCKaRnpGuEuXAkEAzxZTfMmvmCUDIew4 -5Gk6bK265XQWdhcgiq254lpBGOYmDj9yCE7yA+zmASQwMsXTdQOi1hOCEyrXuSJ5 -c++EDQJAFh3WrnzoEPByuYXMmET8tSFRWMQ5vpgNqh3haHR5b4gUC2hxaiunCBNL -1RpVY9AoUiDywGcG/SPh93CnKB3niwJBAKP7AtsifZgVXtiizB4aMThTjVYaSZrz -D0Kg9DuHylpkDChmFu77TGrNUQgAVuYtfhb/bRblVa/F0hJ4eQHT3JUCQBVT68tb -OgRUk0aP9tC3021VN82X6+klowSQN8oBPX8+TfDWSUilp/+j24Hky+Z29Do7yR/R -qutnL92CvBlVLV4= ------END PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/1024.pub b/node_modules/public-encrypt/test/1024.pub deleted file mode 100644 index 2dba785..0000000 --- a/node_modules/public-encrypt/test/1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrpVE2fAdanHGfHA10RkmNPIFv -Cry5XMccRguIGRzU9wgVBfJ+UeChN9GmcmGf67bEGbtOY7mScWidKpm3u+XZUOXf -l3PQTF3kIPzKU2cOUwDeziHRmGKRQXvtTy2esBH45GKzKjFHH6ti6oUy3QG7wSZ7 -kXGGS6pgXjkPBU6yqwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/ec.pass.priv b/node_modules/public-encrypt/test/ec.pass.priv deleted file mode 100644 index bf1836d..0000000 --- a/node_modules/public-encrypt/test/ec.pass.priv +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAi9LqZQx4JFXAICCAAw -HQYJYIZIAWUDBAECBBA+js1fG4Rv/yRN7oZvxbgyBIGQ/D4yj86M1x8lMsnAHQ/K -7/ryb/baDNHqN9LTZanEGBuyxgrTzt08SiL+h91yFGMoaly029K1VgEI8Lxu5Np/ -A+LK7ewh73ABzsbuxYdcXI+rKnrvLN9Tt6veDs4GlqTTsWwq5wF0C+6gaYRBXA74 -T1b6NykGh2UNL5U5pHZEYdOVLz+lRJL7gYqlweNHP/S3 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/ec.priv b/node_modules/public-encrypt/test/ec.priv deleted file mode 100644 index 25fffbd..0000000 --- a/node_modules/public-encrypt/test/ec.priv +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHQCAQEEIDF6Xv8Sv//wGUWD+c780ppGrU0QdZWCAzxAQPQX8r/uoAcGBSuBBAAK -oUQDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQRija4e/qEMikOHJai7geeUreU -r5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END EC PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/ec.pub b/node_modules/public-encrypt/test/ec.pub deleted file mode 100644 index 2e39e5b..0000000 --- a/node_modules/public-encrypt/test/ec.pub +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEIZeowDylls4K/wfBjO18bYo7gGx8nYQR -ija4e/qEMikOHJai7geeUreUr5Xky/Ax7s2dGtegsPNsPgGe5MpQvg== ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/index.js b/node_modules/public-encrypt/test/index.js deleted file mode 100644 index 85b32e3..0000000 --- a/node_modules/public-encrypt/test/index.js +++ /dev/null @@ -1,113 +0,0 @@ -var test = require('tape') -var fs = require('fs') -var parseKeys = require('parse-asn1') -var Buffer = require('safe-buffer').Buffer -var path = require('path') - -require('./nodeTests') -var rsa1024 = { - private: fs.readFileSync(path.join(__dirname, 'rsa.1024.priv')), - public: fs.readFileSync(path.join(__dirname, 'rsa.1024.pub')) -} -var rsa1024priv = { - private: fs.readFileSync(path.join(__dirname, 'rsa.1024.priv')), - public: fs.readFileSync(path.join(__dirname, 'rsa.1024.priv')) -} - -var rsa2028 = { - private: fs.readFileSync(path.join(__dirname, 'rsa.2028.priv')), - public: fs.readFileSync(path.join(__dirname, 'rsa.2028.pub')) -} -var nonrsa1024 = { - private: fs.readFileSync(path.join(__dirname, '1024.priv')), - public: fs.readFileSync(path.join(__dirname, '1024.pub')) -} -var nonrsa1024str = { - private: fs.readFileSync(path.join(__dirname, '1024.priv')).toString(), - public: fs.readFileSync(path.join(__dirname, '1024.pub')).toString() -} -var pass1024 = { - private: { - passphrase: 'fooo', - key: fs.readFileSync(path.join(__dirname, 'pass.1024.priv')) - }, - public: fs.readFileSync(path.join(__dirname, 'pass.1024.pub')) -} -var pass2028 = { - private: { - passphrase: 'password', - key: fs.readFileSync(path.join(__dirname, 'rsa.pass.priv')) - }, - public: fs.readFileSync(path.join(__dirname, 'rsa.pass.pub')) -} - -var nodeCrypto = require('../') -var myCrypto = require('../browser') -function _testIt (keys, message, t) { - var pub = keys.public - var priv = keys.private - t.test(message.toString(), function (t) { - t.plan(8) - - var myEnc = myCrypto.publicEncrypt(pub, message) - var nodeEnc = nodeCrypto.publicEncrypt(pub, message) - t.equals(myCrypto.privateDecrypt(priv, myEnc).toString('hex'), message.toString('hex'), 'my decrypter my message') - t.equals(myCrypto.privateDecrypt(priv, nodeEnc).toString('hex'), message.toString('hex'), 'my decrypter node\'s message') - t.equals(nodeCrypto.privateDecrypt(priv, myEnc).toString('hex'), message.toString('hex'), 'node decrypter my message') - t.equals(nodeCrypto.privateDecrypt(priv, nodeEnc).toString('hex'), message.toString('hex'), 'node decrypter node\'s message') - myEnc = myCrypto.privateEncrypt(priv, message) - nodeEnc = nodeCrypto.privateEncrypt(priv, message) - t.equals(myCrypto.publicDecrypt(pub, myEnc).toString('hex'), message.toString('hex'), 'reverse methods my decrypter my message') - t.equals(myCrypto.publicDecrypt(pub, nodeEnc).toString('hex'), message.toString('hex'), 'reverse methods my decrypter node\'s message') - t.equals(nodeCrypto.publicDecrypt(pub, myEnc).toString('hex'), message.toString('hex'), 'reverse methods node decrypter my message') - t.equals(nodeCrypto.publicDecrypt(pub, nodeEnc).toString('hex'), message.toString('hex'), 'reverse methods node decrypter node\'s message') - }) -} -function testIt (keys, message, t) { - _testIt(keys, message, t) - _testIt(paddingObject(keys, 1), Buffer.concat([message, Buffer.from(' with RSA_PKCS1_PADDING')]), t) - var parsedKey = parseKeys(keys.public) - var k = parsedKey.modulus.byteLength() - var zBuf = Buffer.alloc(k) - var msg = Buffer.concat([zBuf, message, Buffer.from(' with no padding')]).slice(-k) - _testIt(paddingObject(keys, 3), msg, t) -} -function paddingObject (keys, padding) { - return { - public: addPadding(keys.public, padding), - private: addPadding(keys.private, padding) - } -} -function addPadding (key, padding) { - if (typeof key === 'string' || Buffer.isBuffer(key)) { - return { - key: key, - padding: padding - } - } - var out = { - key: key.key, - padding: padding - } - if ('passphrase' in key) { - out.passphrase = key.passphrase - } - return out -} -function testRun (i) { - test('run ' + i, function (t) { - testIt(rsa1024priv, Buffer.from('1024 2 private keys'), t) - testIt(rsa1024, Buffer.from('1024 keys'), t) - testIt(rsa2028, Buffer.from('2028 keys'), t) - testIt(nonrsa1024, Buffer.from('1024 keys non-rsa key'), t) - testIt(pass1024, Buffer.from('1024 keys and password'), t) - testIt(nonrsa1024str, Buffer.from('1024 keys non-rsa key as a string'), t) - testIt(pass2028, Buffer.from('2028 rsa key with variant passwords'), t) - }) -} - -var i = 0 -var num = 20 -while (++i <= num) { - testRun(i) -} diff --git a/node_modules/public-encrypt/test/nodeTests.js b/node_modules/public-encrypt/test/nodeTests.js deleted file mode 100644 index f022e07..0000000 --- a/node_modules/public-encrypt/test/nodeTests.js +++ /dev/null @@ -1,51 +0,0 @@ -var crypto = require('../browser') -var test = require('tape') -var fs = require('fs') -var Buffer = require('safe-buffer').Buffer -var path = require('path') -// Test RSA encryption/decryption -test('node tests', function (t) { - var keyPem = fs.readFileSync(path.join(__dirname, 'test_key.pem'), 'ascii') - var rsaPubPem = fs.readFileSync(path.join(__dirname, 'test_rsa_pubkey.pem'), - 'ascii') - var rsaKeyPem = fs.readFileSync(path.join(__dirname, 'test_rsa_privkey.pem'), - 'ascii') - var rsaKeyPemEncrypted = fs.readFileSync(path.join( - __dirname, 'test_rsa_privkey_encrypted.pem'), 'ascii') - var input = 'I AM THE WALRUS' - var bufferToEncrypt = Buffer.from(input) - - var encryptedBuffer = crypto.publicEncrypt(rsaPubPem, bufferToEncrypt) - - var decryptedBuffer = crypto.privateDecrypt(rsaKeyPem, encryptedBuffer) - t.equal(input, decryptedBuffer.toString()) - - var decryptedBufferWithPassword = crypto.privateDecrypt({ - key: rsaKeyPemEncrypted, - passphrase: 'password' - }, encryptedBuffer) - t.equal(input, decryptedBufferWithPassword.toString()) - - // encryptedBuffer = crypto.publicEncrypt(certPem, bufferToEncrypt); - - // decryptedBuffer = crypto.privateDecrypt(keyPem, encryptedBuffer); - // t.equal(input, decryptedBuffer.toString()); - - encryptedBuffer = crypto.publicEncrypt(keyPem, bufferToEncrypt) - - decryptedBuffer = crypto.privateDecrypt(keyPem, encryptedBuffer) - t.equal(input, decryptedBuffer.toString()) - - encryptedBuffer = crypto.privateEncrypt(keyPem, bufferToEncrypt) - - decryptedBuffer = crypto.publicDecrypt(keyPem, encryptedBuffer) - t.equal(input, decryptedBuffer.toString()) - - t.throws(function () { - crypto.privateDecrypt({ - key: rsaKeyPemEncrypted, - passphrase: 'wrong' - }, encryptedBuffer) - }) - t.end() -}) diff --git a/node_modules/public-encrypt/test/pass.1024.priv b/node_modules/public-encrypt/test/pass.1024.priv deleted file mode 100644 index b9f3884..0000000 --- a/node_modules/public-encrypt/test/pass.1024.priv +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICzzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIji3ZZ6JbsA4CAggA -MB0GCWCGSAFlAwQBFgQQC6MKblq8zyX90/KmgotsMQSCAoDghNf+yxPC/KRh7F3O -k0lMgtDkV+wCLDv7aBvUqy8Ry2zqFPIlfLb8XtSW943XEu6KUI13IZPEr8p9h1ve -Iye6L0g6uAgbFxBE2DwBBSI7mYr7lokr4v0k+inMKf4JeRdI9XWgwOILKTGf1vH7 -PhvBnqLhOg6BIOuF426qpiyYlmRda74d0Th4o6ZyhyMSzPI1XbWSg719Ew3N/tLe -OHdYl0eFrgNjq+xO4Ev+W7eNIh/XBMQtk9wo+mxeNdldRnX822HxTsL8fSSPs+9T -W5M/2EBTJMSsswSjZyFkq8ehtxovI2u0IBX1IiPulyUZLnSNPDV1eUVClK6rk+q1 -kVsfJhUr2qvIjNlQWlbEXQj4VwGtgl0++l8vdpj59MuN2J3Nx5TNMLjA6BYAa/tr -Bu928QoT7ET+SGx5XKCwKb5fwXmDlV5zZC4kZWTaF/d/Icvj5F+fDZuYFg1JOXNZ -+q2oA1qMYaHGX6lF3pbO84ebg1iwQTDM8iIqFeSMGUJTnk/3a7sqfaWQbEQwGb+X -fXnSTwkF+wO2rriPbFvWyzecWu67zDCP0ZWUgGb86sSJCM7xRGShESwCjOrb88F1 -5SZjyIqogrkc3IWiLH9gc5U8d86qoFjJnP6BfwYks1UIyXNGKfZTCqICpMphV+IS -b0N2jprjLTkWR6nxYGSH1bkKMs7x1M0FBLWWLAZqPn9X3pe6JwIBds04O6XjF0un -oxwDjcJdoxVs7PgRiM5d1Tubqu2zmpCCmXNiqi9B0+rV9/jHg9IA5gUfvYdCcEv+ -oAr90I+2+PuBFa9lgdbDV6DtZk4bSYluqamxVeLPg/vrewYfVfDv6jftfY1D0DEy -69H0 ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/pass.1024.pub b/node_modules/public-encrypt/test/pass.1024.pub deleted file mode 100644 index 617e7fb..0000000 --- a/node_modules/public-encrypt/test/pass.1024.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSK/7i5BV0x+gmX16Wrm7kRkCZ -y1QUt6wiM2g+SAZTYR0381VnSMX2cv7CpN3499lZj1rL5S7YTaZZwX3RvU5fz56/ -eDX6ciL/PZsbclN2KdkMWYgmcb9J1zUeoMQ3cjfFUCdQZ/ZvDWa+wY2Zg8os2Bow -AoufHtYHm3eOly/cWwIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/rsa.1024.priv b/node_modules/public-encrypt/test/rsa.1024.priv deleted file mode 100644 index d3b5fda..0000000 --- a/node_modules/public-encrypt/test/rsa.1024.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICVAIBAAJ/OwswbFo/uyC8ltGf/yA1A+gV5IGdnAgPbUSI3GzbHCA+x+TLG/tL -vbRw3r1smppY/jkkpiVW1ErSMuN0uixp5gb78Z9rH1XpWb5WWgp3WaY/9EHMjMdO -kQ/9LVZvRvl/M/Fi6owP+q+amJI1BEjECYfbhGL3rmlVdq4qXc40QwIDAQABAn8I -VZ0BPoAOhyF33KFMHxy8r28fsVgxJUYgM3NqQgdv4fFawCYXjhJz9duU5YJGFJGJ -WUGeHlkyYFlpi4f3m7tY7JawmQUWB0MNSoKHI3cgDX4/tfBN8ni+cO0eSoR5czBY -EsAHBU47p1awNFAHwd+ZEuv9H4RmMn7p279rQTtpAkAH3Nqs2/vrRF2cZUN4fIXf -4xHsQBByUayGq8a3J0UGaSFWv68zTUKFherr9uZotNp7NJ4jBXiARw0q8docXUG1 -AkAHgmOKHoORtAmikqpmFEJZOtsXMaLCIm4EszPo5ciYoLMBcVit09AdiQlt7ZJL -DY02svU1b0agCZ97kDkmHDkXAkACa8M9JELuDs/P/vIGYDkMVatIFfW6bWF02eFG -taWwMqCcSEsWvbw0xqYt34jURpNbCjmCyQVwYfAw/+TLhP9dAkAFwRjdwjw37qpj -ddg1mNiu37b7swFxmkiMOXZRxaNNsfb56A14RpN3zob3QdGUybGodMIKTFbmU/lu -CjqAxafJAkAG2yf6RWbwFIWfMyt7WYCh0VaGBCcgy574AinVieEo3ZZyFfC63+xm -3uoaNy4iLoJv4GCjqUBz3ZfcVaO/DDWG ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/rsa.1024.pub b/node_modules/public-encrypt/test/rsa.1024.pub deleted file mode 100644 index 7ba0636..0000000 --- a/node_modules/public-encrypt/test/rsa.1024.pub +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIGGAn87CzBsWj+7ILyW0Z//IDUD6BXkgZ2cCA9tRIjcbNscID7H5Msb+0u9tHDe -vWyamlj+OSSmJVbUStIy43S6LGnmBvvxn2sfVelZvlZaCndZpj/0QcyMx06RD/0t -Vm9G+X8z8WLqjA/6r5qYkjUESMQJh9uEYveuaVV2ripdzjRDAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/rsa.2028.priv b/node_modules/public-encrypt/test/rsa.2028.priv deleted file mode 100644 index 10e651d..0000000 --- a/node_modules/public-encrypt/test/rsa.2028.priv +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEjwIBAAKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExC -tAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1 -foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8P -jaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/Z -vAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/R -G0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMBAAECgf4LrWHY/l54ouThZWvvbrug -pfz6sJX2g9l7yXmWlEWsPECVo/7SUbpYFpt6OZy99zSg+IKbGqWKfdhoKrTwIVtC -L0YZ0NlmdnANSIz0roxQG7ZxkL5+vHSw/PmD9x4Uwf+Cz8hATCmNBv1qc60dkyuW -4CLqe72qaTiVWRoO1iagQghNcLoo6vSy65ExLaCDTPha7yu2vw4hFZpWiEjW4dxf -rFdLiix52BC86YlAlxME/rLg8IJVvilbyo9aWdXmxOaUTLRv6PkFD1/gVdw8V9Qr -SLN9FlK2kkjiX0dzoibvZw3tMnt3yydAx0X87+sMRVahC1bp3kVPz4Hy0EWX4QJ/ -PM31vGiuITk2NCd51DXt1Ltn2OP5FaJSmCaEjh0XkU4qouYyjXWt8Bu6BTCl2vua -Fg0Uji9C+IkPLmaUMbMIOwaTk8cWqLthSxsLe70J5OkGrgfKUM/w+BHH1Pt/Pjzj -C++l0kiFaOVDVaAV9GpLPLCBoK/PC9Rb/rxMMoCCNwJ/NZuedIny2w3LMii77h/T -zSvergNGhjY6Rnva8lLXJ6dlrkcPAyps3gWwxqj4NR0T+GM0bDUPVLb7M07XV7SX -v7VJGm52JbRGwM1ss+r8XTTNemeGk+WRxG7TgtsMqYGXLfB8Qxk/f5/Mcc00Tl8u -wXFNsfxJxmt6AbsTr3g36wJ/IhOnibz9Ad+nchlBnN3QeW3CKHqzaR18voqvtVm2 -kJfHK15prH/sSGmxmiEGgrCJTZxtDbaNCO7/VBjnKudUUIhCAwsLtuq0/zub9vAd -8G1scfIpv5qaSNzmKoX8bOwArvrS6wP7yKrcTsuWIlHD8rJVI7IEDnQoTp5G8fK1 -hwJ/MIh8M5v0r5dUYEv6oIJWGcle6AH1JmsP5WIafgq72Z2288pHcCFHwNY8Dg9J -76QswVLnUhPTlmm3EOOPGEtam2iAD5r0Afytlb4lbNoQsj2szeXONDXB+6oueajh -VNELUr8HcSP5lgzRZjJW6aFIzj9LDRmQnUAOjGSXVOQtEwJ/MCQZ7N/v4dIKeDRA -8d8UExZ3+gGHumziztGRJ0tQryZH2PakP5I7V+1l7qEUnJ2c3mF+e1v41Ep9LCvh -bzrPKw9dxh18g4b+7bMpsWPnsraKh6ipxc7aaOaZV0Dxgez4zcZu0P1olO0cN3KM -nxJ0Pds3R8bAhNCDdS2JZaRp5Q== ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/rsa.2028.pub b/node_modules/public-encrypt/test/rsa.2028.pub deleted file mode 100644 index b36dca4..0000000 --- a/node_modules/public-encrypt/test/rsa.2028.pub +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BNiv3pPb0es27+FKY0hszLaOw47ExCtAWp -DsH48TXAfyHBYwBLguayfk4LGIupxb+CGMbRo3xEp0CbfY1Jby26T9vGjRC1foHD -DUJG84uaRbyHqaf4i6zt4gVR+xlAEIjkaFAAK8cOoXAT1CVqGLLljUCchL8PjaHj -/yriZ/S7rdwlI3LnABxwwmLrmR/v71WtpmO/aNG8N+1po+QwaghTkyQ59E/ZvAuO -kFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQaEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/V -Fd+ZeM5251TeTvXH695nlSGauVl9AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/rsa.pass.priv b/node_modules/public-encrypt/test/rsa.pass.priv deleted file mode 100644 index 99e8213..0000000 --- a/node_modules/public-encrypt/test/rsa.pass.priv +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,7A6A055AD675947A657041422F06D439 - -HQdjzAKUuqqKhZHmpzzY/monfqFhiHnZ5c24jtR9fM4aQJXf/e1fz6MEhyIz6XON -sb4CnXZstnxUuVWDkHEu6KWQ/dKALgiDUuT+UdMawVoVPGdgyWZp35pQPWi3fT2V -XZn58YkG8bO3Y403eZPyhadOefD1VtuFuK6/f90jjzx6ZDnwveXpYgFV7Jy1/pFd -cLLMf07C+hbk416nX6UVipWe4GH+ADFom5ZCfAaUotM7n8i149dULNF4YYi2wP31 -1YaDH5vf1CqiaieDY7xLzpEixwJz6ZEg3gLXaUvz2MpF8owiGI3eP0g7voWp3xt4 -TQx/qDURlaXiaRriWdWtpKyW1MFuJ5+KdNtR1/kXr2BLPB/ZLwyqtynUy8ZYpb4+ -WIRYpUGeb//ZHGhlCH7CRMdABsal4wTwnzi9fW4Ax96ecJ2SlwCuKxwS7iEq2y1/ -FAfGwsE+XufHhme5p6XjKfiHx+zJMIB2NMkrm+wm4PbMTrGVnw5/41/r6XxOB8fe -iKi12Jth4dusc1vYGYfzKop9uEM6CZ6+Chqzb+Zyh/xUiZVlCX/BYnxr7yXUm9aR -PHQgxkn2Act8FgQB3Kgs3jCiCRIJrlsnybeWzQ3YO9TjC4MxygmmwODDBpsOKnEi -kXXS54+cZFjcsva4uJVwhAywRPVUkLzmTkH0tGiwCHjeQNECm+TLahkkEIXrVTb9 -c9creNXMgE6jVVz+R43HXsGvTcgMcBLyFRQJe2nVaj/dQ5JbF4uqNnQzRjAbD34K -uTpFaJ/kmlgcmeScRLnwaoYwFlmhSC+bK0dfY1Jr6AQRA6IDP7nIjqWNDCHNBB8r -Qj1v2KWoVQe3xNHaXhkbJPbA2DKlUIqffkBVtMKtt9KuG3Rccf3bVYAW6oid73/D -z7DMAF5G/OpVR8VbGh1WxXuR7zEVDUwpwsp9ek5dqN8BnBz1ppdZNIKqzszneckU -s2l/6mZBmgV1Nfy/cQU6U5s3S1Xc75UDQVLms3CIOpFTRIpecNTdfa31fYy/svy0 -M2lWTbCva0dOyuvMUhTgBL4I7Qa2dUMPXHMZatV5ooHYq/BZJA1r84C5cM5r+umE -2LLv/BlUr7RaQHhaKGn4Qhpzo5yRDE9mEqDpLVkbg8SxMsdf/pEF5/VyUwA9t8RT -fKVsInRd386tDqJSDbSFqKTvLztr/5YCyzZzvC2YB1voko/caOGd2d/G51Ij+bXU -xEN8U4fHDBsHwPUGb31uZUhTXpL37KiOqZmXFoH2usmuvx882XvyGcV0F4tstMaR -KLKzl2PwqzAYGFexLkYKMz0TYIeN6h3b86ETazPPU49nkaEU23Dx21J2Rb3UlH+I -lDQF3wuH1QlYiTnlcVa/Zu4QQg0/iP8ALkZ06mvn9e9mOtnA8gsh4B2oLqc19VLU -bcpv40dV1H3W9Lcx9B8JYUp0c/Oyno1D7Yj3tjGcwMKECmUpHi4kksehVo0/P933 -xmFmC6eyWYVdO9upvY/vKSB7b1dMt85iWr3gnMsSfRYc6jsbSxdjOPST46UsIzjx -wa1DS6+Bv5tiaC4uC6X+0tCAZo+UOQMYUbTGRR/7g/c= ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/rsa.pass.pub b/node_modules/public-encrypt/test/rsa.pass.pub deleted file mode 100644 index 655cc3a..0000000 --- a/node_modules/public-encrypt/test/rsa.pass.pub +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBHjANBgkqhkiG9w0BAQEFAAOCAQsAMIIBBgKB/gy7mjaWgPeFdVYDZWRCA9BN -iv3pPb0es27+FKY0hszLaOw47ExCtAWpDsH48TXAfyHBYwBLguayfk4LGIupxb+C -GMbRo3xEp0CbfY1Jby26T9vGjRC1foHDDUJG84uaRbyHqaf4i6zt4gVR+xlAEIjk -aFAAK8cOoXAT1CVqGLLljUCchL8PjaHj/yriZ/S7rdwlI3LnABxwwmLrmR/v71Wt -pmO/aNG8N+1po+QwaghTkyQ59E/ZvAuOkFWHok2q/R6PYAa2jdZ9zim0FqOP+nkQ -aEDRbBFBmBqTv5fFGfk2WsAfKf/RG0/VFd+ZeM5251TeTvXH695nlSGauVl9AgMB -AAE= ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/test/test_cert.pem b/node_modules/public-encrypt/test/test_cert.pem deleted file mode 100644 index a3c1e4a..0000000 --- a/node_modules/public-encrypt/test/test_cert.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXDCCAsWgAwIBAgIJAKL0UG+mRkSPMA0GCSqGSIb3DQEBBQUAMH0xCzAJBgNV -BAYTAlVLMRQwEgYDVQQIEwtBY2tuYWNrIEx0ZDETMBEGA1UEBxMKUmh5cyBKb25l -czEQMA4GA1UEChMHbm9kZS5qczEdMBsGA1UECxMUVGVzdCBUTFMgQ2VydGlmaWNh -dGUxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0wOTExMTEwOTUyMjJaFw0yOTExMDYw -OTUyMjJaMH0xCzAJBgNVBAYTAlVLMRQwEgYDVQQIEwtBY2tuYWNrIEx0ZDETMBEG -A1UEBxMKUmh5cyBKb25lczEQMA4GA1UEChMHbm9kZS5qczEdMBsGA1UECxMUVGVz -dCBUTFMgQ2VydGlmaWNhdGUxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA8d8Hc6atq78Jt1HLp9agA/wpQfsFvkYUdZ1YsdvO -kL2janjwHQgMMCy/Njal3FUEW0OLPebKZUJ8L44JBXSlVxU4zyiiSOWld8EkTetR -AVT3WKQq3ud+cnxv7g8rGRQp1UHZwmdbZ1wEfAYq8QjYx6m1ciMgRo7DaDQhD29k -d+UCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUL9miTJn+HKNuTmx/oMWlZP9cd4QwgbAG -A1UdIwSBqDCBpYAUL9miTJn+HKNuTmx/oMWlZP9cd4ShgYGkfzB9MQswCQYDVQQG -EwJVSzEUMBIGA1UECBMLQWNrbmFjayBMdGQxEzARBgNVBAcTClJoeXMgSm9uZXMx -EDAOBgNVBAoTB25vZGUuanMxHTAbBgNVBAsTFFRlc3QgVExTIENlcnRpZmljYXRl -MRIwEAYDVQQDEwlsb2NhbGhvc3SCCQCi9FBvpkZEjzAMBgNVHRMEBTADAQH/MA0G -CSqGSIb3DQEBBQUAA4GBADRXXA2xSUK5W1i3oLYWW6NEDVWkTQ9RveplyeS9MOkP -e7yPcpz0+O0ZDDrxR9chAiZ7fmdBBX1Tr+pIuCrG/Ud49SBqeS5aMJGVwiSd7o1n -dhU2Sz3Q60DwJEL1VenQHiVYlWWtqXBThe9ggqRPnCfsCRTP8qifKkjk45zWPcpN ------END CERTIFICATE----- diff --git a/node_modules/public-encrypt/test/test_key.pem b/node_modules/public-encrypt/test/test_key.pem deleted file mode 100644 index 48fd93c..0000000 --- a/node_modules/public-encrypt/test/test_key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDx3wdzpq2rvwm3Ucun1qAD/ClB+wW+RhR1nVix286QvaNqePAd -CAwwLL82NqXcVQRbQ4s95splQnwvjgkFdKVXFTjPKKJI5aV3wSRN61EBVPdYpCre -535yfG/uDysZFCnVQdnCZ1tnXAR8BirxCNjHqbVyIyBGjsNoNCEPb2R35QIDAQAB -AoGBAJNem9C4ftrFNGtQ2DB0Udz7uDuucepkErUy4MbFsc947GfENjDKJXr42Kx0 -kYx09ImS1vUpeKpH3xiuhwqe7tm4FsCBg4TYqQle14oxxm7TNeBwwGC3OB7hiokb -aAjbPZ1hAuNs6ms3Ybvvj6Lmxzx42m8O5DXCG2/f+KMvaNUhAkEA/ekrOsWkNoW9 -2n3m+msdVuxeek4B87EoTOtzCXb1dybIZUVv4J48VAiM43hhZHWZck2boD/hhwjC -M5NWd4oY6QJBAPPcgBVNdNZSZ8hR4ogI4nzwWrQhl9MRbqqtfOn2TK/tjMv10ALg -lPmn3SaPSNRPKD2hoLbFuHFERlcS79pbCZ0CQQChX3PuIna/gDitiJ8oQLOg7xEM -wk9TRiDK4kl2lnhjhe6PDpaQN4E4F0cTuwqLAoLHtrNWIcOAQvzKMrYdu1MhAkBm -Et3qDMnjDAs05lGT72QeN90/mPAcASf5eTTYGahv21cb6IBxM+AnwAPpqAAsHhYR -9h13Y7uYbaOjvuF23LRhAkBoI9eaSMn+l81WXOVUHnzh3ZwB4GuTyxMXXNOhuiFd -0z4LKAMh99Z4xQmqSoEkXsfM4KPpfhYjF/bwIcP5gOei ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/test_rsa_privkey.pem b/node_modules/public-encrypt/test/test_rsa_privkey.pem deleted file mode 100644 index 425518a..0000000 --- a/node_modules/public-encrypt/test/test_rsa_privkey.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF -NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F -UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB -AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA -QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK -kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg -f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u -412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc -mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 -kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA -gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW -G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI -7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem b/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem deleted file mode 100644 index 08e7617..0000000 --- a/node_modules/public-encrypt/test/test_rsa_privkey_encrypted.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,9D916E00476DFF9E70FA4BA9E3A6CB0E - -oj0VC35ShSEqlfJ0rLGgkqJCyIK+mXSsa/X/xAur+lI/RVOVTWd7oQQGTdI/0rLX -PdQR02Na3X9Rptezh6J04PfMGeFysxdT6RpC+rkHRPVbN0F4TqxSNNXzkwK70+EF -dSuDMyVKv9YN4wWDf0g6VKe4ShAH/sqICQBrVyzWyYLvH/hwZmZZ1QEab6ylIKtb -EJunwu9BxVVA04bbuATKkKjJOqDn0fG8hb4bYbyD02dJwgLePzzn36F31kcBCEHI -tESlD3RsS+EtfpfgPkplXNOhqYzkD9auDb7Zy+ZwL20fjnJb75OSGu8gOg3KTljt -mApZOg0nJ5Jk9ATAdyzyVSFOM1Hhcw12ws06Dq9KRnXgO6bbuadLTFRDdvSYDFvD -ijUb+97UolQfYIXQMqXli3EIvHr7CTWe/3mpoDgK1mtr0+923Bm97XgE7KSr0L46 -n5QpNjCZf1vbXldNmW+TRifiJMgtVdS7x0N4vqDPNEe+FelVv3U4Pz3HIOtFuWLr -ZCxlgVxJY4IsyYlV0ItQjIv8fJiAyemZdO2lA9K6h0eEF+9Apr3i79JGWUi74p5D -Ooak4le0Va9O34f6FxCGn/a54A6bhKu24Ub/0gr/e4WRa7693euEdgIAZXhtMu2Z -taU5SKjjXPzjmRCM2kINHTCENlaU4oFzTmj3TYY/jdKyNP1bHa07NhlomladkIHK -GD6HaYkcbuwvh8hOPsopSwuS+NqjnGPq9Vv4ecBC+9veDEmpIE1iR6FK9Hjrre88 -kLoMQNmA+vuc8jG4/FIHM3SauQiR1ZJ6+zkz97kcmOf+X7LRaS4j6lfFR6qHiJ6y ------END RSA PRIVATE KEY----- diff --git a/node_modules/public-encrypt/test/test_rsa_pubkey.pem b/node_modules/public-encrypt/test/test_rsa_pubkey.pem deleted file mode 100644 index b3bbf6c..0000000 --- a/node_modules/public-encrypt/test/test_rsa_pubkey.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 -6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 -Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw -oYi+1hqp1fIekaxsyQIDAQAB ------END PUBLIC KEY----- diff --git a/node_modules/public-encrypt/withPublic.js b/node_modules/public-encrypt/withPublic.js deleted file mode 100644 index 417a1bf..0000000 --- a/node_modules/public-encrypt/withPublic.js +++ /dev/null @@ -1,12 +0,0 @@ -var BN = require('bn.js') -var Buffer = require('safe-buffer').Buffer - -function withPublic (paddedMsg, key) { - return Buffer.from(paddedMsg - .toRed(BN.mont(key.modulus)) - .redPow(new BN(key.publicExponent)) - .fromRed() - .toArray()) -} - -module.exports = withPublic diff --git a/node_modules/public-encrypt/xor.js b/node_modules/public-encrypt/xor.js deleted file mode 100644 index 10d2764..0000000 --- a/node_modules/public-encrypt/xor.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function xor (a, b) { - var len = a.length - var i = -1 - while (++i < len) { - a[i] ^= b[i] - } - return a -} diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/punycode/README.md b/node_modules/punycode/README.md deleted file mode 100644 index 7ad7d1f..0000000 --- a/node_modules/punycode/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) - -A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js). - -## Installation - -Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2): - -```bash -npm install punycode -``` - -Via [Bower](http://bower.io/): - -```bash -bower install punycode -``` - -Via [Component](https://github.com/component/component): - -```bash -component install bestiejs/punycode.js -``` - -In a browser: - -```html - -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): - -```js -var punycode = require('punycode'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('punycode.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'punycode': 'path/to/punycode' - } - }, - ['punycode'], - function(punycode) { - console.log(punycode); - } -); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## Unit tests & code coverage - -After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -Feel free to fork if you see possible improvements! - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Contributors - -| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json deleted file mode 100644 index 6d3214d..0000000 --- a/node_modules/punycode/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "punycode@^1.3.2", - "_id": "punycode@1.4.1", - "_inBundle": false, - "_integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "_location": "/punycode", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "punycode@^1.3.2", - "name": "punycode", - "escapedName": "punycode", - "rawSpec": "^1.3.2", - "saveSpec": null, - "fetchSpec": "^1.3.2" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "_shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", - "_spec": "punycode@^1.3.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - } - ], - "deprecated": false, - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "devDependencies": { - "coveralls": "^2.11.4", - "grunt": "^0.4.5", - "grunt-contrib-uglify": "^0.11.0", - "grunt-shell": "^1.1.2", - "istanbul": "^0.4.1", - "qunit-extras": "^1.4.4", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.22" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js" - ], - "homepage": "https://mths.be/punycode", - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "main": "punycode.js", - "name": "punycode", - "repository": { - "type": "git", - "url": "git+https://github.com/bestiejs/punycode.js.git" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "version": "1.4.1" -} diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js deleted file mode 100644 index 2c87f6c..0000000 --- a/node_modules/punycode/punycode.js +++ /dev/null @@ -1,533 +0,0 @@ -/*! https://mths.be/punycode v1.4.1 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.4.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { - // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { - // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/querystring-es3/.travis.yml b/node_modules/querystring-es3/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/node_modules/querystring-es3/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/querystring-es3/History.md b/node_modules/querystring-es3/History.md deleted file mode 100644 index 4fddbaf..0000000 --- a/node_modules/querystring-es3/History.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.2.0 / 2013-02-21 - - - Refactor into function per-module idiomatic style. - - Improved test coverage. - -# 0.1.0 / 2011-12-13 - - - Minor project reorganization - -# 0.0.3 / 2011-04-16 - - Support for AMD module loaders - -# 0.0.2 / 2011-04-16 - - - Ported unit tests - - Removed functionality that depended on Buffers - -# 0.0.1 / 2011-04-15 - - - Initial release diff --git a/node_modules/querystring-es3/License.md b/node_modules/querystring-es3/License.md deleted file mode 100644 index fc80e85..0000000 --- a/node_modules/querystring-es3/License.md +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/querystring-es3/Readme.md b/node_modules/querystring-es3/Readme.md deleted file mode 100644 index be1668d..0000000 --- a/node_modules/querystring-es3/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# querystring - -[![Build Status](https://secure.travis-ci.org/mike-spainhower/querystring.png)](http://travis-ci.org/mike-spainhower/querystring) - - -[![Browser support](http://ci.testling.com/mike-spainhower/querystring.png)](http://ci.testling.com/mike-spainhower/querystring) - - - -Node's querystring module for all engines. - -## Install ## - - npm install querystring - diff --git a/node_modules/querystring-es3/decode.js b/node_modules/querystring-es3/decode.js deleted file mode 100644 index b5825c0..0000000 --- a/node_modules/querystring-es3/decode.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/querystring-es3/encode.js b/node_modules/querystring-es3/encode.js deleted file mode 100644 index 76e4cfb..0000000 --- a/node_modules/querystring-es3/encode.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return map(objectKeys(obj), function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (isArray(obj[k])) { - return map(obj[k], function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -function map (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; diff --git a/node_modules/querystring-es3/index.js b/node_modules/querystring-es3/index.js deleted file mode 100644 index 99826ea..0000000 --- a/node_modules/querystring-es3/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); diff --git a/node_modules/querystring-es3/package.json b/node_modules/querystring-es3/package.json deleted file mode 100644 index ad177c5..0000000 --- a/node_modules/querystring-es3/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_from": "querystring-es3@~0.2.0", - "_id": "querystring-es3@0.2.1", - "_inBundle": false, - "_integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "_location": "/querystring-es3", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "querystring-es3@~0.2.0", - "name": "querystring-es3", - "escapedName": "querystring-es3", - "rawSpec": "~0.2.0", - "saveSpec": null, - "fetchSpec": "~0.2.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "_shasum": "9ec61f79049875707d69414596fd907a4d711e73", - "_spec": "querystring-es3@~0.2.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com" - }, - "bugs": { - "url": "http://github.com/mike-spainhower/querystring/issues/" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node's querystring module for all engines. (ES3 compat fork)", - "devDependencies": { - "phantomify": "~0.x.0", - "retape": "~0.x.0", - "tape": "~0.1.5", - "test": "~0.x.0" - }, - "engines": { - "node": ">=0.4.x" - }, - "homepage": "https://github.com/mike-spainhower/querystring#readme", - "id": "querystring-es3", - "keywords": [ - "commonjs", - "query", - "querystring" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/Gozala/enchain/License.md" - } - ], - "name": "querystring-es3", - "repository": { - "type": "git", - "url": "git://github.com/mike-spainhower/querystring.git", - "web": "https://github.com/mike-spainhower/querystring" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser && npm run test-tap", - "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", - "test-node": "node ./test/common-index.js", - "test-tap": "node ./test/tap-index.js" - }, - "testling": { - "files": "test/tap-index.js", - "browsers": { - "iexplore": [ - 9, - 10 - ], - "chrome": [ - 16, - 20, - 25, - "canary" - ], - "firefox": [ - 10, - 15, - 16, - 17, - 18, - "nightly" - ], - "safari": [ - 5, - 6 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.2.1" -} diff --git a/node_modules/querystring-es3/test/common-index.js b/node_modules/querystring-es3/test/common-index.js deleted file mode 100644 index f356f98..0000000 --- a/node_modules/querystring-es3/test/common-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("test").run(require("./index")) \ No newline at end of file diff --git a/node_modules/querystring-es3/test/index.js b/node_modules/querystring-es3/test/index.js deleted file mode 100644 index 62eb2ac..0000000 --- a/node_modules/querystring-es3/test/index.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -"use strict"; - -// test using assert -var qs = require('../'); - -// folding block, commented to pass gjslint -// {{{ -// [ wonkyQS, canonicalQS, obj ] -var qsTestCases = [ - ['foo=918854443121279438895193', - 'foo=918854443121279438895193', - {'foo': '918854443121279438895193'}], - ['foo=bar', 'foo=bar', {'foo': 'bar'}], - ['foo=bar&foo=quux', 'foo=bar&foo=quux', {'foo': ['bar', 'quux']}], - ['foo=1&bar=2', 'foo=1&bar=2', {'foo': '1', 'bar': '2'}], - ['my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F', - 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', - {'my weird field': 'q1!2"\'w$5&7/z8)?' }], - ['foo%3Dbaz=bar', 'foo%3Dbaz=bar', {'foo=baz': 'bar'}], - ['foo=baz=bar', 'foo=baz%3Dbar', {'foo': 'baz=bar'}], - ['str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - 'str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - { 'str': 'foo', - 'arr': ['1', '2', '3'], - 'somenull': '', - 'undef': ''}], - [' foo = bar ', '%20foo%20=%20bar%20', {' foo ': ' bar '}], - // disable test that fails ['foo=%zx', 'foo=%25zx', {'foo': '%zx'}], - ['foo=%EF%BF%BD', 'foo=%EF%BF%BD', {'foo': '\ufffd' }], - // See: https://github.com/joyent/node/issues/1707 - ['hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - 'hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - { hasOwnProperty: 'x', - toString: 'foo', - valueOf: 'bar', - __defineGetter__: 'baz' }], - // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] -]; - -// [ wonkyQS, canonicalQS, obj ] -var qsColonTestCases = [ - ['foo:bar', 'foo:bar', {'foo': 'bar'}], - ['foo:bar;foo:quux', 'foo:bar;foo:quux', {'foo': ['bar', 'quux']}], - ['foo:1&bar:2;baz:quux', - 'foo:1%26bar%3A2;baz:quux', - {'foo': '1&bar:2', 'baz': 'quux'}], - ['foo%3Abaz:bar', 'foo%3Abaz:bar', {'foo:baz': 'bar'}], - ['foo:baz:bar', 'foo:baz%3Abar', {'foo': 'baz:bar'}] -]; - -// [wonkyObj, qs, canonicalObj] -var extendedFunction = function() {}; -extendedFunction.prototype = {a: 'b'}; -var qsWeirdObjects = [ - [{regexp: /./g}, 'regexp=', {'regexp': ''}], - [{regexp: new RegExp('.', 'g')}, 'regexp=', {'regexp': ''}], - [{fn: function() {}}, 'fn=', {'fn': ''}], - [{fn: new Function('')}, 'fn=', {'fn': ''}], - [{math: Math}, 'math=', {'math': ''}], - [{e: extendedFunction}, 'e=', {'e': ''}], - [{d: new Date()}, 'd=', {'d': ''}], - [{d: Date}, 'd=', {'d': ''}], - [{f: new Boolean(false), t: new Boolean(true)}, 'f=&t=', {'f': '', 't': ''}], - [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], - [{n: null}, 'n=', {'n': ''}], - [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] -]; -// }}} - -var qsNoMungeTestCases = [ - ['', {}], - ['foo=bar&foo=baz', {'foo': ['bar', 'baz']}], - ['blah=burp', {'blah': 'burp'}], - ['gragh=1&gragh=3&goo=2', {'gragh': ['1', '3'], 'goo': '2'}], - ['frappucino=muffin&goat%5B%5D=scone&pond=moose', - {'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose'}], - ['trololol=yes&lololo=no', {'trololol': 'yes', 'lololo': 'no'}] -]; - -exports['test basic'] = function(assert) { - assert.strictEqual('918854443121279438895193', - qs.parse('id=918854443121279438895193').id, - 'prase id=918854443121279438895193'); -}; - -exports['test that the canonical qs is parsed properly'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0]), - 'parse ' + testCase[0]); - }); -}; - - -exports['test that the colon test cases can do the same'] = function(assert) { - qsColonTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0], ';', ':'), - 'parse ' + testCase[0] + ' -> ; :'); - }); -}; - -exports['test the weird objects, that they get parsed properly'] = function(assert) { - qsWeirdObjects.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[1]), - 'parse ' + testCase[1]); - }); -}; - -exports['test non munge test cases'] = function(assert) { - qsNoMungeTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[0], qs.stringify(testCase[1], '&', '=', false), - 'stringify ' + JSON.stringify(testCase[1]) + ' -> & ='); - }); -}; - -exports['test the nested qs-in-qs case'] = function(assert) { - var f = qs.parse('a=b&q=x%3Dy%26y%3Dz'); - f.q = qs.parse(f.q); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a=b&q=x%3Dy%26y%3Dz'); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':'); - f.q = qs.parse(f.q, ';', ':'); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a:b;q:x%3Ay%3By%3Az -> ; :'); -}; - -exports['test stringifying'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2]), - 'stringify ' + JSON.stringify(testCase[2])); - }); - - qsColonTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2], ';', ':'), - 'stringify ' + JSON.stringify(testCase[2]) + ' -> ; :'); - }); - - qsWeirdObjects.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[0]), - 'stringify ' + JSON.stringify(testCase[0])); - }); -}; - -exports['test stringifying nested'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) - }); - assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz', - JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - })); - - var threw = false; - try { qs.parse(undefined); } catch(error) { threw = true; } - assert.ok(!threw, "does not throws on undefined"); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') - }, ';', ':'); - assert.equal(f, 'a:b;q:x%3Ay%3By%3Az', - 'stringify ' + JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - }) + ' -> ; : '); - - - assert.deepEqual({}, qs.parse(), 'parse undefined'); -}; diff --git a/node_modules/querystring-es3/test/tap-index.js b/node_modules/querystring-es3/test/tap-index.js deleted file mode 100644 index 70679b3..0000000 --- a/node_modules/querystring-es3/test/tap-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("retape")(require("./index")) \ No newline at end of file diff --git a/node_modules/querystring/.History.md.un~ b/node_modules/querystring/.History.md.un~ deleted file mode 100644 index c96a7dd..0000000 Binary files a/node_modules/querystring/.History.md.un~ and /dev/null differ diff --git a/node_modules/querystring/.Readme.md.un~ b/node_modules/querystring/.Readme.md.un~ deleted file mode 100644 index 71613b5..0000000 Binary files a/node_modules/querystring/.Readme.md.un~ and /dev/null differ diff --git a/node_modules/querystring/.package.json.un~ b/node_modules/querystring/.package.json.un~ deleted file mode 100644 index d86fe31..0000000 Binary files a/node_modules/querystring/.package.json.un~ and /dev/null differ diff --git a/node_modules/querystring/.travis.yml b/node_modules/querystring/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/node_modules/querystring/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/querystring/History.md b/node_modules/querystring/History.md deleted file mode 100644 index 4fddbaf..0000000 --- a/node_modules/querystring/History.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.2.0 / 2013-02-21 - - - Refactor into function per-module idiomatic style. - - Improved test coverage. - -# 0.1.0 / 2011-12-13 - - - Minor project reorganization - -# 0.0.3 / 2011-04-16 - - Support for AMD module loaders - -# 0.0.2 / 2011-04-16 - - - Ported unit tests - - Removed functionality that depended on Buffers - -# 0.0.1 / 2011-04-15 - - - Initial release diff --git a/node_modules/querystring/License.md b/node_modules/querystring/License.md deleted file mode 100644 index fc80e85..0000000 --- a/node_modules/querystring/License.md +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2012 Irakli Gozalishvili. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/querystring/Readme.md b/node_modules/querystring/Readme.md deleted file mode 100644 index a4fe252..0000000 --- a/node_modules/querystring/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# querystring - -[![Build Status](https://secure.travis-ci.org/Gozala/querystring.png)](http://travis-ci.org/Gozala/querystring) - - -[![Browser support](http://ci.testling.com/Gozala/querystring.png)](http://ci.testling.com/Gozala/querystring) - - - -Node's querystring module for all engines. - -## Install ## - - npm install querystring - diff --git a/node_modules/querystring/decode.js b/node_modules/querystring/decode.js deleted file mode 100644 index a6518b8..0000000 --- a/node_modules/querystring/decode.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (Array.isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; diff --git a/node_modules/querystring/encode.js b/node_modules/querystring/encode.js deleted file mode 100644 index 4f2b561..0000000 --- a/node_modules/querystring/encode.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return Object.keys(obj).map(function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (Array.isArray(obj[k])) { - return obj[k].map(function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; diff --git a/node_modules/querystring/index.js b/node_modules/querystring/index.js deleted file mode 100644 index 99826ea..0000000 --- a/node_modules/querystring/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); diff --git a/node_modules/querystring/package.json b/node_modules/querystring/package.json deleted file mode 100644 index 14f1d60..0000000 --- a/node_modules/querystring/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_from": "querystring@0.2.0", - "_id": "querystring@0.2.0", - "_inBundle": false, - "_integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "_location": "/querystring", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "querystring@0.2.0", - "name": "querystring", - "escapedName": "querystring", - "rawSpec": "0.2.0", - "saveSpec": null, - "fetchSpec": "0.2.0" - }, - "_requiredBy": [ - "/url" - ], - "_resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "_shasum": "b209849203bb25df820da756e747005878521620", - "_spec": "querystring@0.2.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/url", - "author": { - "name": "Irakli Gozalishvili", - "email": "rfobic@gmail.com" - }, - "bugs": { - "url": "http://github.com/Gozala/querystring/issues/" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node's querystring module for all engines.", - "devDependencies": { - "phantomify": "~0.x.0", - "retape": "~0.x.0", - "tape": "~0.1.5", - "test": "~0.x.0" - }, - "engines": { - "node": ">=0.4.x" - }, - "homepage": "https://github.com/Gozala/querystring#readme", - "id": "querystring", - "keywords": [ - "commonjs", - "query", - "querystring" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/Gozala/enchain/License.md" - } - ], - "name": "querystring", - "repository": { - "type": "git", - "url": "git://github.com/Gozala/querystring.git", - "web": "https://github.com/Gozala/querystring" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser && npm run test-tap", - "test-browser": "node ./node_modules/phantomify/bin/cmd.js ./test/common-index.js", - "test-node": "node ./test/common-index.js", - "test-tap": "node ./test/tap-index.js" - }, - "testling": { - "files": "test/tap-index.js", - "browsers": { - "iexplore": [ - 9, - 10 - ], - "chrome": [ - 16, - 20, - 25, - "canary" - ], - "firefox": [ - 10, - 15, - 16, - 17, - 18, - "nightly" - ], - "safari": [ - 5, - 6 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.2.0" -} diff --git a/node_modules/querystring/test/.index.js.un~ b/node_modules/querystring/test/.index.js.un~ deleted file mode 100644 index 898eced..0000000 Binary files a/node_modules/querystring/test/.index.js.un~ and /dev/null differ diff --git a/node_modules/querystring/test/common-index.js b/node_modules/querystring/test/common-index.js deleted file mode 100644 index f356f98..0000000 --- a/node_modules/querystring/test/common-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("test").run(require("./index")) \ No newline at end of file diff --git a/node_modules/querystring/test/index.js b/node_modules/querystring/test/index.js deleted file mode 100644 index 62eb2ac..0000000 --- a/node_modules/querystring/test/index.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -"use strict"; - -// test using assert -var qs = require('../'); - -// folding block, commented to pass gjslint -// {{{ -// [ wonkyQS, canonicalQS, obj ] -var qsTestCases = [ - ['foo=918854443121279438895193', - 'foo=918854443121279438895193', - {'foo': '918854443121279438895193'}], - ['foo=bar', 'foo=bar', {'foo': 'bar'}], - ['foo=bar&foo=quux', 'foo=bar&foo=quux', {'foo': ['bar', 'quux']}], - ['foo=1&bar=2', 'foo=1&bar=2', {'foo': '1', 'bar': '2'}], - ['my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F', - 'my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F', - {'my weird field': 'q1!2"\'w$5&7/z8)?' }], - ['foo%3Dbaz=bar', 'foo%3Dbaz=bar', {'foo=baz': 'bar'}], - ['foo=baz=bar', 'foo=baz%3Dbar', {'foo': 'baz=bar'}], - ['str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - 'str=foo&arr=1&arr=2&arr=3&somenull=&undef=', - { 'str': 'foo', - 'arr': ['1', '2', '3'], - 'somenull': '', - 'undef': ''}], - [' foo = bar ', '%20foo%20=%20bar%20', {' foo ': ' bar '}], - // disable test that fails ['foo=%zx', 'foo=%25zx', {'foo': '%zx'}], - ['foo=%EF%BF%BD', 'foo=%EF%BF%BD', {'foo': '\ufffd' }], - // See: https://github.com/joyent/node/issues/1707 - ['hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - 'hasOwnProperty=x&toString=foo&valueOf=bar&__defineGetter__=baz', - { hasOwnProperty: 'x', - toString: 'foo', - valueOf: 'bar', - __defineGetter__: 'baz' }], - // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] -]; - -// [ wonkyQS, canonicalQS, obj ] -var qsColonTestCases = [ - ['foo:bar', 'foo:bar', {'foo': 'bar'}], - ['foo:bar;foo:quux', 'foo:bar;foo:quux', {'foo': ['bar', 'quux']}], - ['foo:1&bar:2;baz:quux', - 'foo:1%26bar%3A2;baz:quux', - {'foo': '1&bar:2', 'baz': 'quux'}], - ['foo%3Abaz:bar', 'foo%3Abaz:bar', {'foo:baz': 'bar'}], - ['foo:baz:bar', 'foo:baz%3Abar', {'foo': 'baz:bar'}] -]; - -// [wonkyObj, qs, canonicalObj] -var extendedFunction = function() {}; -extendedFunction.prototype = {a: 'b'}; -var qsWeirdObjects = [ - [{regexp: /./g}, 'regexp=', {'regexp': ''}], - [{regexp: new RegExp('.', 'g')}, 'regexp=', {'regexp': ''}], - [{fn: function() {}}, 'fn=', {'fn': ''}], - [{fn: new Function('')}, 'fn=', {'fn': ''}], - [{math: Math}, 'math=', {'math': ''}], - [{e: extendedFunction}, 'e=', {'e': ''}], - [{d: new Date()}, 'd=', {'d': ''}], - [{d: Date}, 'd=', {'d': ''}], - [{f: new Boolean(false), t: new Boolean(true)}, 'f=&t=', {'f': '', 't': ''}], - [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], - [{n: null}, 'n=', {'n': ''}], - [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] -]; -// }}} - -var qsNoMungeTestCases = [ - ['', {}], - ['foo=bar&foo=baz', {'foo': ['bar', 'baz']}], - ['blah=burp', {'blah': 'burp'}], - ['gragh=1&gragh=3&goo=2', {'gragh': ['1', '3'], 'goo': '2'}], - ['frappucino=muffin&goat%5B%5D=scone&pond=moose', - {'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose'}], - ['trololol=yes&lololo=no', {'trololol': 'yes', 'lololo': 'no'}] -]; - -exports['test basic'] = function(assert) { - assert.strictEqual('918854443121279438895193', - qs.parse('id=918854443121279438895193').id, - 'prase id=918854443121279438895193'); -}; - -exports['test that the canonical qs is parsed properly'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0]), - 'parse ' + testCase[0]); - }); -}; - - -exports['test that the colon test cases can do the same'] = function(assert) { - qsColonTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[0], ';', ':'), - 'parse ' + testCase[0] + ' -> ; :'); - }); -}; - -exports['test the weird objects, that they get parsed properly'] = function(assert) { - qsWeirdObjects.forEach(function(testCase) { - assert.deepEqual(testCase[2], qs.parse(testCase[1]), - 'parse ' + testCase[1]); - }); -}; - -exports['test non munge test cases'] = function(assert) { - qsNoMungeTestCases.forEach(function(testCase) { - assert.deepEqual(testCase[0], qs.stringify(testCase[1], '&', '=', false), - 'stringify ' + JSON.stringify(testCase[1]) + ' -> & ='); - }); -}; - -exports['test the nested qs-in-qs case'] = function(assert) { - var f = qs.parse('a=b&q=x%3Dy%26y%3Dz'); - f.q = qs.parse(f.q); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a=b&q=x%3Dy%26y%3Dz'); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':'); - f.q = qs.parse(f.q, ';', ':'); - assert.deepEqual(f, { a: 'b', q: { x: 'y', y: 'z' } }, - 'parse a:b;q:x%3Ay%3By%3Az -> ; :'); -}; - -exports['test stringifying'] = function(assert) { - qsTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2]), - 'stringify ' + JSON.stringify(testCase[2])); - }); - - qsColonTestCases.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[2], ';', ':'), - 'stringify ' + JSON.stringify(testCase[2]) + ' -> ; :'); - }); - - qsWeirdObjects.forEach(function(testCase) { - assert.equal(testCase[1], qs.stringify(testCase[0]), - 'stringify ' + JSON.stringify(testCase[0])); - }); -}; - -exports['test stringifying nested'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) - }); - assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz', - JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - })); - - var threw = false; - try { qs.parse(undefined); } catch(error) { threw = true; } - assert.ok(!threw, "does not throws on undefined"); -}; - -exports['test nested in colon'] = function(assert) { - var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') - }, ';', ':'); - assert.equal(f, 'a:b;q:x%3Ay%3By%3Az', - 'stringify ' + JSON.stringify({ - a: 'b', - 'qs.stringify -> q': { - x: 'y', - y: 'z' - } - }) + ' -> ; : '); - - - assert.deepEqual({}, qs.parse(), 'parse undefined'); -}; diff --git a/node_modules/querystring/test/tap-index.js b/node_modules/querystring/test/tap-index.js deleted file mode 100644 index 70679b3..0000000 --- a/node_modules/querystring/test/tap-index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -require("retape")(require("./index")) \ No newline at end of file diff --git a/node_modules/randombytes/.travis.yml b/node_modules/randombytes/.travis.yml deleted file mode 100644 index 69fdf71..0000000 --- a/node_modules/randombytes/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -matrix: - include: - - node_js: '7' - env: TEST_SUITE=test - - node_js: '6' - env: TEST_SUITE=test - - node_js: '5' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=phantom -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/randombytes/.zuul.yml b/node_modules/randombytes/.zuul.yml deleted file mode 100644 index 96d9cfb..0000000 --- a/node_modules/randombytes/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/randombytes/LICENSE b/node_modules/randombytes/LICENSE deleted file mode 100644 index fea9d48..0000000 --- a/node_modules/randombytes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/randombytes/README.md b/node_modules/randombytes/README.md deleted file mode 100644 index 3bacba4..0000000 --- a/node_modules/randombytes/README.md +++ /dev/null @@ -1,14 +0,0 @@ -randombytes -=== - -[![Version](http://img.shields.io/npm/v/randombytes.svg)](https://www.npmjs.org/package/randombytes) [![Build Status](https://travis-ci.org/crypto-browserify/randombytes.svg?branch=master)](https://travis-ci.org/crypto-browserify/randombytes) - -randombytes from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues - -```js -var randomBytes = require('randombytes'); -randomBytes(16);//get 16 random bytes -randomBytes(16, function (err, resp) { - // resp is 16 random bytes -}); -``` diff --git a/node_modules/randombytes/browser.js b/node_modules/randombytes/browser.js deleted file mode 100644 index 0fb0b71..0000000 --- a/node_modules/randombytes/browser.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' - -// limit of Crypto.getRandomValues() -// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues -var MAX_BYTES = 65536 - -// Node supports requesting up to this number of bytes -// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48 -var MAX_UINT32 = 4294967295 - -function oldBrowser () { - throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11') -} - -var Buffer = require('safe-buffer').Buffer -var crypto = global.crypto || global.msCrypto - -if (crypto && crypto.getRandomValues) { - module.exports = randomBytes -} else { - module.exports = oldBrowser -} - -function randomBytes (size, cb) { - // phantomjs needs to throw - if (size > MAX_UINT32) throw new RangeError('requested too many random bytes') - - var bytes = Buffer.allocUnsafe(size) - - if (size > 0) { // getRandomValues fails on IE if size == 0 - if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues - // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues - for (var generated = 0; generated < size; generated += MAX_BYTES) { - // buffer.slice automatically checks if the end is past the end of - // the buffer so we don't have to here - crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES)) - } - } else { - crypto.getRandomValues(bytes) - } - } - - if (typeof cb === 'function') { - return process.nextTick(function () { - cb(null, bytes) - }) - } - - return bytes -} diff --git a/node_modules/randombytes/index.js b/node_modules/randombytes/index.js deleted file mode 100644 index a2d9e39..0000000 --- a/node_modules/randombytes/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('crypto').randomBytes diff --git a/node_modules/randombytes/package.json b/node_modules/randombytes/package.json deleted file mode 100644 index 0b07489..0000000 --- a/node_modules/randombytes/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "randombytes@^2.0.0", - "_id": "randombytes@2.1.0", - "_inBundle": false, - "_integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "_location": "/randombytes", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "randombytes@^2.0.0", - "name": "randombytes", - "escapedName": "randombytes", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/browserify-rsa", - "/crypto-browserify", - "/diffie-hellman", - "/public-encrypt", - "/randomfill" - ], - "_resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "_shasum": "df6f84372f0270dc65cdf6291349ab7a473d4f2a", - "_spec": "randombytes@^2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/crypto-browserify", - "author": "", - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/randombytes/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "^5.1.0" - }, - "deprecated": false, - "description": "random bytes from browserify stand alone", - "devDependencies": { - "phantomjs": "^1.9.9", - "standard": "^10.0.2", - "tap-spec": "^2.1.2", - "tape": "^4.6.3", - "zuul": "^3.7.2" - }, - "homepage": "https://github.com/crypto-browserify/randombytes", - "keywords": [ - "crypto", - "random" - ], - "license": "MIT", - "main": "index.js", - "name": "randombytes", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/crypto-browserify/randombytes.git" - }, - "scripts": { - "local": "zuul --local --no-coverage -- test.js", - "phantom": "zuul --phantom -- test.js", - "test": "standard && node test.js | tspec" - }, - "version": "2.1.0" -} diff --git a/node_modules/randombytes/test.js b/node_modules/randombytes/test.js deleted file mode 100644 index f266976..0000000 --- a/node_modules/randombytes/test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('tape') -var randomBytes = require('./') -var MAX_BYTES = 65536 -var MAX_UINT32 = 4294967295 - -test('sync', function (t) { - t.plan(9) - t.equals(randomBytes(0).length, 0, 'len: ' + 0) - t.equals(randomBytes(3).length, 3, 'len: ' + 3) - t.equals(randomBytes(30).length, 30, 'len: ' + 30) - t.equals(randomBytes(300).length, 300, 'len: ' + 300) - t.equals(randomBytes(17 + MAX_BYTES).length, 17 + MAX_BYTES, 'len: ' + 17 + MAX_BYTES) - t.equals(randomBytes(MAX_BYTES * 100).length, MAX_BYTES * 100, 'len: ' + MAX_BYTES * 100) - t.throws(function () { - randomBytes(MAX_UINT32 + 1) - }) - t.throws(function () { - t.equals(randomBytes(-1)) - }) - t.throws(function () { - t.equals(randomBytes('hello')) - }) -}) - -test('async', function (t) { - t.plan(9) - - randomBytes(0, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 0, 'len: ' + 0) - }) - - randomBytes(3, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 3, 'len: ' + 3) - }) - - randomBytes(30, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 30, 'len: ' + 30) - }) - - randomBytes(300, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 300, 'len: ' + 300) - }) - - randomBytes(17 + MAX_BYTES, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 17 + MAX_BYTES, 'len: ' + 17 + MAX_BYTES) - }) - - randomBytes(MAX_BYTES * 100, function (err, resp) { - if (err) throw err - - t.equals(resp.length, MAX_BYTES * 100, 'len: ' + MAX_BYTES * 100) - }) - - t.throws(function () { - randomBytes(MAX_UINT32 + 1, function () { - t.ok(false, 'should not get here') - }) - }) - - t.throws(function () { - randomBytes(-1, function () { - t.ok(false, 'should not get here') - }) - }) - - t.throws(function () { - randomBytes('hello', function () { - t.ok(false, 'should not get here') - }) - }) -}) diff --git a/node_modules/randomfill/.travis.yml b/node_modules/randomfill/.travis.yml deleted file mode 100644 index 69fdf71..0000000 --- a/node_modules/randomfill/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -matrix: - include: - - node_js: '7' - env: TEST_SUITE=test - - node_js: '6' - env: TEST_SUITE=test - - node_js: '5' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=phantom -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/randomfill/.zuul.yml b/node_modules/randomfill/.zuul.yml deleted file mode 100644 index 96d9cfb..0000000 --- a/node_modules/randomfill/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/node_modules/randomfill/LICENSE b/node_modules/randomfill/LICENSE deleted file mode 100644 index fea9d48..0000000 --- a/node_modules/randomfill/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/randomfill/README.md b/node_modules/randomfill/README.md deleted file mode 100644 index 1ae13ad..0000000 --- a/node_modules/randomfill/README.md +++ /dev/null @@ -1,15 +0,0 @@ -randomfill -=== - -[![Version](http://img.shields.io/npm/v/randomfill.svg)](https://www.npmjs.org/package/randomfill) - -randomfill from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues - -```js -var randomFill = require('randomfill'); -var buf -randomFill.randomFillSync(16);//get 16 random bytes -randomFill.randomFill(16, function (err, resp) { - // resp is 16 random bytes -}); -``` diff --git a/node_modules/randomfill/browser.js b/node_modules/randomfill/browser.js deleted file mode 100644 index ce34a69..0000000 --- a/node_modules/randomfill/browser.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict' - -function oldBrowser () { - throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') -} -var safeBuffer = require('safe-buffer') -var randombytes = require('randombytes') -var Buffer = safeBuffer.Buffer -var kBufferMaxLength = safeBuffer.kMaxLength -var crypto = global.crypto || global.msCrypto -var kMaxUint32 = Math.pow(2, 32) - 1 -function assertOffset (offset, length) { - if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare - throw new TypeError('offset must be a number') - } - - if (offset > kMaxUint32 || offset < 0) { - throw new TypeError('offset must be a uint32') - } - - if (offset > kBufferMaxLength || offset > length) { - throw new RangeError('offset out of range') - } -} - -function assertSize (size, offset, length) { - if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare - throw new TypeError('size must be a number') - } - - if (size > kMaxUint32 || size < 0) { - throw new TypeError('size must be a uint32') - } - - if (size + offset > length || size > kBufferMaxLength) { - throw new RangeError('buffer too small') - } -} -if ((crypto && crypto.getRandomValues) || !process.browser) { - exports.randomFill = randomFill - exports.randomFillSync = randomFillSync -} else { - exports.randomFill = oldBrowser - exports.randomFillSync = oldBrowser -} -function randomFill (buf, offset, size, cb) { - if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) { - throw new TypeError('"buf" argument must be a Buffer or Uint8Array') - } - - if (typeof offset === 'function') { - cb = offset - offset = 0 - size = buf.length - } else if (typeof size === 'function') { - cb = size - size = buf.length - offset - } else if (typeof cb !== 'function') { - throw new TypeError('"cb" argument must be a function') - } - assertOffset(offset, buf.length) - assertSize(size, offset, buf.length) - return actualFill(buf, offset, size, cb) -} - -function actualFill (buf, offset, size, cb) { - if (process.browser) { - var ourBuf = buf.buffer - var uint = new Uint8Array(ourBuf, offset, size) - crypto.getRandomValues(uint) - if (cb) { - process.nextTick(function () { - cb(null, buf) - }) - return - } - return buf - } - if (cb) { - randombytes(size, function (err, bytes) { - if (err) { - return cb(err) - } - bytes.copy(buf, offset) - cb(null, buf) - }) - return - } - var bytes = randombytes(size) - bytes.copy(buf, offset) - return buf -} -function randomFillSync (buf, offset, size) { - if (typeof offset === 'undefined') { - offset = 0 - } - if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) { - throw new TypeError('"buf" argument must be a Buffer or Uint8Array') - } - - assertOffset(offset, buf.length) - - if (size === undefined) size = buf.length - offset - - assertSize(size, offset, buf.length) - - return actualFill(buf, offset, size) -} diff --git a/node_modules/randomfill/index.js b/node_modules/randomfill/index.js deleted file mode 100644 index e2b5f7a..0000000 --- a/node_modules/randomfill/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var crypto = require('crypto') -if (typeof crypto.randomFill === 'function' && typeof crypto.randomFillSync === 'function') { - exports.randomFill = crypto.randomFill - exports.randomFillSync = crypto.randomFillSync -} else { - module.exports = require('./browser') -} diff --git a/node_modules/randomfill/package.json b/node_modules/randomfill/package.json deleted file mode 100644 index aac02ea..0000000 --- a/node_modules/randomfill/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "randomfill@^1.0.3", - "_id": "randomfill@1.0.4", - "_inBundle": false, - "_integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "_location": "/randomfill", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "randomfill@^1.0.3", - "name": "randomfill", - "escapedName": "randomfill", - "rawSpec": "^1.0.3", - "saveSpec": null, - "fetchSpec": "^1.0.3" - }, - "_requiredBy": [ - "/crypto-browserify" - ], - "_resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "_shasum": "c92196fc86ab42be983f1bf31778224931d61458", - "_spec": "randomfill@^1.0.3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/crypto-browserify", - "author": "", - "browser": "browser.js", - "bugs": { - "url": "https://github.com/crypto-browserify/randomfill/issues" - }, - "bundleDependencies": false, - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - }, - "deprecated": false, - "description": "random fill from browserify stand alone", - "devDependencies": { - "phantomjs": "^1.9.9", - "standard": "^10.0.2", - "tap-spec": "^2.1.2", - "tape": "^4.6.3", - "zuul": "^3.7.2" - }, - "homepage": "https://github.com/crypto-browserify/randomfill", - "keywords": [ - "crypto", - "random" - ], - "license": "MIT", - "main": "index.js", - "name": "randomfill", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/randomfill.git" - }, - "scripts": { - "local": "zuul --local --no-coverage -- test.js", - "phantom": "zuul --phantom -- test.js", - "test": "standard && node test.js | tspec" - }, - "version": "1.0.4" -} diff --git a/node_modules/randomfill/test.js b/node_modules/randomfill/test.js deleted file mode 100644 index eff227c..0000000 --- a/node_modules/randomfill/test.js +++ /dev/null @@ -1,28 +0,0 @@ -var test = require('tape') -var crypto = require('./browser') -var Buffer = require('safe-buffer').Buffer -test('sync', function (t) { - t.test('first', function (t) { - const buf = Buffer.alloc(10) - const before = buf.toString('hex') - crypto.randomFillSync(buf, 5, 5) - const after = buf.toString('hex') - t.notEqual(before, after) - t.equal(before.slice(0, 10), after.slice(0, 10)) - t.end() - }) -}) -test('async', function (t) { - t.test('first', function (t) { - const buf = Buffer.alloc(10) - const before = buf.toString('hex') - crypto.randomFill(buf, 5, 5, function (err, bufa) { - t.error(err) - const after = bufa.toString('hex') - t.notEqual(before, after) - t.equal(before.slice(0, 10), after.slice(0, 10)) - t.ok(buf === bufa, 'same buffer') - t.end() - }) - }) -}) diff --git a/node_modules/read-only-stream/.travis.yml b/node_modules/read-only-stream/.travis.yml deleted file mode 100644 index 9672e12..0000000 --- a/node_modules/read-only-stream/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/read-only-stream/LICENSE b/node_modules/read-only-stream/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/read-only-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-only-stream/example/main.js b/node_modules/read-only-stream/example/main.js deleted file mode 100644 index 22720fe..0000000 --- a/node_modules/read-only-stream/example/main.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('./wrap.js'); -var ro = wrap(); // can't write to `ro` and muck up internal state -ro.pipe(process.stdout); diff --git a/node_modules/read-only-stream/example/wrap.js b/node_modules/read-only-stream/example/wrap.js deleted file mode 100644 index 5586081..0000000 --- a/node_modules/read-only-stream/example/wrap.js +++ /dev/null @@ -1,8 +0,0 @@ -var through = require('through2'); -var readonly = require('../'); - -module.exports = function () { - var stream = through(); - stream.end('wooooo\n'); - return readonly(stream); -}; diff --git a/node_modules/read-only-stream/index.js b/node_modules/read-only-stream/index.js deleted file mode 100644 index 68c495d..0000000 --- a/node_modules/read-only-stream/index.js +++ /dev/null @@ -1,30 +0,0 @@ -var Readable = require('readable-stream').Readable; - -module.exports = function (stream) { - var opts = stream._readableState; - if (typeof stream.read !== 'function') { - stream = new Readable(opts).wrap(stream); - } - - var ro = new Readable({ objectMode: opts && opts.objectMode }); - var waiting = false; - - stream.on('readable', function () { - if (waiting) { - waiting = false; - ro._read(); - } - }); - - ro._read = function () { - var buf, reads = 0; - while ((buf = stream.read()) !== null) { - ro.push(buf); - reads ++; - } - if (reads === 0) waiting = true; - }; - stream.once('end', function () { ro.push(null) }); - stream.on('error', function (err) { ro.emit('error', err) }); - return ro; -}; diff --git a/node_modules/read-only-stream/package.json b/node_modules/read-only-stream/package.json deleted file mode 100644 index 9963da4..0000000 --- a/node_modules/read-only-stream/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "read-only-stream@^2.0.0", - "_id": "read-only-stream@2.0.0", - "_inBundle": false, - "_integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "_location": "/read-only-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "read-only-stream@^2.0.0", - "name": "read-only-stream", - "escapedName": "read-only-stream", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "_shasum": "2724fd6a8113d73764ac288d4386270c1dbf17f0", - "_spec": "read-only-stream@^2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/read-only-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "^2.0.2" - }, - "deprecated": false, - "description": "wrap a readable/writable stream to be read-only", - "devDependencies": { - "concat-stream": "^1.4.6", - "covert": "^1.0.0", - "tape": "^4.2.0", - "through": "^2.3.4", - "through2": "^2.0.0" - }, - "homepage": "https://github.com/substack/read-only-stream", - "keywords": [ - "stream", - "readonly" - ], - "license": "MIT", - "main": "index.js", - "name": "read-only-stream", - "repository": { - "type": "git", - "url": "git://github.com/substack/read-only-stream.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tape test/*.js" - }, - "version": "2.0.0" -} diff --git a/node_modules/read-only-stream/readme.markdown b/node_modules/read-only-stream/readme.markdown deleted file mode 100644 index 05e6a9d..0000000 --- a/node_modules/read-only-stream/readme.markdown +++ /dev/null @@ -1,60 +0,0 @@ -# read-only-stream - -wrap a readable/writable stream to be read-only -to prevent mucking up the input side - -[![build status](https://secure.travis-ci.org/substack/read-only-stream.png)](http://travis-ci.org/substack/read-only-stream) - -# example - -Suppose you have a module that uses a readable/writable stream internally but -want to expose just the readable part of that internal stream. This is common if -you use the writable side internally and expose the readable side as the -interface. - -Now we can write some code like this with a `through` stream internally for -convenience: - -``` js -var through = require('through2'); -var readonly = require('read-only-stream'); - -module.exports = function () { - var stream = through(); - stream.end('wooooo\n'); - return readonly(stream); -}; -``` - -but consumers won't be able to write to the input side and break the api: - -``` js -var wrap = require('./wrap.js'); -var ro = wrap(); // can't write to `ro` and muck up internal state -ro.pipe(process.stdout); -``` - -# methods - -``` js -var readonly = require('read-only-stream') -``` - -## var ro = readonly(stream) - -Return a readable stream `ro` that wraps the readable/writable `stream` argument -given to only expose the readable side. - -`stream` can be a streams1 or streams2 stream. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install read-only-stream -``` - -# license - -MIT diff --git a/node_modules/read-only-stream/test/error.js b/node_modules/read-only-stream/test/error.js deleted file mode 100644 index e53447c..0000000 --- a/node_modules/read-only-stream/test/error.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through2'); - -test('error', function (t) { - t.plan(1); - - var stream = through(); - var ro = readonly(stream); - - ro.on('error', function (err) { - t.ok(err); - }); - stream.emit('error', new Error); -}); diff --git a/node_modules/read-only-stream/test/ro.js b/node_modules/read-only-stream/test/ro.js deleted file mode 100644 index b7f4a55..0000000 --- a/node_modules/read-only-stream/test/ro.js +++ /dev/null @@ -1,22 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through2'); -var concat = require('concat-stream'); - -test('readonly', function (t) { - t.plan(2); - - var stream = through(); - stream.write('woo'); - - var ro = readonly(stream); - ro.pipe(concat(function (body) { - t.equal(body.toString('utf8'), 'woo'); - })); - - t.throws(function () { - ro.write('beep'); - }); - - stream.end(); -}); diff --git a/node_modules/read-only-stream/test/streams1.js b/node_modules/read-only-stream/test/streams1.js deleted file mode 100644 index dfe408f..0000000 --- a/node_modules/read-only-stream/test/streams1.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require('tape'); -var readonly = require('../'); -var through = require('through'); -var concat = require('concat-stream'); - -test('streams1', function (t) { - t.plan(2); - - var stream = through(); - - var ro = readonly(stream); - ro.pipe(concat(function (body) { - t.equal(body.toString('utf8'), 'woo'); - })); - - t.throws(function () { - ro.write('beep'); - }); - - stream.end('woo'); -}); diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 4099255..0000000 --- a/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58..0000000 --- a/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93..0000000 --- a/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b..0000000 --- a/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3..0000000 --- a/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f1..0000000 --- a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/readable-stream/duplex-browser.js b/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db8..0000000 --- a/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cb..0000000 --- a/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a1ca813..0000000 --- a/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index a9c8358..0000000 --- a/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index bf34ac6..0000000 --- a/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 5d1f8b8..0000000 --- a/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b3f4e85..0000000 --- a/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68b..0000000 --- a/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d8..0000000 --- a/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3f..0000000 --- a/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b..0000000 --- a/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/readable-stream/node_modules/safe-buffer/LICENSE b/node_modules/readable-stream/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/node_modules/readable-stream/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/readable-stream/node_modules/safe-buffer/README.md b/node_modules/readable-stream/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81af..0000000 --- a/node_modules/readable-stream/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/readable-stream/node_modules/safe-buffer/index.d.ts b/node_modules/readable-stream/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed80..0000000 --- a/node_modules/readable-stream/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/readable-stream/node_modules/safe-buffer/index.js b/node_modules/readable-stream/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438da..0000000 --- a/node_modules/readable-stream/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/readable-stream/node_modules/safe-buffer/package.json b/node_modules/readable-stream/node_modules/safe-buffer/package.json deleted file mode 100644 index 7a75c6b..0000000 --- a/node_modules/readable-stream/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/readable-stream/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/readable-stream", - "/readable-stream/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/readable-stream/node_modules/string_decoder/.travis.yml b/node_modules/readable-stream/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a72..0000000 --- a/node_modules/readable-stream/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb2..0000000 --- a/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd5831..0000000 --- a/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js b/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63..0000000 --- a/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index b8acd55..0000000 --- a/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/readable-stream/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json deleted file mode 100644 index 9b83dec..0000000 --- a/node_modules/readable-stream/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_from": "readable-stream@^2.0.2", - "_id": "readable-stream@2.3.6", - "_inBundle": false, - "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "_location": "/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.0.2", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.0.2", - "saveSpec": null, - "fetchSpec": "^2.0.2" - }, - "_requiredBy": [ - "/browserify", - "/concat-stream", - "/duplexer2", - "/module-deps", - "/read-only-stream", - "/stream-browserify", - "/stream-combiner2", - "/stream-splicer", - "/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf", - "_spec": "readable-stream@^2.0.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.6" -} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d..0000000 --- a/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e503725..0000000 --- a/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec5..0000000 --- a/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba2..0000000 --- a/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/readable-stream/writable-browser.js b/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a..0000000 --- a/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f..0000000 --- a/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/readline/.npmignore b/node_modules/readline/.npmignore deleted file mode 100644 index 1ca9571..0000000 --- a/node_modules/readline/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log diff --git a/node_modules/readline/README.md b/node_modules/readline/README.md deleted file mode 100644 index 88a116d..0000000 --- a/node_modules/readline/README.md +++ /dev/null @@ -1,66 +0,0 @@ -## _readline_ -> Read a file line by line. - -## Install - -## Important. In node 10 there is a core module named readline. Please use linebyline instead, it is the same module just renamed: -[Npm linebyline](https://www.npmjs.com/package/linebyline) - -```sh -npm install linebyline -``` - -## Test -```sh -npm install . -npm test - -``` - - -## What's this? - -Simple streaming readline module for NodeJS. Reads a file and buffers new lines emitting a _line_ event for each line. - -## Usage -### Simple -```js - var readline = require('linebyline'), - rl = readline('./somefile.txt'); - rl.on('line', function(line, lineCount, byteCount) { - // do something with the line of text - }) - .on('error', function(e) { - // something went wrong - }); -``` - -### ASCII file decoding -As the underlying `fs.createReadStream` doesn't care about the specific ASCII encoding of the file, an alternative way to decode the file is by telling the `readline` library to retain buffer and then decoding it using a converter (e.g. [`iconv-lite`](https://www.npmjs.com/package/iconv-lite)). -```js - var readline = require('linebyline'), - rl = readline('./file-in-win1251.txt', { - retainBuffer: true //tell readline to retain buffer - }); - rl.on("line", function (data,linecount){ - var line = iconv.decode(data, 'win1251'); - // do something with the line of converted text - }); -``` -##API -## readLine(readingObject[, options]) -### Params: - -* `readingObject` - file path or stream object -* `options` can include: - * `maxLineLength` - override the default 4K buffer size (lines longer than this will not be read) - * `retainBuffer` - avoid converting to String prior to emitting 'line' event; will pass raw buffer with encoded data to the callback - -### Return: - -* **EventEmitter** - - -## License - -BSD © [Craig Brookes](http://craigbrookes.com/) diff --git a/node_modules/readline/package.json b/node_modules/readline/package.json deleted file mode 100644 index 285880d..0000000 --- a/node_modules/readline/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "readline@^1.3.0", - "_id": "readline@1.3.0", - "_inBundle": false, - "_integrity": "sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw=", - "_location": "/readline", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readline@^1.3.0", - "name": "readline", - "escapedName": "readline", - "rawSpec": "^1.3.0", - "saveSpec": null, - "fetchSpec": "^1.3.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", - "_shasum": "c580d77ef2cfc8752b132498060dc9793a7ac01c", - "_spec": "readline@^1.3.0", - "_where": "/Users/heekyun/Kadena/transfer", - "author": { - "name": "craig brookes" - }, - "bugs": { - "url": "https://github.com/maleck13/readline/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Simple streaming readline module.", - "devDependencies": { - "iconv-lite": "0.4.13", - "tap": "0.4.3" - }, - "homepage": "https://github.com/maleck13/readline#readme", - "keywords": [ - "readline", - "line by line", - "file" - ], - "license": "BSD", - "main": "readline.js", - "name": "readline", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/maleck13/readline.git" - }, - "scripts": { - "test": "tap --tap --stderr --timeout=120 test/*.js" - }, - "version": "1.3.0" -} diff --git a/node_modules/readline/readline.js b/node_modules/readline/readline.js deleted file mode 100644 index e11a7a5..0000000 --- a/node_modules/readline/readline.js +++ /dev/null @@ -1,60 +0,0 @@ -var fs = require('fs'), - EventEmitter = require('events').EventEmitter, - util = require('util'); - -var readLine = module.exports = function(file, opts) { - if (!(this instanceof readLine)) return new readLine(file, opts); - - EventEmitter.call(this); - opts = opts || {}; - opts.maxLineLength = opts.maxLineLength || 4096; // 4K - opts.retainBuffer = !!opts.retainBuffer; //do not convert to String prior to invoking emit 'line' event - var self = this, - lineBuffer = new Buffer(opts.maxLineLength), - lineLength = 0, - lineCount = 0, - byteCount = 0, - emit = function(lineCount, byteCount) { - try { - var line = lineBuffer.slice(0, lineLength); - self.emit('line', opts.retainBuffer? line : line.toString(), lineCount, byteCount); - } catch (err) { - self.emit('error', err); - } finally { - lineLength = 0; // Empty buffer. - } - }; - this.input = ('string' === typeof file) ? fs.createReadStream(file, opts) : file; - this.input.on('open', function(fd) { - self.emit('open', fd); - }) - .on('data', function(data) { - for (var i = 0; i < data.length; i++) { - if (data[i] == 10 || data[i] == 13) { // Newline char was found. - if (data[i] == 10) { - lineCount++; - emit(lineCount, byteCount); - } - } else { - lineBuffer[lineLength] = data[i]; // Buffer new line data. - lineLength++; - } - byteCount++; - } - }) - .on('error', function(err) { - self.emit('error', err); - }) - .on('end', function() { - // Emit last line if anything left over since EOF won't trigger it. - if (lineLength) { - lineCount++; - emit(lineCount, byteCount); - } - self.emit('end'); - }) - .on('close', function() { - self.emit('close'); - }); -}; -util.inherits(readLine, EventEmitter); diff --git a/node_modules/readline/test/fixtures/afile.txt b/node_modules/readline/test/fixtures/afile.txt deleted file mode 100644 index 08f8b67..0000000 --- a/node_modules/readline/test/fixtures/afile.txt +++ /dev/null @@ -1,39773 +0,0 @@ -The Project Gutenberg EBook of The Adventures of Sherlock Holmes -by Sir Arthur Conan Doyle -(#15 in our series by Sir Arthur Conan Doyle) - -Copyright laws are changing all over the world. Be sure to check the -copyright laws for your country before downloading or redistributing -this or any other Project Gutenberg eBook. - -This header should be the first thing seen when viewing this Project -Gutenberg file. Please do not remove it. Do not change or edit the -header without written permission. - -Please read the "legal small print," and other information about the -eBook and Project Gutenberg at the bottom of this file. Included is -important information about your specific rights and restrictions in -how the file may be used. You can also find out about how to make a -donation to Project Gutenberg, and how to get involved. - - -**Welcome To The World of Free Plain Vanilla Electronic Texts** - -**eBooks Readable By Both Humans and By Computers, Since 1971** - -*****These eBooks Were Prepared By Thousands of Volunteers!***** - - -Title: The Adventures of Sherlock Holmes - -Author: Sir Arthur Conan Doyle - -Release Date: March, 1999 [EBook #1661] -[Most recently updated: November 29, 2002] - -Edition: 12 - -Language: English - -Character set encoding: ASCII - -*** START OF THE PROJECT GUTENBERG EBOOK, THE ADVENTURES OF SHERLOCK HOLMES *** - - - - -(Additional editing by Jose Menendez) - - - -THE ADVENTURES OF -SHERLOCK HOLMES - -BY - -SIR ARTHUR CONAN DOYLE - -CONTENTS - -I. A Scandal in Bohemia -II. The Red-Headed League -III. A Case of Identity -IV. The Boscombe Valley Mystery -V. The Five Orange Pips -VI. The Man with the Twisted Lip -VII. The Adventure of the Blue Carbuncle -VIII. The Adventure of the Speckled Band -IX. The Adventure of the Engineer's Thumb -X. The Adventure of the Noble Bachelor -XI. The Adventure of the Beryl Coronet -XII. The Adventure of the Copper Beeches - - -ADVENTURE I. A SCANDAL IN BOHEMIA - -I. - - -To Sherlock Holmes she is always the woman. I have seldom heard him mention her under any other name. In his eyes she eclipses and predominates the whole of her sex. It was not that he felt any emotion akin to love for Irene Adler. All emotions, and that one particularly, were abhorrent to his cold, precise but admirably balanced mind. He was, I take it, the most perfect reasoning and observing machine that the world has seen, but as a lover he would have placed himself in a false position. He never spoke of the softer passions, save with a gibe and a sneer. They were admirable things for the observer--excellent for drawing the veil from men's motives and actions. But for the trained reasoner to admit such intrusions into his own delicate and finely adjusted temperament was to introduce a distracting factor which might throw a doubt upon all his mental results. Grit in a sensitive instrument, or a crack in one of his own high-power lenses, would not be more disturbing than a strong emotion in a nature such as his. And yet there was but one woman to him, and that woman was the late Irene Adler, of dubious and questionable memory. - -I had seen little of Holmes lately. My marriage had drifted us away from each other. My own complete happiness, and the home-centred interests which rise up around the man who first finds himself master of his own establishment, were sufficient to absorb all my attention, while Holmes, who loathed every form of society with his whole Bohemian soul, remained in our lodgings in Baker Street, buried among his old books, and alternating from week to week between cocaine and ambition, the drowsiness of the drug, and the fierce energy of his own keen nature. He was still, as ever, deeply attracted by the study of crime, and occupied his immense faculties and extraordinary powers of observation in following out those clues, and clearing up those mysteries which had been abandoned as hopeless by the official police. From time to time I heard some vague account of his doings: of his summons to Odessa in the case of the Trepoff murder, of his clearing up of the singular tragedy of the Atkinson brothers at Trincomalee, and finally of the mission which he had accomplished so delicately and successfully for the reigning family of Holland. Beyond these signs of his activity, however, which I merely shared with all the readers of the daily press, I knew little of my former friend and companion. - -One night--it was on the twentieth of March, 1888--I was returning from a journey to a patient (for I had now returned to civil practice), when my way led me through Baker Street. As I passed the well-remembered door, which must always be associated in my mind with my wooing, and with the dark incidents of the Study in Scarlet, I was seized with a keen desire to see Holmes again, and to know how he was employing his extraordinary powers. His rooms were brilliantly lit, and, even as I looked up, I saw his tall, spare figure pass twice in a dark silhouette against the blind. He was pacing the room swiftly, eagerly, with his head sunk upon his chest and his hands clasped behind him. To me, who knew his every mood and habit, his attitude and manner told their own story. He was at work again. He had risen out of his drug-created dreams and was hot upon the scent of some new problem. I rang the bell and was shown up to the chamber which had formerly been in part my own. - -His manner was not effusive. It seldom was; but he was glad, I think, to see me. With hardly a word spoken, but with a kindly eye, he waved me to an armchair, threw across his case of cigars, and indicated a spirit case and a gasogene in the corner. Then he stood before the fire and looked me over in his singular introspective fashion. - -"Wedlock suits you," he remarked. "I think, Watson, that you have put on seven and a half pounds since I saw you." - -"Seven!" I answered. - -"Indeed, I should have thought a little more. Just a trifle more, I fancy, Watson. And in practice again, I observe. You did not tell me that you intended to go into harness." - -"Then, how do you know?" - -"I see it, I deduce it. How do I know that you have been getting yourself very wet lately, and that you have a most clumsy and careless servant girl?" - -"My dear Holmes," said I, "this is too much. You would certainly have been burned, had you lived a few centuries ago. It is true that I had a country walk on Thursday and came home in a dreadful mess, but as I have changed my clothes I can't imagine how you deduce it. As to Mary Jane, she is incorrigible, and my wife has given her notice, but there, again, I fail to see how you work it out." - -He chuckled to himself and rubbed his long, nervous hands together. - -"It is simplicity itself," said he; "my eyes tell me that on the inside of your left shoe, just where the firelight strikes it, the leather is scored by six almost parallel cuts. Obviously they have been caused by someone who has very carelessly scraped round the edges of the sole in order to remove crusted mud from it. Hence, you see, my double deduction that you had been out in vile weather, and that you had a particularly malignant boot-slitting specimen of the London slavey. As to your practice, if a gentleman walks into my rooms smelling of iodoform, with a black mark of nitrate of silver upon his right forefinger, and a bulge on the right side of his top-hat to show where he has secreted his stethoscope, I must be dull, indeed, if I do not pronounce him to be an active member of the medical profession." - -I could not help laughing at the ease with which he explained his process of deduction. "When I hear you give your reasons," I remarked, "the thing always appears to me to be so ridiculously simple that I could easily do it myself, though at each successive instance of your reasoning I am baffled until you explain your process. And yet I believe that my eyes are as good as yours." - -"Quite so," he answered, lighting a cigarette, and throwing himself down into an armchair. "You see, but you do not observe. The distinction is clear. For example, you have frequently seen the steps which lead up from the hall to this room." - -"Frequently." - -"How often?" - -"Well, some hundreds of times." - -"Then how many are there?" - -"How many? I don't know." - -"Quite so! You have not observed. And yet you have seen. That is just my point. Now, I know that there are seventeen steps, because I have both seen and observed. By the way, since you are interested in these little problems, and since you are good enough to chronicle one or two of my trifling experiences, you may be interested in this." He threw over a sheet of thick, pink-tinted notepaper which had been lying open upon the table. "It came by the last post," said he. "Read it aloud." - -The note was undated, and without either signature or address. - -"There will call upon you to-night, at a quarter to eight o'clock," it said, "a gentleman who desires to consult you upon a matter of the very deepest moment. Your recent services to one of the royal houses of Europe have shown that you are one who may safely be trusted with matters which are of an importance which can hardly be exaggerated. This account of you we have from all quarters received. Be in your chamber then at that hour, and do not take it amiss if your visitor wear a mask." - -"This is indeed a mystery," I remarked. "What do you imagine that it means?" - -"I have no data yet. It is a capital mistake to theorise before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts. But the note itself. What do you deduce from it?" - -I carefully examined the writing, and the paper upon which it was written. - -"The man who wrote it was presumably well to do," I remarked, endeavouring to imitate my companion's processes. "Such paper could not be bought under half a crown a packet. It is peculiarly strong and stiff." - -"Peculiar--that is the very word," said Holmes. "It is not an English paper at all. Hold it up to the light." - -I did so, and saw a large "E" with a small "g," a "P," and a large "G" with a small "t" woven into the texture of the paper. - -"What do you make of that?" asked Holmes. - -"The name of the maker, no doubt; or his monogram, rather." - -"Not at all. The 'G' with the small 't' stands for 'Gesellschaft,' which is the German for 'Company.' It is a customary contraction like our 'Co.' 'P,' of course, stands for 'Papier.' Now for the 'Eg.' Let us glance at our Continental Gazetteer." He took down a heavy brown volume from his shelves. "Eglow, Eglonitz--here we are, Egria. It is in a German-speaking country--in Bohemia, not far from Carlsbad. 'Remarkable as being the scene of the death of Wallenstein, and for its numerous glass-factories and paper-mills.' Ha, ha, my boy, what do you make of that?" His eyes sparkled, and he sent up a great blue triumphant cloud from his cigarette. - -"The paper was made in Bohemia," I said. - -"Precisely. And the man who wrote the note is a German. Do you note the peculiar construction of the sentence--'This account of you we have from all quarters received.' A Frenchman or Russian could not have written that. It is the German who is so uncourteous to his verbs. It only remains, therefore, to discover what is wanted by this German who writes upon Bohemian paper and prefers wearing a mask to showing his face. And here he comes, if I am not mistaken, to resolve all our doubts." - -As he spoke there was the sharp sound of horses' hoofs and grating wheels against the curb, followed by a sharp pull at the bell. Holmes whistled. - -"A pair, by the sound," said he. "Yes," he continued, glancing out of the window. "A nice little brougham and a pair of beauties. A hundred and fifty guineas apiece. There's money in this case, Watson, if there is nothing else." - -"I think that I had better go, Holmes." - -"Not a bit, Doctor. Stay where you are. I am lost without my Boswell. And this promises to be interesting. It would be a pity to miss it." - -"But your client--" - -"Never mind him. I may want your help, and so may he. Here he comes. Sit down in that armchair, Doctor, and give us your best attention." - -A slow and heavy step, which had been heard upon the stairs and in the passage, paused immediately outside the door. Then there was a loud and authoritative tap. - -"Come in!" said Holmes. - -A man entered who could hardly have been less than six feet six inches in height, with the chest and limbs of a Hercules. His dress was rich with a richness which would, in England, be looked upon as akin to bad taste. Heavy bands of astrakhan were slashed across the sleeves and fronts of his double-breasted coat, while the deep blue cloak which was thrown over his shoulders was lined with flame-coloured silk and secured at the neck with a brooch which consisted of a single flaming beryl. Boots which extended halfway up his calves, and which were trimmed at the tops with rich brown fur, completed the impression of barbaric opulence which was suggested by his whole appearance. He carried a broad-brimmed hat in his hand, while he wore across the upper part of his face, extending down past the cheekbones, a black vizard mask, which he had apparently adjusted that very moment, for his hand was still raised to it as he entered. From the lower part of the face he appeared to be a man of strong character, with a thick, hanging lip, and a long, straight chin suggestive of resolution pushed to the length of obstinacy. - -"You had my note?" he asked with a deep harsh voice and a strongly marked German accent. "I told you that I would call." He looked from one to the other of us, as if uncertain which to address. - -"Pray take a seat," said Holmes. "This is my friend and colleague, Dr. Watson, who is occasionally good enough to help me in my cases. Whom have I the honour to address?" - -"You may address me as the Count Von Kramm, a Bohemian nobleman. I understand that this gentleman, your friend, is a man of honour and discretion, whom I may trust with a matter of the most extreme importance. If not, I should much prefer to communicate with you alone." - -I rose to go, but Holmes caught me by the wrist and pushed me back into my chair. "It is both, or none," said he. "You may say before this gentleman anything which you may say to me." - -The Count shrugged his broad shoulders. "Then I must begin," said he, "by binding you both to absolute secrecy for two years; at the end of that time the matter will be of no importance. At present it is not too much to say that it is of such weight it may have an influence upon European history." - -"I promise," said Holmes. - -"And I." - -"You will excuse this mask," continued our strange visitor. "The august person who employs me wishes his agent to be unknown to you, and I may confess at once that the title by which I have just called myself is not exactly my own." - -"I was aware of it," said Holmes dryly. - -"The circumstances are of great delicacy, and every precaution has to be taken to quench what might grow to be an immense scandal and seriously compromise one of the reigning families of Europe. To speak plainly, the matter implicates the great House of Ormstein, hereditary kings of Bohemia." - -"I was also aware of that," murmured Holmes, settling himself down in his armchair and closing his eyes. - -Our visitor glanced with some apparent surprise at the languid, lounging figure of the man who had been no doubt depicted to him as the most incisive reasoner and most energetic agent in Europe. Holmes slowly reopened his eyes and looked impatiently at his gigantic client. - -"If your Majesty would condescend to state your case," he remarked, "I should be better able to advise you." - -The man sprang from his chair and paced up and down the room in uncontrollable agitation. Then, with a gesture of desperation, he tore the mask from his face and hurled it upon the ground. "You are right," he cried; "I am the King. Why should I attempt to conceal it?" - -"Why, indeed?" murmured Holmes. "Your Majesty had not spoken before I was aware that I was addressing Wilhelm Gottsreich Sigismond von Ormstein, Grand Duke of Cassel-Felstein, and hereditary King of Bohemia." - -"But you can understand," said our strange visitor, sitting down once more and passing his hand over his high white forehead, "you can understand that I am not accustomed to doing such business in my own person. Yet the matter was so delicate that I could not confide it to an agent without putting myself in his power. I have come incognito from Prague for the purpose of consulting you." - -"Then, pray consult," said Holmes, shutting his eyes once more. - -"The facts are briefly these: Some five years ago, during a lengthy visit to Warsaw, I made the acquaintance of the well-known adventuress, Irene Adler. The name is no doubt familiar to you." - -"Kindly look her up in my index, Doctor," murmured Holmes without opening his eyes. For many years he had adopted a system of docketing all paragraphs concerning men and things, so that it was difficult to name a subject or a person on which he could not at once furnish information. In this case I found her biography sandwiched in between that of a Hebrew rabbi and that of a staff-commander who had written a monograph upon the deep-sea fishes. - -"Let me see!" said Holmes. "Hum! Born in New Jersey in the year 1858. Contralto--hum! La Scala, hum! Prima donna Imperial Opera of Warsaw--yes! Retired from operatic stage--ha! Living in London--quite so! Your Majesty, as I understand, became entangled with this young person, wrote her some compromising letters, and is now desirous of getting those letters back." - -"Precisely so. But how--" - -"Was there a secret marriage?" - -"None." - -"No legal papers or certificates?" - -"None." - -"Then I fail to follow your Majesty. If this young person should produce her letters for blackmailing or other purposes, how is she to prove their authenticity?" - -"There is the writing." - -"Pooh, pooh! Forgery." - -"My private note-paper." - -"Stolen." - -"My own seal." - -"Imitated." - -"My photograph." - -"Bought." - -"We were both in the photograph." - -"Oh, dear! That is very bad! Your Majesty has indeed committed an indiscretion." - -"I was mad--insane." - -"You have compromised yourself seriously." - -"I was only Crown Prince then. I was young. I am but thirty now." - -"It must be recovered." - -"We have tried and failed." - -"Your Majesty must pay. It must be bought." - -"She will not sell." - -"Stolen, then." - -"Five attempts have been made. Twice burglars in my pay ransacked her house. Once we diverted her luggage when she travelled. Twice she has been waylaid. There has been no result." - - - -"On the contrary, Watson, you can see everything. You fail, however, to reason from what you see. You are too timid in drawing your inferences." - -"Then, pray tell me what it is that you can infer from this hat?" - -He picked it up and gazed at it in the peculiar introspective fashion which was characteristic of him. "It is perhaps less suggestive than it might have been," he remarked, "and yet there are a few inferences which are very distinct, and a few others which represent at least a strong balance of probability. That the man was highly intellectual is of course obvious upon the face of it, and also that he was fairly well-to-do within the last three years, although he has now fallen upon evil days. He had foresight, but has less now than formerly, pointing to a moral retrogression, which, when taken with the decline of his fortunes, seems to indicate some evil influence, probably drink, at work upon him. This may account also for the obvious fact that his wife has ceased to love him." - -"My dear Holmes!" - -"He has, however, retained some degree of self-respect," he continued, disregarding my remonstrance. "He is a man who leads a sedentary life, goes out little, is out of training entirely, is middle-aged, has grizzled hair which he has had cut within the last few days, and which he anoints with lime-cream. These are the more patent facts which are to be deduced from his hat. Also, by the way, that it is extremely improbable that he has gas laid on in his house." - -"You are certainly joking, Holmes." - -"Not in the least. Is it possible that even now, when I give you these results, you are unable to see how they are attained?" - -"I have no doubt that I am very stupid, but I must confess that I am unable to follow you. For example, how did you deduce that this man was intellectual?" - -For answer Holmes clapped the hat upon his head. It came right over the forehead and settled upon the bridge of his nose. "It is a question of cubic capacity," said he; "a man with so large a brain must have something in it." - -"The decline of his fortunes, then?" - -"This hat is three years old. These flat brims curled at the edge came in then. It is a hat of the very best quality. Look at the band of ribbed silk and the excellent lining. If this man could afford to buy so expensive a hat three years ago, and has had no hat since, then he has assuredly gone down in the world." - -"Well, that is clear enough, certainly. But how about the foresight and the moral retrogression?" - -Sherlock Holmes laughed. "Here is the foresight," said he putting his finger upon the little disc and loop of the hat-securer. "They are never sold upon hats. If this man ordered one, it is a sign of a certain amount of foresight, since he went out of his way to take this precaution against the wind. But since we see that he has broken the elastic and has not troubled to replace it, it is obvious that he has less foresight now than formerly, which is a distinct proof of a weakening nature. On the other hand, he has endeavoured to conceal some of these stains upon the felt by daubing them with ink, which is a sign that he has not entirely lost his self-respect." - -"Your reasoning is certainly plausible." - -"The further points, that he is middle-aged, that his hair is grizzled, that it has been recently cut, and that he uses lime-cream, are all to be gathered from a close examination of the lower part of the lining. The lens discloses a large number of hair-ends, clean cut by the scissors of the barber. They all appear to be adhesive, and there is a distinct odour of lime-cream. This dust, you will observe, is not the gritty, grey dust of the street but the fluffy brown dust of the house, showing that it has been hung up indoors most of the time, while the marks of moisture upon the inside are proof positive that the wearer perspired very freely, and could therefore, hardly be in the best of training." - -"But his wife--you said that she had ceased to love him." - -"This hat has not been brushed for weeks. When I see you, my dear Watson, with a week's accumulation of dust upon your hat, and when your wife allows you to go out in such a state, I shall fear that you also have been unfortunate enough to lose your wife's affection." - -"But he might be a bachelor." - -"Nay, he was bringing home the goose as a peace-offering to his wife. Remember the card upon the bird's leg." - -"You have an answer to everything. But how on earth do you deduce that the gas is not laid on in his house?" - -"One tallow stain, or even two, might come by chance; but when I see no less than five, I think that there can be little doubt that the individual must be brought into frequent contact with burning tallow--walks upstairs at night probably with his hat in one hand and a guttering candle in the other. Anyhow, he never got tallow-stains from a gas-jet. Are you satisfied?" - -"Well, it is very ingenious," said I, laughing; "but since, as you said just now, there has been no crime committed, and no harm done save the loss of a goose, all this seems to be rather a waste of energy." - -Sherlock Holmes had opened his mouth to reply, when the door flew open, and Peterson, the commissionaire, rushed into the apartment with flushed cheeks and the face of a man who is dazed with astonishment. - -"The goose, Mr. Holmes! The goose, sir!" he gasped. - -"Eh? What of it, then? Has it returned to life and flapped off through the kitchen window?" Holmes twisted himself round upon the sofa to get a fairer view of the man's excited face. - -"See here, sir! See what my wife found in its crop!" He held out his hand and displayed upon the centre of the palm a brilliantly scintillating blue stone, rather smaller than a bean in size, but of such purity and radiance that it twinkled like an electric point in the dark hollow of his hand. - -Sherlock Holmes sat up with a whistle. "By Jove, Peterson!" said he, "this is treasure trove indeed. I suppose you know what you have got?" - -"A diamond, sir? A precious stone. It cuts into glass as though it were putty." - -"It's more than a precious stone. It is the precious stone." - -"Not the Countess of Morcar's blue carbuncle!" I ejaculated. - -"Precisely so. I ought to know its size and shape, seeing that I have read the advertisement about it in The Times every day lately. It is absolutely unique, and its value can only be conjectured, but the reward offered of $1000 is certainly not within a twentieth part of the market price." - -"A thousand pounds! Great Lord of mercy!" The commissionaire plumped down into a chair and stared from one to the other of us. - -"That is the reward, and I have reason to know that there are sentimental considerations in the background which would induce the Countess to part with half her fortune if she could but recover the gem." - -"It was lost, if I remember aright, at the Hotel Cosmopolitan," I remarked. - -"Precisely so, on December 22nd, just five days ago. John Horner, a plumber, was accused of having abstracted it from the lady's jewel-case. The evidence against him was so strong that the case has been referred to the Assizes. I have some account of the matter here, I believe." He rummaged amid his newspapers, glancing over the dates, until at last he smoothed one out, doubled it over, and read the following paragraph: - -"Hotel Cosmopolitan Jewel Robbery. John Horner, 26, plumber, was brought up upon the charge of having upon the 22nd inst., abstracted from the jewel-case of the Countess of Morcar the valuable gem known as the blue carbuncle. James Ryder, upper-attendant at the hotel, gave his evidence to the effect that he had shown Horner up to the dressing-room of the Countess of Morcar upon the day of the robbery in order that he might solder the second bar of the grate, which was loose. He had remained with Horner some little time, but had finally been called away. On returning, he found that Horner had disappeared, that the bureau had been forced open, and that the small morocco casket in which, as it afterwards transpired, the Countess was accustomed to keep her jewel, was lying empty upon the dressing-table. Ryder instantly gave the alarm, and Horner was arrested the same evening; but the stone could not be found either upon his person or in his rooms. Catherine Cusack, maid to the Countess, deposed to having heard Ryder's cry of dismay on discovering the robbery, and to having rushed into the room, where she found matters as described by the last witness. Inspector Bradstreet, B division, gave evidence as to the arrest of Horner, who struggled frantically, and protested his innocence in the strongest terms. Evidence of a previous conviction for robbery having been given against the prisoner, the magistrate refused to deal summarily with the offence, but referred it to the Assizes. Horner, who had shown signs of intense emotion during the proceedings, fainted away at the conclusion and was carried out of court." - -"Hum! So much for the police-court," said Holmes thoughtfully, tossing aside the paper. "The question for us now to solve is the sequence of events leading from a rifled jewel-case at one end to the crop of a goose in Tottenham Court Road at the other. You see, Watson, our little deductions have suddenly assumed a much more important and less innocent aspect. Here is the stone; the stone came from the goose, and the goose came from Mr. Henry Baker, the gentleman with the bad hat and all the other characteristics with which I have bored you. So now we must set ourselves very seriously to finding this gentleman and ascertaining what part he has played in this little mystery. To do this, we must try the simplest means first, and these lie undoubtedly in an advertisement in all the evening papers. If this fail, I shall have recourse to other methods." - -"What will you say?" - -"Give me a pencil and that slip of paper. Now, then: 'Found at the corner of Goodge Street, a goose and a black felt hat. Mr. Henry Baker can have the same by applying at 6:30 this evening at 221B, Baker Street.' That is clear and concise." - -"Very. But will he see it?" - -"Well, he is sure to keep an eye on the papers, since, to a poor man, the loss was a heavy one. He was clearly so scared by his mischance in breaking the window and by the approach of Peterson that he thought of nothing but flight, but since then he must have bitterly regretted the impulse which caused him to drop his bird. Then, again, the introduction of his name will cause him to see it, for everyone who knows him will direct his attention to it. Here you are, Peterson, run down to the advertising agency and have this put in the evening papers." - -"In which, sir?" - -"Oh, in the Globe, Star, Pall Mall, St. James's, Evening News, Standard, Echo, and any others that occur to you." - -"Very well, sir. And this stone?" - -"Ah, yes, I shall keep the stone. Thank you. And, I say, Peterson, just buy a goose on your way back and leave it here with me, for we must have one to give to this gentleman in place of the one which your family is now devouring." - -When the commissionaire had gone, Holmes took up the stone and held it against the light. "It's a bonny thing," said he. "Just see how it glints and sparkles. Of course it is a nucleus and focus of crime. Every good stone is. They are the devil's pet baits. In the larger and older jewels every facet may stand for a bloody deed. This stone is not yet twenty years old. It was found in the banks of the Amoy River in southern China and is remarkable in having every characteristic of the carbuncle, save that it is blue in shade instead of ruby red. In spite of its youth, it has already a sinister history. There have been two murders, a vitriol-throwing, a suicide, and several robberies brought about for the sake of this forty-grain weight of crystallised charcoal. Who would think that so pretty a toy would be a purveyor to the gallows and the prison? I'll lock it up in my strong box now and drop a line to the Countess to say that we have it." - -"Do you think that this man Horner is innocent?" - -"I cannot tell." - -"Well, then, do you imagine that this other one, Henry Baker, had anything to do with the matter?" - -"It is, I think, much more likely that Henry Baker is an absolutely innocent man, who had no idea that the bird which he was carrying was of considerably more value than if it were made of solid gold. That, however, I shall determine by a very simple test if we have an answer to our advertisement." - -"And you can do nothing until then?" - -"Nothing." - -"In that case I shall continue my professional round. But I shall come back in the evening at the hour you have mentioned, for I should like to see the solution of so tangled a business." - -"Very glad to see you. I dine at seven. There is a woodcock, I believe. By the way, in view of recent occurrences, perhaps I ought to ask Mrs. Hudson to examine its crop." - -I had been delayed at a case, and it was a little after half-past six when I found myself in Baker Street once more. As I approached the house I saw a tall man in a Scotch bonnet with a coat which was buttoned up to his chin waiting outside in the bright semicircle which was thrown from the fanlight. Just as I arrived the door was opened, and we were shown up together to Holmes' room. - -"Mr. Henry Baker, I believe," said he, rising from his armchair and greeting his visitor with the easy air of geniality which he could so readily assume. "Pray take this chair by the fire, Mr. Baker. It is a cold night, and I observe that your circulation is more adapted for summer than for winter. Ah, Watson, you have just come at the right time. Is that your hat, Mr. Baker?" - -"Yes, sir, that is undoubtedly my hat." - -He was a large man with rounded shoulders, a massive head, and a broad, intelligent face, sloping down to a pointed beard of grizzled brown. A touch of red in nose and cheeks, with a slight tremor of his extended hand, recalled Holmes' surmise as to his habits. His rusty black frock-coat was buttoned right up in front, with the collar turned up, and his lank wrists protruded from his sleeves without a sign of cuff or shirt. He spoke in a slow staccato fashion, choosing his words with care, and gave the impression generally of a man of learning and letters who had had ill-usage at the hands of fortune. - -"We have retained these things for some days," said Holmes, "because we expected to see an advertisement from you giving your address. I am at a loss to know now why you did not advertise." - -Our visitor gave a rather shamefaced laugh. "Shillings have not been so plentiful with me as they once were," he remarked. "I had no doubt that the gang of roughs who assaulted me had carried off both my hat and the bird. I did not care to spend more money in a hopeless attempt at recovering them." - -"Very naturally. By the way, about the bird, we were compelled to eat it." - -"To eat it!" Our visitor half rose from his chair in his excitement. - -"Yes, it would have been of no use to anyone had we not done so. But I presume that this other goose upon the sideboard, which is about the same weight and perfectly fresh, will answer your purpose equally well?" - -"Oh, certainly, certainly," answered Mr. Baker with a sigh of relief. - -"Of course, we still have the feathers, legs, crop, and so on of your own bird, so if you wish--" - -The man burst into a hearty laugh. "They might be useful to me as relics of my adventure," said he, "but beyond that I can hardly see what use the disjecta membra of my late acquaintance are going to be to me. No, sir, I think that, with your permission, I will confine my attentions to the excellent bird which I perceive upon the sideboard." - -Sherlock Holmes glanced sharply across at me with a slight shrug of his shoulders. - -"There is your hat, then, and there your bird," said he. "By the way, would it bore you to tell me where you got the other one from? I am somewhat of a fowl fancier, and I have seldom seen a better grown goose." - -"Certainly, sir," said Baker, who had risen and tucked his newly gained property under his arm. "There are a few of us who frequent the Alpha Inn, near the Museum--we are to be found in the Museum itself during the day, you understand. This year our good host, Windigate by name, instituted a goose club, by which, on consideration of some few pence every week, we were each to receive a bird at Christmas. My pence were duly paid, and the rest is familiar to you. I am much indebted to you, sir, for a Scotch bonnet is fitted neither to my years nor my gravity." With a comical pomposity of manner he bowed solemnly to both of us and strode off upon his way. - -"So much for Mr. Henry Baker," said Holmes when he had closed the door behind him. "It is quite certain that he knows nothing whatever about the matter. Are you hungry, Watson?" - -"Not particularly." - -"Then I suggest that we turn our dinner into a supper and follow up this clue while it is still hot." - -"By all means." - -It was a bitter night, so we drew on our ulsters and wrapped cravats about our throats. Outside, the stars were shining coldly in a cloudless sky, and the breath of the passers-by blew out into smoke like so many pistol shots. Our footfalls rang out crisply and loudly as we swung through the doctors' quarter, Wimpole Street, Harley Street, and so through Wigmore Street into Oxford Street. In a quarter of an hour we were in Bloomsbury at the Alpha Inn, which is a small public-house at the corner of one of the streets which runs down into Holborn. Holmes pushed open the door of the private bar and ordered two glasses of beer from the ruddy-faced, white-aproned landlord. - -"Your beer should be excellent if it is as good as your geese," said he. - -"My geese!" The man seemed surprised. - -"Yes. I was speaking only half an hour ago to Mr. Henry Baker, who was a member of your goose club." - -"Ah! yes, I see. But you see, sir, them's not our geese." - -"Indeed! Whose, then?" - -"Well, I got the two dozen from a salesman in Covent Garden." - -"Indeed? I know some of them. Which was it?" - -"Breckinridge is his name." - -"Ah! I don't know him. Well, here's your good health landlord, and prosperity to your house. Good-night." - -"Now for Mr. Breckinridge," he continued, buttoning up his coat as we came out into the frosty air. "Remember, Watson that though we have so homely a thing as a goose at one end of this chain, we have at the other a man who will certainly get seven years' penal servitude unless we can establish his innocence. It is possible that our inquiry may but confirm his guilt; but, in any case, we have a line of investigation which has been missed by the police, and which a singular chance has placed in our hands. Let us follow it out to the bitter end. Faces to the south, then, and quick march!" - -We passed across Holborn, down Endell Street, and so through a zigzag of slums to Covent Garden Market. One of the largest stalls bore the name of Breckinridge upon it, and the proprietor a horsey-looking man, with a sharp face and trim side-whiskers was helping a boy to put up the shutters. - -"Good-evening. It's a cold night," said Holmes. - -The salesman nodded and shot a questioning glance at my companion. - -"Sold out of geese, I see," continued Holmes, pointing at the bare slabs of marble. - -"Let you have five hundred to-morrow morning." - -"That's no good." - -"Well, there are some on the stall with the gas-flare." - -"Ah, but I was recommended to you." - -"Who by?" - -"The landlord of the Alpha." - -"Oh, yes; I sent him a couple of dozen." - -"Fine birds they were, too. Now where did you get them from?" - -To my surprise the question provoked a burst of anger from the salesman. - -"Now, then, mister," said he, with his head cocked and his arms akimbo, "what are you driving at? Let's have it straight, now." - -"It is straight enough. I should like to know who sold you the geese which you supplied to the Alpha." - -"Well then, I shan't tell you. So now!" - -"Oh, it is a matter of no importance; but I don't know why you should be so warm over such a trifle." - -"Warm! You'd be as warm, maybe, if you were as pestered as I am. When I pay good money for a good article there should be an end of the business; but it's 'Where are the geese?' and 'Who did you sell the geese to?' and 'What will you take for the geese?' One would think they were the only geese in the world, to hear the fuss that is made over them." - -"Well, I have no connection with any other people who have been making inquiries," said Holmes carelessly. "If you won't tell us the bet is off, that is all. But I'm always ready to back my opinion on a matter of fowls, and I have a fiver on it that the bird I ate is country bred." - -"Well, then, you've lost your fiver, for it's town bred," snapped the salesman. - -"It's nothing of the kind." - -"I say it is." - -"I don't believe it." - -"D'you think you know more about fowls than I, who have handled them ever since I was a nipper? I tell you, all those birds that went to the Alpha were town bred." - -"You'll never persuade me to believe that." - -"Will you bet, then?" - -"It's merely taking your money, for I know that I am right. But I'll have a sovereign on with you, just to teach you not to be obstinate." - -The salesman chuckled grimly. "Bring me the books, Bill," said he. - -The small boy brought round a small thin volume and a great greasy-backed one, laying them out together beneath the hanging lamp. - -"Now then, Mr. Cocksure," said the salesman, "I thought that I was out of geese, but before I finish you'll find that there is still one left in my shop. You see this little book?" - -"Well?" - -"That's the list of the folk from whom I buy. D'you see? Well, then, here on this page are the country folk, and the numbers after their names are where their accounts are in the big ledger. Now, then! You see this other page in red ink? Well, that is a list of my town suppliers. Now, look at that third name. Just read it out to me." - -"Mrs. Oakshott, 117, Brixton Road--249," read Holmes. - -"Quite so. Now turn that up in the ledger." - -Holmes turned to the page indicated. "Here you are, 'Mrs. Oakshott, 117, Brixton Road, egg and poultry supplier.' " - -"Now, then, what's the last entry?" - -" 'December 22nd. Twenty-four geese at 7s. 6d.' " - -"Quite so. There you are. And underneath?" - -" 'Sold to Mr. Windigate of the Alpha, at 12s.' " - -"What have you to say now?" - -Sherlock Holmes looked deeply chagrined. He drew a sovereign from his pocket and threw it down upon the slab, turning away with the air of a man whose disgust is too deep for words. A few yards off he stopped under a lamp-post and laughed in the hearty, noiseless fashion which was peculiar to him. - -"When you see a man with whiskers of that cut and the 'Pink 'un' protruding out of his pocket, you can always draw him by a bet," said he. "I daresay that if I had put $100 down in front of him, that man would not have given me such complete information as was drawn from him by the idea that he was doing me on a wager. Well, Watson, we are, I fancy, nearing the end of our quest, and the only point which remains to be determined is whether we should go on to this Mrs. Oakshott to-night, or whether we should reserve it for to-morrow. It is clear from what that surly fellow said that there are others besides ourselves who are anxious about the matter, and I should--" - -His remarks were suddenly cut short by a loud hubbub which broke out from the stall which we had just left. Turning round we saw a little rat-faced fellow standing in the centre of the circle of yellow light which was thrown by the swinging lamp, while Breckinridge, the salesman, framed in the door of his stall, was shaking his fists fiercely at the cringing figure. - -"I've had enough of you and your geese," he shouted. "I wish you were all at the devil together. If you come pestering me any more with your silly talk I'll set the dog at you. You bring Mrs. Oakshott here and I'll answer her, but what have you to do with it? Did I buy the geese off you?" - -"No; but one of them was mine all the same," whined the little man. - -"Well, then, ask Mrs. Oakshott for it." - -"She told me to ask you." - -"Well, you can ask the King of Proosia, for all I care. I've had enough of it. Get out of this!" He rushed fiercely forward, and the inquirer flitted away into the darkness. - -"Ha! this may save us a visit to Brixton Road," whispered Holmes. "Come with me, and we will see what is to be made of this fellow." Striding through the scattered knots of people who lounged round the flaring stalls, my companion speedily overtook the little man and touched him upon the shoulder. He sprang round, and I could see in the gas-light that every vestige of colour had been driven from his face. - -"Who are you, then? What do you want?" he asked in a quavering voice. - -"You will excuse me," said Holmes blandly, "but I could not help overhearing the questions which you put to the salesman just now. I think that I could be of assistance to you." - -"You? Who are you? How could you know anything of the matter?" - -"My name is Sherlock Holmes. It is my business to know what other people don't know." - -"But you can know nothing of this?" - -"Excuse me, I know everything of it. You are endeavouring to trace some geese which were sold by Mrs. Oakshott, of Brixton Road, to a salesman named Breckinridge, by him in turn to Mr. Windigate, of the Alpha, and by him to his club, of which Mr. Henry Baker is a member." - -"Oh, sir, you are the very man whom I have longed to meet," cried the little fellow with outstretched hands and quivering fingers. "I can hardly explain to you how interested I am in this matter." - -Sherlock Holmes hailed a four-wheeler which was passing. "In that case we had better discuss it in a cosy room rather than in this wind-swept market-place," said he. "But pray tell me, before we go farther, who it is that I have the pleasure of assisting." - -The man hesitated for an instant. "My name is John Robinson," he answered with a sidelong glance. - -"No, no; the real name," said Holmes sweetly. "It is always awkward doing business with an alias." - -A flush sprang to the white cheeks of the stranger. "Well then," said he, "my real name is James Ryder." - -"Precisely so. Head attendant at the Hotel Cosmopolitan. Pray step into the cab, and I shall soon be able to tell you everything which you would wish to know." - -The little man stood glancing from one to the other of us with half-frightened, half-hopeful eyes, as one who is not sure whether he is on the verge of a windfall or of a catastrophe. Then he stepped into the cab, and in half an hour we were back in the sitting-room at Baker Street. Nothing had been said during our drive, but the high, thin breathing of our new companion, and the claspings and unclaspings of his hands, spoke of the nervous tension within him. - -"Here we are!" said Holmes cheerily as we filed into the room. "The fire looks very seasonable in this weather. You look cold, Mr. Ryder. Pray take the basket-chair. I will just put on my slippers before we settle this little matter of yours. Now, then! You want to know what became of those geese?" - -"Yes, sir." - -"Or rather, I fancy, of that goose. It was one bird, I imagine in which you were interested--white, with a black bar across the tail." - -Ryder quivered with emotion. "Oh, sir," he cried, "can you tell me where it went to?" - -"It came here." - -"Here?" - -"Yes, and a most remarkable bird it proved. I don't wonder that you should take an interest in it. It laid an egg after it was dead--the bonniest, brightest little blue egg that ever was seen. I have it here in my museum." - -Our visitor staggered to his feet and clutched the mantelpiece with his right hand. Holmes unlocked his strong-box and held up the blue carbuncle, which shone out like a star, with a cold, brilliant, many-pointed radiance. Ryder stood glaring with a drawn face, uncertain whether to claim or to disown it. - -"The game's up, Ryder," said Holmes quietly. "Hold up, man, or you'll be into the fire! Give him an arm back into his chair, Watson. He's not got blood enough to go in for felony with impunity. Give him a dash of brandy. So! Now he looks a little more human. What a shrimp it is, to be sure!" - -For a moment he had staggered and nearly fallen, but the brandy brought a tinge of colour into his cheeks, and he sat staring with frightened eyes at his accuser. - -"I have almost every link in my hands, and all the proofs which I could possibly need, so there is little which you need tell me. Still, that little may as well be cleared up to make the case complete. You had heard, Ryder, of this blue stone of the Countess of Morcar's?" - -"It was Catherine Cusack who told me of it," said he in a crackling voice. - -"I see--her ladyship's waiting-maid. Well, the temptation of sudden wealth so easily acquired was too much for you, as it has been for better men before you; but you were not very scrupulous in the means you used. It seems to me, Ryder, that there is the making of a very pretty villain in you. You knew that this man Horner, the plumber, had been concerned in some such matter before, and that suspicion would rest the more readily upon him. What did you do, then? You made some small job in my lady's room--you and your confederate Cusack--and you managed that he should be the man sent for. Then, when he had left, you rifled the jewel-case, raised the alarm, and had this unfortunate man arrested. You then--" - -Ryder threw himself down suddenly upon the rug and clutched at my companion's knees. "For God's sake, have mercy!" he shrieked. "Think of my father! Of my mother! It would break their hearts. I never went wrong before! I never will again. I swear it. I'll swear it on a Bible. Oh, don't bring it into court! For Christ's sake, don't!" - -"Get back into your chair!" said Holmes sternly. "It is very well to cringe and crawl now, but you thought little enough of this poor Horner in the dock for a crime of which he knew nothing." - -"I will fly, Mr. Holmes. I will leave the country, sir. Then the charge against him will break down." - -"Hum! We will talk about that. And now let us hear a true account of the next act. How came the stone into the goose, and how came the goose into the open market? Tell us the truth, for there lies your only hope of safety." - -Ryder passed his tongue over his parched lips. "I will tell you it just as it happened, sir," said he. "When Horner had been arrested, it seemed to me that it would be best for me to get away with the stone at once, for I did not know at what moment the police might not take it into their heads to search me and my room. There was no place about the hotel where it would be safe. I went out, as if on some commission, and I made for my sister's house. She had married a man named Oakshott, and lived in Brixton Road, where she fattened fowls for the market. All the way there every man I met seemed to me to be a policeman or a detective; and, for all that it was a cold night, the sweat was pouring down my face before I came to the Brixton Road. My sister asked me what was the matter, and why I was so pale; but I told her that I had been upset by the jewel robbery at the hotel. Then I went into the back yard and smoked a pipe and wondered what it would be best to do. - -"I had a friend once called Maudsley, who went to the bad, and has just been serving his time in Pentonville. One day he had met me, and fell into talk about the ways of thieves, and how they could get rid of what they stole. I knew that he would be true to me, for I knew one or two things about him; so I made up my mind to go right on to Kilburn, where he lived, and take him into my confidence. He would show me how to turn the stone into money. But how to get to him in safety? I thought of the agonies I had gone through in coming from the hotel. I might at any moment be seized and searched, and there would be the stone in my waistcoat pocket. I was leaning against the wall at the time and looking at the geese which were waddling about round my feet, and suddenly an idea came into my head which showed me how I could beat the best detective that ever lived. - -"My sister had told me some weeks before that I might have the pick of her geese for a Christmas present, and I knew that she was always as good as her word. I would take my goose now, and in it I would carry my stone to Kilburn. There was a little shed in the yard, and behind this I drove one of the birds--a fine big one, white, with a barred tail. I caught it, and prying its bill open, I thrust the stone down its throat as far as my finger could reach. The bird gave a gulp, and I felt the stone pass along its gullet and down into its crop. But the creature flapped and struggled, and out came my sister to know what was the matter. As I turned to speak to her the brute broke loose and fluttered off among the others. - -" 'Whatever were you doing with that bird, Jem?' says she. - -" 'Well,' said I, 'you said you'd give me one for Christmas, and I was feeling which was the fattest.' - -" 'Oh,' says she, 'we've set yours aside for you--Jem's bird, we call it. It's the big white one over yonder. There's twenty-six of them, which makes one for you, and one for us, and two dozen for the market.' - -" 'Thank you, Maggie,' says I; 'but if it is all the same to you, I'd rather have that one I was handling just now.' - -" 'The other is a good three pound heavier,' said she, 'and we fattened it expressly for you.' - -" 'Never mind. I'll have the other, and I'll take it now,' said I. - -" 'Oh, just as you like,' said she, a little huffed. 'Which is it you want, then?' - -" 'That white one with the barred tail, right in the middle of the flock.' - -" 'Oh, very well. Kill it and take it with you.' - -"Well, I did what she said, Mr. Holmes, and I carried the bird all the way to Kilburn. I told my pal what I had done, for he was a man that it was easy to tell a thing like that to. He laughed until he choked, and we got a knife and opened the goose. My heart turned to water, for there was no sign of the stone, and I knew that some terrible mistake had occurred. I left the bird, rushed back to my sister's, and hurried into the back yard. There was not a bird to be seen there. - -" 'Where are they all, Maggie?' I cried. - -" 'Gone to the dealer's, Jem.' - -" 'Which dealer's?' - -" 'Breckinridge, of Covent Garden.' - -" 'But was there another with a barred tail?' I asked, 'the same as the one I chose?' - -" 'Yes, Jem; there were two barred-tailed ones, and I could never tell them apart.' - -"Well, then, of course I saw it all, and I ran off as hard as my feet would carry me to this man Breckinridge; but he had sold the lot at once, and not one word would he tell me as to where they had gone. You heard him yourselves to-night. Well, he has always answered me like that. My sister thinks that I am going mad. Sometimes I think that I am myself. And now--and now I am myself a branded thief, without ever having touched the wealth for which I sold my character. God help me! God help me!" He burst into convulsive sobbing, with his face buried in his hands. - -There was a long silence, broken only by his heavy breathing and by the measured tapping of Sherlock Holmes' finger-tips upon the edge of the table. Then my friend rose and threw open the door. - -"Get out!" said he. - -"What, sir! Oh, Heaven bless you!" - -"No more words. Get out!" - -And no more words were needed. There was a rush, a clatter upon the stairs, the bang of a door, and the crisp rattle of running footfalls from the street. - -"After all, Watson," said Holmes, reaching up his hand for his clay pipe, "I am not retained by the police to supply their deficiencies. If Horner were in danger it would be another thing; but this fellow will not appear against him, and the case must collapse. I suppose that I am commuting a felony, but it is just possible that I am saving a soul. This fellow will not go wrong again; he is too terribly frightened. Send him to gaol now, and you make him a gaol-bird for life. Besides, it is the season of forgiveness. Chance has put in our way a most singular and whimsical problem, and its solution is its own reward. If you will have the goodness to touch the bell, Doctor, we will begin another investigation, in which, also a bird will be the chief feature." - -VIII. THE ADVENTURE OF THE SPECKLED BAND - - -On glancing over my notes of the seventy odd cases in which I have during the last eight years studied the methods of my friend Sherlock Holmes, I find many tragic, some comic, a large number merely strange, but none commonplace; for, working as he did rather for the love of his art than for the acquirement of wealth, he refused to associate himself with any investigation which did not tend towards the unusual, and even the fantastic. Of all these varied cases, however, I cannot recall any which presented more singular features than that which was associated with the well-known Surrey family of the Roylotts of Stoke Moran. The events in question occurred in the early days of my association with Holmes, when we were sharing rooms as bachelors in Baker Street. It is possible that I might have placed them upon record before, but a promise of secrecy was made at the time, from which I have only been freed during the last month by the untimely death of the lady to whom the pledge was given. It is perhaps as well that the facts should now come to light, for I have reasons to know that there are widespread rumours as to the death of Dr. Grimesby Roylott which tend to make the matter even more terrible than the truth. - -It was early in April in the year '83 that I woke one morning to find Sherlock Holmes standing, fully dressed, by the side of my bed. He was a late riser, as a rule, and as the clock on the mantelpiece showed me that it was only a quarter-past seven, I blinked up at him in some surprise, and perhaps just a little resentment, for I was myself regular in my habits. - -"Very sorry to knock you up, Watson," said he, "but it's the common lot this morning. Mrs. Hudson has been knocked up, she retorted upon me, and I on you." - -"What is it, then--a fire?" - -"No; a client. It seems that a young lady has arrived in a considerable state of excitement, who insists upon seeing me. She is waiting now in the sitting-room. Now, when young ladies wander about the metropolis at this hour of the morning, and knock sleepy people up out of their beds, I presume that it is something very pressing which they have to communicate. Should it prove to be an interesting case, you would, I am sure, wish to follow it from the outset. I thought, at any rate, that I should call you and give you the chance." - -"My dear fellow, I would not miss it for anything." - -I had no keener pleasure than in following Holmes in his professional investigations, and in admiring the rapid deductions, as swift as intuitions, and yet always founded on a logical basis with which he unravelled the problems which were submitted to him. I rapidly threw on my clothes and was ready in a few minutes to accompany my friend down to the sitting-room. A lady dressed in black and heavily veiled, who had been sitting in the window, rose as we entered. - -"Good-morning, madam," said Holmes cheerily. "My name is Sherlock Holmes. This is my intimate friend and associate, Dr. Watson, before whom you can speak as freely as before myself. Ha! I am glad to see that Mrs. Hudson has had the good sense to light the fire. Pray draw up to it, and I shall order you a cup of hot coffee, for I observe that you are shivering." - -"It is not cold which makes me shiver," said the woman in a low voice, changing her seat as requested. - -"What, then?" - -"It is fear, Mr. Holmes. It is terror." She raised her veil as she spoke, and we could see that she was indeed in a pitiable state of agitation, her face all drawn and grey, with restless frightened eyes, like those of some hunted animal. Her features and figure were those of a woman of thirty, but her hair was shot with premature grey, and her expression was weary and haggard. Sherlock Holmes ran her over with one of his quick, all-comprehensive glances. - -"You must not fear," said he soothingly, bending forward and patting her forearm. "We shall soon set matters right, I have no doubt. You have come in by train this morning, I see." - -"You know me, then?" - -"No, but I observe the second half of a return ticket in the palm of your left glove. You must have started early, and yet you had a good drive in a dog-cart, along heavy roads, before you reached the station." - -The lady gave a violent start and stared in bewilderment at my companion. - -"There is no mystery, my dear madam," said he, smiling. "The left arm of your jacket is spattered with mud in no less than seven places. The marks are perfectly fresh. There is no vehicle save a dog-cart which throws up mud in that way, and then only when you sit on the left-hand side of the driver." - -"Whatever your reasons may be, you are perfectly correct," said she. "I started from home before six, reached Leatherhead at twenty past, and came in by the first train to Waterloo. Sir, I can stand this strain no longer; I shall go mad if it continues. I have no one to turn to--none, save only one, who cares for me, and he, poor fellow, can be of little aid. I have heard of you, Mr. Holmes; I have heard of you from Mrs. Farintosh, whom you helped in the hour of her sore need. It was from her that I had your address. Oh, sir, do you not think that you could help me, too, and at least throw a little light through the dense darkness which surrounds me? At present it is out of my power to reward you for your services, but in a month or six weeks I shall be married, with the control of my own income, and then at least you shall not find me ungrateful." - -Holmes turned to his desk and, unlocking it, drew out a small case-book, which he consulted. - -"Farintosh," said he. "Ah yes, I recall the case; it was concerned with an opal tiara. I think it was before your time, Watson. I can only say, madam, that I shall be happy to devote the same care to your case as I did to that of your friend. As to reward, my profession is its own reward; but you are at liberty to defray whatever expenses I may be put to, at the time which suits you best. And now I beg that you will lay before us everything that may help us in forming an opinion upon the matter." - -"Alas!" replied our visitor, "the very horror of my situation lies in the fact that my fears are so vague, and my suspicions depend so entirely upon small points, which might seem trivial to another, that even he to whom of all others I have a right to look for help and advice looks upon all that I tell him about it as the fancies of a nervous woman. He does not say so, but I can read it from his soothing answers and averted eyes. But I have heard, Mr. Holmes, that you can see deeply into the manifold wickedness of the human heart. You may advise me how to walk amid the dangers which encompass me." - -"I am all attention, madam." - -"My name is Helen Stoner, and I am living with my stepfather, who is the last survivor of one of the oldest Saxon families in England, the Roylotts of Stoke Moran, on the western border of Surrey." - -Holmes nodded his head. "The name is familiar to me," said he. - - - -"I have very little difficulty in finding what I want," said I, "for the facts are quite recent, and the matter struck me as remarkable. I feared to refer them to you, however, as I knew that you had an inquiry on hand and that you disliked the intrusion of other matters." - -"Oh, you mean the little problem of the Grosvenor Square furniture van. That is quite cleared up now--though, indeed, it was obvious from the first. Pray give me the results of your newspaper selections." - -"Here is the first notice which I can find. It is in the personal column of the Morning Post, and dates, as you see, some weeks back: 'A marriage has been arranged,' it says, 'and will, if rumour is correct, very shortly take place, between Lord Robert St. Simon, second son of the Duke of Balmoral, and Miss Hatty Doran, the only daughter of Aloysius Doran. Esq., of San Francisco, Cal., U.S.A.' That is all." - -"Terse and to the point," remarked Holmes, stretching his long, thin legs towards the fire. - -"There was a paragraph amplifying this in one of the society papers of the same week. Ah, here it is: 'There will soon be a call for protection in the marriage market, for the present free-trade principle appears to tell heavily against our home product. One by one the management of the noble houses of Great Britain is passing into the hands of our fair cousins from across the Atlantic. An important addition has been made during the last week to the list of the prizes which have been borne away by these charming invaders. Lord St. Simon, who has shown himself for over twenty years proof against the little god's arrows, has now definitely announced his approaching marriage with Miss Hatty Doran, the fascinating daughter of a California millionaire. Miss Doran, whose graceful figure and striking face attracted much attention at the Westbury House festivities, is an only child, and it is currently reported that her dowry will run to considerably over the six figures, with expectancies for the future. As it is an open secret that the Duke of Balmoral has been compelled to sell his pictures within the last few years, and as Lord St. Simon has no property of his own save the small estate of Birchmoor, it is obvious that the Californian heiress is not the only gainer by an alliance which will enable her to make the easy and common transition from a Republican lady to a British peeress.' " - -"Anything else?" asked Holmes, yawning. - -"Oh, yes; plenty. Then there is another note in the Morning Post to say that the marriage would be an absolutely quiet one, that it would be at St. George's, Hanover Square, that only half a dozen intimate friends would be invited, and that the party would return to the furnished house at Lancaster Gate which has been taken by Mr. Aloysius Doran. Two days later--that is, on Wednesday last--there is a curt announcement that the wedding had taken place, and that the honeymoon would be passed at Lord Backwater's place, near Petersfield. Those are all the notices which appeared before the disappearance of the bride." - -"Before the what?" asked Holmes with a start. - -"The vanishing of the lady." - -"When did she vanish, then?" - -"At the wedding breakfast." - -"Indeed. This is more interesting than it promised to be; quite dramatic, in fact." - -"Yes; it struck me as being a little out of the common." - -"They often vanish before the ceremony, and occasionally during the honeymoon; but I cannot call to mind anything quite so prompt as this. Pray let me have the details." - -"I warn you that they are very incomplete." - -"Perhaps we may make them less so." - -"Such as they are, they are set forth in a single article of a morning paper of yesterday, which I will read to you. It is headed, 'Singular Occurrence at a Fashionable Wedding': - -" 'The family of Lord Robert St. Simon has been thrown into the greatest consternation by the strange and painful episodes which have taken place in connection with his wedding. The ceremony, as shortly announced in the papers of yesterday, occurred on the previous morning; but it is only now that it has been possible to confirm the strange rumours which have been so persistently floating about. In spite of the attempts of the friends to hush the matter up, so much public attention has now been drawn to it that no good purpose can be served by affecting to disregard what is a common subject for conversation. - -" 'The ceremony, which was performed at St. George's, Hanover Square, was a very quiet one, no one being present save the father of the bride, Mr. Aloysius Doran, the Duchess of Balmoral, Lord Backwater, Lord Eustace and Lady Clara St. Simon (the younger brother and sister of the bridegroom), and Lady Alicia Whittington. The whole party proceeded afterwards to the house of Mr. Aloysius Doran, at Lancaster Gate, where breakfast had been prepared. It appears that some little trouble was caused by a woman, whose name has not been ascertained, who endeavoured to force her way into the house after the bridal party, alleging that she had some claim upon Lord St. Simon. It was only after a painful and prolonged scene that she was ejected by the butler and the footman. The bride, who had fortunately entered the house before this unpleasant interruption, had sat down to breakfast with the rest, when she complained of a sudden indisposition and retired to her room. Her prolonged absence having caused some comment, her father followed her, but learned from her maid that she had only come up to her chamber for an instant, caught up an ulster and bonnet, and hurried down to the passage. One of the footmen declared that he had seen a lady leave the house thus apparelled, but had refused to credit that it was his mistress, believing her to be with the company. On ascertaining that his daughter had disappeared, Mr. Aloysius Doran, in conjunction with the bridegroom, instantly put themselves in communication with the police, and very energetic inquiries are being made, which will probably result in a speedy clearing up of this very singular business. Up to a late hour last night, however, nothing had transpired as to the whereabouts of the missing lady. There are rumours of foul play in the matter, and it is said that the police have caused the arrest of the woman who had caused the original disturbance, in the belief that, from jealousy or some other motive, she may have been concerned in the strange disappearance of the bride.' " - -"And is that all?" - -"Only one little item in another of the morning papers, but it is a suggestive one." - -"And it is--" - -"That Miss Flora Millar, the lady who had caused the disturbance, has actually been arrested. It appears that she was formerly a danseuse at the Allegro, and that she has known the bridegroom for some years. There are no further particulars, and the whole case is in your hands now--so far as it has been set forth in the public press." - -"And an exceedingly interesting case it appears to be. I would not have missed it for worlds. But there is a ring at the bell, Watson, and as the clock makes it a few minutes after four, I have no doubt that this will prove to be our noble client. Do not dream of going, Watson, for I very much prefer having a witness, if only as a check to my own memory." - -"Lord Robert St. Simon," announced our page-boy, throwing open the door. A gentleman entered, with a pleasant, cultured face, high-nosed and pale, with something perhaps of petulance about the mouth, and with the steady, well-opened eye of a man whose pleasant lot it had ever been to command and to be obeyed. His manner was brisk, and yet his general appearance gave an undue impression of age, for he had a slight forward stoop and a little bend of the knees as he walked. His hair, too, as he swept off his very curly-brimmed hat, was grizzled round the edges and thin upon the top. As to his dress, it was careful to the verge of foppishness, with high collar, black frock-coat, white waistcoat, yellow gloves, patent-leather shoes, and light-coloured gaiters. He advanced slowly into the room, turning his head from left to right, and swinging in his right hand the cord which held his golden eyeglasses. - -"Good-day, Lord St. Simon," said Holmes, rising and bowing. "Pray take the basket-chair. This is my friend and colleague, Dr. Watson. Draw up a little to the fire, and we will talk this matter over." - -"A most painful matter to me, as you can most readily imagine, Mr. Holmes. I have been cut to the quick. I understand that you have already managed several delicate cases of this sort, sir, though I presume that they were hardly from the same class of society." - -"No, I am descending." - -"I beg pardon." - -"My last client of the sort was a king." - -"Oh, really! I had no idea. And which king?" - -"The King of Scandinavia." - -"What! Had he lost his wife?" - -"You can understand," said Holmes suavely, "that I extend to the affairs of my other clients the same secrecy which I promise to you in yours." - -"Of course! Very right! very right! I'm sure I beg pardon. As to my own case, I am ready to give you any information which may assist you in forming an opinion." - -"Thank you. I have already learned all that is in the public prints, nothing more. I presume that I may take it as correct--this article, for example, as to the disappearance of the bride." - -Lord St. Simon glanced over it. "Yes, it is correct, as far as it goes." - -"But it needs a great deal of supplementing before anyone could offer an opinion. I think that I may arrive at my facts most directly by questioning you." - -"Pray do so." - -"When did you first meet Miss Hatty Doran?" - -"In San Francisco, a year ago." - -"You were travelling in the States?" - -"Yes." - -"Did you become engaged then?" - -"No." - -"But you were on a friendly footing?" - -"I was amused by her society, and she could see that I was amused." - -"Her father is very rich?" - -"He is said to be the richest man on the Pacific slope." - -"And how did he make his money?" - -"In mining. He had nothing a few years ago. Then he struck gold, invested it, and came up by leaps and bounds." - -"Now, what is your own impression as to the young lady's--your wife's character?" - -The nobleman swung his glasses a little faster and stared down into the fire. "You see, Mr. Holmes," said he, "my wife was twenty before her father became a rich man. During that time she ran free in a mining camp and wandered through woods or mountains, so that her education has come from Nature rather than from the schoolmaster. She is what we call in England a tomboy, with a strong nature, wild and free, unfettered by any sort of traditions. She is impetuous--volcanic, I was about to say. She is swift in making up her mind and fearless in carrying out her resolutions. On the other hand, I would not have given her the name which I have the honour to bear"--he gave a little stately cough--"had I not thought her to be at bottom a noble woman. I believe that she is capable of heroic self-sacrifice and that anything dishonourable would be repugnant to her." - -"Have you her photograph?" - -"I brought this with me." He opened a locket and showed us the full face of a very lovely woman. It was not a photograph but an ivory miniature, and the artist had brought out the full effect of the lustrous black hair, the large dark eyes, and the exquisite mouth. Holmes gazed long and earnestly at it. Then he closed the locket and handed it back to Lord St. Simon. - -"The young lady came to London, then, and you renewed your acquaintance?" - -"Yes, her father brought her over for this last London season. I met her several times, became engaged to her, and have now married her." - -"She brought, I understand, a considerable dowry?" - -"A fair dowry. Not more than is usual in my family." - -"And this, of course, remains to you, since the marriage is a fait accompli?" - -"I really have made no inquiries on the subject." - -"Very naturally not. Did you see Miss Doran on the day before the wedding?" - -"Yes." - -"Was she in good spirits?" - -"Never better. She kept talking of what we should do in our future lives." - -"Indeed! That is very interesting. And on the morning of the wedding?" - -"She was as bright as possible--at least until after the ceremony." - -"And did you observe any change in her then?" - -"Well, to tell the truth, I saw then the first signs that I had ever seen that her temper was just a little sharp. The incident however, was too trivial to relate and can have no possible bearing upon the case." - -"Pray let us have it, for all that." - -"Oh, it is childish. She dropped her bouquet as we went towards the vestry. She was passing the front pew at the time, and it fell over into the pew. There was a moment's delay, but the gentleman in the pew handed it up to her again, and it did not appear to be the worse for the fall. Yet when I spoke to her of the matter, she answered me abruptly; and in the carriage, on our way home, she seemed absurdly agitated over this trifling cause." - -"Indeed! You say that there was a gentleman in the pew. Some of the general public were present, then?" - -"Oh, yes. It is impossible to exclude them when the church is open." - -"This gentleman was not one of your wife's friends?" - -"No, no; I call him a gentleman by courtesy, but he was quite a common-looking person. I hardly noticed his appearance. But really I think that we are wandering rather far from the point." - -"Lady St. Simon, then, returned from the wedding in a less cheerful frame of mind than she had gone to it. What did she do on re-entering her father's house?" - -"I saw her in conversation with her maid." - -"And who is her maid?" - -"Alice is her name. She is an American and came from California with her." - -"A confidential servant?" - -"A little too much so. It seemed to me that her mistress allowed her to take great liberties. Still, of course, in America they look upon these things in a different way." - -"How long did she speak to this Alice?" - -"Oh, a few minutes. I had something else to think of." - -"You did not overhear what they said?" - -"Lady St. Simon said something about 'jumping a claim.' She was accustomed to use slang of the kind. I have no idea what she meant." - -"American slang is very expressive sometimes. And what did your wife do when she finished speaking to her maid?" - -"She walked into the breakfast-room." - -"On your arm?" - -"No, alone. She was very independent in little matters like that. Then, after we had sat down for ten minutes or so, she rose hurriedly, muttered some words of apology, and left the room. She never came back." - -"But this maid, Alice, as I understand, deposes that she went to her room, covered her bride's dress with a long ulster, put on a bonnet, and went out." - -"Quite so. And she was afterwards seen walking into Hyde Park in company with Flora Millar, a woman who is now in custody, and who had already made a disturbance at Mr. Doran's house that morning." - -"Ah, yes. I should like a few particulars as to this young lady, and your relations to her." - -Lord St. Simon shrugged his shoulders and raised his eyebrows. "We have been on a friendly footing for some years--I may say on a very friendly footing. She used to be at the Allegro. I have not treated her ungenerously, and she had no just cause of complaint against me, but you know what women are, Mr. Holmes. Flora was a dear little thing, but exceedingly hot-headed and devotedly attached to me. She wrote me dreadful letters when she heard that I was about to be married, and, to tell the truth, the reason why I had the marriage celebrated so quietly was that I feared lest there might be a scandal in the church. She came to Mr. Doran's door just after we returned, and she endeavoured to push her way in, uttering very abusive expressions towards my wife, and even threatening her, but I had foreseen the possibility of something of the sort, and I had two police fellows there in private clothes, who soon pushed her out again. She was quiet when she saw that there was no good in making a row." - -"Did your wife hear all this?" - -"No, thank goodness, she did not." - -"And she was seen walking with this very woman afterwards?" - -"Yes. That is what Mr. Lestrade, of Scotland Yard, looks upon as so serious. It is thought that Flora decoyed my wife out and laid some terrible trap for her." - -"Well, it is a possible supposition." - -"You think so, too?" - -"I did not say a probable one. But you do not yourself look upon this as likely?" - -"I do not think Flora would hurt a fly." - -"Still, jealousy is a strange transformer of characters. Pray what is your own theory as to what took place?" - -"Well, really, I came to seek a theory, not to propound one. I have given you all the facts. Since you ask me, however, I may say that it has occurred to me as possible that the excitement of this affair, the consciousness that she had made so immense a social stride, had the effect of causing some little nervous disturbance in my wife." - -"In short, that she had become suddenly deranged?" - -"Well, really, when I consider that she has turned her back--I will not say upon me, but upon so much that many have aspired to without success--I can hardly explain it in any other fashion." - -"Well, certainly that is also a conceivable hypothesis," said Holmes, smiling. "And now, Lord St. Simon, I think that I have nearly all my data. May I ask whether you were seated at the breakfast-table so that you could see out of the window?" - -"We could see the other side of the road and the Park." - -"Quite so. Then I do not think that I need to detain you longer. I shall communicate with you." - -"Should you be fortunate enough to solve this problem," said our client, rising. - -"I have solved it." - -"Eh? What was that?" - -"I say that I have solved it." - -"Where, then, is my wife?" - -"That is a detail which I shall speedily supply." - -Lord St. Simon shook his head. "I am afraid that it will take wiser heads than yours or mine," he remarked, and bowing in a stately, old-fashioned manner he departed. - -"It is very good of Lord St. Simon to honour my head by putting it on a level with his own," said Sherlock Holmes, laughing. "I think that I shall have a whisky and soda and a cigar after all this cross-questioning. I had formed my conclusions as to the case before our client came into the room." - -"My dear Holmes!" - -"I have notes of several similar cases, though none, as I remarked before, which were quite as prompt. My whole examination served to turn my conjecture into a certainty. Circumstantial evidence is occasionally very convincing, as when you find a trout in the milk, to quote Thoreau's example." - -"But I have heard all that you have heard." - -"Without, however, the knowledge of pre-existing cases which serves me so well. There was a parallel instance in Aberdeen some years back, and something on very much the same lines at Munich the year after the Franco-Prussian War. It is one of these cases--but, hullo, here is Lestrade! Good-afternoon, Lestrade! You will find an extra tumbler upon the sideboard, and there are cigars in the box." - -The official detective was attired in a pea-jacket and cravat, which gave him a decidedly nautical appearance, and he carried a black canvas bag in his hand. With a short greeting he seated himself and lit the cigar which had been offered to him. - -"What's up, then?" asked Holmes with a twinkle in his eye. "You look dissatisfied." - -"And I feel dissatisfied. It is this infernal St. Simon marriage case. I can make neither head nor tail of the business." - -"Really! You surprise me." - -"Who ever heard of such a mixed affair? Every clue seems to slip through my fingers. I have been at work upon it all day." - -"And very wet it seems to have made you," said Holmes laying his hand upon the arm of the pea-jacket. - -"Yes, I have been dragging the Serpentine." - -"In heaven's name, what for?" - -"In search of the body of Lady St. Simon." - -Sherlock Holmes leaned back in his chair and laughed heartily. - -"Have you dragged the basin of Trafalgar Square fountain?" he asked. - -"Why? What do you mean?" - -"Because you have just as good a chance of finding this lady in the one as in the other." - -Lestrade shot an angry glance at my companion. "I suppose you know all about it," he snarled. - -"Well, I have only just heard the facts, but my mind is made up." - -"Oh, indeed! Then you think that the Serpentine plays no part in the matter?" - -"I think it very unlikely." - -"Then perhaps you will kindly explain how it is that we found this in it?" He opened his bag as he spoke, and tumbled onto the floor a wedding-dress of watered silk, a pair of white satin shoes and a bride's wreath and veil, all discoloured and soaked in water. "There," said he, putting a new wedding-ring upon the top of the pile. "There is a little nut for you to crack, Master Holmes." - -"Oh, indeed!" said my friend, blowing blue rings into the air. "You dragged them from the Serpentine?" - -"No. They were found floating near the margin by a park-keeper. They have been identified as her clothes, and it seemed to me that if the clothes were there the body would not be far off." - -"By the same brilliant reasoning, every man's body is to be found in the neighbourhood of his wardrobe. And pray what did you hope to arrive at through this?" - -"At some evidence implicating Flora Millar in the disappearance." - -"I am afraid that you will find it difficult." - -"Are you, indeed, now?" cried Lestrade with some bitterness. "I am afraid, Holmes, that you are not very practical with your deductions and your inferences. You have made two blunders in as many minutes. This dress does implicate Miss Flora Millar." - -"And how?" - -"In the dress is a pocket. In the pocket is a card-case. In the card-case is a note. And here is the very note." He slapped it down upon the table in front of him. "Listen to this: 'You will see me when all is ready. Come at once. F. H. M.' Now my theory all along has been that Lady St. Simon was decoyed away by Flora Millar, and that she, with confederates, no doubt, was responsible for her disappearance. Here, signed with her initials, is the very note which was no doubt quietly slipped into her hand at the door and which lured her within their reach." - -"Very good, Lestrade," said Holmes, laughing. "You really are very fine indeed. Let me see it." He took up the paper in a listless way, but his attention instantly became riveted, and he gave a little cry of satisfaction. "This is indeed important," said he. - -"Ha! you find it so?" - -"Extremely so. I congratulate you warmly." - -Lestrade rose in his triumph and bent his head to look. "Why," he shrieked, "you're looking at the wrong side!" - -"On the contrary, this is the right side." - -"The right side? You're mad! Here is the note written in pencil over here." - -"And over here is what appears to be the fragment of a hotel bill, which interests me deeply." - -"There's nothing in it. I looked at it before," said Lestrade. " 'Oct. 4th, rooms 8s., breakfast 2s. 6d., cocktail 1s., lunch 2s. 6d., glass sherry, 8d.' I see nothing in that." - -"Very likely not. It is most important, all the same. As to the note, it is important also, or at least the initials are, so I congratulate you again." - -"I've wasted time enough," said Lestrade, rising. "I believe in hard work and not in sitting by the fire spinning fine theories. Good-day, Mr. Holmes, and we shall see which gets to the bottom of the matter first." He gathered up the garments, thrust them into the bag, and made for the door. - -"Just one hint to you, Lestrade," drawled Holmes before his rival vanished; "I will tell you the true solution of the matter. Lady St. Simon is a myth. There is not, and there never has been, any such person." - -Lestrade looked sadly at my companion. Then he turned to me, tapped his forehead three times, shook his head solemnly, and hurried away. - -He had hardly shut the door behind him when Holmes rose to put on his overcoat. "There is something in what the fellow says about outdoor work," he remarked, "so I think, Watson, that I must leave you to your papers for a little." - -It was after five o'clock when Sherlock Holmes left me, but I had no time to be lonely, for within an hour there arrived a confectioner's man with a very large flat box. This he unpacked with the help of a youth whom he had brought with him, and presently, to my very great astonishment, a quite epicurean little cold supper began to be laid out upon our humble lodging-house mahogany. There were a couple of brace of cold woodcock, a pheasant, a pate de foie gras pie with a group of ancient and cobwebby bottles. Having laid out all these luxuries, my two visitors vanished away, like the genii of the Arabian Nights, with no explanation save that the things had been paid for and were ordered to this address. - -Just before nine o'clock Sherlock Holmes stepped briskly into the room. His features were gravely set, but there was a light in his eye which made me think that he had not been disappointed in his conclusions. - -"They have laid the supper, then," he said, rubbing his hands. - -"You seem to expect company. They have laid for five." - -"Yes, I fancy we may have some company dropping in," said he. "I am surprised that Lord St. Simon has not already arrived. Ha! I fancy that I hear his step now upon the stairs." - -It was indeed our visitor of the afternoon who came bustling in, dangling his glasses more vigorously than ever, and with a very perturbed expression upon his aristocratic features. - - - -To conserve the patient's strength by preventing or diminishing the -severity of the spasms, he should be placed in a quiet room, and every -form of disturbance avoided. Sedatives, such as bromides, paraldehyde, -or opium, must be given in large doses. Chloral is perhaps the best, and -the patient should rarely have less than 150 grains in twenty-four -hours. When he is unable to swallow, it should be given by the rectum. -The administration of chloroform is of value in conserving the strength -of the patient, by abolishing the spasms, and enabling the attendants to -administer nourishment or drugs either through a stomach tube or by the -rectum. Extreme elevation of temperature is met by tepid sponging. It is -necessary to use the catheter if retention of urine occurs. - - -HYDROPHOBIA - -Hydrophobia is an acute infective disease following on the bite of a -rabid animal. It most commonly follows the bite or lick of a rabid dog -or cat. The virus appears to be communicated through the saliva of the -animal, and to show a marked affinity for nerve tissues; and the disease -is most likely to develop when the patient is infected on the face or -other uncovered part, or in a part richly endowed with nerves. - -A dog which has bitten a person should on no account be killed until its -condition has been proved one way or the other. Should rabies develop -and its destruction become necessary, the head and spinal cord should be -retained and forwarded, packed in ice, to a competent observer. Much -anxiety to the person bitten and to his friends would be avoided if -these rules were observed, because in many cases it will be shown that -the animal did not after all suffer from rabies, and that the patient -consequently runs no risk. If, on the other hand, rabies is proved to be -present, the patient should be submitted to the Pasteur treatment. - -_Clinical Features._--There is almost always a history of the patient -having been bitten or licked by an animal supposed to suffer from -rabies. The incubation period averages about forty days, but varies from -a fortnight to seven or eight months, and is shorter in young than in -old persons. The original wound has long since healed, and beyond a -slight itchiness or pain shooting along the nerves of the part, shows no -sign of disturbance. A few days of general malaise, with chills and -giddiness precede the onset of the acute manifestations, which affect -chiefly the muscles of deglutition and respiration. One of the earliest -signs is that the patient has periodically a sudden catch in his -breathing "resembling what often occurs when a person goes into a cold -bath." This is due to spasm of the diaphragm, and is frequently -accompanied by a loud-sounding hiccough, likened by the laity to the -barking of a dog. Difficulty in swallowing fluids may be the first -symptom. - -The spasms rapidly spread to all the muscles of deglutition and -respiration, so that the patient not only has the greatest difficulty in -swallowing, but has a constant sense of impending suffocation. To add to -his distress, a copious secretion of viscid saliva fills his mouth. Any -voluntary effort, as well as all forms of external stimuli, only serve -to aggravate the spasms which are always induced by the attempt to -swallow fluid, or even by the sound of running water. - -The temperature is raised; the pulse is small, rapid, and intermittent; -and the urine may contain sugar and albumen. - -The mind may remain clear to the end, or the patient may have delusions, -supposing himself to be surrounded by terrifying forms. There is always -extreme mental agitation and despair, and the sufferer is in constant -fear of his impending fate. Happily the inevitable issue is not long -delayed, death usually occurring in from two to four days from the -onset. The symptoms of the disease are so characteristic that there is -no difficulty in diagnosis. The only condition with which it is liable -to be confused is the variety of cephalic tetanus in which the muscles -of deglutition are specially involved--the so-called tetanus -hydrophobicus. - -_Prophylaxis._--The bite of an animal suspected of being rabid should be -cauterised at once by means of the actual or Paquelin cautery, or by a -strong chemical escharotic such as pure carbolic acid, after which -antiseptic dressings are applied. - -It is, however, to Pasteur's _preventive inoculation_ that we must look -for our best hope of averting the onset of symptoms. "It may now be -taken as established that a grave responsibility rests on those -concerned if a person bitten by a mad animal is not subjected to the -Pasteur treatment" (Muir and Ritchie). - -This method is based on the fact that the long incubation period of the -disease admits of the patient being inoculated with a modified virus -producing a mild attack, which protects him from the natural disease. - -_Treatment._--When the symptoms have once developed they can only be -palliated. The patient must be kept absolutely quiet and free from all -sources of irritation. The spasms may be diminished by means of chloral -and bromides, or by chloroform inhalation. - - -ANTHRAX - -Anthrax is a comparatively rare disease, communicable to man from -certain of the lower animals, such as sheep, oxen, horses, deer, and -other herbivora. In animals it is characterised by symptoms of acute -general poisoning, and, from the fact that it produces a marked -enlargement of the spleen, is known in veterinary surgery as "splenic -fever." - -The _bacillus anthracis_ (Fig. 27), the largest of the known pathogenic -bacteria, occurs in groups or in chains made up of numerous bacilli, -each bacillus measuring from 6 to 8 u in length. The organisms are found -in enormous numbers throughout the bodies of animals that have died of -anthrax, and are readily recognised and cultivated. Sporulation only -takes place outside the body, probably because free oxygen is necessary -to the process. In the spore-free condition, the organisms are readily -destroyed by ordinary germicides, and by the gastric juice. The spores, -on the other hand, have a high degree of resistance. Not only do they -remain viable in the dry state for long periods, even up to a year, but -they survive boiling for five minutes, and must be subjected to dry heat -at 140 o C. for several hours before they are destroyed. - -[Illustration: FIG. 27.--Bacillus of Anthrax in section of skin, from a -case of malignant pustule; shows vesicle containing bacilli. x 400 diam. -Gram's stain.] - -_Clinical Varieties of Anthrax._--In man, anthrax may manifest itself in -one of three clinical forms. - -It may be transmitted by means of spores or bacilli directly from a -diseased animal to those who, by their occupation or otherwise, are -brought into contact with it--for example, shepherds, butchers, -veterinary surgeons, or hide-porters. Infection may occur on the face by -the use of a shaving-brush contaminated by spores. The path of infection -is usually through an abrasion of the skin, and the primary -manifestations are local, constituting what is known as _the malignant -pustule_. - -In other cases the disease is contracted through the inhalation of the -dried spores into the respiratory passages. This occurs oftenest in -those who work amongst wool, fur, and rags, and a form of acute -pneumonia of great virulence ensues. This affection is known as -_wool-sorter's disease_, and is almost universally fatal. - -There is reason to believe that infection may also take place by means -of spores ingested into the alimentary canal in meat or milk derived -from diseased animals, or in infected water. - - -become associated with branches from the musculo-cutaneous is followed -by a loss of sensibility on the radial side of the hand and thumb. Wounds -on the dorsal surface of the wrist and forearm are often followed by -loss of sensibility over a larger area, because the musculo-cutaneous -nerve is divided as well, and some of the fibres of the lower lateral -cutaneous branch of the radial. - -[Illustration: FIG. 91.--To illustrate the Loss of Sensation produced by -Division of the Median Nerve. The area of complete cutaneous -insensibility is shaded black. The parts insensitive to light touch and -to intermediate degrees of temperature are enclosed within the dotted -line. - -(After Head and Sherren.)] - -#The Median Nerve# is most frequently injured in wounds made by broken -glass in the region of the wrist. It may also be injured in fractures of -the lower end of the humerus, in fractures of both bones of the forearm, -and as a result of pressure by splints. After _division at the elbow_, -there is impairment of mobility which affects the thumb, and to a less -extent the index finger: the terminal phalanx of the thumb cannot be -flexed owing to the paralysis of the flexor pollicis longus, and the -index can only be flexed at its metacarpo-phalangeal joint by the -interosseous muscles attached to it. Pronation of the forearm is feeble, -and is completed by the weight of the hand. After _division at the -wrist_, the abductor-opponens group of muscles and the two lateral -lumbricals only are affected; the abduction of the thumb can be feebly -imitated by the short extensor and the long abductor (ext. ossis -metacarpi pollicis), while opposition may be simulated by contraction of -the long flexor and the short abductor of the thumb; the paralysis of -the two medial lumbricals produces no symptoms that can be recognised. -It is important to remember that when the median nerve is divided at the -wrist, deep touch can be appreciated over the whole of the area -supplied by the nerve; the injury, therefore, is liable to be over -looked. If, however, the tendons are divided as well as the nerve, there -is insensibility to deep touch. The areas of epicritic and of -protopathic insensibility are illustrated in Fig. 91. The division of -the nerve at the elbow, or even at the axilla, does not increase the -extent of the loss of epicritic or protopathic sensibility, but usually -affects deep sensibility. - -[Illustration: FIG. 92.--To illustrate Loss of Sensation produced by -complete Division of Ulnar Nerve. Loss of all forms of cutaneous -sensibility is represented by the shaded area. The parts insensitive to -light touch and to intermediate degrees of heat and cold are enclosed -within the dotted line. - -(Head and Sherren.)] - -#The Ulnar Nerve.#--The most common injury of this nerve is its division -in transverse accidental wounds just above the wrist. In the arm it may -be contused, along with the radial, in crutch paralysis; in the region -of the elbow it may be injured in fractures or dislocations, or it may -be accidentally divided in the operation for excising the elbow-joint. - - -same class as himself and possessed the same breeding and -traditions, Bolkonski would soon have discovered his weak, human, -unheroic sides; but as it was, Speranski's strange and logical turn of -mind inspired him with respect all the more because he did not quite -understand him. Moreover, Speranski, either because he appreciated the -other's capacity or because he considered it necessary to win him to -his side, showed off his dispassionate calm reasonableness before -Prince Andrew and flattered him with that subtle flattery which goes -hand in hand with self-assurance and consists in a tacit assumption -that one's companion is the only man besides oneself capable of -understanding the folly of the rest of mankind and the -reasonableness and profundity of one's own ideas. - -During their long conversation on Wednesday evening, Speranski -more than once remarked: "We regard everything that is above the -common level of rooted custom..." or, with a smile: "But we want the -wolves to be fed and the sheep to be safe..." or: "They cannot -understand this..." and all in a way that seemed to say: "We, you -and I, understand what they are and who we are." - -This first long conversation with Speranski only strengthened in -Prince Andrew the feeling he had experienced toward him at their first -meeting. He saw in him a remarkable, clear-thinking man of vast -intellect who by his energy and persistence had attained power, -which he was using solely for the welfare of Russia. In Prince -Andrew's eyes Speranski was the man he would himself have wished to -be--one who explained all the facts of life reasonably, considered -important only what was rational, and was capable of applying the -standard of reason to everything. Everything seemed so simple and -clear in Speranski's exposition that Prince Andrew involuntarily -agreed with him about everything. If he replied and argued, it was -only because he wished to maintain his independence and not submit -to Speranski's opinions entirely. Everything was right and -everything was as it should be: only one thing disconcerted Prince -Andrew. This was Speranski's cold, mirrorlike look, which did not -allow one to penetrate to his soul, and his delicate white hands, -which Prince Andrew involuntarily watched as one does watch the -hands of those who possess power. This mirrorlike gaze and those -delicate hands irritated Prince Andrew, he knew not why. He was -unpleasantly struck, too, by the excessive contempt for others that he -observed in Speranski, and by the diversity of lines of argument he -used to support his opinions. He made use of every kind of mental -device, except analogy, and passed too boldly, it seemed to Prince -Andrew, from one to another. Now he would take up the position of a -practical man and condemn dreamers; now that of a satirist, and -laugh ironically at his opponents; now grow severely logical, or -suddenly rise to the realm of metaphysics. (This last resource was one -he very frequently employed.) He would transfer a question to -metaphysical heights, pass on to definitions of space, time, and -thought, and, having deduced the refutation he needed, would again -descend to the level of the original discussion. - -In general the trait of Speranski's mentality which struck Prince -Andrew most was his absolute and unshakable belief in the power and -authority of reason. It was evident that the thought could never occur -to him which to Prince Andrew seemed so natural, namely, that it is -after all impossible to express all one thinks; and that he had -never felt the doubt, "Is not all I think and believe nonsense?" And -it was just this peculiarity of Speranski's mind that particularly -attracted Prince Andrew. - -During the first period of their acquaintance Bolkonski felt a -passionate admiration for him similar to that which he had once felt -for Bonaparte. The fact that Speranski was the son of a village -priest, and that stupid people might meanly despise him on account -of his humble origin (as in fact many did), caused Prince Andrew to -cherish his sentiment for him the more, and unconsciously to -strengthen it. - -On that first evening Bolkonski spent with him, having mentioned the -Commission for the Revision of the Code of Laws, Speranski told him -sarcastically that the Commission had existed for a hundred and -fifty years, had cost millions, and had done nothing except that -Rosenkampf had stuck labels on the corresponding paragraphs of the -different codes. - -"And that is all the state has for the millions it has spent," -said he. "We want to give the Senate new juridical powers, but we have -no laws. That is why it is a sin for men like you, Prince, not to -serve in these times!" - -Prince Andrew said that for that work an education in -jurisprudence was needed which he did not possess. - -"But nobody possesses it, so what would you have? It is a vicious -circle from which we must break a way out." - -A week later Prince Andrew was a member of the Committee on Army -Regulations and--what he had not at all expected--was chairman of a -section of the committee for the revision of the laws. At -Speranski's request he took the first part of the Civil Code that -was being drawn up and, with the aid of the Code Napoleon and the -Institutes of Justinian, he worked at formulating the section on -Personal Rights. - - - - - -CHAPTER VII - - -Nearly two years before this, in 1808, Pierre on returning to -Petersburg after visiting his estates had involuntarily found -himself in a leading position among the Petersburg Freemasons. He -arranged dining and funeral lodge meetings, enrolled new members, -and busied himself uniting various lodges and acquiring authentic -charters. He gave money for the erection of temples and supplemented -as far as he could the collection of alms, in regard to which the -majority of members were stingy and irregular. He supported almost -singlehanded a poorhouse the order had founded in Petersburg. - -His life meanwhile continued as before, with the same infatuations -and dissipations. He liked to dine and drink well, and though he -considered it immoral and humiliating could not resist the temptations -of the bachelor circles in which he moved. - -Amid the turmoil of his activities and distractions, however, Pierre -at the end of a year began to feel that the more firmly he tried to -rest upon it, the more Masonic ground on which he stood gave way under -him. At the same time he felt that the deeper the ground sank under -him the closer bound he involuntarily became to the order. When he had -joined the Freemasons he had experienced the feeling of one who -confidently steps onto the smooth surface of a bog. When he put his -foot down it sank in. To make quite sure of the firmness the ground, -he put his other foot down and sank deeper still, became stuck in -it, and involuntarily waded knee-deep in the bog. - -Joseph Alexeevich was not in Petersburg--he had of late stood -aside from the affairs of the Petersburg lodges, and lived almost -entirely in Moscow. All the members of the lodges were men Pierre knew -in ordinary life, and it was difficult for him to regard them merely -as Brothers in Freemasonry and not as Prince B. or Ivan Vasilevich D., -whom he knew in society mostly as weak and insignificant men. Under -the Masonic aprons and insignia he saw the uniforms and decorations at -which they aimed in ordinary life. Often after collecting alms, and -reckoning up twenty to thirty rubles received for the most part in -promises from a dozen members, of whom half were as well able to pay -as himself, Pierre remembered the Masonic vow in which each Brother -promised to devote all his belongings to his neighbor, and doubts on -which he tried not to dwell arose in his soul. - -He divided the Brothers he knew into four categories. In the first -he put those who did not take an active part in the affairs of the -lodges or in human affairs, but were exclusively occupied with the -mystical science of the order: with questions of the threefold -designation of God, the three primordial elements--sulphur, mercury, -and salt--or the meaning of the square and all the various figures -of the temple of Solomon. Pierre respected this class of Brothers to -which the elder ones chiefly belonged, including, Pierre thought, -Joseph Alexeevich himself, but he did not share their interests. His -heart was not in the mystical aspect of Freemasonry. - -In the second category Pierre reckoned himself and others like -him, seeking and vacillating, who had not yet found in Freemasonry a -straight and comprehensible path, but hoped to do so. - -In the third category he included those Brothers (the majority) -who saw nothing in Freemasonry but the external forms and -ceremonies, and prized the strict performance of these forms without -troubling about their purport or significance. Such were Willarski and -even the Grand Master of the principal lodge. - -Finally, to the fourth category also a great many Brothers belonged, -particularly those who had lately joined. These according to -Pierre's observations were men who had no belief in anything, nor -desire for anything, but joined the Freemasons merely to associate -with the wealthy young Brothers who were influential through their -connections or rank, and of whom there were very many in the lodge. - -Pierre began to feel dissatisfied with what he was doing. -Freemasonry, at any rate as he saw it here, sometimes seemed to him -based merely on externals. He did not think of doubting Freemasonry -itself, but suspected that Russian Masonry had taken a wrong path -and deviated from its original principles. And so toward the end of -the year he went abroad to be initiated into the higher secrets of the -order. - -In the summer of 1809 Pierre returned to Petersburg. Our -Freemasons knew from correspondence with those abroad that Bezukhov -had obtained the confidence of many highly placed persons, had been -initiated into many mysteries, had been raised to a higher grade, -and was bringing back with him much that might conduce to the -advantage of the Masonic cause in Russia. The Petersburg Freemasons -all came to see him, tried to ingratiate themselves with him, and it -seemed to them all that he was preparing something for them and -concealing it. - -A solemn meeting of the lodge of the second degree was convened, -at which Pierre promised to communicate to the Petersburg Brothers -what he had to deliver to them from the highest leaders of their -order. The meeting was a full one. After the usual ceremonies Pierre -rose and began his address. - -"Dear Brothers," he began, blushing and stammering, with a written -speech in his hand, "it is not sufficient to observe our mysteries -in the seclusion of our lodge--we must act--act! We are drowsing, -but we must act." Pierre raised his notebook and began to read. - -"For the dissemination of pure truth and to secure the triumph of -virtue," he read, "we must cleanse men from prejudice, diffuse -principles in harmony with the spirit of the times, undertake the -education of the young, unite ourselves in indissoluble bonds with the -wisest men, boldly yet prudently overcome superstitions, infidelity, -and folly, and form of those devoted to us a body linked together by -unity of purpose and possessed of authority and power. - -"To attain this end we must secure a preponderance of virtue over -vice and must endeavor to secure that the honest man may, even in this -world, receive a lasting reward for his virtue. But in these great -endeavors we are gravely hampered by the political institutions of -today. What is to be done in these circumstances? To favor -revolutions, overthrow everything, repel force by force?... No! We are -very far from that. Every violent reform deserves censure, for it -quite fails to remedy evil while men remain what they are, and also -because wisdom needs no violence. - -"The whole plan of our order should be based on the idea of -preparing men of firmness and virtue bound together by unity of -conviction--aiming at the punishment of vice and folly, and -patronizing talent and virtue: raising worthy men from the dust and -attaching them to our Brotherhood. Only then will our order have the -power unobtrusively to bind the hands of the protectors of disorder -and to control them without their being aware of it. In a word, we -must found a form of government holding universal sway, which should -be diffused over the whole world without destroying the bonds of -citizenship, and beside which all other governments can continue in -their customary course and do everything except what impedes the great -aim of our order, which is to obtain for virtue the victory over vice. -This aim was that of Christianity itself. It taught men to be wise and -good and for their own benefit to follow the example and instruction -of the best and wisest men. - -"At that time, when everything was plunged in darkness, preaching -alone was of course sufficient. The novelty of Truth endowed her -with special strength, but now we need much more powerful methods. -It is now necessary that man, governed by his senses, should find in -virtue a charm palpable to those senses. It is impossible to eradicate -the passions; but we must strive to direct them to a noble aim, and it -is therefore necessary that everyone should be able to satisfy his -passions within the limits of virtue. Our order should provide means -to that end. - -"As soon as we have a certain number of worthy men in every state, -each of them again training two others and all being closely united, -everything will be possible for our order, which has already in secret -accomplished much for the welfare of mankind." - -This speech not only made a strong impression, but created -excitement in the lodge. The majority of the Brothers, seeing in it -dangerous designs of Illuminism,* met it with a coldness that -surprised Pierre. The Grand Master began answering him, and Pierre -began developing his views with more and more warmth. It was long -since there had been so stormy a meeting. Parties were formed, some -accusing Pierre of Illuminism, others supporting him. At that -meeting he was struck for the first time by the endless variety of -men's minds, which prevents a truth from ever presenting itself -identically to two persons. Even those members who seemed to be on his -side understood him in their own way with limitations and -alterations he could not agree to, as what he always wanted most was -to convey his thought to others just as he himself understood it. - - -*The Illuminati sought to substitute republican for monarchical -institutions. - - -At the end of the meeting the Grand Master with irony and ill-will -reproved Bezukhov for his vehemence and said it was not love of virtue -alone, but also a love of strife that had moved him in the dispute. -Pierre did not answer him and asked briefly whether his proposal would -be accepted. He was told that it would not, and without waiting for -the usual formalities he left the lodge and went home. - - - - - -CHAPTER VIII - - -Again Pierre was overtaken by the depression he so dreaded. For -three days after the delivery of his speech at the lodge he lay on a -sofa at home receiving no one and going nowhere. - -It was just then that he received a letter from his wife, who -implored him to see her, telling him how grieved she was about him and -how she wished to devote her whole life to him. - -At the end of the letter she informed him that in a few days she -would return to Petersburg from abroad. - -Following this letter one of the Masonic Brothers whom Pierre -respected less than the others forced his way in to see him and, -turning the conversation upon Pierre's matrimonial affairs, by way -of fraternal advice expressed the opinion that his severity to his -wife was wrong and that he was neglecting one of the first rules of -Freemasonry by not forgiving the penitent. - -At the same time his mother-in-law, Prince Vasili's wife, sent to -him imploring him to come if only for a few minutes to discuss a -most important matter. Pierre saw that there was a conspiracy -against him and that they wanted to reunite him with his wife, and -in the mood he then was, this was not even unpleasant to him. -Nothing mattered to him. Nothing in life seemed to him of much -importance, and under the influence of the depression that possessed -him he valued neither his liberty nor his resolution to punish his -wife. - -"No one is right and no one is to blame; so she too is not to -blame," he thought. - -If he did not at once give his consent to a reunion with his wife, -it was only because in his state of depression he did not feel able to -take any step. Had his wife come to him, he would not have turned -her away. Compared to what preoccupied him, was it not a matter of -indifference whether he lived with his wife or not? - -Without replying either to his wife or his mother-in-law, Pierre -late one night prepared for a journey and started for Moscow to see -Joseph Alexeevich. This is what he noted in his diary: - - -Moscow, 17th November - -I have just returned from my benefactor, and hasten to write down -what I have experienced. Joseph Alexeevich is living poorly and has -for three years been suffering from a painful disease of the -bladder. No one has ever heard him utter a groan or a word of -complaint. From morning till late at night, except when he eats his -very plain food, he is working at science. He received me graciously -and made me sit down on the bed on which he lay. I made the sign of -the Knights of the East and of Jerusalem, and he responded in the same -manner, asking me with a mild smile what I had learned and gained in -the Prussian and Scottish lodges. I told him everything as best I -could, and told him what I had proposed to our Petersburg lodge, of -the bad reception I had encountered, and of my rupture with the -Brothers. Joseph Alexeevich, having remained silent and thoughtful for -a good while, told me his view of the matter, which at once lit up for -me my whole past and the future path I should follow. He surprised -me by asking whether I remembered the threefold aim of the order: -(1) The preservation and study of the mystery. (2) The purification -and reformation of oneself for its reception, and (3) The -improvement of the human race by striving for such purification. Which -is the principal aim of these three? Certainly self-reformation and -self-purification. Only to this aim can we always strive independently -of circumstances. But at the same time just this aim demands the -greatest efforts of us; and so, led astray by pride, losing sight of -this aim, we occupy ourselves either with the mystery which in our -impurity we are unworthy to receive, or seek the reformation of the -human race while ourselves setting an example of baseness and -profligacy. Illuminism is not a pure doctrine, just because it is -attracted by social activity and puffed up by pride. On this ground -Joseph Alexeevich condemned my speech and my whole activity, and in -the depth of my soul I agreed with him. Talking of my family affairs -he said to me, "the chief duty of a true Mason, as I have told you, -lies in perfecting himself. We often think that by removing all the -difficulties of our life we shall more quickly reach our aim, but on -the contrary, my dear sir, it is only in the midst of worldly cares -that we can attain our three chief aims: (1) Self-knowledge--for man -can only know himself by comparison, (2) Self-perfecting, which can -only be attained by conflict, and (3) The attainment of the chief -virtue--love of death. Only the vicissitudes of life can show us its -vanity and develop our innate love of death or of rebirth to a new -life." These words are all the more remarkable because, in spite of -his great physical sufferings, Joseph Alexeevich is never weary of -life though he loves death, for which--in spite of the purity and -loftiness of his inner man--he does not yet feel himself -sufficiently prepared. My benefactor then explained to me fully the -meaning of the Great Square of creation and pointed out to me that the -numbers three and seven are the basis of everything. He advised me not -to avoid intercourse with the Petersburg Brothers, but to take up only -second-grade posts in the lodge, to try, while diverting the -Brothers from pride, to turn them toward the true path -self-knowledge and self-perfecting. Besides this he advised me for -myself personally above all to keep a watch over myself, and to that -end he gave me a notebook, the one I am now writing in and in which -I will in future note down all my actions. - - -Petersburg, 23rd November - -I am again living with my wife. My mother-in-law came to me in tears -and said that Helene was here and that she implored me to hear her; -that she was innocent and unhappy at my desertion, and much more. I -knew that if I once let myself see her I should not have strength to -go on refusing what she wanted. In my perplexity I did not know -whose aid and advice to seek. Had my benefactor been here he would -have told me what to do. I went to my room and reread Joseph -Alexeevich's letters and recalled my conversations with him, and -deduced from it all that I ought not to refuse a suppliant, and -ought to reach a helping hand to everyone--especially to one so -closely bound to me--and that I must bear my cross. But if I forgive -her for the sake of doing right, then let union with her have only a -spiritual aim. That is what I decided, and what I wrote to Joseph -Alexeevich. I told my wife that I begged her to forget the past, to -forgive me whatever wrong I may have done her, and that I had -nothing to forgive. It gave me joy to tell her this. She need not know -how hard it was for me to see her again. I have settled on the upper -floor of this big house and am experiencing a happy feeling of -regeneration. - - - - - -CHAPTER IX - - -At that time, as always happens, the highest society that met at -court and at the grand balls was divided into several circles, each -with its own particular tone. The largest of these was the French -circle of the Napoleonic alliance, the circle of Count Rumyantsev -and Caulaincourt. In this group Helene, as soon as she had settled -in Petersburg with her husband, took a very prominent place. She was -visited by the members of the French embassy and by many belonging -to that circle and noted for their intellect and polished manners. - -Helene had been at Erfurt during the famous meeting of the -Emperors and had brought from there these connections with the -Napoleonic notabilities. At Erfurt her success had been brilliant. -Napoleon himself had noticed her in the theater and said of her: -"C'est un superbe animal."* Her success as a beautiful and elegant -woman did not surprise Pierre, for she had become even handsomer -than before. What did surprise him was that during these last two -years his wife had succeeded in gaining the reputation "d' une femme -charmante, aussi spirituelle que belle."*[2] The distinguished -Prince de Ligne wrote her eight-page letters. Bilibin saved up his -epigrams to produce them in Countess Bezukhova's presence. To be -received in the Countess Bezukhova's salon was regarded as a diploma -of intellect. Young men read books before attending Helene's evenings, -to have something to say in her salon, and secretaries of the embassy, -and even ambassadors, confided diplomatic secrets to her, so that in a -way Helene was a power. Pierre, who knew she was very stupid, -sometimes attended, with a strange feeling of perplexity and fear, her -evenings and dinner parties, where politics, poetry, and philosophy -were discussed. At these parties his feelings were like those of a -conjuror who always expects his trick to be found out at any moment. -But whether because stupidity was just what was needed to run such a -salon, or because those who were deceived found pleasure in the -deception, at any rate it remained unexposed and Helene Bezukhova's -reputation as a lovely and clever woman became so firmly established -that she could say the emptiest and stupidest things and everybody -would go into raptures over every word of hers and look for a profound -meaning in it of which she herself had no conception. - - -*"That's a superb animal." - -*[2] "Of a charming woman, as witty as she is lovely." - - -Pierre was just the husband needed for a brilliant society woman. He -was that absent-minded crank, a grand seigneur husband who was in no -one's way, and far from spoiling the high tone and general -impression of the drawing room, he served, by the contrast he -presented to her, as an advantageous background to his elegant and -tactful wife. Pierre during the last two years, as a result of his -continual absorption in abstract interests and his sincere contempt -for all else, had acquired in his wife's circle, which did not -interest him, that air of unconcern, indifference, and benevolence -toward all, which cannot be acquired artificially and therefore -inspires involuntary respect. He entered his wife's drawing room as -one enters a theater, was acquainted with everybody, equally pleased -to see everyone, and equally indifferent to them all. Sometimes he -joined in a conversation which interested him and, regardless of -whether any "gentlemen of the embassy" were present or not, -lispingly expressed his views, which were sometimes not at all in -accord with the accepted tone of the moment. But the general opinion -concerning the queer husband of "the most distinguished woman in -Petersburg" was so well established that no one took his freaks -seriously. - -Among the many young men who frequented her house every day, Boris -Drubetskoy, who had already achieved great success in the service, was -the most intimate friend of the Bezukhov household since Helene's -return from Erfurt. Helene spoke of him as "mon page" and treated -him like a child. Her smile for him was the same as for everybody, but -sometimes that smile made Pierre uncomfortable. Toward him Boris -behaved with a particularly dignified and sad deference. This shade of -deference also disturbed Pierre. He had suffered so painfully three -years before from the mortification to which his wife had subjected -him that he now protected himself from the danger of its repetition, -first by not being a husband to his wife, and secondly by not allowing -himself to suspect. - -"No, now that she has become a bluestocking she has finally -renounced her former infatuations," he told himself. "There has -never been an instance of a bluestocking being carried away by affairs -of the heart"--a statement which, though gathered from an unknown -source, he believed implicitly. Yet strange to say Boris' presence -in his wife's drawing room (and he was almost always there) had a -physical effect upon Pierre; it constricted his limbs and destroyed -the unconsciousness and freedom of his movements. - -"What a strange antipathy," thought Pierre, "yet I used to like -him very much." - -In the eyes of the world Pierre was a great gentleman, the rather -blind and absurd husband of a distinguished wife, a clever crank who -did nothing but harmed nobody and was a first-rate, good-natured -fellow. But a complex and difficult process of internal development -was taking place all this time in Pierre's soul, revealing much to him -and causing him many spiritual doubts and joys. - - - - - -CHAPTER X - - -Pierre went on with his diary, and this is what he wrote in it -during that time: - - -24th November - -Got up at eight, read the Scriptures, then went to my duties. [By -Joseph Alexeevich's advice Pierre had entered the service of the state -and served on one of the committees.] Returned home for dinner and -dined alone--the countess had many visitors I do not like. I ate and -drank moderately and after dinner copied out some passages for the -Brothers. In the evening I went down to the countess and told a -funny story about B., and only remembered that I ought not to have -done so when everybody laughed loudly at it. - -I am going to bed with a happy and tranquil mind. Great God, help me -to walk in Thy paths, (1) to conquer anger by calmness and -deliberation, (2) to vanquish lust by self-restraint and repulsion, -(3) to withdraw from worldliness, but not avoid (a) the service of the -state, (b) family duties, (c) relations with my friends, and the -management of my affairs. - - -27th November - -I got up late. On waking I lay long in bed yielding to sloth. O God, -help and strengthen me that I may walk in Thy ways! Read the -Scriptures, but without proper feeling. Brother Urusov came and we -talked about worldly vanities. He told me of the Emperor's new -projects. I began to criticize them, but remembered my rules and my -benefactor's words--that a true Freemason should be a zealous worker -for the state when his aid is required and a quiet onlooker when not -called on to assist. My tongue is my enemy. Brothers G. V. and O. -visited me and we had a preliminary talk about the reception of a -new Brother. They laid on me the duty of Rhetor. I feel myself weak -and unworthy. Then our talk turned to the interpretation of the -seven pillars and steps of the Temple, the seven sciences, the seven -virtues, the seven vices, and the seven gifts of the Holy Spirit. -Brother O. was very eloquent. In the evening the admission took place. -The new decoration of the Premises contributed much to the -magnificence of the spectacle. It was Boris Drubetskoy who was -admitted. I nominated him and was the Rhetor. A strange feeling -agitated me all the time I was alone with him in the dark chamber. I -caught myself harboring a feeling of hatred toward him which I -vainly tried to overcome. That is why I should really like to save him -from evil and lead him into the path of truth, but evil thoughts of -him did not leave me. It seemed to me that his object in entering -the Brotherhood was merely to be intimate and in favor with members of -our lodge. Apart from the fact that he had asked me several times -whether N. and S. were members of our lodge (a question to which I -could not reply) and that according to my observation he is -incapable of feeling respect for our holy order and is too preoccupied -and satisfied with the outer man to desire spiritual improvement, I -had no cause to doubt him, but he seemed to me insincere, and all -the time I stood alone with him in the dark temple it seemed to me -that he was smiling contemptuously at my words, and I wished really to -stab his bare breast with the sword I held to it. I could not be -eloquent, nor could I frankly mention my doubts to the Brothers and to -the Grand Master. Great Architect of Nature, help me to find the -true path out of the labyrinth of lies! - - - After this, three pages were left blank in the diary, and then -the following was written: - - -I have had a long and instructive talk alone with Brother V., who -advised me to hold fast by brother A. Though I am unworthy, much was -revealed to me. Adonai is the name of the creator of the world. Elohim -is the name of the ruler of all. The third name is the name -unutterable which means the All. Talks with Brother V. strengthen, -refresh, and support me in the path of virtue. In his presence doubt -has no place. The distinction between the poor teachings of mundane -science and our sacred all-embracing teaching is clear to me. Human -sciences dissect everything to comprehend it, and kill everything to -examine it. In the holy science of our order all is one, all is -known in its entirety and life. The Trinity--the three elements of -matter--are sulphur, mercury, and salt. Sulphur is of an oily and -fiery nature; in combination with salt by its fiery nature it -arouses a desire in the latter by means of which it attracts -mercury, seizes it, holds it, and in combination produces other -bodies. Mercury is a fluid, volatile, spiritual essence. Christ, the -Holy Spirit, Him!... - - -3rd December - -Awoke late, read the Scriptures but was apathetic. Afterwards went -and paced up and down the large hall. I wished to meditate, but -instead my imagination pictured an occurrence of four years ago, -when Dolokhov, meeting me in Moscow after our duel, said he hoped I -was enjoying perfect peace of mind in spite of my wife's absence. At -the time I gave him no answer. Now I recalled every detail of that -meeting and in my mind gave him the most malevolent and bitter -replies. I recollected myself and drove away that thought only when -I found myself glowing with anger, but I did not sufficiently -repent. Afterwards Boris Drubetskoy came and began relating various -adventures. His coming vexed me from the first, and I said something -disagreeable to him. He replied. I flared up and said much that was -unpleasant and even rude to him. He became silent, and I recollected -myself only when it was too late. My God, I cannot get on with him -at all. The cause of this is my egotism. I set myself above him and so -become much worse than he, for he is lenient to my rudeness while I on -the contrary nourish contempt for him. O God, grant that in his -presence I may rather see my own vileness, and behave so that he too -may benefit. After dinner I fell asleep and as I was drowsing off I -clearly heard a voice saying in my left ear, "Thy day!" - -I dreamed that I was walking in the dark and was suddenly surrounded -by dogs, but I went on undismayed. Suddenly a smallish dog seized my -left thigh with its teeth and would not let go. I began to throttle it -with my hands. Scarcely had I torn it off before another, a bigger -one, began biting me. I lifted it up, but the higher I lifted it the -bigger and heavier it grew. And suddenly Brother A. came and, taking -my arm, led me to a building to enter which we had to pass along a -narrow plank. I stepped on it, but it bent and gave way and I began to -clamber up a fence which I could scarcely reach with my hands. After -much effort I dragged myself up, so that my leg hung down on one -side and my body on the other. I looked round and saw Brother A. -standing on the fence and pointing me to a broad avenue and garden, -and in the garden was a large and beautiful building. I woke up. O -Lord, great Architect of Nature, help me to tear from myself these -dogs--my passions especially the last, which unites in itself the -strength of all the former ones, and aid me to enter that temple of -virtue to a vision of which I attained in my dream. - - -7th December - -I dreamed that Joseph Alexeevich was sitting in my house, and that I -was very glad and wished to entertain him. It seemed as if I chattered -incessantly with other people and suddenly remembered that this -could not please him, and I wished to come close to him and embrace -him. But as soon as I drew near I saw that his face had changed and -grown young, and he was quietly telling me something about the -teaching of our order, but so softly that I could not hear it. Then it -seemed that we all left the room and something strange happened. We -were sitting or lying on the floor. He was telling me something, and I -wished to show him my sensibility, and not listening to what he was -saying I began picturing to myself the condition of my inner man and -the grace of God sanctifying me. And tears came into my eyes, and I -was glad he noticed this. But he looked at me with vexation and jumped -up, breaking off his remarks. I felt abashed and asked whether what he -had been saying did not concern me; but he did not reply, gave me a -kind look, and then we suddenly found ourselves in my bedroom where -there is a double bed. He lay down on the edge of it and I burned with -longing to caress him and lie down too. And he said, "Tell me -frankly what is your chief temptation? Do you know it? I think you -know it already." Abashed by this question, I replied that sloth was -my chief temptation. He shook his head incredulously; and even more -abashed, I said that though I was living with my wife as he advised, I -was not living with her as her husband. To this he replied that one -should not deprive a wife of one's embraces and gave me to -understand that that was my duty. But I replied that I should be -ashamed to do it, and suddenly everything vanished. And I awoke and -found in my mind the text from the Gospel: "The life was the light -of men. And the light shineth in darkness; and the darkness -comprehended it not." Joseph Alexeevich's face had looked young and -bright. That day I received a letter from my benefactor in which he -wrote about "conjugal duties." - - -9th December - -I had a dream from which I awoke with a throbbing heart. I saw -that I was in Moscow in my house, in the big sitting room, and -Joseph Alexeevich came in from the drawing room. I seemed to know at -once that the process of regeneration had already taken place in -him, and I rushed to meet him. I embraced him and kissed his hands, -and he said, "Hast thou noticed that my face is different?" I looked -at him, still holding him in my arms, and saw that his face was young, -but that he had no hair on his head and his features were quite -changed. And I said, "I should have known you had I met you by -chance," and I thought to myself, "Am I telling the truth?" And -suddenly I saw him lying like a dead body; then he gradually recovered -and went with me into my study carrying a large book of sheets of -drawing paper; I said, "I drew that," and he answered by bowing his -head. I opened the book, and on all the pages there were excellent -drawings. And in my dream I knew that these drawings represented the -love adventures of the soul with its beloved. And on its pages I saw a -beautiful representation of a maiden in transparent garments and -with a transparent body, flying up to the clouds. And I seemed to know -that this maiden was nothing else than a representation of the Song of -Songs. And looking at those drawings I dreamed I felt that I was doing -wrong, but could not tear myself away from them. Lord, help me! My -God, if Thy forsaking me is Thy doing, Thy will be done; but if I am -myself the cause, teach me what I should do! I shall perish of my -debauchery if Thou utterly desertest me! - - - - - -CHAPTER XI - - -The Rostovs' monetary affairs had not improved during the two -years they had spent in the country. - -Though Nicholas Rostov had kept firmly to his resolution and was -still serving modestly in an obscure regiment, spending -comparatively little, the way of life at Otradnoe--Mitenka's -management of affairs, in particular--was such that the debts -inevitably increased every year. The only resource obviously -presenting itself to the old count was to apply for an official -post, so he had come to Petersburg to look for one and also, as he -said, to let the lassies enjoy themselves for the last time. - -Soon after their arrival in Petersburg Berg proposed to Vera and was -accepted. - -Though in Moscow the Rostovs belonged to the best society without -themselves giving it a thought, yet in Petersburg their circle of -acquaintances was a mixed and indefinite one. In Petersburg they -were provincials, and the very people they had entertained in Moscow -without inquiring to what set they belonged, here looked down on them. - -The Rostovs lived in the same hospitable way in Petersburg as in -Moscow, and the most diverse people met at their suppers. Country -neighbors from Otradnoe, impoverished old squires and their daughters, -Peronskaya a maid of honor, Pierre Bezukhov, and the son of their -district postmaster who had obtained a post in Petersburg. Among the -men who very soon became frequent visitors at the Rostovs' house in -Petersburg were Boris, Pierre whom the count had met in the street and -dragged home with him, and Berg who spent whole days at the Rostovs' -and paid the eldest daughter, Countess Vera, the attentions a young -man pays when he intends to propose. - -Not in vain had Berg shown everybody his right hand wounded at -Austerlitz and held a perfectly unnecessary sword in his left. He -narrated that episode so persistently and with so important an air -that everyone believed in the merit and usefulness of his deed, and he -had obtained two decorations for Austerlitz. - -In the Finnish war he also managed to distinguish himself. He had -picked up the scrap of a grenade that had killed an aide-de-camp -standing near the commander in chief and had taken it to his -commander. Just as he had done after Austerlitz, he related this -occurrence at such length and so insistently that everyone again -believed it had been necessary to do this, and he received two -decorations for the Finnish war also. In 1809 he was a captain in -the Guards, wore medals, and held some special lucrative posts in -Petersburg. - -Though some skeptics smiled when told of Berg's merits, it could not -be denied that he was a painstaking and brave officer, on excellent -terms with his superiors, and a moral young man with a brilliant -career before him and an assured position in society. - -Four years before, meeting a German comrade in the stalls of a -Moscow theater, Berg had pointed out Vera Rostova to him and had -said in German, "das soll mein Weib werden,"* and from that moment had -made up his mind to marry her. Now in Petersburg, having considered -the Rostovs' position and his own, he decided that the time had come -to propose. - - -*"That girl shall be my wife." - - -Berg's proposal was at first received with a perplexity that was not -flattering to him. At first it seemed strange that the son of an -obscure Livonian gentleman should propose marriage to a Countess -Rostova; but Berg's chief characteristic was such a naive and good -natured egotism that the Rostovs involuntarily came to think it -would be a good thing, since he himself was so firmly convinced that -it was good, indeed excellent. Moreover, the Rostovs' affairs were -seriously embarrassed, as the suitor could not but know; and above -all, Vera was twenty-four, had been taken out everywhere, and though -she was certainly good-looking and sensible, no one up to now had -proposed to her. So they gave their consent. - -"You see," said Berg to his comrade, whom he called "friend" only -because he knew that everyone has friends, "you see, I have considered -it all, and should not marry if I had not thought it all out or if -it were in any way unsuitable. But on the contrary, my papa and -mamma are now provided for--I have arranged that rent for them in -the Baltic Provinces--and I can live in Petersburg on my pay, and with -her fortune and my good management we can get along nicely. I am not -marrying for money--I consider that dishonorable--but a wife should -bring her share and a husband his. I have my position in the -service, she has connections and some means. In our times that is -worth something, isn't it? But above all, she is a handsome, estimable -girl, and she loves me..." - -Berg blushed and smiled. - -"And I love her, because her character is sensible and very good. -Now the other sister, though they are the same family, is quite -different--an unpleasant character and has not the same -intelligence. She is so... you know?... Unpleasant... But my -fiancee!... Well, you will be coming," he was going to say, "to dine," -but changed his mind and said "to take tea with us," and quickly -doubling up his tongue he blew a small round ring of tobacco smoke, -perfectly embodying his dream of happiness. - -After the first feeling of perplexity aroused in the parents by -Berg's proposal, the holiday tone of joyousness usual at such times -took possession of the family, but the rejoicing was external and -insincere. In the family's feeling toward this wedding a certain -awkwardness and constraint was evident, as if they were ashamed of not -having loved Vera sufficiently and of being so ready to get her off -their hands. The old count felt this most. He would probably have been -unable to state the cause of his embarrassment, but it resulted from -the state of his affairs. He did not know at all how much he had, what -his debts amounted to, or what dowry he could give Vera. When his -daughters were born he had assigned to each of them, for her dowry, an -estate with three hundred serfs; but one of these estates had -already been sold, and the other was mortgaged and the interest so -much in arrears that it would have to be sold, so that it was -impossible to give it to Vera. Nor had he any money. - -Berg had already been engaged a month, and only a week remained -before the wedding, but the count had not yet decided in his own -mind the question of the dowry, nor spoken to his wife about it. At -one time the count thought of giving her the Ryazan estate or of -selling a forest, at another time of borrowing money on a note of -hand. A few days before the wedding Berg entered the count's study -early one morning and, with a pleasant smile, respectfully asked his -future father-in-law to let him know what Vera's dowry would be. The -count was so disconcerted by this long-foreseen inquiry that without -consideration he gave the first reply that came into his head. "I like -your being businesslike about it.... I like it. You shall be -satisfied...." - -And patting Berg on the shoulder he got up, wishing to end the -conversation. But Berg, smiling pleasantly, explained that if he did -not know for certain how much Vera would have and did not receive at -least part of the dowry in advance, he would have to break matters -off. - -"Because, consider, Count--if I allowed myself to marry now -without having definite means to maintain my wife, I should be -acting badly...." - -The conversation ended by the count, who wished to be generous and -to avoid further importunity, saying that he would give a note of hand -for eighty thousand rubles. Berg smiled meekly, kissed the count on -the shoulder, and said that he was very grateful, but that it was -impossible for him to arrange his new life without receiving thirty -thousand in ready money. "Or at least twenty thousand, Count," he -added, "and then a note of hand for only sixty thousand." - -"Yes, yes, all right!" said the count hurriedly. "Only excuse me, my - -dear fellow, I'll give you twenty thousand and a note of hand for -eighty thousand as well. Yes, yes! Kiss me." - - - - - -CHAPTER XII - - -Natasha was sixteen and it was the year 1809, the very year to which -she had counted on her fingers with Boris after they had kissed four -years ago. Since then she had not seen him. Before Sonya and her -mother, if Boris happened to be mentioned, she spoke quite freely of -that episode as of some childish, long-forgotten matter that was not -worth mentioning. But in the secret depths of her soul the question -whether her engagement to Boris was a jest or an important, binding -promise tormented her. - -Since Boris left Moscow in 1805 to join the army he had had not seen -the Rostovs. He had been in Moscow several times, and had passed -near Otradnoe, but had never been to see them. - -Sometimes it occurred to Natasha that he not wish to see her, and -this conjecture was confirmed by the sad tone in which her elders -spoke of him. - -"Nowadays old friends are not remembered," the countess would say -when Boris was mentioned. - -Anna Mikhaylovna also had of late visited them less frequently, -seemed to hold herself with particular dignity, and always spoke -rapturously and gratefully of the merits of her son and the -brilliant career on which he had entered. When the Rostovs came to -Petersburg Boris called on them. - -He drove to their house in some agitation. The memory of Natasha was -his most poetic recollection. But he went with the firm intention of -letting her and her parents feel that the childish relations between -himself and Natasha could not be binding either on her or on him. He -had a brilliant position in society thanks to his intimacy with -Countess Bezukhova, a brilliant position in the service thanks to -the patronage of an important personage whose complete confidence he -enjoyed, and he was beginning to make plans for marrying one of the -richest heiresses in Petersburg, plans which might very easily be -realized. When he entered the Rostovs' drawing room Natasha was in her -own room. When she heard of his arrival she almost ran into the -drawing room, flushed and beaming with a more than cordial smile. - -Boris remembered Natasha in a short dress, with dark eyes shining -from under her curls and boisterous, childish laughter, as he had -known her four years before; and so he was taken aback when quite a -different Natasha entered, and his face expressed rapturous -astonishment. This expression on his face pleased Natasha. - -"Well, do you recognize your little madcap playmate?" asked the -countess. - -Boris kissed Natasha's hand and said that he was astonished at the -change in her. - -"How handsome you have grown!" - -"I should think so!" replied Natasha's laughing eyes. - -"And is Papa older?" she asked. - -Natasha sat down and, without joining in Boris' conversation with -the countess, silently and minutely studied her childhood's suitor. He -felt the weight of that resolute and affectionate scrutiny and glanced -at her occasionally. - -Boris' uniform, spurs, tie, and the way his hair was brushed were -all comme il faut and in the latest fashion. This Natasha noticed at -once. He sat rather sideways in the armchair next to the countess, -arranging with his right hand the cleanest of gloves that fitted his -left hand like a skin, and he spoke with a particularly refined -compression of his lips about the amusements of the highest Petersburg -society, recalling with mild irony old times in Moscow and Moscow -acquaintances. It was not accidentally, Natasha felt, that he alluded, -when speaking of the highest aristocracy, to an ambassador's ball he -had attended, and to invitations he had received from N.N. and S.S. - -All this time Natasha sat silent, glancing up at him from under -her brows. This gaze disturbed and confused Boris more and more. He -looked round more frequently toward her, and broke off in what he -was saying. He did not stay more than ten minutes, then rose and -took his leave. The same inquisitive, challenging, and rather -mocking eyes still looked at him. After his first visit Boris said -to himself that Natasha attracted him just as much as ever, but that -he must not yield to that feeling, because to marry her, a girl almost -without fortune, would mean ruin to his career, while to renew their -former relations without intending to marry her would be dishonorable. -Boris made up his mind to avoid meeting Natasha, but despite that -resolution he called again a few days later and began calling often -and spending whole days at the Rostovs'. It seemed to him that he -ought to have an explanation with Natasha and tell her that the old -times must be forgotten, that in spite of everything... she could -not be his wife, that he had no means, and they would never let her -marry him. But he failed to do so and felt awkward about entering on -such an explanation. From day to day he became more and more -entangled. It seemed to her mother and Sonya that Natasha was in -love with Boris as of old. She sang him his favorite songs, showed him -her album, making him write in it, did not allow him to allude to -the past, letting it be understood how was the present; and every -day he went away in a fog, without having said what he meant to, and -not knowing what he was doing or why he came, or how it would all end. -He left off visiting Helene and received reproachful notes from her -every day, and yet he continued to spend whole days with the Rostovs. - - - - - -CHAPTER XIII - - -One night when the old countess, in nightcap and dressing jacket, -without her false curls, and with her poor little knob of hair showing -under her white cotton cap, knelt sighing and groaning on a rug and -bowing to the ground in prayer, her door creaked and Natasha, also -in a dressing jacket with slippers on her bare feet and her hair in -curlpapers, ran in. The countess--her prayerful mood dispelled--looked -round and frowned. She was finishing her last prayer: "Can it be -that this couch will be my grave?" Natasha, flushed and eager, -seeing her mother in prayer, suddenly checked her rush, half sat down, -and unconsciously put out her tongue as if chiding herself. Seeing -that her mother was still praying she ran on tiptoe to the bed and, -rapidly slipping one little foot against the other, pushed off her -slippers and jumped onto the bed the countess had feared might -become her grave. This couch was high, with a feather bed and five -pillows each smaller than the one below. Natasha jumped on it, sank -into the feather bed, rolled over to the wall, and began snuggling -up the bedclothes as she settled down, raising her knees to her -chin, kicking out and laughing almost inaudibly, now covering -herself up head and all, and now peeping at her mother. The countess -finished her prayers and came to the bed with a stern face, but -seeing, that Natasha's head was covered, she smiled in her kind, -weak way. - -"Now then, now then!" said she. - -"Mamma, can we have a talk? Yes?" said Natasha. "Now, just one on -your throat and another... that'll do!" And seizing her mother round -the neck, she kissed her on the throat. In her behavior to her -mother Natasha seemed rough, but she was so sensitive and tactful that -however she clasped her mother she always managed to do it without -hurting her or making her feel uncomfortable or displeased. - -"Well, what is it tonight?" said the mother, having arranged her -pillows and waited until Natasha, after turning over a couple of -times, had settled down beside her under the quilt, spread out her -arms, and assumed a serious expression. - -These visits of Natasha's at night before the count returned from -his club were one of the greatest pleasures of both mother, and -daughter. - -"What is it tonight?--But I have to tell you..." - -Natasha put her hand on her mother's mouth. - -"About Boris... I know," she said seriously; "that's what I have -come about. Don't say it--I know. No, do tell me!" and she removed her -hand. "Tell me, Mamma! He's nice?" - -"Natasha, you are sixteen. At your age I was married. You say -Boris is nice. He is very nice, and I love him like a son. But what -then?... What are you thinking about? You have quite turned his -head, I can see that...." - -As she said this the countess looked round at her daughter. -Natasha was lying looking steadily straight before her at one of the -mahogany sphinxes carved on the corners of the bedstead, so that the -countess only saw her daughter's face in profile. That face struck her -by its peculiarly serious and concentrated expression. - -Natasha was listening and considering. - -"Well, what then?" said she. - -"You have quite turned his head, and why? What do you want of him? -You know you can't marry him." - -"Why not?" said Natasha, without changing her position. - -"Because he is young, because he is poor, because he is a -relation... and because you yourself don't love him." - -"How do you know?" - -"I know. It is not right, darling!" - - "But if I want to..." said Natasha. - -"Leave off talking nonsense," said the countess. - -"But if I want to..." - -"Natasha, I am in earnest..." - -Natasha did not let her finish. She drew the countess' large hand to -her, kissed it on the back and then on the palm, then again turned -it over and began kissing first one knuckle, then the space between -the knuckles, then the next knuckle, whispering, "January, February, -March, April, May. Speak, Mamma, why don't you say anything? Speak!" -said she, turning to her mother, who was tenderly gazing at her -daughter and in that contemplation seemed to have forgotten all she -had wished to say. - -"It won't do, my love! Not everyone will understand this -friendship dating from your childish days, and to see him so -intimate with you may injure you in the eyes of other young men who -visit us, and above all it torments him for nothing. He may already -have found a suitable and wealthy match, and now he's half crazy." - -"Crazy?" repeated Natasha. - -"I'll tell you some things about myself. I had a cousin..." - -"I know! Cyril Matveich... but he is old." - -"He was not always old. But this is what I'll do, Natasha, I'll have -a talk with Boris. He need not come so often...." - -"Why not, if he likes to?" - -"Because I know it will end in nothing...." - -"How can you know? No, Mamma, don't speak to him! What nonsense!" -said Natasha in the tone of one being deprived of her property. "Well, -I won't marry, but let him come if he enjoys it and I enjoy it." -Natasha smiled and looked at her mother. "Not to marry, but just -so," she added. - -"How so, my pet?" - -"Just so. There's no need for me to marry him. But... just so." - -"Just so, just so," repeated the countess, and shaking all over, she -went off into a good humored, unexpected, elderly laugh. - -"Don't laugh, stop!" cried Natasha. "You're shaking the whole bed! -You're awfully like me, just such another giggler.... Wait..." and she -seized the countess' hands and kissed a knuckle of the little -finger, saying, "June," and continued, kissing, "July, August," on the -other hand. "But, Mamma, is he very much in love? What do you think? -Was anybody ever so much in love with you? And he's very nice, very, -very nice. Only not quite my taste--he is so narrow, like the -dining-room clock.... Don't you understand? Narrow, you know--gray, -light gray..." - -"What rubbish you're talking!" said the countess. - -Natasha continued: "Don't you really understand? Nicholas would -understand.... Bezukhov, now, is blue, dark-blue and red, and he is -square." - -"You flirt with him too," said the countess, laughing. - -"No, he is a Freemason, I have found out. He is fine, dark-blue -and red.... How can I explain it to you?" - -"Little countess!" the count's voice called from behind the door. -"You're not asleep?" Natasha jumped up, snatched up her slippers, -and ran barefoot to her own room. - -It was a long time before she could sleep. She kept thinking that no -one could understand all that she understood and all there was in her. - -"Sonya?" she thought, glancing at that curled-up, sleeping little -kitten with her enormous plait of hair. "No, how could she? She's -virtuous. She fell in love with Nicholas and does not wish to know -anything more. Even Mamma does not understand. It is wonderful how -clever I am and how... charming she is," she went on, speaking of -herself in the third person, and imagining it was some very wise -man--the wisest and best of men--who was saying it of her. "There is -everything, everything in her," continued this man. "She is -unusually intelligent, charming... and then she is pretty, -uncommonly pretty, and agile--she swims and rides splendidly... and -her voice! One can really say it's a wonderful voice!" - -She hummed a scrap from her favorite opera by Cherubini, threw -herself on her bed, laughed at the pleasant thought that she would -immediately fall asleep, called Dunyasha the maid to put out the -candle, and before Dunyasha had left the room had already passed -into yet another happier world of dreams, where everything was as -light and beautiful as in reality, and even more so because it was -different. - - -Next day the countess called Boris aside and had a talk with him, -after which he ceased coming to the Rostovs'. - - - - - -CHAPTER XIV - - -On the thirty-first of December, New Year's Eve, 1809 --10 an old -grandee of Catherine's day was giving a ball and midnight supper. -The diplomatic corps and the Emperor himself were to be present. - -The grandee's well-known mansion on the English Quay glittered -with innumerable lights. Police were stationed at the brightly lit -entrance which was carpeted with red baize, and not only gendarmes but -dozens of police officers and even the police master himself stood -at the porch. Carriages kept driving away and fresh ones arriving, -with red-liveried footmen and footmen in plumed hats. From the -carriages emerged men wearing uniforms, stars, and ribbons, while -ladies in satin and ermine cautiously descended the carriage steps -which were let down for them with a clatter, and then walked hurriedly -and noiselessly over the baize at the entrance. - -Almost every time a new carriage drove up a whisper ran through -the crowd and caps were doffed. - -"The Emperor?... No, a minister.... prince... ambassador. Don't -you see the plumes?..." was whispered among the crowd. - -One person, better dressed than the rest, seemed to know everyone -and mentioned by name the greatest dignitaries of the day. - -A third of the visitors had already arrived, but the Rostovs, who -were to be present, were still hurrying to get dressed. - -There had been many discussions and preparations for this ball in -the Rostov family, many fears that the invitation would not arrive, -that the dresses would not be ready, or that something would not be -arranged as it should be. - -Marya Ignatevna Peronskaya, a thin and shallow maid of honor at -the court of the Dowager Empress, who was a friend and relation of the -countess and piloted the provincial Rostovs in Petersburg high -society, was to accompany them to the ball. - -They were to call for her at her house in the Taurida Gardens at ten -o'clock, but it was already five minutes to ten, and the girls were -not yet dressed. - -Natasha was going to her first grand ball. She had got up at eight -that morning and had been in a fever of excitement and activity all -day. All her powers since morning had been concentrated on ensuring -that they all--she herself, Mamma, and Sonya--should be as well -dressed as possible. Sonya and her mother put themselves entirely in -her hands. The countess was to wear a claret-colored velvet dress, and -the two girls white gauze over pink silk slips, with roses on their -bodices and their hair dressed a la grecque. - -Everything essential had already been done; feet, hands, necks, -and ears washed, perfumed, and powdered, as befits a ball; the -openwork silk stockings and white satin shoes with ribbons were -already on; the hairdressing was almost done. Sonya was finishing -dressing and so was the countess, but Natasha, who had bustled about -helping them all, was behindhand. She was still sitting before a -looking-glass with a dressing jacket thrown over her slender -shoulders. Sonya stood ready dressed in the middle of the room and, -pressing the head of a pin till it hurt her dainty finger, was -fixing on a last ribbon that squeaked as the pin went through it. - -"That's not the way, that's not the way, Sonya!" cried Natasha -turning her head and clutching with both hands at her hair which the -maid who was dressing it had not time to release. "That bow is not -right. Come here!" - -Sonya sat down and Natasha pinned the ribbon on differently. - -"Allow me, Miss! I can't do it like that," said the maid who was -holding Natasha's hair. - -"Oh, dear! Well then, wait. That's right, Sonya." - -"Aren't you ready? It is nearly ten," came the countess' voice. - -"Directly! Directly! And you, Mamma?" - -"I have only my cap to pin on." - -"Don't do it without me!" called Natasha. "You won't do it right." - -"But it's already ten." - -They had decided to be at the ball by half past ten, and Natasha had -still to get dressed and they had to call at the Taurida Gardens. - -When her hair was done, Natasha, in her short petticoat from under -which her dancing shoes showed, and in her mother's dressing jacket, -ran up to Sonya, scrutinized her, and then ran to her mother. -Turning her mother's head this way and that, she fastened on the cap -and, hurriedly kissing her gray hair, ran back to the maids who were -turning up the hem of her skirt. - -The cause of the delay was Natasha's skirt, which was too long. -Two maids were turning up the hem and hurriedly biting off the ends of -thread. A third with pins in her mouth was running about between the -countess and Sonya, and a fourth held the whole of the gossamer -garment up high on one uplifted hand. - -"Mavra, quicker, darling!" - -"Give me my thimble, Miss, from there..." - -"Whenever will you be ready?" asked the count coming to the door. -"Here is here is some scent. Peronskaya must be tired of waiting." - -"It's ready, Miss," said the maid, holding up the shortened gauze -dress with two fingers, and blowing and shaking something off it, as -if by this to express a consciousness of the airiness and purity of -what she held. - -Natasha began putting on the dress. - -"In a minute! In a minute! Don't come in, Papa!" she cried to her -father as he opened the door--speaking from under the filmy skirt -which still covered her whole face. - -Sonya slammed the door to. A minute later they let the count in. -He was wearing a blue swallow-tail coat, shoes and stockings, and -was perfumed and his hair pomaded. - -"Oh, Papa! how nice you look! Charming!" cried Natasha, as she stood -in the middle of the room smoothing out the folds of the gauze. - -"If you please, Miss! allow me," said the maid, who on her knees was -pulling the skirt straight and shifting the pins from one side of -her mouth to the other with her tongue. - -"Say what you like," exclaimed Sonya, in a despairing voice as she -looked at Natasha, "say what you like, it's still too long." - -Natasha stepped back to look at herself in the pier glass. The dress -was too long. - -"Really, madam, it is not at all too long," said Mavra, crawling -on her knees after her young lady. - -"Well, if it's too long we'll take it up... we'll tack it up in -one minute," said the resolute Dunyasha taking a needle that was stuck -on the front of her little shawl and, still kneeling on the floor, set -to work once more. - -At that moment, with soft steps, the countess came in shyly, in -her cap and velvet gown. - -"Oo-oo, my beauty!" exclaimed the count, "she looks better than -any of you!" - -He would have embraced her but, blushing, she stepped aside -fearing to be rumpled. - -"Mamma, your cap, more to this side," said Natasha. "I'll arrange -it," and she rushed forward so that the maids who were tacking up -her skirt could not move fast enough and a piece of gauze was torn -off. - -"Oh goodness! What has happened? Really it was not my fault!" - -"Never mind, I'll run it up, it won't show," said Dunyasha. - -"What a beauty--a very queen!" said the nurse as she came to the -door. "And Sonya! They are lovely!" - -At a quarter past ten they at last got into their carriages and -started. But they had still to call at the Taurida Gardens. - -Peronskaya was quite ready. In spite of her age and plainness she -had gone through the same process as the Rostovs, but with less -flurry--for to her it was a matter of routine. Her ugly old body was -washed, perfumed, and powdered in just the same way. She had washed -behind her ears just as carefully, and when she entered her drawing -room in her yellow dress, wearing her badge as maid of honor, her -old lady's maid was as full of rapturous admiration as the Rostovs' -servants had been. - -She praised the Rostovs' toilets. They praised her taste and toilet, -and at eleven o'clock, careful of their coiffures and dresses, they -settled themselves in their carriages and drove off. - - - - - -CHAPTER XV - - -Natasha had not had a moment free since early morning and had not -once had time to think of what lay before her. - -In the damp chill air and crowded closeness of the swaying carriage, -she for the first time vividly imagined what was in store for her -there at the ball, in those brightly lighted rooms--with music, -flowers, dances, the Emperor, and all the brilliant young people of -Petersburg. The prospect was so splendid that she hardly believed it -would come true, so out of keeping was it with the chill darkness -and closeness of the carriage. She understood all that awaited her -only when, after stepping over the red baize at the entrance, she -entered the hall, took off her fur cloak, and, beside Sonya and in -front of her mother, mounted the brightly illuminated stairs between -the flowers. Only then did she remember how she must behave at a ball, -and tried to assume the majestic air she considered indispensable -for a girl on such an occasion. But, fortunately for her, she felt her -eyes growing misty, she saw nothing clearly, her pulse beat a -hundred to the minute, and the blood throbbed at her heart. She -could not assume that pose, which would have made her ridiculous, -and she moved on almost fainting from excitement and trying with all -her might to conceal it. And this was the very attitude that became -her best. Before and behind them other visitors were entering, also -talking in low tones and wearing ball dresses. The mirrors on the -landing reflected ladies in white, pale-blue, and pink dresses, with -diamonds and pearls on their bare necks and arms. - -Natasha looked in the mirrors and could not distinguish her -reflection from the others. All was blended into one brilliant -procession. On entering the ballroom the regular hum of voices, -footsteps, and greetings deafened Natasha, and the light and glitter -dazzled her still more. The host and hostess, who had already been -standing at the door for half an hour repeating the same words to -the various arrivals, "Charme de vous voir,"* greeted the Rostovs -and Peronskaya in the same manner. - - -*"Delighted to see you." - - -The two girls in their white dresses, each with a rose in her -black hair, both curtsied in the same way, but the hostess' eye -involuntarily rested longer on the slim Natasha. She looked at her and -gave her alone a special smile in addition to her usual smile as -hostess. Looking at her she may have recalled the golden, -irrecoverable days of her own girlhood and her own first ball. The -host also followed Natasha with his eyes and asked the count which was -his daughter. - -"Charming!" said he, kissing the tips of his fingers. - -In the ballroom guests stood crowding at the entrance doors awaiting -the Emperor. The countess took up a position in one of the front -rows of that crowd. Natasha heard and felt that several people were -asking about her and looking at her. She realized that those -noticing her liked her, and this observation helped to calm her. - -"There are some like ourselves and some worse," she thought. - -Peronskaya was pointing out to the countess the most important -people at the ball. - -"That is the Dutch ambassador, do you see? That gray-haired man," -she said, indicating an old man with a profusion of silver-gray -curly hair, who was surrounded by ladies laughing at something he -said. - -"Ah, here she is, the Queen of Petersburg, Countess Bezukhova," said -Peronskaya, indicating Helene who had just entered. "How lovely! She -is quite equal to Marya Antonovna. See how the men, young and old, pay -court to her. Beautiful and clever... they say Prince--is quite mad -about her. But see, those two, though not good-looking, are even -more run after." - -She pointed to a lady who was crossing the room followed by a very -plain daughter. - -"She is a splendid match, a millionairess," said Peronskaya. "And -look, here come her suitors." - -"That is Bezukhova's brother, Anatole Kuragin," she said, indicating -a handsome officer of the Horse Guards who passed by them with head -erect, looking at something over the heads of the ladies. "He's -handsome, isn't he? I hear they will marry him to that rich girl. -But your cousin, Drubetskoy, is also very attentive to her. They say -she has millions. Oh yes, that's the French ambassador himself!" she -replied to the countess' inquiry about Caulaincourt. "Looks as if he -were a king! All the same, the French are charming, very charming. -No one more charming in society. Ah, here she is! Yes, she is still -the most beautiful of them all, our Marya Antonovna! And how simply -she is dressed! Lovely! And that stout one in spectacles is the -universal Freemason," she went on, indicating Pierre. "Put him -beside his wife and he looks a regular buffoon!" - -Pierre, swaying his stout body, advanced, making way through the -crowd and nodding to right and left as casually and good-naturedly -as if he were passing through a crowd at a fair. He pushed through, -evidently looking for someone. - -Natasha looked joyfully at the familiar face of Pierre, "the -buffoon," as Peronskaya had called him, and knew he was looking for -them, and for her in particular. He had promised to be at the ball and -introduce partners to her. - -But before he reached them Pierre stopped beside a very handsome, -dark man of middle height, and in a white uniform, who stood by a -window talking to a tall man wearing stars and a ribbon. Natasha at -once recognized the shorter and younger man in the white uniform: it -was Bolkonski, who seemed to her to have grown much younger, -happier, and better-looking. - -"There's someone else we know--Bolkonski, do you see, Mamma?" said -Natasha, pointing out Prince Andrew. "You remember, he stayed a -night with us at Otradnoe." - -"Oh, you know him?" said Peronskaya. "I can't bear him. Il fait a -present la pluie et le beau temps.* He's too proud for anything. -Takes after his father. And he's hand in glove with Speranski, writing -some project or other. Just look how he treats the ladies! There's one -talking to him and he has turned away," she said, pointing at him. -"I'd give it to him if he treated me as he does those ladies." - - -*"He is all the rage just now. - - - - - -CHAPTER XVI - - -Suddenly everybody stirred, began talking, and pressed forward and -then back, and between the two rows, which separated, the Emperor -entered to the sounds of music that had immediately struck up. -Behind him walked his host and hostess. He walked in rapidly, bowing -to right and left as if anxious to get the first moments of the -reception over. The band played the polonaise in vogue at that time on -account of the words that had been set to it, beginning: "Alexander, -Elisaveta, all our hearts you ravish quite..." The Emperor passed on -to the drawing room, the crowd made a rush for the doors, and -several persons with excited faces hurried there and back again. -Then the crowd hastily retired from the drawing-room door, at which -the Emperor reappeared talking to the hostess. A young man, looking -distraught, pounced down on the ladies, asking them to move aside. -Some ladies, with faces betraying complete forgetfulness of all the -rules of decorum, pushed forward to the detriment of their toilets. -The men began to choose partners and take their places for the -polonaise. - -Everyone moved back, and the Emperor came smiling out of the drawing -room leading his hostess by the hand but not keeping time to the -music. The host followed with Marya Antonovna Naryshkina; then came -ambassadors, ministers, and various generals, whom Peronskaya -diligently named. More than half the ladies already had partners and -were taking up, or preparing to take up, their positions for the -polonaise. Natasha felt that she would be left with her mother and -Sonya among a minority of women who crowded near the wall, not -having been invited to dance. She stood with her slender arms -hanging down, her scarcely defined bosom rising and falling regularly, -and with bated breath and glittering, frightened eyes gazed straight -before her, evidently prepared for the height of joy or misery. She -was not concerned about the Emperor or any of those great people -whom Peronskaya was pointing out--she had but one thought: "Is it -possible no one will ask me, that I shall not be among the first to -dance? Is it possible that not one of all these men will notice me? -They do not even seem to see me, or if they do they look as if they -were saying, 'Ah, she's not the one I'm after, so it's not worth -looking at her!' No, it's impossible," she thought. "They must know -how I long to dance, how splendidly I dance, and how they would -enjoy dancing with me." - -The strains of the polonaise, which had continued for a considerable -time, had begun to sound like a sad reminiscence to Natasha's ears. -She wanted to cry. Peronskaya had left them. The count was at the -other end of the room. She and the countess and Sonya were standing by -themselves as in the depths of a forest amid that crowd of -strangers, with no one interested in them and not wanted by anyone. -Prince Andrew with a lady passed by, evidently not recognizing them. -The handsome Anatole was smilingly talking to a partner on his arm and -looked at Natasha as one looks at a wall. Boris passed them twice -and each time turned away. Berg and his wife, who were not dancing, -came up to them. - -This family gathering seemed humiliating to Natasha--as if there -were nowhere else for the family to talk but here at the ball. She did -not listen to or look at Vera, who was telling her something about her -own green dress. - -At last the Emperor stopped beside his last partner (he had danced -with three) and the music ceased. A worried aide-de-camp ran up to the -Rostovs requesting them to stand farther back, though as it was they -were already close to the wall, and from the gallery resounded the -distinct, precise, enticingly rhythmical strains of a waltz. The -Emperor looked smilingly down the room. A minute passed but no one had -yet begun dancing. An aide-de-camp, the Master of Ceremonies, went -up to Countess Bezukhova and asked her to dance. She smilingly -raised her hand and laid it on his shoulder without looking at him. -The aide-de-camp, an adept in his art, grasping his partner firmly -round her waist, with confident deliberation started smoothly, gliding -first round the edge of the circle, then at the corner of the room -he caught Helene's left hand and turned her, the only sound audible, -apart from the ever-quickening music, being the rhythmic click of -the spurs on his rapid, agile feet, while at every third beat his -partner's velvet dress spread out and seemed to flash as she whirled -round. Natasha gazed at them and was ready to cry because it was not -she who was dancing that first turn of the waltz. - -Prince Andrew, in the white uniform of a cavalry colonel, wearing -stockings and dancing shoes, stood looking animated and bright in -the front row of the circle not far from the Rostovs. Baron Firhoff -was talking to him about the first sitting of the Council of State -to be held next day. Prince Andrew, as one closely connected with -Speranski and participating in the work of the legislative commission, -could give reliable information about that sitting, concerning which -various rumors were current. But not listening to what Firhoff was -saying, he was gazing now at the sovereign and now at the men -intending to dance who had not yet gathered courage to enter the -circle. - -Prince Andrew was watching these men abashed by the Emperor's -presence, and the women who were breathlessly longing to be asked to -dance. - -Pierre came up to him and caught him by the arm. - -"You always dance. I have a protegee, the young Rostova, here. Ask -her," he said. - -"Where is she?" asked Bolkonski. "Excuse me!" he added, turning to -the baron, "we will finish this conversation elsewhere--at a ball -one must dance." He stepped forward in the direction Pierre indicated. -The despairing, dejected expression of Natasha's face caught his -eye. He recognized her, guessed her feelings, saw that it was her -debut, remembered her conversation at the window, and with an -expression of pleasure on his face approached Countess Rostova. - -"Allow me to introduce you to my daughter," said the countess, -with heightened color. - -"I have the pleasure of being already acquainted, if the countess -remembers me," said Prince Andrew with a low and courteous bow quite -belying Peronskaya's remarks about his rudeness, and approaching -Natasha he held out his arm to grasp her waist before he had completed -his invitation. He asked her to waltz. That tremulous expression on -Natasha's face, prepared either for despair or rapture, suddenly -brightened into a happy, grateful, childlike smile. - -"I have long been waiting for you," that frightened happy little -girl seemed to say by the smile that replaced the threatened tears, as -she raised her hand to Prince Andrew's shoulder. They were the -second couple to enter the circle. Prince Andrew was one of the best -dancers of his day and Natasha danced exquisitely. Her little feet -in their white satin dancing shoes did their work swiftly, lightly, -and independently of herself, while her face beamed with ecstatic -happiness. Her slender bare arms and neck were not beautiful--compared -to Helene's her shoulders looked thin and her bosom undeveloped. But -Helene seemed, as it were, hardened by a varnish left by the thousands -of looks that had scanned her person, while Natasha was like a girl -exposed for the first time, who would have felt very much ashamed -had she not been assured that this was absolutely necessary. - -Prince Andrew liked dancing, and wishing to escape as quickly as -possible from the political and clever talk which everyone addressed -to him, wishing also to break up the circle of restraint he -disliked, caused by the Emperor's presence, he danced, and had -chosen Natasha because Pierre pointed her out to him and because she -was the first pretty girl who caught his eye; but scarcely had he -embraced that slender supple figure and felt her stirring so close -to him and smiling so near him than the wine of her charm rose to -his head, and he felt himself revived and rejuvenated when after -leaving her he stood breathing deeply and watching the other dancers. - - - - - -CHAPTER XVII - - -After Prince Andrew, Boris came up to ask Natasha for dance, and -then the aide-de-camp who had opened the ball, and several other young -men, so that, flushed and happy, and passing on her superfluous -partners to Sonya, she did not cease dancing all the evening. She -noticed and saw nothing of what occupied everyone else. Not only did -she fail to notice that the Emperor talked a long time with the French -ambassador, and how particularly gracious he was to a certain lady, or -that Prince So-and-so and So-and-so did and said this and that, and -that Helene had great success and was honored was by the special -attention of So-and-so, but she did not even see the Emperor, and only -noticed that he had gone because the ball became livelier after his -departure. For one of the merry cotillions before supper Prince Andrew -was again her partner. He reminded her of their first encounter in the -Otradnoe avenue, and how she had been unable to sleep that moonlight -night, and told her how he had involuntarily overheard her. Natasha -blushed at that recollection and tried to excuse herself, as if -there had been something to be ashamed of in what Prince Andrew had -overheard. - -Like all men who have grown up in society, Prince Andrew liked -meeting someone there not of the conventional society stamp. And -such was Natasha, with her surprise, her delight, her shyness, and -even her mistakes in speaking French. With her he behaved with special -care and tenderness, sitting beside her and talking of the simplest -and most unimportant matters; he admired her shy grace. In the -middle of the cotillion, having completed one of the figures, Natasha, -still out of breath, was returning to her seat when another dancer -chose her. She was tired and panting and evidently thought of -declining, but immediately put her hand gaily on the man's shoulder, -smiling at Prince Andrew. - -"I'd be glad to sit beside you and rest: I'm tired; but you see -how they keep asking me, and I'm glad of it, I'm happy and I love -everybody, and you and I understand it all," and much, much more was -said in her smile. When her partner left her Natasha ran across the -room to choose two ladies for the figure. - -"If she goes to her cousin first and then to another lady, she -will be my wife," said Prince Andrew to himself quite to his own -surprise, as he watched her. She did go first to her cousin. - -"What rubbish sometimes enters one's head!" thought Prince Andrew, -"but what is certain is that that girl is so charming, so original, -that she won't be dancing here a month before she will be -married.... Such as she are rare here," he thought, as Natasha, -readjusting a rose that was slipping on her bodice, settled herself -beside him. - -When the cotillion was over the old count in his blue coat came up -to the dancers. He invited Prince Andrew to come and see them, and -asked his daughter whether she was enjoying herself. Natasha did not -answer at once but only looked up with a smile that said -reproachfully: "How can you ask such a question?" - -"I have never enjoyed myself so much before!" she said, and Prince -Andrew noticed how her thin arms rose quickly as if to embrace her -father and instantly dropped again. Natasha was happier than she had -ever been in her life. She was at that height of bliss when one -becomes completely kind and good and does not believe in the -possibility of evil, unhappiness, or sorrow. - -At that ball Pierre for the first time felt humiliated by the -position his wife occupied in court circles. He was gloomy and -absent-minded. A deep furrow ran across his forehead, and standing -by a window he stared over his spectacles seeing no one. - -On her way to supper Natasha passed him. - -Pierre's gloomy, unhappy look struck her. She stopped in front of -him. She wished to help him, to bestow on him the superabundance of -her own happiness. - -"How delightful it is, Count!" said she. "Isn't it?" - -Pierre smiled absent-mindedly, evidently not grasping what she said. - -"Yes, I am very glad," he said. - -"How can people be dissatisfied with anything?" thought Natasha. -"Especially such a capital fellow as Bezukhov!" In Natasha's eyes -all the people at the ball alike were good, kind, and splendid people, -loving one another; none of them capable of injuring another--and so -they ought all to be happy. - - - - - -CHAPTER XVIII - - -Next day Prince Andrew thought of the ball, but his mind did not -dwell on it long. "Yes, it was a very brilliant ball," and then... -"Yes, that little Rostova is very charming. There's something fresh, -original, un-Petersburg-like about her that distinguishes her." That -was all he thought about yesterday's ball, and after his morning tea -he set to work. - -But either from fatigue or want of sleep he was ill-disposed for -work and could get nothing done. He kept criticizing his own work, -as he often did, and was glad when he heard someone coming. - -The visitor was Bitski, who served on various committees, frequented -all the societies in Petersburg, and a passionate devotee of the new -ideas and of Speranski, and a diligent Petersburg newsmonger--one of -those men who choose their opinions like their clothes according to -the fashion, but who for that very reason appear to be the warmest -partisans. Hardly had he got rid of his hat before he ran into -Prince Andrew's room with a preoccupied air and at once began talking. -He had just heard particulars of that morning's sitting of the Council -of State opened by the Emperor, and he spoke of it enthusiastically. -The Emperor's speech had been extraordinary. It had been a speech such -as only constitutional monarchs deliver. "The Sovereign plainly said -that the Council and Senate are estates of the realm, he said that the -government must rest not on authority but on secure bases. The Emperor -said that the fiscal system must be reorganized and the accounts -published," recounted Bitski, emphasizing certain words and opening -his eyes significantly. - -"Ah, yes! Today's events mark an epoch, the greatest epoch in our -history," he concluded. - -Prince Andrew listened to the account of the opening of the -Council of State, which he had so impatiently awaited and to which -he had attached such importance, and was surprised that this event, -now that it had taken place, did not affect him, and even seemed quite -insignificant. He listened with quiet irony to Bitski's enthusiastic -account of it. A very simple thought occurred to him: "What does it -matter to me or to Bitski what the Emperor was pleased to say at the -Council? Can all that make me any happier or better?" - -And this simple reflection suddenly destroyed all the interest -Prince Andrew had felt in the impending reforms. He was going to -dine that evening at Speranski's, "with only a few friends," as the -host had said when inviting him. The prospect of that dinner in the -intimate home circle of the man he so admired had greatly interested -Prince Andrew, especially as he had not yet seen Speranski in his -domestic surroundings, but now he felt disinclined to go to it. - -At the appointed hour, however, he entered the modest house -Speranski owned in the Taurida Gardens. In the parqueted dining room -this small house, remarkable for its extreme cleanliness (suggesting -that of a monastery), Prince Andrew, who was rather late, found the -friendly gathering of Speranski's intimate acquaintances already -assembled at five o'clock. There were no ladies present except -Speranski's little daughter (long-faced like her father) and her -governess. The other guests were Gervais, Magnitski, and Stolypin. -While still in the anteroom Prince Andrew heard loud voices and a -ringing staccato laugh--a laugh such as one hears on the stage. -Someone--it sounded like Speranski--was distinctly ejaculating -ha-ha-ha. Prince Andrew had never before heard Speranski's famous -laugh, and this ringing, high pitched laughter from a statesman made a -strange impression on him. - -He entered the dining room. The whole company were standing -between two windows at a small table laid with hors-d'oeuvres. -Speranski, wearing a gray swallow-tail coat with a star on the breast, -and evidently still the same waistcoat and high white stock he had -worn at the meeting of the Council of State, stood at the table with a -beaming countenance. His guests surrounded him. Magnitski, -addressing himself to Speranski, was relating an anecdote, and -Speranski was laughing in advance at what Magnitski was going to -say. When Prince Andrew entered the room Magnitski's words were -again crowned by laughter. Stolypin gave a deep bass guffaw as he -munched a piece of bread and cheese. Gervais laughed softly with a -hissing chuckle, and Speranski in a high-pitched staccato manner. - -Still laughing, Speranski held out his soft white hand to Prince -Andrew. - -"Very pleased to see you, Prince," he said. "One moment..." he -went on, turning to Magnitski and interrupting his story. "We have -agreed that this is a dinner for recreation, with not a word about -business!" and turning again to the narrator he began to laugh afresh. - -Prince Andrew looked at the laughing Speranski with astonishment, -regret, and disillusionment. It seemed to him that this was not -Speranski but someone else. Everything that had formerly appeared -mysterious and fascinating in Speranski suddenly became plain and -unattractive. - -At dinner the conversation did not cease for a moment and seemed -to consist of the contents of a book of funny anecdotes. Before -Magnitski had finished his story someone else was anxious to relate -something still funnier. Most of the anecdotes, if not relating to the -state service, related to people in the service. It seemed that in -this company the insignificance of those people was so definitely -accepted that the only possible attitude toward them was one of good -humored ridicule. Speranski related how at the Council that morning -a deaf dignitary, when asked his opinion, replied that he thought so -too. Gervais gave a long account of an official revision, remarkable -for the stupidity of everybody concerned. Stolypin, stuttering, -broke into the conversation and began excitedly talking of the -abuses that existed under the former order of things--threatening to -give a serious turn to the conversation. Magnitski starting quizzing -Stolypin about his vehemence. Gervais intervened with a joke, and -the talk reverted to its former lively tone. - -Evidently Speranski liked to rest after his labors and find -amusement in a circle of friends, and his guests, understanding his -wish, tried to enliven him and amuse themselves. But their gaiety -seemed to Prince Andrew mirthless and tiresome. Speranski's -high-pitched voice struck him unpleasantly, and the incessant laughter -grated on him like a false note. Prince Andrew did not laugh and -feared that he would be a damper on the spirits of the company, but no -one took any notice of his being out of harmony with the general mood. -They all seemed very gay. - -He tried several times to join in the conversation, but his -remarks were tossed aside each time like a cork thrown out of the -water, and he could not jest with them. - -There was nothing wrong or unseemly in what they said, it was -witty and might have been funny, but it lacked just that something -which is the salt of mirth, and they were not even aware that such a -thing existed. - -After dinner Speranski's daughter and her governess rose. He -patted the little girl with his white hand and kissed her. And that -gesture, too, seemed unnatural to Prince Andrew. - -The men remained at table over their port--English fashion. In the -midst of a conversation that was started about Napoleon's Spanish -affairs, which they all agreed in approving, Prince Andrew began to -express a contrary opinion. Speranski smiled and, with an evident wish -to prevent the conversation from taking an unpleasant course, told a -story that had no connection with the previous conversation. For a few -moments all were silent. - -Having sat some time at table, Speranski corked a bottle of wine -and, remarking, "Nowadays good wine rides in a carriage and pair," -passed it to the servant and got up. All rose and continuing to talk -loudly went into the drawing room. Two letters brought by a courier -were handed to Speranski and he took them to his study. As soon as -he had left the room the general merriment stopped and the guests -began to converse sensibly and quietly with one another. - -"Now for the recitation!" said Speranski on returning from his -study. "A wonderful talent!" he said to Prince Andrew, and Magnitski -immediately assumed a pose and began reciting some humorous verses -in French which he had composed about various well-known Petersburg -people. He was interrupted several times by applause. When the -verses were finished Prince Andrew went up to Speranski and took his -leave. - -"Where are you off to so early?" asked Speranski. - -"I promised to go to a reception." - -They said no more. Prince Andrew looked closely into those -mirrorlike, impenetrable eyes, and felt that it had been ridiculous of -him to have expected anything from Speranski and from any of his own -activities connected with him, or ever to have attributed importance -to what Speranski was doing. That precise, mirthless laughter rang -in Prince Andrew's ears long after he had left the house. - -When he reached home Prince Andrew began thinking of his life in -Petersburg during those last four months as if it were something -new. He recalled his exertions and solicitations, and the history of -his project of army reform, which had been accepted for -consideration and which they were trying to pass over in silence -simply because another, a very poor one, had already been prepared and -submitted to the Emperor. He thought of the meetings of a committee of -which Berg was a member. He remembered how carefully and at what -length everything relating to form and procedure was discussed at -those meetings, and how sedulously and promptly all that related to -the gist of the business was evaded. He recalled his labors on the -Legal Code, and how painstakingly he had translated the articles of -the Roman and French codes into Russian, and he felt ashamed of -himself. Then he vividly pictured to himself Bogucharovo, his -occupations in the country, his journey to Ryazan; he remembered the -peasants and Dron the village elder, and mentally applying to them the -Personal Rights he had divided into paragraphs, he felt astonished -that he could have spent so much time on such useless work. - - - - - -CHAPTER XIX - - -Next day Prince Andrew called at a few houses he had not visited -before, and among them at the Rostovs' with whom he had renewed -acquaintance at the ball. Apart from considerations of politeness -which demanded the call, he wanted to see that original, eager girl -who had left such a pleasant impression on his mind, in her own home. - -Natasha was one of the first to meet him. She was wearing a -dark-blue house dress in which Prince Andrew thought her even prettier -than in her ball dress. She and all the Rostov family welcomed him -as an old friend, simply and cordially. The whole family, whom he -had formerly judged severely, now seemed to him to consist of -excellent, simple, and kindly people. The old count's hospitality -and good nature, which struck one especially in Petersburg as a -pleasant surprise, were such that Prince Andrew could not refuse to -stay to dinner. "Yes," he thought, "they are capital people, who of -course have not the slightest idea what a treasure they possess in -Natasha; but they are kindly folk and form the best possible setting -for this strikingly poetic, charming girl, overflowing with life!" - -In Natasha Prince Andrew was conscious of a strange world completely -alien to him and brimful of joys unknown to him, a different world, -that in the Otradnoe avenue and at the window that moonlight night had -already begun to disconcert him. Now this world disconcerted him no -longer and was no longer alien to him, but he himself having entered -it found in it a new enjoyment. - -After dinner Natasha, at Prince Andrew's request, went to the -clavichord and began singing. Prince Andrew stood by a window -talking to the ladies and listened to her. In the midst of a phrase he -ceased speaking and suddenly felt tears choking him, a thing he had -thought impossible for him. He looked at Natasha as she sang, and -something new and joyful stirred in his soul. He felt happy and at the -same time sad. He had absolutely nothing to weep about yet he was -ready to weep. What about? His former love? The little princess? His -disillusionments?... His hopes for the future?... Yes and no. The -chief reason was a sudden, vivid sense of the terrible contrast -between something infinitely great and illimitable within him and that -limited and material something that he, and even she, was. This -contrast weighed on and yet cheered him while she sang. - -As soon as Natasha had finished she went up to him and asked how -he liked her voice. She asked this and then became confused, feeling -that she ought not to have asked it. He smiled, looking at her, and -said he liked her singing as he liked everything she did. - -Prince Andrew left the Rostovs' late in the evening. He went to -bed from habit, but soon realized that he could not sleep. Having -lit his candle he sat up in bed, then got up, then lay down again -not at all troubled by his sleeplessness: his soul was as fresh and -joyful as if he had stepped out of a stuffy room into God's own -fresh air. It did not enter his head that he was in love with Natasha; -he was not thinking about her, but only picturing her to himself, -and in consequence all life appeared in a new light. "Why do I strive, -why do I toil in this narrow, confined frame, when life, all life with -all its joys, is open to me?" said he to himself. And for the first -time for a very long while he began making happy plans for the future. -He decided that he must attend to his son's education by finding a -tutor and putting the boy in his charge, then he ought to retire -from the service and go abroad, and see England, Switzerland and -Italy. "I must use my freedom while I feel so much strength and -youth in me," he said to himself. "Pierre was right when he said one -must believe in the possibility of happiness in order to be happy, and -now I do believe in it. Let the dead bury their dead, but while one -has life one must live and be happy!" thought he. - - - - - -CHAPTER XX - - -One morning Colonel Berg, whom Pierre knew as he knew everybody in -Moscow and Petersburg, came to see him. Berg arrived in an -immaculate brand-new uniform, with his hair pomaded and brushed -forward over his temples as the Emperor Alexander wore his hair. - -"I have just been to see the countess, your wife. Unfortunately -she could not grant my request, but I hope, Count, I shall be more -fortunate with you," he said with a smile. - -"What is it you wish, Colonel? I am at your service." - -"I have now quite settled in my new rooms, Count" (Berg said this -with perfect conviction that this information could not but be -agreeable), "and so I wish to arrange just a small party for my own -and my wife's friends." (He smiled still more pleasantly.) "I wished -to ask the countess and you to do me the honor of coming to tea and to -supper." - -Only Countess Helene, considering the society of such people as -the Bergs beneath her, could be cruel enough to refuse such an -invitation. Berg explained so clearly why he wanted to collect at -his house a small but select company, and why this would give him -pleasure, and why though he grudged spending money on cards or -anything harmful, he was prepared to run into some expense for the -sake of good society--that Pierre could not refuse, and promised to -come. - -"But don't be late, Count, if I may venture to ask; about ten -minutes to eight, please. We shall make up a rubber. Our general is -coming. He is very good to me. We shall have supper, Count. So you -will do me the favor." - -Contrary to his habit of being late, Pierre on that day arrived at -the Bergs' house, not at ten but at fifteen minutes to eight. - -Having prepared everything necessary for the party, the Bergs were -ready for their guests' arrival. - -In their new, clean, and light study with its small busts and -pictures and new furniture sat Berg and his wife. Berg, closely -buttoned up in his new uniform, sat beside his wife explaining to -her that one always could and should be acquainted with people above -one, because only then does one get satisfaction from acquaintances. - -"You can get to know something, you can ask for something. See how I -managed from my first promotion." (Berg measured his life not by years -but by promotions.) "My comrades are still nobodies, while I am only -waiting for a vacancy to command a regiment, and have the happiness to -be your husband." (He rose and kissed Vera's hand, and on the way to -her straightened out a turned-up corner of the carpet.) "And how -have I obtained all this? Chiefly by knowing how to choose my -aquaintances. It goes without saying that one must be conscientious -and methodical." - -Berg smiled with a sense of his superiority over a weak woman, and -paused, reflecting that this dear wife of his was after all but a weak -woman who could not understand all that constitutes a man's dignity, -what it was ein Mann zu sein.* Vera at the same time smiling with a -sense of superiority over her good, conscientious husband, who all the -same understood life wrongly, as according to Vera all men did. -Berg, judging by his wife, thought all women weak and foolish. Vera, -judging only by her husband and generalizing from that observation, -supposed that all men, though they understand nothing and are -conceited and selfish, ascribe common sense to themselves alone. - - -*To be a man. - - -Berg rose and embraced his wife carefully, so as not to crush her -lace fichu for which he had paid a good price, kissing her straight on -the lips. - -"The only thing is, we mustn't have children too soon," he -continued, following an unconscious sequence of ideas. - -"Yes," answered Vera, "I don't at all want that. We must live for -society." - -"Princess Yusupova wore one exactly like this," said Berg, -pointing to the fichu with a happy and kindly smile. - -Just then Count Bezukhov was announced. Husband and wife glanced -at one another, both smiling with self-satisfaction, and each mentally -claiming the honor of this visit. - -"This is what what comes of knowing how to make acquaintances," -thought Berg. "This is what comes of knowing how to conduct oneself." - -"But please don't interrupt me when I am entertaining the guests," -said Vera, "because I know what interests each of them and what to say -to different people." - -Berg smiled again. - -"It can't be helped: men must sometimes have masculine -conversation," said he. - -They received Pierre in their small, new drawing-room, where it -was impossible to sit down anywhere without disturbing its symmetry, -neatness, and order; so it was quite comprehensible and not strange -that Berg, having generously offered to disturb the symmetry of an -armchair or of the sofa for his dear guest, but being apparently -painfully undecided on the matter himself, eventually left the visitor -to settle the question of selection. Pierre disturbed the symmetry -by moving a chair for himself, and Berg and Vera immediately began -their evening party, interrupting each other in their efforts to -entertain their guest. - -Vera, having decided in her own mind that Pierre ought to be -entertained with conversation about the French embassy, at once -began accordingly. Berg, having decided that masculine conversation -was required, interrupted his wife's remarks and touched on the -question of the war with Austria, and unconsciously jumped from the -general subject to personal considerations as to the proposals made -him to take part in the Austrian campaign and the reasons why he had -declined them. Though the conversation was very incoherent and Vera -was angry at the intrusion of the masculine element, both husband -and wife felt with satisfaction that, even if only one guest was -present, their evening had begun very well and was as like as two peas -to every other evening party with its talk, tea, and lighted candles. - -Before long Boris, Berg's old comrade, arrived. There was a shade of -condescension and patronage in his treatment of Berg and Vera. After -Boris came a lady with the colonel, then the general himself, then the -Rostovs, and the party became unquestionably exactly like all other -evening parties. Berg and Vera could not repress their smiles of -satisfaction at the sight of all this movement in their drawing -room, at the sound of the disconnected talk, the rustling of -dresses, and the bowing and scraping. Everything was just as everybody -always has it, especially so the general, who admired the apartment, -patted Berg on the shoulder, and with parental authority superintended -the setting out of the table for boston. The general sat down by Count -Ilya Rostov, who was next to himself the most important guest. The old -people sat with the old, the young with the young, and the hostess -at the tea table, on which stood exactly the same kind of cakes in a -silver cake basket as the Panins had at their party. Everything was -just as it was everywhere else. - - - - - -CHAPTER XXI - - -Pierre, as one of the principal guests, had to sit down to boston -with Count Rostov, the general, and the colonel. At the card table -he happened to be directly facing Natasha, and was struck by a curious -change that had come over her since the ball. She was silent, and -not only less pretty than at the ball, but only redeemed from -plainness by her look of gentle indifference to everything around. - -"What's the matter with her?" thought Pierre, glancing at her. She -was sitting by her sister at the tea table, and reluctantly, without -looking at him, made some reply to Boris who sat down beside her. -After playing out a whole suit and to his partner's delight taking -five tricks, Pierre, hearing greetings and the steps of someone who -had entered the room while he was picking up his tricks, glanced again -at Natasha. - -"What has happened to her?" he asked himself with still greater -surprise. - -Prince Andrew was standing before her, saying something to her -with a look of tender solicitude. She, having raised her head, was -looking up at him, flushed and evidently trying to master her rapid -breathing. And the bright glow of some inner fire that had been -suppressed was again alight in her. She was completely transformed and -from a plain girl had again become what she had been at the ball. - -Prince Andrew went up to Pierre, and the latter noticed a new and -youthful expression in his friend's face. - -Pierre changed places several times during the game, sitting now -with his back to Natasha and now facing her, but during the whole of -the six rubbers he watched her and his friend. - -"Something very important is happening between them," thought -Pierre, and a feeling that was both joyful and painful agitated him -and made him neglect the game. - -After six rubbers the general got up, saying that it was no use -playing like that, and Pierre was released. Natasha on one side was -talking with Sonya and Boris, and Vera with a subtle smile was -saying something to Prince Andrew. Pierre went up to his friend and, -asking whether they were talking secrets, sat down beside them. -Vera, having noticed Prince Andrew's attentions to Natasha, decided -that at a party, a real evening party, subtle allusions to the -tender passion were absolutely necessary and, seizing a moment when -Prince Andrew was alone, began a conversation with him about -feelings in general and about her sister. With so intellectual a guest -as she considered Prince Andrew to be, she felt that she had to employ -her diplomatic tact. - -When Pierre went up to them he noticed that Vera was being carried -away by her self-satisfied talk, but that Prince Andrew seemed -embarrassed, a thing that rarely happened with him. - -"What do you think?" Vera was saying with an arch smile. "You are so -discerning, Prince, and understand people's characters so well at a -glance. What do you think of Natalie? Could she be constant in her -attachments? Could she, like other women" (Vera meant herself), -"love a man once for all and remain true to him forever? That is -what I consider true love. What do you think, Prince?" - -"I know your sister too little," replied Prince Andrew, with a -sarcastic smile under which he wished to hide his embarrassment, "to -be able to solve so delicate a question, and then I have noticed -that the less attractive a woman is the more constant she is likely to -be," he added, and looked up Pierre who was just approaching them. - -"Yes, that is true, Prince. In our days," continued Vera--mentioning -"our days" as people of limited intelligence are fond of doing, -imagining that they have discovered and appraised the peculiarities of -"our days" and that human characteristics change with the times--"in -our days a girl has so much freedom that the pleasure of being courted -often stifles real feeling in her. And it must be confessed that -Natalie is very susceptible." This return to the subject of Natalie -caused Prince Andrew to knit his brows with discomfort: he was about -to rise, but Vera continued with a still more subtle smile: - -"I think no one has been more courted than she," she went on, "but -till quite lately she never cared seriously for anyone. Now you -know, Count," she said to Pierre, "even our dear cousin Boris, who, -between ourselves, was very far gone in the land of tenderness..." -(alluding to a map of love much in vogue at that time). - -Prince Andrew frowned and remained silent. - -"You are friendly with Boris, aren't you?" asked Vera. - -"Yes, I know him..." - -"I expect he has told you of his childish love for Natasha?" - -"Oh, there was childish love?" suddenly asked Prince Andrew, -blushing unexpectedly. - -"Yes, you know between cousins intimacy often leads to love. Le -cousinage est un dangereux voisinage.* Don't you think so?" - - -*"Cousinhood is a dangerous neighborhood." - - -"Oh, undoubtedly!" said Prince Andrew, and with sudden and unnatural -liveliness he began chaffing Pierre about the need to be very -careful with his fifty-year-old Moscow cousins, and in the midst of -these jesting remarks he rose, taking Pierre by the arm, and drew -him aside. - -"Well?" asked Pierre, seeing his friend's strange animation with -surprise, and noticing the glance he turned on Natasha as he rose. - -"I must... I must have a talk with you," said Prince Andrew. "You -know that pair of women's gloves?" (He referred to the Masonic -gloves given to a newly initiated Brother to present to the woman he -loved.) "I... but no, I will talk to you later on," and with a strange -light in his eyes and restlessness in his movements, Prince Andrew -approached Natasha and sat down beside her. Pierre saw how Prince -Andrew asked her something and how she flushed as she replied. - -But at that moment Berg came to Pierre and began insisting that he -should take part in an argument between the general and the colonel on -the affairs in Spain. - -Berg was satisfied and happy. The smile of pleasure never left his -face. The party was very successful and quite like other parties he -had seen. Everything was similar: the ladies' subtle talk, the -cards, the general raising his voice at the card table, and the -samovar and the tea cakes; only one thing was lacking that he had -always seen at the evening parties he wished to imitate. They had -not yet had a loud conversation among the men and a dispute about -something important and clever. Now the general had begun such a -discussion and so Berg drew Pierre to it. - - - - - -CHAPTER XXII - - -Next day, having been invited by the count, Prince Andrew dined with -the Rostovs and spent the rest of the day there. - -Everyone in the house realized for whose sake Prince Andrew came, -and without concealing it he tried to be with Natasha all day. Not -only in the soul of the frightened yet happy and enraptured Natasha, -but in the whole house, there was a feeling of awe at something -important that was bound to happen. The countess looked with sad and -sternly serious eyes at Prince Andrew when he talked to Natasha and -timidly started some artificial conversation about trifles as soon -as he looked her way. Sonya was afraid to leave Natasha and afraid -of being in the way when she was with them. Natasha grew pale, in a -panic of expectation, when she remained alone with him for a moment. -Prince Andrew surprised her by his timidity. She felt that he wanted -to say something to her but could not bring himself to do so. - -In the evening, when Prince Andrew had left, the countess went up to -Natasha and whispered: "Well, what?" - -"Mamma! For heaven's sake don't ask me anything now! One can't -talk about that," said Natasha. - -But all the same that night Natasha, now agitated and now -frightened, lay a long time in her mother's bed gazing straight -before her. She told her how he had complimented her, how he told -her he was going abroad, asked her where they were going to spend -the summer, and then how he had asked her about Boris. - -"But such a... such a... never happened to me before!" she said. -"Only I feel afraid in his presence. I am always afraid when I'm -with him. What does that mean? Does it mean that it's the real -thing? Yes? Mamma, are you asleep?" - -"No, my love; I am frightened myself," answered her mother. "Now -go!" - -"All the same I shan't sleep. What silliness, to sleep! Mummy! -Mummy! such a thing never happened to me before," she said, -surprised and alarmed at the feeling she was aware of in herself. "And -could we ever have thought!..." - -It seemed to Natasha that even at the time she first saw Prince -Andrew at Otradnoe she had fallen in love with him. It was as if she -feared this strange, unexpected happiness of meeting again the very -man she had then chosen (she was firmly convinced she had done so) and -of finding him, as it seemed, not indifferent to her. - -"And it had to happen that he should come specially to Petersburg -while we are here. And it had to happen that we should meet at that -ball. It is fate. Clearly it is fate that everything led up to this! -Already then, directly I saw him I felt something peculiar." - -"What else did he say to you? What are those verses? Read them..." -said her mother, thoughtfully, referring to some verses Prince -Andrew had written in Natasha's album. - -"Mamma, one need not be ashamed of his being a widower?" - -"Don't, Natasha! Pray to God. 'Marriages are made in heaven,'" -said her mother. - -"Darling Mummy, how I love you! How happy I am!" cried Natasha, -shedding tears of joy and excitement and embracing her mother. - -At that very time Prince Andrew was sitting with Pierre and -telling him of his love for Natasha and his firm resolve to make her -his wife. - -That day Countess Helene had a reception at her house. The French -ambassador was there, and a foreign prince of the blood who had of -late become a frequent visitor of hers, and many brilliant ladies -and gentlemen. Pierre, who had come downstairs, walked through the -rooms and struck everyone by his preoccupied, absent-minded, and -morose air. - -Since the ball he had felt the approach of a fit of nervous -depression and had made desperate efforts to combat it. Since the -intimacy of his wife with the royal prince, Pierre had unexpectedly -been made a gentleman of the bedchamber, and from that time he had -begun to feel oppressed and ashamed in court society, and dark -thoughts of the vanity of all things human came to him oftener than -before. At the same time the feeling he had noticed between his -protegee Natasha and Prince Andrew accentuated his gloom by the -contrast between his own position and his friend's. He tried equally -to avoid thinking about his wife, and about Natasha and Prince Andrew; -and again everything seemed to him insignificant in comparison with -eternity; again the question: for what? presented itself; and he -forced himself to work day and night at Masonic labors, hoping to -drive away the evil spirit that threatened him. Toward midnight, after -he had left the countess' apartments, he was sitting upstairs in a -shabby dressing gown, copying out the original transaction of the -Scottish lodge of Freemasons at a table in his low room cloudy with -tobacco smoke, when someone came in. It was Prince Andrew. - -"Ah, it's you!" said Pierre with a preoccupied, dissatisfied air. -"And I, you see, am hard at it." He pointed to his manuscript book -with that air of escaping from the ills of life with which unhappy -people look at their work. - -Prince Andrew, with a beaming, ecstatic expression of renewed life -on his face, paused in front of Pierre and, not noticing his sad look, -smiled at him with the egotism of joy. - -"Well, dear heart," said he, "I wanted to tell you about it -yesterday and I have come to do so today. I never experienced anything -like it before. I am in love, my friend!" - -Suddenly Pierre heaved a deep sigh and dumped his heavy person -down on the sofa beside Prince Andrew. - -"With Natasha Rostova, yes?" said he. - -"Yes, yes! Who else should it be? I should never have believed it, -but the feeling is stronger than I. Yesterday I tormented myself and -suffered, but I would not exchange even that torment for anything in -the world, I have not lived till now. At last I live, but I can't live -without her! But can she love me?... I am too old for her.... Why -don't you speak?" - -"I? I? What did I tell you?" said Pierre suddenly, rising and -beginning to pace up and down the room. "I always thought it.... -That girl is such a treasure... she is a rare girl.... My dear friend, -I entreat you, don't philosophize, don't doubt, marry, marry, -marry.... And I am sure there will not be a happier man than you." - -"But what of her?" - -"She loves you." - -"Don't talk rubbish..." said Prince Andrew, smiling and looking into -Pierre's eyes. - -"She does, I know," Pierre cried fiercely. - -"But do listen," returned Prince Andrew, holding him by the arm. "Do -you know the condition I am in? I must talk about it to someone." - -"Well, go on, go on. I am very glad," said Pierre, and his face -really changed, his brow became smooth, and he listened gladly to -Prince Andrew. Prince Andrew seemed, and really was, quite a -different, quite a new man. Where was his spleen, his contempt for -life, his disillusionment? Pierre was the only person to whom he -made up his mind to speak openly; and to him he told all that was in -his soul. Now he boldly and lightly made plans for an extended future, -said he could not sacrifice his own happiness to his father's caprice, -and spoke of how he would either make his father consent to this -marriage and love her, or would do without his consent; then he -marveled at the feeling that had mastered him as at something strange, -apart from and independent of himself. - -"I should not have believed anyone who told me that I was capable of -such love," said Prince Andrew. "It is not at all the same feeling -that I knew in the past. The whole world is now for me divided into -two halves: one half is she, and there all is joy, hope, light: the -other half is everything where she is not, and there is all gloom -and darkness...." - -"Darkness and gloom," reiterated Pierre: "yes, yes, I understand -that." - -"I cannot help loving the light, it is not my fault. And I am very -happy! You understand me? I know you are glad for my sake." - -"Yes, yes," Pierre assented, looking at his friend with a touched -and sad expression in his eyes. The brighter Prince Andrew's lot -appeared to him, the gloomier seemed his own. - - - - - -CHAPTER XXIII - - -Prince Andrew needed his father's consent to his marriage, and to -obtain this he started for the country next day. - -His father received his son's communication with external composure, -but inward wrath. He could not comprehend how anyone could wish to -alter his life or introduce anything new into it, when his own life -was already ending. "If only they would let me end my days as I want -to," thought the old man, "then they might do as they please." With -his son, however, he employed the diplomacy he reserved for -important occasions and, adopting a quiet tone, discussed the whole -matter. - -In the first place the marriage was not a brilliant one as regards -birth, wealth, or rank. Secondly, Prince Andrew was no longer as young -as he had been and his health was poor (the old man laid special -stress on this), while she was very young. Thirdly, he had a son -whom it would be a pity to entrust to a chit of a girl. "Fourthly -and finally," the father said, looking ironically at his son, "I beg -you to put it off for a year: go abroad, take a cure, look out as -you wanted to for a German tutor for Prince Nicholas. Then if your -love or passion or obstinacy--as you please--is still as great, marry! -And that's my last word on it. Mind, the last..." concluded the -prince, in a tone which showed that nothing would make him alter his -decision. - -Prince Andrew saw clearly that the old man hoped that his -feelings, or his fiancee's, would not stand a year's test, or that -he (the old prince himself) would die before then, and he decided to -conform to his father's wish--to propose, and postpone the wedding for -a year. - -Three weeks after the last evening he had spent with the Rostovs, -Prince Andrew returned to Petersburg. - - -Next day after her talk with her mother Natasha expected Bolkonski -all day, but he did not come. On the second and third day it was the -same. Pierre did not come either and Natasha, not knowing that -Prince Andrew had gone to see his father, could not explain his -absence to herself. - -Three weeks passed in this way. Natasha had no desire to go out -anywhere and wandered from room to room like a shadow, idle and -listless; she wept secretly at night and did not go to her mother in -the evenings. She blushed continually and was irritable. It seemed -to her that everybody knew about her disappointment and was laughing -at her and pitying her. Strong as was her inward grief, this wound -to her vanity intensified her misery. - -Once she came to her mother, tried to say something, and suddenly -began to cry. Her tears were those of an offended child who does not -know why it is being punished. - -The countess began to soothe Natasha, who after first listening to -her mother's words, suddenly interrupted her: - -"Leave off, Mamma! I don't think, and don't want to think about -it! He just came and then left off, left off..." - -Her voice trembled, and she again nearly cried, but recovered and -went on quietly: - -"And I don't at all want to get married. And I am afraid of him; I -have now become quite calm, quite calm." - -The day after this conversation Natasha put on the old dress which -she knew had the peculiar property of conducing to cheerfulness in the -mornings, and that day she returned to the old way of life which she -had abandoned since the ball. Having finished her morning tea she went -to the ballroom, which she particularly liked for its loud -resonance, and began singing her solfeggio. When she had finished -her first exercise she stood still in the middle of the room and -sang a musical phrase that particularly pleased her. She listened -joyfully (as though she had not expected it) to the charm of the notes -reverberating, filling the whole empty ballroom, and slowly dying -away; and all at once she felt cheerful. "What's the good of making so -much of it? Things are nice as it is," she said to herself, and she -began walking up and down the room, not stepping simply on the -resounding parquet but treading with each step from the heel to the -toe (she had on a new and favorite pair of shoes) and listening to the -regular tap of the heel and creak of the toe as gladly as she had to -the sounds of her own voice. Passing a mirror she glanced into it. -"There, that's me!" the expression of her face seemed to say as she -caught sight of herself. "Well, and very nice too! I need nobody." - -A footman wanted to come in to clear away something in the room -but she would not let him, and having closed the door behind him -continued her walk. That morning she had returned to her favorite -mood--love of, and delight in, herself. "How charming that Natasha -is!" she said again, speaking as some third, collective, male -person. "Pretty, a good voice, young, and in nobody's way if only they -leave her in peace." But however much they left her in peace she could -not now be at peace, and immediately felt this. - -In the hall the porch door opened, and someone asked, "At home?" and -then footsteps were heard. Natasha was looking at the mirror, but -did not see herself. She listened to the sounds in the hall. When -she saw herself, her face was pale. It was he. She knew this for -certain, though she hardly heard his voice through the closed doors. - -Pale and agitated, Natasha ran into the drawing room. - -"Mamma! Bolkonski has come!" she said. "Mamma, it is awful, it is -unbearable! I don't want... to be tormented? What am I to do?..." - -Before the countess could answer, Prince Andrew entered the room -with an agitated and serious face. As soon as he saw Natasha his -face brightened. He kissed the countess' hand and Natasha's, and sat -down beside the sofa. - -"It is long since we had the pleasure..." began the countess, but -Prince Andrew interrupted her by answering her intended question, -obviously in haste to say what he had to. - -"I have not been to see all this time because I have been at my -father's. I had to talk over a very important matter with him. I -only got back last night," he said glancing at Natasha; "I want to -have a talk with you, Countess," he added after a moment's pause. - -The countess lowered her eyes, sighing deeply. - -"I am at your disposal," she murmured. - -Natasha knew that she ought to go away, but was unable to do so: -something gripped her throat, and regardless of manners she stared -straight at Prince Andrew with wide-open eyes. - -"At once? This instant!... No, it can't be!" she thought. - -Again he glanced at her, and that glance convinced her that she -was not mistaken. Yes, at once, that very instant, her fate would be -decided. - -"Go, Natasha! I will call you," said the countess in a whisper. - -Natasha glanced with frightened imploring eyes at Prince Andrew -and at her mother and went out. - -"I have come, Countess, to ask for your daughter's hand," said -Prince Andrew. - -The countess' face flushed hotly, but she said nothing. - -"Your offer..." she began at last sedately. He remained silent, -looking into her eyes. "Your offer..." (she grew confused) "is -agreeable to us, and I accept your offer. I am glad. And my husband... -I hope... but it will depend on her...." - -"I will speak to her when I have your consent.... Do you give it -to me?" said Prince Andrew. - -"Yes," replied the countess. She held out her hand to him, and -with a mixed feeling of estrangement and tenderness pressed her lips -to his forehead as he stooped to kiss her hand. She wished to love him -as a son, but felt that to her he was a stranger and a terrifying man. -"I am sure my husband will consent," said the countess, "but your -father..." - -"My father, to whom I have told my plans, has made it an express -condition of his consent that the wedding is not to take place for a -year. And I wished to tell you of that," said Prince Andrew. - -"It is true that Natasha is still young, but--so long as that?..." - -"It is unavoidable," said Prince Andrew with a sigh. - -"I will send her to you," said the countess, and left the room. - -"Lord have mercy upon us!" she repeated while seeking her daughter. - -Sonya said that Natasha was in her bedroom. Natasha was sitting on -the bed, pale and dry eyed, and was gazing at the icons and whispering -something as she rapidly crossed herself. Seeing her mother she jumped -up and flew to her. - -"Well, Mamma?... Well?..." - -"Go, go to him. He is asking for your hand," said the countess, -coldly it seemed to Natasha. "Go... go," said the mother, sadly and -reproachfully, with a deep sigh, as her daughter ran away. - -Natasha never remembered how she entered the drawing room. When -she came in and saw him she paused. "Is it possible that this stranger -has now become everything to me?" she asked herself, and immediately -answered, "Yes, everything! He alone is now dearer to me than -everything in the world." Prince Andrew came up to her with downcast -eyes. - -"I have loved you from the very first moment I saw you. May I hope?" - -He looked at her and was struck by the serious impassioned -expression of her face. Her face said: "Why ask? Why doubt what you -cannot but know? Why speak, when words cannot express what one feels?" - -She drew near to him and stopped. He took her hand and kissed it. - -"Do you love me?" - -"Yes, yes!" Natasha murmured as if in vexation. Then she sighed -loudly and, catching her breath more and more quickly, began to sob. - -"What is it? What's the matter?" - -"Oh, I am so happy!" she replied, smiled through her tears, bent -over closer to him, paused for an instant as if asking herself whether -she might, and then kissed him. - -Prince Andrew held her hands, looked into her eyes, and did not find -in his heart his former love for her. Something in him had suddenly -changed; there was no longer the former poetic and mystic charm of -desire, but there was pity for her feminine and childish weakness, -fear at her devotion and trustfulness, and an oppressive yet joyful -sense of the duty that now bound him to her forever. The present -feeling, though not so bright and poetic as the former, was stronger -and more serious. - -"Did your mother tell you that it cannot be for a year?" asked -Prince Andrew, still looking into her eyes. - -"Is it possible that I--the 'chit of a girl,' as everybody called -me," thought Natasha--"is it possible that I am now to be the wife and -the equal of this strange, dear, clever man whom even my father -looks up to? Can it be true? Can it be true that there can be no -more playing with life, that now I am grown up, that on me now lies -a responsibility for my every word and deed? Yes, but what did he -ask me?" - -"No," she replied, but she had not understood his question. - -"Forgive me!" he said. "But you are so young, and I have already -been through so much in life. I am afraid for you, you do not yet know -yourself." - -Natasha listened with concentrated attention, trying but failing -to take in the meaning of his words. - -"Hard as this year which delays my happiness will be," continued -Prince Andrew, "it will give you time to be sure of yourself. I ask -you to make me happy in a year, but you are free: our engagement shall -remain a secret, and should you find that you do not love me, or -should you come to love..." said Prince Andrew with an unnatural -smile. - -"Why do you say that?" Natasha interrupted him. "You know that -from the very day you first came to Otradnoe I have loved you," she -cried, quite convinced that she spoke the truth. - -"In a year you will learn to know yourself...." - -"A whole year!" Natasha repeated suddenly, only now realizing that -the marriage was to be postponed for a year. "But why a year? Why a -year?..." - -Prince Andrew began to explain to her the reasons for this delay. -Natasha did not hear him. - -"And can't it be helped?" she asked. Prince Andrew did not reply, -but his face expressed the impossibility of altering that decision. - -"It's awful! Oh, it's awful! awful!" Natasha suddenly cried, and -again burst into sobs. "I shall die, waiting a year: it's -impossible, it's awful!" She looked into her lover's face and saw in -it a look of commiseration and perplexity. - -"No, no! I'll do anything!" she said, suddenly checking her tears. -"I am so happy." - -The father and mother came into the room and gave the betrothed -couple their blessing. - -From that day Prince Andrew began to frequent the Rostovs' as -Natasha's affianced lover. - - - - - -CHAPTER XXIV - -No betrothal ceremony took place and Natasha's engagement to -Bolkonski was not announced; Prince Andrew insisted on that. He said -that as he was responsible for the delay he ought to bear the whole -burden of it; that he had given his word and bound himself forever, -but that he did not wish to bind Natasha and gave her perfect freedom. -If after six months she felt that she did not love him she would -have full right to reject him. Naturally neither Natasha nor her -parents wished to hear of this, but Prince Andrew was firm. He came -every day to the Rostovs', but did not behave to Natasha as an -affianced lover: he did not use the familiar thou, but said you to -her, and kissed only her hand. After their engagement, quite -different, intimate, and natural relations sprang up between them. -It was as if they had not known each other till now. Both liked to -recall how they had regarded each other when as yet they were -nothing to one another; they felt themselves now quite different -beings: then they were artificial, now natural and sincere. At first -the family felt some constraint in intercourse with Prince Andrew; -he seemed a man from another world, and for a long time Natasha -trained the family to get used to him, proudly assuring them all -that he only appeared to be different, but was really just like all of -them, and that she was not afraid of him and no one else ought to -be. After a few days they grew accustomed to him, and without -restraint in his presence pursued their usual way of life, in which he -took his part. He could talk about rural economy with the count, -fashions with the countess and Natasha, and about albums and fancywork -with Sonya. Sometimes the household both among themselves and in his -presence expressed their wonder at how it had all happened, and at the -evident omens there had been of it: Prince Andrew's coming to Otradnoe -and their coming to Petersburg, and the likeness between Natasha and -Prince Andrew which her nurse had noticed on his first visit, and -Andrew's encounter with Nicholas in 1805, and many other incidents -betokening that it had to be. - -In the house that poetic dullness and quiet reigned which always -accompanies the presence of a betrothed couple. Often when all sitting -together everyone kept silent. Sometimes the others would get up and -go away and the couple, left alone, still remained silent. They rarely -spoke of their future life. Prince Andrew was afraid and ashamed to -speak of it. Natasha shared this as she did all his feelings, which -she constantly divined. Once she began questioning him about his -son. Prince Andrew blushed, as he often did now--Natasha -particularly liked it in him--and said that his son would not live -with them. - -"Why not?" asked Natasha in a frightened tone. - -"I cannot take him away from his grandfather, and besides..." - -"How I should have loved him!" said Natasha, immediately guessing -his thought; "but I know you wish to avoid any pretext for finding -fault with us." - -Sometimes the old count would come up, kiss Prince Andrew, and ask -his advice about Petya's education or Nicholas' service. The old -countess sighed as she looked at them; Sonya was always getting -frightened lest she should be in the way and tried to find excuses for -leaving them alone, even when they did not wish it. When Prince Andrew -spoke (he could tell a story very well), Natasha listened to him -with pride; when she spoke she noticed with fear and joy that he gazed -attentively and scrutinizingly at her. She asked herself in -perplexity: "What does he look for in me? He is trying to discover -something by looking at me! What if what he seeks in me is not there?" -Sometimes she fell into one of the mad, merry moods characteristic -of her, and then she particularly loved to hear and see how Prince -Andrew laughed. He seldom laughed, but when he did he abandoned -himself entirely to his laughter, and after such a laugh she always -felt nearer to him. Natasha would have been completely happy if the -thought of the separation awaiting her and drawing near had not -terrified her, just as the mere thought of it made him turn pale and -cold. - -On the eve of his departure from Petersburg Prince Andrew brought -with him Pierre, who had not been to the Rostovs' once since the ball. -Pierre seemed disconcerted and embarrassed. He was talking to the -countess, and Natasha sat down beside a little chess table with Sonya, -thereby inviting Prince Andrew to come too. He did so. - -"You have known Bezukhov a long time?" he asked. "Do you like him?" - -"Yes, he's a dear, but very absurd." - -And as usual when speaking of Pierre, she began to tell anecdotes of -his absent-mindedness, some of which had even been invented about him. - -"Do you know I have entrusted him with our secret? I have known -him from childhood. He has a heart of gold. I beg you, Natalie," -Prince Andrew said with sudden seriousness--"I am going away and -heaven knows what may happen. You may cease to... all right, I know -I am not to say that. Only this, then: whatever may happen to you when -I am not here..." - -"What can happen?" - -"Whatever trouble may come," Prince Andrew continued, "I beg you, -Mademoiselle Sophie, whatever may happen, to turn to him alone for -advice and help! He is a most absent-minded and absurd fellow, but -he has a heart of gold." - -Neither her father, nor her mother, nor Sonya, nor Prince Andrew -himself could have foreseen how the separation from her lover would -act on Natasha. Flushed and agitated she went about the house all that -day, dry-eyed, occupied with most trivial matters as if not -understanding what awaited her. She did not even cry when, on taking -leave, he kissed her hand for the last time. "Don't go!" she said in a -tone that made him wonder whether he really ought not to stay and -which he remembered long afterwards. Nor did she cry when he was gone; -but for several days she sat in her room dry-eyed, taking no -interest in anything and only saying now and then, "Oh, why did he -go away?" - -But a fortnight after his departure, to the surprise of those around -her, she recovered from her mental sickness just as suddenly and -became her old self again, but with a change in her moral physiognomy, -as a child gets up after a long illness with a changed expression of -face. - - - - - -CHAPTER XXV - - -During that year after his son's departure, Prince Nicholas -Bolkonski's health and temper became much worse. He grew still more -irritable, and it was Princess Mary who generally bore the brunt of -his frequent fits of unprovoked anger. He seemed carefully to seek out -her tender spots so as to torture her mentally as harshly as possible. -Princess Mary had two passions and consequently two joys--her -nephew, little Nicholas, and religion--and these were the favorite -subjects of the prince's attacks and ridicule. Whatever was spoken -of he would bring round to the superstitiousness of old maids, or -the petting and spoiling of children. "You want to make him"--little -Nicholas--"into an old maid like yourself! A pity! Prince Andrew wants -a son and not an old maid," he would say. Or, turning to -Mademoiselle Bourienne, he would ask her in Princess Mary's presence -how she liked our village priests and icons and would joke about them. - -He continually hurt Princess Mary's feelings and tormented her, -but it cost her no effort to forgive him. Could he be to blame -toward her, or could her father, whom she knew loved her in spite of -it all, be unjust? And what is justice? The princess never thought -of that proud word "justice." All the complex laws of man centered for -her in one clear and simple law--the law of love and self-sacrifice -taught us by Him who lovingly suffered for mankind though He Himself -was God. What had she to do with the justice or injustice of other -people? She had to endure and love, and that she did. - -During the winter Prince Andrew had come to Bald Hills and had -been gay, gentle, and more affectionate than Princess Mary had known -him for a long time past. She felt that something had happened to him, -but he said nothing to her about his love. Before he left he had a -long talk with his father about something, and Princess Mary noticed -that before his departure they were dissatisfied with one another. - -Soon after Prince Andrew had gone, Princess Mary wrote to her friend -Julie Karagina in Petersburg, whom she had dreamed (as all girls -dream) of marrying to her brother, and who was at that time in -mourning for her own brother, killed in Turkey. - - -Sorrow, it seems, is our common lot, my dear, tender friend Julie. - -Your loss is so terrible that I can only explain it to myself as a -special providence of God who, loving you, wishes to try you and -your excellent mother. Oh, my friend! Religion, and religion alone, -can--I will not say comfort us--but save us from despair. Religion -alone can explain to us what without its help man cannot comprehend: -why, for what cause, kind and noble beings able to find happiness in -life--not merely harming no one but necessary to the happiness of -others--are called away to God, while cruel, useless, harmful persons, -or such as are a burden to themselves and to others, are left -living. The first death I saw, and one I shall never forget--that of -my dear sister-in-law--left that impression on me. Just as you ask -destiny why your splendid brother had to die, so I asked why that -angel Lise, who not only never wronged anyone, but in whose soul there -were never any unkind thoughts, had to die. And what do you think, -dear friend? Five years have passed since then, and already I, with my -petty understanding, begin to see clearly why she had to die, and in -what way that death was but an expression of the infinite goodness -of the Creator, whose every action, though generally -incomprehensible to us, is but a manifestation of His infinite love -for His creatures. Perhaps, I often think, she was too angelically -innocent to have the strength to perform all a mother's duties. As a -young wife she was irreproachable; perhaps she could not have been -so as a mother. As it is, not only has she left us, and particularly -Prince Andrew, with the purest regrets and memories, but probably -she will there receive a place I dare not hope for myself. But not -to speak of her alone, that early and terrible death has had the -most beneficent influence on me and on my brother in spite of all -our grief. Then, at the moment of our loss, these thoughts could not -occur to me; I should then have dismissed them with horror, but now -they are very clear and certain. I write all this to you, dear friend, -only to convince you of the Gospel truth which has become for me a -principle of life: not a single hair of our heads will fall without -His will. And His will is governed only by infinite love for us, and -so whatever befalls us is for our good. - -You ask whether we shall spend next winter in Moscow. In spite of my -wish to see you, I do not think so and do not want to do so. You -will be surprised to hear that the reason for this is Buonaparte! -The case is this: my father's health is growing noticeably worse, he -cannot stand any contradiction and is becoming irritable. This -irritability is, as you know, chiefly directed to political questions. -He cannot endure the notion that Buonaparte is negotiating on equal -terms with all the sovereigns of Europe and particularly with our own, -the grandson of the Great Catherine! As you know, I am quite -indifferent to politics, but from my father's remarks and his talks -with Michael Ivanovich I know all that goes on in the world and -especially about the honors conferred on Buonaparte, who only at -Bald Hills in the whole world, it seems, is not accepted as a great -man, still less as Emperor of France. And my father cannot stand this. -It seems to me that it is chiefly because of his political views -that my father is reluctant to speak of going to Moscow; for he -foresees the encounters that would result from his way of expressing -his views regardless of anybody. All the benefit he might derive -from a course of treatment he would lose as a result of the disputes -about Buonaparte which would be inevitable. In any case it will be -decided very shortly. - -Our family life goes on in the old way except for my brother -Andrew's absence. He, as I wrote you before, has changed very much -of late. After his sorrow he only this year quite recovered his -spirits. He has again become as I used to know him when a child: kind, -affectionate, with that heart of gold to which I know no equal. He has -realized, it seems to me, that life is not over for him. But -together with this mental change he has grown physically much -weaker. He has become thinner and more nervous. I am anxious about him -and glad he is taking this trip abroad which the doctors recommended -long ago. I hope it will cure him. You write that in Petersburg he -is spoken of as one of the most active, cultivated, and capable of the -young men. Forgive my vanity as a relation, but I never doubted it. -The good he has done to everybody here, from his peasants up to the -gentry, is incalculable. On his arrival in Petersburg he received only -his due. I always wonder at the way rumors fly from Petersburg to -Moscow, especially such false ones as that you write about--I mean the -report of my brother's betrothal to the little Rostova. I do not think -my brother will ever marry again, and certainly not her; and this is -why: first, I know that though he rarely speaks about the wife he -has lost, the grief of that loss has gone too deep in his heart for -him ever to decide to give her a successor and our little angel a -stepmother. Secondly because, as far as I know, that girl is not the -kind of girl who could please Prince Andrew. I do not think he would -choose her for a wife, and frankly I do not wish it. But I am -running on too long and am at the end of my second sheet. Good-by, -my dear friend. May God keep you in His holy and mighty care. My -dear friend, Mademoiselle Bourienne, sends you kisses. - -MARY - - - - - -CHAPTER XXVI - - -In the middle of the summer Princess Mary received an unexpected -letter from Prince Andrew in Switzerland in which he gave her -strange and surprising news. He informed her of his engagement to -Natasha Rostova. The whole letter breathed loving rapture for his -betrothed and tender and confiding affection for his sister. He -wrote that he had never loved as he did now and that only now did he -understand and know what life was. He asked his sister to forgive -him for not having told her of his resolve when he had last visited -Bald Hills, though he had spoken of it to his father. He had not -done so for fear Princess Mary should ask her father to give his -consent, irritating him and having to bear the brunt of his -displeasure without attaining her object. "Besides," he wrote, "the -matter was not then so definitely settled as it is now. My father then -insisted on a delay of a year and now already six months, half of that -period, have passed, and my resolution is firmer than ever. If the -doctors did not keep me here at the spas I should be back in Russia, -but as it is I have to postpone my return for three months. You know -me and my relations with Father. I want nothing from him. I have -been and always shall be independent; but to go against his will and -arouse his anger, now that he may perhaps remain with us such a -short time, would destroy half my happiness. I am now writing to him -about the same question, and beg you to choose a good moment to hand -him the letter and to let me know how he looks at the whole matter and -whether there is hope that he may consent to reduce the term by four -months." - -After long hesitations, doubts, and prayers, Princess Mary gave -the letter to her father. The next day the old prince said to her -quietly: - -"Write and tell your brother to wait till I am dead.... It won't -be long--I shall soon set him free." - -The princess was about to reply, but her father would not let her -speak and, raising his voice more and more, cried: - -"Marry, marry, my boy!... A good family!... Clever people, eh? Rich, -eh? Yes, a nice stepmother little Nicholas will have! Write and tell -him that he may marry tomorrow if he likes. She will be little -Nicholas' stepmother and I'll marry Bourienne!... Ha, ha, ha! He -mustn't be without a stepmother either! Only one thing, no more -women are wanted in my house--let him marry and live by himself. -Perhaps you will go and live with him too?" he added, turning to -Princess Mary. "Go in heavens name! Go out into the frost... the -frost... the frost! - -After this outburst the prince did not speak any more about the -matter. But repressed vexation at his son's poor-spirited behavior -found expression in his treatment of his daughter. To his former -pretexts for irony a fresh one was now added--allusions to stepmothers -and amiabilities to Mademoiselle Bourienne. - -"Why shouldn't I marry her?" he asked his daughter. "She'll make a -splendid princess!" - -And latterly, to her surprise and bewilderment, Princess Mary -noticed that her father was really associating more and more with -the Frenchwoman. She wrote to Prince Andrew about the reception of his -letter, but comforted him with hopes of reconciling their father to -the idea. - -Little Nicholas and his education, her brother Andrew, and -religion were Princess Mary's joys and consolations; but besides that, -since everyone must have personal hopes, Princess Mary in the -profoundest depths of her heart had a hidden dream and hope that -supplied the chief consolation of her life. This comforting dream -and hope were given her by God's folk--the half-witted and other -pilgrims who visited her without the prince's knowledge. The longer -she lived, the more experience and observation she had of life, the -greater was her wonder at the short-sightedness of men who seek -enjoyment and happiness here on earth: toiling, suffering, struggling, -and harming one another, to obtain that impossible, visionary, -sinful happiness. Prince Andrew had loved his wife, she died, but that -was not enough: he wanted to bind his happiness to another woman. -Her father objected to this because he wanted a more distinguished and -wealthier match for Andrew. And they all struggled and suffered and -tormented one another and injured their souls, their eternal souls, -for the attainment of benefits which endure but for an instant. Not -only do we know this ourselves, but Christ, the Son of God, came -down to earth and told us that this life is but for a moment and is -a probation; yet we cling to it and think to find happiness in it. -"How is it that no one realizes this?" thought Princess Mary. "No -one except these despised God's folk who, wallet on back, come to me -by the back door, afraid of being seen by the prince, not for fear -of ill-usage by him but for fear of causing him to sin. To leave -family, home, and all the cares of worldly welfare, in order without -clinging to anything to wander in hempen rags from place to place -under an assumed name, doing no one any harm but praying for all- -for those who drive one away as well as for those who protect one: -higher than that life and truth there is no life or truth!" - -There was one pilgrim, a quiet pockmarked little woman of fifty -called Theodosia, who for over thirty years had gone about barefoot -and worn heavy chains. Princess Mary was particularly fond of her. -Once, when in a room with a lamp dimly lit before the icon Theodosia -was talking of her life, the thought that Theodosia alone had found -the true path of life suddenly came to Princess Mary with such force -that she resolved to become a pilgrim herself. When Theodosia had gone -to sleep Princess Mary thought about this for a long time, and at last -made up her mind that, strange as it might seem, she must go on a -pilgrimage. She disclosed this thought to no one but to her confessor, -Father Akinfi, the monk, and he approved of her intention. Under guise -of a present for the pilgrims, Princess Mary prepared a pilgrim's -complete costume for herself: a coarse smock, bast shoes, a rough -coat, and a black kerchief. Often, approaching the chest of drawers -containing this secret treasure, Princess Mary paused, uncertain -whether the time had not already come to put her project into -execution. - -Often, listening to the pilgrims' tales, she was so stimulated by -their simple speech, mechanical to them but to her so full of deep -meaning, that several times she was on the point of abandoning -everything and running away from home. In imagination she already -pictured herself by Theodosia's side, dressed in coarse rags, -walking with a staff, a wallet on her back, along the dusty road, -directing her wanderings from one saint's shrine to another, free from -envy, earthly love, or desire, and reaching at last the place where -there is no more sorrow or sighing, but eternal joy and bliss. - -"I shall come to a place and pray there, and before having time to -get used to it or getting to love it, I shall go farther. I will go on -till my legs fail, and I'll lie down and die somewhere, and shall at -last reach that eternal, quiet haven, where there is neither sorrow -nor sighing..." thought Princess Mary. - -But afterwards, when she saw her father and especially little Koko -(Nicholas), her resolve weakened. She wept quietly, and felt that -she was a sinner who loved her father and little nephew more than God. - - - - - -BOOK SEVEN: 1810 --11 - - - - - -CHAPTER I - - -The Bible legend tells us that the absence of labor--idleness--was a -condition of the first man's blessedness before the Fall. Fallen man -has retained a love of idleness, but the curse weighs on the race -not only because we have to seek our bread in the sweat of our -brows, but because our moral nature is such that we cannot be both -idle and at ease. An inner voice tells us we are in the wrong if we -are idle. If man could find a state in which he felt that though -idle he was fulfilling his duty, he would have found one of the -conditions of man's primitive blessedness. And such a state of -obligatory and irreproachable idleness is the lot of a whole class- -the military. The chief attraction of military service has consisted -and will consist in this compulsory and irreproachable idleness. - -Nicholas Rostov experienced this blissful condition to the full -when, after 1807, he continued to serve in the Pavlograd regiment, -in which he already commanded the squadron he had taken over from -Denisov. - -Rostov had become a bluff, good-natured fellow, whom his Moscow -acquaintances would have considered rather bad form, but who was liked -and respected by his comrades, subordinates, and superiors, and was -well contented with his life. Of late, in 1809, he found in letters -from home more frequent complaints from his mother that their -affairs were falling into greater and greater disorder, and that it -was time for him to come back to gladden and comfort his old parents. - -Reading these letters, Nicholas felt a dread of their wanting to -take him away from surroundings in which, protected from all the -entanglements of life, he was living so calmly and quietly. He felt -that sooner or later he would have to re-enter that whirlpool of life, -with its embarrassments and affairs to be straightened out, its -accounts with stewards, quarrels, and intrigues, its ties, society, -and with Sonya's love and his promise to her. It was all dreadfully -difficult and complicated; and he replied to his mother in cold, -formal letters in French, beginning: "My dear Mamma," and ending: -"Your obedient son," which said nothing of when he would return. In -1810 he received letters from his parents, in which they told him of -Natasha's engagement to Bolkonski, and that the wedding would be in -a year's time because the old prince made difficulties. This letter -grieved and mortified Nicholas. In the first place he was sorry that -Natasha, for whom he cared more than for anyone else in the family, -should be lost to the home; and secondly, from his hussar point of -view, he regretted not to have been there to show that fellow -Bolkonski that connection with him was no such great honor after -all, and that if he loved Natasha he might dispense with permission -from his dotard father. For a moment he hesitated whether he should -not apply for leave in order to see Natasha before she was married, -but then came the maneuvers, and considerations about Sonya and -about the confusion of their affairs, and Nicholas again put it off. -But in the spring of that year, he received a letter from his -mother, written without his father's knowledge, and that letter -persuaded him to return. She wrote that if he did not come and take -matters in hand, their whole property would be sold by auction and -they would all have to go begging. The count was so weak, and -trusted Mitenka so much, and was so good-natured, that everybody -took advantage of him and things were going from bad to worse. "For -God's sake, I implore you, come at once if you do not wish to make -me and the whole family wretched," wrote the countess. - -This letter touched Nicholas. He had that common sense of a -matter-of-fact man which showed him what he ought to do. - -The right thing now was, if not to retire from the service, at any -rate to go home on leave. Why he had to go he did not know; but -after his after-dinner nap he gave orders to saddle Mars, an extremely -vicious gray stallion that had not been ridden for a long time, and -when he returned with the horse all in a lather, he informed Lavrushka -(Denisov's servant who had remained with him) and his comrades who -turned up in the evening that he was applying for leave and was -going home. Difficult and strange as it was for him to reflect that he -would go away without having heard from the staff--and this interested -him extremely--whether he was promoted to a captaincy or would receive -the Order of St. Anne for the last maneuvers; strange as it was to -think that he would go away without having sold his three roans to the -Polish Count Golukhovski, who was bargaining for the horses Rostov had -betted he would sell for two thousand rubles; incomprehensible as it -seemed that the ball the hussars were giving in honor of the Polish -Mademoiselle Przazdziecka (out of rivalry to the Uhlans who had -given one in honor of their Polish Mademoiselle Borzozowska) would -take place without him--he knew he must go away from this good, bright -world to somewhere where everything was stupid and confused. A week -later he obtained his leave. His hussar comrades--not only those of -his own regiment, but the whole brigade--gave Rostov a dinner to which -the subscription was fifteen rubles a head, and at which there were -two bands and two choirs of singers. Rostov danced the Trepak with -Major Basov; the tipsy officers tossed, embraced, and dropped -Rostov; the soldiers of the third squadron tossed him too, and shouted -"hurrah!" and then they put him in his sleigh and escorted him as -far as the first post station. - -During the first half of the journey--from Kremenchug to Kiev--all -Rostov's thoughts, as is usual in such cases, were behind him, with -the squadron; but when he had gone more than halfway he began to -forget his three roans and Dozhoyveyko, his quartermaster, and to -wonder anxiously how things would be at Otradnoe and what he would -find there. Thoughts of home grew stronger the nearer he approached -it--far stronger, as though this feeling of his was subject to the law -by which the force of attraction is in inverse proportion to the -square of the distance. At the last post station before Otradnoe he -gave the driver a three-ruble tip, and on arriving he ran -breathlessly, like a boy, up the steps of his home. - -After the rapture of meeting, and after that odd feeling of -unsatisfied expectation--the feeling that "everything is just the -same, so why did I hurry?"--Nicholas began to settle down in his old -home world. His father and mother were much the same, only a little -older. What was new in them was a certain uneasiness and occasional -discord, which there used not to be, and which, as Nicholas soon found -out, was due to the bad state of their affairs. Sonya was nearly -twenty; she had stopped growing prettier and promised nothing more -than she was already, but that was enough. She exhaled happiness and -love from the time Nicholas returned, and the faithful, unalterable -love of this girl had a gladdening effect on him. Petya and Natasha -surprised Nicholas most. Petya was a big handsome boy of thirteen, -merry, witty, and mischievous, with a voice that was already breaking. -As for Natasha, for a long while Nicholas wondered and laughed -whenever he looked at her. - -"You're not the same at all," he said. - -"How? Am I uglier?" - -"On the contrary, but what dignity? A princess!" he whispered to -her. - -"Yes, yes, yes!" cried Natasha, joyfully. - -She told him about her romance with Prince Andrew and of his visit -to Otradnoe and showed him his last letter. - -"Well, are you glad?" Natasha asked. "I am so tranquil and happy -now." - -"Very glad," answered Nicholas. "He is an excellent fellow.... And -are you very much in love?" - -"How shall I put it?" replied Natasha. "I was in love with Boris, -with my teacher, and with Denisov, but this is quite different. I feel -at peace and settled. I know that no better man than he exists, and -I am calm and contented now. Not at all as before." - -Nicholas expressed his disapproval of the postponement of the -marriage for a year; but Natasha attacked her brother with -exasperation, proving to him that it could not be otherwise, and -that it would be a bad thing to enter a family against the father's -will, and that she herself wished it so. - -"You don't at all understand," she said. - -Nicholas was silent and agreed with her. - -Her brother often wondered as he looked at her. She did not seem -at all like a girl in love and parted from her affianced husband. -She was even-tempered and calm and quite as cheerful as of old. This -amazed Nicholas and even made him regard Bolkonski's courtship -skeptically. He could not believe that her fate was sealed, especially -as he had not seen her with Prince Andrew. It always seemed to him -that there was something not quite right about this intended marriage. - -"Why this delay? Why no betrothal?" he thought. Once, when he had -touched on this topic with his mother, he discovered, to his -surprise and somewhat to his satisfaction, that in the depth of her -soul she too had doubts about this marriage. - -"You see he writes," said she, showing her son a letter of Prince -Andrew's, with that latent grudge a mother always has in regard to a -daughter's future married happiness, "he writes that he won't come -before December. What can be keeping him? Illness, probably! His -health is very delicate. Don't tell Natasha. And don't attach -importance to her being so bright: that's because she's living through -the last days of her girlhood, but I know what she is like every -time we receive a letter from him! However, God grant that -everything turns out well!" (She always ended with these words.) "He -is an excellent man!" - - - - - -CHAPTER II - - -After reaching home Nicholas was at first serious and even dull. -He was worried by the impending necessity of interfering in the stupid -business matters for which his mother had called him home. To throw -off this burden as quickly as possible, on the third day after his -arrival he went, angry and scowling and without answering questions as -to where he was going, to Mitenka's lodge and demanded an account of -everything. But what an account of everything might be Nicholas knew -even less than the frightened and bewildered Mitenka. The conversation -and the examination of the accounts with Mitenka did not last long. -The village elder, a peasant delegate, and the village clerk, who were -waiting in the passage, heard with fear and delight first the young -count's voice roaring and snapping and rising louder and louder, and -then words of abuse, dreadful words, ejaculated one after the other. - -"Robber!... Ungrateful wretch!... I'll hack the dog to pieces! I'm -not my father!... Robbing us!..." and so on. - -Then with no less fear and delight they saw how the young count, red -in the face and with bloodshot eyes, dragged Mitenka out by the scruff -of the neck and applied his foot and knee to his behind with great -agility at convenient moments between the words, shouting, "Be off! -Never let me see your face here again, you villain!" - -Mitenka flew headlong down the six steps and ran away into the -shrubbery. (This shrubbery was a well-known haven of refuge for -culprits at Otradnoe. Mitenka himself, returning tipsy from the -town, used to hide there, and many of the residents at Otradnoe, -hiding from Mitenka, knew of its protective qualities.) - -Mitenka's wife and sisters-in-law thrust their heads and -frightened faces out of the door of a room where a bright samovar -was boiling and where the steward's high bedstead stood with its -patchwork quilt. - -The young count paid no heed to them, but, breathing hard, passed by -with resolute strides and went into the house. - -The countess, who heard at once from the maids what had happened -at the lodge, was calmed by the thought that now their affairs would -certainly improve, but on the other hand felt anxious as to the effect -this excitement might have on her son. She went several times to his -door on tiptoe and listened, as he lighted one pipe after another. - -Next day the old count called his son aside and, with an embarrassed -smile, said to him: - -"But you know, my dear boy, it's a pity you got excited! Mitenka has -told me all about it." - -"I knew," thought Nicholas, "that I should never understand anything -in this crazy world." - -"You were angry that he had not entered those 700 rubles. But they -were carried forward--and you did not look at the other page." - -"Papa, he is a blackguard and a thief! I know he is! And what I have -done, I have done; but, if you like, I won't speak to him again." - -"No, my dear boy" (the count, too, felt embarrassed. He knew he -had mismanaged his wife's property and was to blame toward his -children, but he did not know how to remedy it). "No, I beg you to -attend to the business. I am old. I..." - -"No, Papa. Forgive me if I have caused you unpleasantness. I -understand it all less than you do." - -"Devil take all these peasants, and money matters, and carryings -forward from page to page," he thought. "I used to understand what a -'corner' and the stakes at cards meant, but carrying forward to -another page I don't understand at all," said he to himself, and after -that he did not meddle in business affairs. But once the countess -called her son and informed him that she had a promissory note from -Anna Mikhaylovna for two thousand rubles, and asked him what he -thought of doing with it. - -"This," answered Nicholas. "You say it rests with me. Well, I -don't like Anna Mikhaylovna and I don't like Boris, but they were -our friends and poor. Well then, this!" and he tore up the note, and -by so doing caused the old countess to weep tears of joy. After -that, young Rostov took no further part in any business affairs, but -devoted himself with passionate enthusiasm to what was to him a new -pursuit--the chase--for which his father kept a large establishment. - - - - - -CHAPTER III - - -The weather was already growing wintry and morning frosts -congealed an earth saturated by autumn rains. The verdure had -thickened and its bright green stood out sharply against the -brownish strips of winter rye trodden down by the cattle, and -against the pale-yellow stubble of the spring buckwheat. The wooded -ravines and the copses, which at the end of August had still been -green islands amid black fields and stubble, had become golden and -bright-red islands amid the green winter rye. The hares had already -half changed their summer coats, the fox cubs were beginning to -scatter, and the young wolves were bigger than dogs. It was the best -time of the year for the chase. The hounds of that ardent young -sportsman Rostov had not merely reached hard winter condition, but -were so jaded that at a meeting of the huntsmen it was decided to give -them a three days' rest and then, on the sixteenth of September, to go -on a distant expedition, starting from the oak grove where there was -an undisturbed litter of wolf cubs. - -All that day the hounds remained at home. It was frosty and the -air was sharp, but toward evening the sky became overcast and it began -to thaw. On the fifteenth, when young Rostov, in his dressing gown, -looked out of the window, he saw it was an unsurpassable morning for -hunting: it was as if the sky were melting and sinking to the earth -without any wind. The only motion in the air was that of the dripping, -microscopic particles of drizzling mist. The bare twigs in the -garden were hung with transparent drops which fell on the freshly -fallen leaves. The earth in the kitchen garden looked wet and black -and glistened like poppy seed and at a short distance merged into -the dull, moist veil of mist. Nicholas went out into the wet and muddy -porch. There was a smell of decaying leaves and of dog. Milka, a -black-spotted, broad-haunched bitch with prominent black eyes, got -up on seeing her master, stretched her hind legs, lay down like a -hare, and then suddenly jumped up and licked him right on his nose and -mustache. Another borzoi, a dog, catching sight of his master from the -garden path, arched his back and, rushing headlong toward the porch -with lifted tail, began rubbing himself against his legs. - -"O-hoy!" came at that moment, that inimitable huntsman's call -which unites the deepest bass with the shrillest tenor, and round -the corner came Daniel the head huntsman and head kennelman, a gray, -wrinkled old man with hair cut straight over his forehead, Ukrainian -fashion, a long bent whip in his hand, and that look of independence -and scorn of everything that is only seen in huntsmen. He doffed his -Circassian cap to his master and looked at him scornfully. This -scorn was not offensive to his master. Nicholas knew that this Daniel, -disdainful of everybody and who considered himself above them, was all -the same his serf and huntsman. - -"Daniel!" Nicholas said timidly, conscious at the sight of the -weather, the hounds, and the huntsman that he was being carried away -by that irresistible passion for sport which makes a man forget all -his previous resolutions, as a lover forgets in the presence of his -mistress. - -"What orders, your excellency?" said the huntsman in his deep -bass, deep as a proto-deacon's and hoarse with hallooing--and two -flashing black eyes gazed from under his brows at his master, who -was silent. "Can you resist it?" those eyes seemed to be asking. - -"It's a good day, eh? For a hunt and a gallop, eh?" asked -Nicholas, scratching Milka behind the ears. - -Daniel did not answer, but winked instead. - -"I sent Uvarka at dawn to listen," his bass boomed out after a -minute's pause. "He says she's moved them into the Otradnoe enclosure. -They were howling there." (This meant that the she-wolf, about whom -they both knew, had moved with her cubs to the Otradnoe copse, a small -place a mile and a half from the house.) - -"We ought to go, don't you think so?" said Nicholas. "Come to me -with Uvarka." - -"As you please." - -"Then put off feeding them." - -"Yes, sir." - -Five minutes later Daniel and Uvarka were standing in Nicholas' -big study. Though Daniel was not a big man, to see him in a room was -like seeing a horse or a bear on the floor among the furniture and -surroundings of human life. Daniel himself felt this, and as usual -stood just inside the door, trying to speak softly and not move, for -fear of breaking something in the master's apartment, and he -hastened to say all that was necessary so as to get from under that -ceiling, out into the open under the sky once more. - -Having finished his inquiries and extorted from Daniel an opinion -that the hounds were fit (Daniel himself wished to go hunting), -Nicholas ordered the horses to be saddled. But just as Daniel was -about to go Natasha came in with rapid steps, not having done up her -hair or finished dressing and with her old nurse's big shawl wrapped -round her. Petya ran in at the same time. - -"You are going?" asked Natasha. "I knew you would! Sonya said you -wouldn't go, but I knew that today is the sort of day when you -couldn't help going." - -"Yes, we are going," replied Nicholas reluctantly, for today, as -he intended to hunt seriously, he did not want to take Natasha and -Petya. "We are going, but only wolf hunting: it would be dull for -you." - -"You know it is my greatest pleasure," said Natasha. "It's not fair; -you are going by yourself, are having the horses saddled and said -nothing to us about it." - -"'No barrier bars a Russian's path'--we'll go!" shouted Petya. - -"But you can't. Mamma said you mustn't," said Nicholas to Natasha. - -"Yes, I'll go. I shall certainly go," said Natasha decisively. -"Daniel, tell them to saddle for us, and Michael must come with my -dogs," she added to the huntsman. - -It seemed to Daniel irksome and improper to be in a room at all, but -to have anything to do with a young lady seemed to him impossible. -He cast down his eyes and hurried out as if it were none of his -business, careful as he went not to inflict any accidental injury on -the young lady. - - - - - -CHAPTER IV - - -The old count, who had always kept up an enormous hunting -establishment but had now handed it all completely over to his son's -care, being in very good spirits on this fifteenth of September, -prepared to go out with the others. - -In an hour's time the whole hunting party was at the porch. -Nicholas, with a stern and serious air which showed that now was no -time for attending to trifles, went past Natasha and Petya who were -trying to tell him something. He had a look at all the details of -the hunt, sent a pack of hounds and huntsmen on ahead to find the -quarry, mounted his chestnut Donets, and whistling to his own leash of -borzois, set off across the threshing ground to a field leading to the -Otradnoe wood. The old count's horse, a sorrel gelding called -Viflyanka, was led by the groom in attendance on him, while the -count himself was to drive in a small trap straight to a spot reserved -for him. - -They were taking fifty-four hounds, with six hunt attendants and -whippers-in. Besides the family, there were eight borzoi kennelmen and -more than forty borzois, so that, with the borzois on the leash -belonging to members of the family, there were about a hundred and -thirty dogs and twenty horsemen. - -Each dog knew its master and its call. Each man in the hunt knew his -business, his place, what he had to do. As soon as they had passed the -fence they all spread out evenly and quietly, without noise or talk, -along the road and field leading to the Otradnoe covert. - -The horses stepped over the field as over a thick carpet, now and -then splashing into puddles as they crossed a road. The misty sky -still seemed to descend evenly and imperceptibly toward the earth, the -air was still, warm, and silent. Occasionally the whistle of a -huntsman, the snort of a horse, the crack of a whip, or the whine of a -straggling hound could be heard. - -When they had gone a little less than a mile, five more riders -with dogs appeared out of the mist, approaching the Rostovs. In -front rode a fresh-looking, handsome old man with a large gray -mustache. - -"Good morning, Uncle!" said Nicholas, when the old man drew near. - -"That's it. Come on!... I was sure of it," began "Uncle." (He was -a distant relative of the Rostovs', a man of small means, and their -neighbor.) "I knew you wouldn't be able to resist it and it's a good -thing you're going. That's it! Come on! (This was "Uncle's" favorite -expression.) "Take the covert at once, for my Girchik says the Ilagins -are at Korniki with their hounds. That's it. Come on!... They'll -take the cubs from under your very nose." - -"That's where I'm going. Shall we join up our packs?" asked -Nicholas. - -The hounds were joined into one pack, and "Uncle" and Nicholas -rode on side by side. Natasha, muffled up in shawls which did not hide -her eager face and shining eyes, galloped up to them. She was followed -by Petya who always kept close to her, by Michael, a huntsman, and -by a groom appointed to look after her. Petya, who was laughing, -whipped and pulled at his horse. Natasha sat easily and confidently on -her black Arabchik and reined him in without effort with a firm hand. - -"Uncle" looked round disapprovingly at Petya and Natasha. He did not -like to combine frivolity with the serious business of hunting. - -"Good morning, Uncle! We are going too!" shouted Petya. - -"Good morning, good morning! But don't go overriding the hounds," -said "Uncle" sternly. - -"Nicholas, what a fine dog Trunila is! He knew me," said Natasha, -referring to her favorite hound. - -"In the first place, Trunila is not a 'dog,' but a harrier," thought -Nicholas, and looked sternly at his sister, trying to make her feel -the distance that ought to separate them at that moment. Natasha -understood it. - -"You mustn't think we'll be in anyone's way, Uncle," she said. -"We'll go to our places and won't budge." - -"A good thing too, little countess," said "Uncle," "only mind you -don't fall off your horse," he added, "because--that's it, come on!- -you've nothing to hold on to." - -The oasis of the Otradnoe covert came in sight a few hundred yards -off, the huntsmen were already nearing it. Rostov, having finally -settled with "Uncle" where they should set on the hounds, and having -shown Natasha where she was to stand--a spot where nothing could -possibly run out--went round above the ravine. - -"Well, nephew, you're going for a big wolf," said "Uncle." "Mind and -don't let her slip!" - -"That's as may happen," answered Rostov. "Karay, here!" he -shouted, answering "Uncle's" remark by this call to his borzoi. -Karay was a shaggy old dog with a hanging jowl, famous for having -tackled a big wolf unaided. They all took up their places. - -The old count, knowing his son's ardor in the hunt, hurried so as -not to be late, and the huntsmen had not yet reached their places when -Count Ilya Rostov, cheerful, flushed, and with quivering cheeks, drove -up with his black horses over the winter rye to the place reserved for -him, where a wolf might come out. Having straightened his coat and -fastened on his hunting knives and horn, he mounted his good, sleek, -well-fed, and comfortable horse, Viflyanka, which was turning gray, -like himself. His horses and trap were sent home. Count Ilya Rostov, -though not at heart a keen sportsman, knew the rules of the hunt well, -and rode to the bushy edge of the road where he was to stand, arranged -his reins, settled himself in the saddle, and, feeling that he was -ready, looked about with a smile. - -Beside him was Simon Chekmar, his personal attendant, an old -horseman now somewhat stiff in the saddle. Chekmar held in leash three -formidable wolfhounds, who had, however, grown fat like their master -and his horse. Two wise old dogs lay down unleashed. Some hundred -paces farther along the edge of the wood stood Mitka, the count's -other groom, a daring horseman and keen rider to hounds. Before the -hunt, by old custom, the count had drunk a silver cupful of mulled -brandy, taken a snack, and washed it down with half a bottle of his -favorite Bordeaux. - -He was somewhat flushed with the wine and the drive. His eyes were -rather moist and glittered more than usual, and as he sat in his -saddle, wrapped up in his fur coat, he looked like a child taken out -for an outing. - -The thin, hollow-cheeked Chekmar, having got everything ready, -kept glancing at his master with whom he had lived on the best of -terms for thirty years, and understanding the mood he was in -expected a pleasant chat. A third person rode up circumspectly through -the wood (it was plain that he had had a lesson) and stopped behind -the count. This person was a gray-bearded old man in a woman's -cloak, with a tall peaked cap on his head. He was the buffoon, who -went by a woman's name, Nastasya Ivanovna. - -"Well, Nastasya Ivanovna!" whispered the count, winking at him. -"If you scare away the beast, Daniel'll give it you!" - -"I know a thing or two myself!" said Nastasya Ivanovna. - -"Hush!" whispered the count and turned to Simon. "Have you seen -the young countess?" he asked. "Where is she?" - -"With young Count Peter, by the Zharov rank grass," answered -Simon, smiling. "Though she's a lady, she's very fond of hunting." - -"And you're surprised at the way she rides, Simon, eh?" said the -count. "She's as good as many a man!" - -"Of course! It's marvelous. So bold, so easy!" - -"And Nicholas? Where is he? By the Lyadov upland, isn't he?" - -"Yes, sir. He knows where to stand. He understands the matter so -well that Daniel and I are often quite astounded," said Simon, well -knowing what would please his master. - -"Rides well, eh? And how well he looks on his horse, eh?" - -"A perfect picture! How he chased a fox out of the rank grass by the -Zavarzinsk thicket the other day! Leaped a fearful place; what a sight -when they rushed from the covert... the horse worth a thousand -rubles and the rider beyond all price! Yes, one would have to search -far to find another as smart." - -"To search far..." repeated the count, evidently sorry Simon had not -said more. "To search far," he said, turning back the skirt of his -coat to get at his snuffbox. - -"The other day when he came out from Mass in full uniform, Michael -Sidorych..." Simon did not finish, for on the still air he had -distinctly caught the music of the hunt with only two or three -hounds giving tongue. He bent down his head and listened, shaking a -warning finger at his master. "They are on the scent of the cubs..." -he whispered, "straight to the Lyadov uplands." - -The count, forgetting to smooth out the smile on his face, looked -into the distance straight before him, down the narrow open space, -holding the snuffbox in his hand but not taking any. After the cry -of the hounds came the deep tones of the wolf call from Daniel's -hunting horn; the pack joined the first three hounds and they could be -heard in full cry, with that peculiar lift in the note that -indicates that they are after a wolf. The whippers-in no longer set on -the hounds, but changed to the cry of ulyulyu, and above the others -rose Daniel's voice, now a deep bass, now piercingly shrill. His voice -seemed to fill the whole wood and carried far beyond out into the open -field. - -After listening a few moments in silence, the count and his -attendant convinced themselves that the hounds had separated into -two packs: the sound of the larger pack, eagerly giving tongue, -began to die away in the distance, the other pack rushed by the wood -past the count, and it was with this that Daniel's voice was heard -calling ulyulyu. The sounds of both packs mingled and broke apart -again, but both were becoming more distant. - -Simon sighed and stooped to straighten the leash a young borzoi -had entangled; the count too sighed and, noticing the snuffbox in -his hand, opened it and took a pinch. "Back!" cried Simon to a -borzoi that was pushing forward out of the wood. The count started and -dropped the snuffbox. Nastasya Ivanovna dismounted to pick it up. -The count and Simon were looking at him. - -Then, unexpectedly, as often happens, the sound of the hunt suddenly -approached, as if the hounds in full cry and Daniel ulyulyuing were -just in front of them. - -The count turned and saw on his right Mitka staring at him with eyes -starting out of his head, raising his cap and pointing before him to -the other side. - -"Look out!" he shouted, in a voice plainly showing that he had -long fretted to utter that word, and letting the borzois slip he -galloped toward the count. - -The count and Simon galloped out of the wood and saw on their left a -wolf which, softly swaying from side to side, was coming at a quiet -lope farther to the left to the very place where they were standing. -The angry borzois whined and getting free of the leash rushed past the -horses' feet at the wolf. - -The wolf paused, turned its heavy forehead toward the dogs -awkwardly, like a man suffering from the quinsy, and, still slightly -swaying from side to side, gave a couple of leaps and with a swish -of its tail disappeared into the skirt of the wood. At the same -instant, with a cry like a wail, first one hound, then another, and -then another, sprang helter-skelter from the wood opposite and the -whole pack rushed across the field toward the very spot where the wolf -had disappeared. The hazel bushes parted behind the hounds and -Daniel's chestnut horse appeared, dark with sweat. On its long back -sat Daniel, hunched forward, capless, his disheveled gray hair hanging -over his flushed, perspiring face. - -"Ulyulyulyu! ulyulyu!..." he cried. When he caught sight of the -count his eyes flashed lightning. - -"Blast you!" he shouted, holding up his whip threateningly at the -count. - -"You've let the wolf go!... What sportsmen!" and as if scorning to -say more to the frightened and shamefaced count, he lashed the heaving -flanks of his sweating chestnut gelding with all the anger the count -had aroused and flew off after the hounds. The count, like a -punished schoolboy, looked round, trying by a smile to win Simon's -sympathy for his plight. But Simon was no longer there. He was -galloping round by the bushes while the field was coming up on both -sides, all trying to head the wolf, but it vanished into the wood -before they could do so. - - - - - -CHAPTER V - - -Nicholas Rostov meanwhile remained at his post, waiting for the -wolf. By the way the hunt approached and receded, by the cries of -the dogs whose notes were familiar to him, by the way the voices of -the huntsmen approached, receded, and rose, he realized what was -happening at the copse. He knew that young and old wolves were -there, that the hounds had separated into two packs, that somewhere -a wolf was being chased, and that something had gone wrong. He -expected the wolf to come his way any moment. He made thousands of -different conjectures as to where and from what side the beast would -come and how he would set upon it. Hope alternated with despair. -Several times he addressed a prayer to God that the wolf should come -his way. He prayed with that passionate and shame-faced feeling with -which men pray at moments of great excitement arising from trivial -causes. "What would it be to Thee to do this for me?" he said to -God. "I know Thou art great, and that it is a sin to ask this of Thee, -but for God's sake do let the old wolf come my way and let Karay -spring at it--in sight of 'Uncle' who is watching from over there--and -seize it by the throat in a death grip!" A thousand times during -that half-hour Rostov cast eager and restless glances over the edge of -the wood, with the two scraggy oaks rising above the aspen undergrowth -and the gully with its water-worn side and "Uncle's" cap just -visible above the bush on his right. - -"No, I shan't have such luck," thought Rostov, "yet what wouldn't it -be worth! It is not to be! Everywhere, at cards and in war, I am -always unlucky." Memories of Austerlitz and of Dolokhov flashed -rapidly and clearly through his mind. "Only once in my life to get -an old wolf, I want only that!" thought he, straining eyes and ears -and looking to the left and then to the right and listening to the -slightest variation of note in the cries of the dogs. - -Again he looked to the right and saw something running toward him -across the deserted field. "No, it can't be!" thought Rostov, taking a -deep breath, as a man does at the coming of something long hoped -for. The height of happiness was reached--and so simply, without -warning, or noise, or display, that Rostov could not believe his -eyes and remained in doubt for over a second. The wolf ran forward and -jumped heavily over a gully that lay in her path. She was an old -animal with a gray back and big reddish belly. She ran without -hurry, evidently feeling sure that no one saw her. Rostov, holding his -breath, looked round at the borzois. They stood or lay not seeing -the wolf or understanding the situation. Old Karay had turned his head -and was angrily searching for fleas, baring his yellow teeth and -snapping at his hind legs. - -"Ulyulyulyu!" whispered Rostov, pouting his lips. The borzois jumped -up, jerking the rings of the leashes and pricking their ears. Karay -finished scratching his hindquarters and, cocking his ears, got up -with quivering tail from which tufts of matted hair hung down. - -"Shall I loose them or not?" Nicholas asked himself as the wolf -approached him coming from the copse. Suddenly the wolf's whole -physiognomy changed: she shuddered, seeing what she had probably never -seen before--human eyes fixed upon her--and turning her head a -little toward Rostov, she paused. - -"Back or forward? Eh, no matter, forward..." the wolf seemed to -say to herself, and she moved forward without again looking round -and with a quiet, long, easy yet resolute lope. - -"Ulyulyu!" cried Nicholas, in a voice not his own, and of its own -accord his good horse darted headlong downhill, leaping over gullies -to head off the wolf, and the borzois passed it, running faster still. -Nicholas did not hear his own cry nor feel that he was galloping, -nor see the borzois, nor the ground over which he went: he saw only -the wolf, who, increasing her speed, bounded on in the same -direction along the hollow. The first to come into view was Milka, -with her black markings and powerful quarters, gaining upon the -wolf. Nearer and nearer... now she was ahead of it; but the wolf -turned its head to face her, and instead of putting on speed as she -usually did Milka suddenly raised her tail and stiffened her forelegs. - -"Ulyulyulyulyu!" shouted Nicholas. - -The reddish Lyubim rushed forward from behind Milka, sprang -impetuously at the wolf, and seized it by its hindquarters, but -immediately jumped aside in terror. The wolf crouched, gnashed her -teeth, and again rose and bounded forward, followed at the distance of -a couple of feet by all the borzois, who did not get any closer to -her. - -"She'll get away! No, it's impossible!" thought Nicholas, still -shouting with a hoarse voice. - -"Karay, ulyulyu!..." he shouted, looking round for the old borzoi -who was now his only hope. Karay, with all the strength age had left -him, stretched himself to the utmost and, watching the wolf, -galloped heavily aside to intercept it. But the quickness of the -wolf's lope and the borzoi's slower pace made it plain that Karay -had miscalculated. Nicholas could already see not far in front of -him the wood where the wolf would certainly escape should she reach -it. But, coming toward him, he saw hounds and a huntsman galloping -almost straight at the wolf. There was still hope. A long, yellowish - -young borzoi, one Nicholas did not know, from another leash, rushed -impetuously at the wolf from in front and almost knocked her over. But -the wolf jumped up more quickly than anyone could have expected and, -gnashing her teeth, flew at the yellowish borzoi, which, with a -piercing yelp, fell with its head on the ground, bleeding from a -gash in its side. - -"Karay? Old fellow!..." wailed Nicholas. - -Thanks to the delay caused by this crossing of the wolf's path, -the old dog with its felted hair hanging from its thigh was within -five paces of it. As if aware of her danger, the wolf turned her -eyes on Karay, tucked her tail yet further between her legs, and -increased her speed. But here Nicholas only saw that something -happened to Karay--the borzoi was suddenly on the wolf, and they -rolled together down into a gully just in front of them. - -That instant, when Nicholas saw the wolf struggling in the gully -with the dogs, while from under them could be seen her gray hair and -outstretched hind leg and her frightened choking head, with her ears -laid back (Karay was pinning her by the throat), was the happiest -moment of his life. With his hand on his saddlebow, he was ready to -dismount and stab the wolf, when she suddenly thrust her head up -from among that mass of dogs, and then her forepaws were on the edge -of the gully. She clicked her teeth (Karay no longer had her by the -throat), leaped with a movement of her hind legs out of the gully, and -having disengaged herself from the dogs, with tail tucked in again, -went forward. Karay, his hair bristling, and probably bruised or -wounded, climbed with difficulty out of the gully. - -"Oh my God! Why?" Nicholas cried in despair. - -"Uncle's" huntsman was galloping from the other side across the -wolf's path and his borzois once more stopped the animal's advance. -She was again hemmed in. - -Nicholas and his attendant, with "Uncle" and his huntsman, were -all riding round the wolf, crying "ulyulyu!" shouting and preparing to -dismount each moment that the wolf crouched back, and starting forward -again every time she shook herself and moved toward the wood where she -would be safe. - -Already, at the beginning of this chase, Daniel, hearing the -ulyulyuing, had rushed out from the wood. He saw Karay seize the wolf, -and checked his horse, supposing the affair to be over. But when he -saw that the horsemen did not dismount and that the wolf shook herself -and ran for safety, Daniel set his chestnut galloping, not at the wolf -but straight toward the wood, just as Karay had run to cut the -animal off. As a result of this, he galloped up to the wolf just -when she had been stopped a second time by "Uncle's" borzois. - -Daniel galloped up silently, holding a naked dagger in his left hand -and thrashing the laboring sides of his chestnut horse with his whip -as if it were a flail. - -Nicholas neither saw nor heard Daniel until the chestnut, -breathing heavily, panted past him, and he heard the fall of a body -and saw Daniel lying on the wolf's back among the dogs, trying to -seize her by the ears. It was evident to the dogs, the hunters, and to -the wolf herself that all was now over. The terrified wolf pressed -back her ears and tried to rise, but the borzois stuck to her. -Daniel rose a little, took a step, and with his whole weight, as if -lying down to rest, fell on the wolf, seizing her by the ears. -Nicholas was about to stab her, but Daniel whispered, "Don't! We'll -gag her!" and, changing his position, set his foot on the wolf's neck. -A stick was thrust between her jaws and she was fastened with a leash, -as if bridled, her legs were bound together, and Daniel rolled her -over once or twice from side to side. - -With happy, exhausted faces, they laid the old wolf, alive, on a -shying and snorting horse and, accompanied by the dogs yelping at her, -took her to the place where they were all to meet. The hounds had -killed two of the cubs and the borzois three. The huntsmen assembled -with their booty and their stories, and all came to look at the -wolf, which, with her broad-browed head hanging down and the bitten -stick between her jaws, gazed with great glassy eyes at this crowd -of dogs and men surrounding her. When she was touched, she jerked -her bound legs and looked wildly yet simply at everybody. Old Count -Rostov also rode up and touched the wolf. - -"Oh, what a formidable one!" said he. "A formidable one, eh?" he -asked Daniel, who was standing near. - -"Yes, your excellency," answered Daniel, quickly doffing his cap. - -The count remembered the wolf he had let slip and his encounter with -Daniel. - -"Ah, but you are a crusty fellow, friend!" said the count. - -For sole reply Daniel gave him a shy, childlike, meek, and amiable -smile. - - - - - -CHAPTER VI - - -The old count went home, and Natasha and Petya promised to return -very soon, but as it was still early the hunt went farther. At -midday they put the hounds into a ravine thickly overgrown with -young trees. Nicholas standing in a fallow field could see all his -whips. - -Facing him lay a field of winter rye, there his own huntsman stood -alone in a hollow behind a hazel bush. The hounds had scarcely been -loosed before Nicholas heard one he knew, Voltorn, giving tongue at -intervals; other hounds joined in, now pausing and now again giving -tongue. A moment later he heard a cry from the wooded ravine that a -fox had been found, and the whole pack, joining together, rushed along -the ravine toward the ryefield and away from Nicholas. - -He saw the whips in their red caps galloping along the edge of the -ravine, he even saw the hounds, and was expecting a fox to show itself -at any moment on the ryefield opposite. - -The huntsman standing in the hollow moved and loosed his borzois, -and Nicholas saw a queer, short-legged red fox with a fine brush going -hard across the field. The borzois bore down on it.... Now they drew -close to the fox which began to dodge between the field in sharper and -sharper curves, trailing its brush, when suddenly a strange white -borzoi dashed in followed by a black one, and everything was in -confusion; the borzois formed a star-shaped figure, scarcely swaying -their bodies and with tails turned away from the center of the -group. Two huntsmen galloped up to the dogs; one in a red cap, the -other, a stranger, in a green coat. - -"What's this?" thought Nicholas. "Where's that huntsman from? He -is not 'Uncle's' man." - -The huntsmen got the fox, but stayed there a long time without -strapping it to the saddle. Their horses, bridled and with high -saddles, stood near them and there too the dogs were lying. The -huntsmen waved their arms and did something to the fox. Then from that -spot came the sound of a horn, with the signal agreed on in case of -a fight. - -"That's Ilagin's huntsman having a row with our Ivan," said -Nicholas' groom. - -Nicholas sent the man to call Natasha and Petya to him, and rode -at a footpace to the place where the whips were getting the hounds -together. Several of the field galloped to the spot where the fight -was going on. - -Nicholas dismounted, and with Natasha and Petya, who had ridden -up, stopped near the hounds, waiting to see how the matter would -end. Out of the bushes came the huntsman who had been fighting and -rode toward his young master, with the fox tied to his crupper. -While still at a distance he took off his cap and tried to speak -respectfully, but he was pale and breathless and his face was angry. -One of his eyes was black, but he probably was not even aware of it. - -"What has happened?" asked Nicholas. - -"A likely thing, killing a fox our dogs had hunted! And it was my -gray bitch that caught it! Go to law, indeed!... He snatches at the -fox! I gave him one with the fox. Here it is on my saddle! Do you want -a taste of this?..." said the huntsman, pointing to his dagger and -probably imagining himself still speaking to his foe. - -Nicholas, not stopping to talk to the man, asked his sister and -Petya to wait for him and rode to the spot where the enemy's, -Ilagin's, hunting party was. - -The victorious huntsman rode off to join the field, and there, -surrounded by inquiring sympathizers, recounted his exploits. - -The facts were that Ilagin, with whom the Rostovs had a quarrel -and were at law, hunted over places that belonged by custom to the -Rostovs, and had now, as if purposely, sent his men to the very -woods the Rostovs were hunting and let his man snatch a fox their dogs -had chased. - -Nicholas, though he had never seen Ilagin, with his usual absence of -moderation in judgment, hated him cordially from reports of his -arbitrariness and violence, and regarded him as his bitterest foe. -He rode in angry agitation toward him, firmly grasping his whip and -fully prepared to take the most resolute and desperate steps to punish -his enemy. - -Hardly had he passed an angle of the wood before a stout gentleman -in a beaver cap came riding toward him on a handsome raven-black -horse, accompanied by two hunt servants. - -Instead of an enemy, Nicholas found in Ilagin a stately and -courteous gentleman who was particularly anxious to make the young -count's acquaintance. Having ridden up to Nicholas, Ilagin raised -his beaver cap and said he much regretted what had occurred and -would have the man punished who had allowed himself to seize a fox -hunted by someone else's borzois. He hoped to become better acquainted -with the count and invited him to draw his covert. - -Natasha, afraid that her brother would do something dreadful, had -followed him in some excitement. Seeing the enemies exchanging -friendly greetings, she rode up to them. Ilagin lifted his beaver -cap still higher to Natasha and said, with a pleasant smile, that -the young countess resembled Diana in her passion for the chase as -well as in her beauty, of which he had heard much. - -To expiate his huntsman's offense, Ilagin pressed the Rostovs to -come to an upland of his about a mile away which he usually kept for -himself and which, he said, swarmed with hares. Nicholas agreed, and -the hunt, now doubled, moved on. - -The way to Iligin's upland was across the fields. The hunt -servants fell into line. The masters rode together. "Uncle," Rostov, -and Ilagin kept stealthily glancing at one another's dogs, trying -not to be observed by their companions and searching uneasily for -rivals to their own borzois. - -Rostov was particularly struck by the beauty of a small, -pure-bred, red-spotted bitch on Ilagin's leash, slender but with -muscles like steel, a delicate muzzle, and prominent black eyes. He -had heard of the swiftness of Ilagin's borzois, and in that -beautiful bitch saw a rival to his own Milka. - -In the middle of a sober conversation begun by Ilagin about the -year's harvest, Nicholas pointed to the red-spotted bitch. - -"A fine little bitch, that!" said he in a careless tone. "Is she -swift?" - -"That one? Yes, she's a good dog, gets what she's after," answered -Ilagin indifferently, of the red-spotted bitch Erza, for which, a year -before, he had given a neighbor three families of house serfs. "So -in your parts, too, the harvest is nothing to boast of, Count?" he -went on, continuing the conversation they had begun. And considering -it polite to return the young count's compliment, Ilagin looked at his -borzois and picked out Milka who attracted his attention by her -breadth. "That black-spotted one of yours is fine--well shaped!" -said he. - -"Yes, she's fast enough," replied Nicholas, and thought: "If only -a full-grown hare would cross the field now I'd show you what sort -of borzoi she is," and turning to his groom, he said he would give a -ruble to anyone who found a hare. - -"I don't understand," continued Ilagin, "how some sportsmen can be -so jealous about game and dogs. For myself, I can tell you, Count, I -enjoy riding in company such as this... what could be better?" (he -again raised his cap to Natasha) "but as for counting skins and what -one takes, I don't care about that." - -"Of course not!" - -"Or being upset because someone else's borzoi and not mine catches -something. All I care about is to enjoy seeing the chase, is it not -so, Count? For I consider that..." - -"A-tu!" came the long-drawn cry of one of the borzoi whippers-in, -who had halted. He stood on a knoll in the stubble, holding his whip -aloft, and again repeated his long-drawn cry, "A-tu!" (This call and -the uplifted whip meant that he saw a sitting hare.) - -"Ah, he has found one, I think," said Ilagin carelessly. "Yes, we -must ride up.... Shall we both course it?" answered Nicholas, seeing -in Erza and "Uncle's" red Rugay two rivals he had never yet had a -chance of pitting against his own borzois. "And suppose they outdo -my Milka at once!" he thought as he rode with "Uncle" and Ilagin -toward the hare. - -"A full-grown one?" asked Ilagin as he approached the whip who had -sighted the hare--and not without agitation he looked round and -whistled to Erza. - -"And you, Michael Nikanorovich?" he said, addressing "Uncle." - -The latter was riding with a sullen expression on his face. - -"How can I join in? Why, you've given a village for each of your -borzois! That's it, come on! Yours are worth thousands. Try yours -against one another, you two, and I'll look on!" - -"Rugay, hey, hey!" he shouted. "Rugayushka!" he added, involuntarily -by this diminutive expressing his affection and the hopes he placed on -this red borzoi. Natasha saw and felt the agitation the two elderly -men and her brother were trying to conceal, and was herself excited by -it. - -The huntsman stood halfway up the knoll holding up his whip and -the gentlefolk rode up to him at a footpace; the hounds that were -far off on the horizon turned away from the hare, and the whips, but -not the gentlefolk, also moved away. All were moving slowly and -sedately. - -"How is it pointing?" asked Nicholas, riding a hundred paces -toward the whip who had sighted the hare. - -But before the whip could reply, the hare, scenting the frost coming -next morning, was unable to rest and leaped up. The pack on leash -rushed downhill in full cry after the hare, and from all sides the -borzois that were not on leash darted after the hounds and the hare. -All the hunt, who had been moving slowly, shouted, "Stop!" calling -in the hounds, while the borzoi whips, with a cry of "A-tu!" galloped -across the field setting the borzois on the hare. The tranquil Ilagin, -Nicholas, Natasha, and "Uncle" flew, reckless of where and how they -went, seeing only the borzois and the hare and fearing only to lose -sight even for an instant of the chase. The hare they had started -was a strong and swift one. When he jumped up he did not run at -once, but pricked his ears listening to the shouting and trampling -that resounded from all sides at once. He took a dozen bounds, not -very quickly, letting the borzois gain on him, and, finally having -chosen his direction and realized his danger, laid back his ears and -rushed off headlong. He had been lying in the stubble, but in front of -him was the autumn sowing where the ground was soft. The two borzois -of the huntsman who had sighted him, having been the nearest, were the -first to see and pursue him, but they had not gone far before Ilagin's -red-spotted Erza passed them, got within a length, flew at the hare -with terrible swiftness aiming at his scut, and, thinking she had -seized him, rolled over like a ball. The hare arched his back and -bounded off yet more swiftly. From behind Erza rushed the -broad-haunched, black-spotted Milka and began rapidly gaining on the -hare. - -"Milashka, dear!" rose Nicholas' triumphant cry. It looked as if -Milka would immediately pounce on the hare, but she overtook him and -flew past. The hare had squatted. Again the beautiful Erza reached -him, but when close to the hare's scut paused as if measuring the -distance, so as not to make a mistake this time but seize his hind -leg. - -"Erza, darling!" Ilagin wailed in a voice unlike his own. Erza did -not hearken to his appeal. At the very moment when she would have -seized her prey, the hare moved and darted along the balk between -the winter rye and the stubble. Again Erza and Milka were abreast, -running like a pair of carriage horses, and began to overtake the -hare, but it was easier for the hare to run on the balk and the -borzois did not overtake him so quickly. - -"Rugay, Rugayushka! That's it, come on!" came a third voice just -then, and "Uncle's" red borzoi, straining and curving its back, caught -up with the two foremost borzois, pushed ahead of them regardless of -the terrible strain, put on speed close to the hare, knocked it off -the balk onto the ryefield, again put on speed still more viciously, -sinking to his knees in the muddy field, and all one could see was -how, muddying his back, he rolled over with the hare. A ring of -borzois surrounded him. A moment later everyone had drawn up round the -crowd of dogs. Only the delighted "Uncle" dismounted, and cut off a -pad, shaking the hare for the blood to drip off, and anxiously -glancing round with restless eyes while his arms and legs twitched. He -spoke without himself knowing whom to or what about. "That's it, -come on! That's a dog!... There, it has beaten them all, the -thousand-ruble as well as the one-ruble borzois. That's it, come -on!" said he, panting and looking wrathfully around as if he were -abusing someone, as if they were all his enemies and had insulted him, -and only now had he at last succeeded in justifying himself. "There -are your thousand-ruble ones.... That's it, come on!..." - -"Rugay, here's a pad for you!" he said, throwing down the hare's -muddy pad. "You've deserved it, that's it, come on!" - -"She'd tired herself out, she'd run it down three times by herself," -said Nicholas, also not listening to anyone and regardless of -whether he were heard or not. - -"But what is there in running across it like that?" said Ilagin's -groom. - -"Once she had missed it and turned it away, any mongrel could take -it," Ilagin was saying at the same time, breathless from his gallop -and his excitement. At the same moment Natasha, without drawing -breath, screamed joyously, ecstatically, and so piercingly that it set -everyone's ear tingling. By that shriek she expressed what the -others expressed by all talking at once, and it was so strange that -she must herself have been ashamed of so wild a cry and everyone -else would have been amazed at it at any other time. "Uncle" himself -twisted up the hare, threw it neatly and smartly across his horse's -back as if by that gesture he meant to rebuke everybody, and, with -an air of not wishing to speak to anyone, mounted his bay and rode -off. The others all followed, dispirited and shamefaced, and only much -later were they able to regain their former affectation of -indifference. For a long time they continued to look at red Rugay who, -his arched back spattered with mud and clanking the ring of his leash, -walked along just behind "Uncle's" horse with the serene air of a -conqueror. - -"Well, I am like any other dog as long as it's not a question of -coursing. But when it is, then look out!" his appearance seemed to -Nicholas to be saying. - -When, much later, "Uncle" rode up to Nicholas and began talking to -him, he felt flattered that, after what had happened, "Uncle" -deigned to speak to him. - - - - - -CHAPTER VII - - -Toward evening Ilagin took leave of Nicholas, who found that they -were so far from home that he accepted "Uncle's" offer that the -hunting party should spend the night in his little village of -Mikhaylovna. - -"And if you put up at my house that will be better still. That's it, -come on!" said "Uncle." "You see it's damp weather, and you could -rest, and the little countess could be driven home in a trap." - -"Uncle's" offer was accepted. A huntsman was sent to Otradnoe for -a trap, while Nicholas rode with Natasha and Petya to "Uncle's" house. - -Some five male domestic serfs, big and little, rushed out to the -front porch to meet their master. A score of women serfs, old and -young, as well as children, popped out from the back entrance to -have a look at the hunters who were arriving. The presence of Natasha- -a woman, a lady, and on horseback--raised the curiosity of the serfs -to such a degree that many of them came up to her, stared her in the -face, and unabashed by her presence made remarks about her as though -she were some prodigy on show and not a human being able to hear or -understand what was said about her. - -"Arinka! Look, she sits sideways! There she sits and her skirt -dangles.... See, she's got a little hunting horn!" - -"Goodness gracious! See her knife?..." - -"Isn't she a Tartar!" - -"How is it you didn't go head over heels?" asked the boldest of all, -addressing Natasha directly. - -"Uncle" dismounted at the porch of his little wooden house which -stood in the midst of an overgrown garden and, after a glance at his -retainers, shouted authoritatively that the superfluous ones should -take themselves off and that all necessary preparations should be made -to receive the guests and the visitors. - -The serfs all dispersed. "Uncle" lifted Natasha off her horse and -taking her hand led her up the rickety wooden steps of the porch. -The house, with its bare, unplastered log walls, was not overclean--it -did not seem that those living in it aimed at keeping it spotless--but -neither was it noticeably neglected. In the entry there was a smell of -fresh apples, and wolf and fox skins hung about. - -"Uncle" led the visitors through the anteroom into a small hall with -a folding table and red chairs, then into the drawing room with a -round birchwood table and a sofa, and finally into his private room -where there was a tattered sofa, a worn carpet, and portraits of -Suvorov, of the host's father and mother, and of himself in military -uniform. The study smelt strongly of tobacco and dogs. "Uncle" asked -his visitors to sit down and make themselves at home, and then went -out of the room. Rugay, his back still muddy, came into the room and -lay down on the sofa, cleaning himself with his tongue and teeth. -Leading from the study was a passage in which a partition with -ragged curtains could be seen. From behind this came women's -laughter and whispers. Natasha, Nicholas, and Petya took off their -wraps and sat down on the sofa. Petya, leaning on his elbow, fell -asleep at once. Natasha and Nicholas were silent. Their faces -glowed, they were hungry and very cheerful. They looked at one another -(now that the hunt was over and they were in the house, Nicholas no -longer considered it necessary to show his manly superiority over -his sister), Natasha gave him a wink, and neither refrained long -from bursting into a peal of ringing laughter even before they had a -pretext ready to account for it. - -After a while "Uncle" came in, in a Cossack coat, blue trousers, and -small top boots. And Natasha felt that this costume, the very one -she had regarded with surprise and amusement at Otradnoe, was just the -right thing and not at all worse than a swallow-tail or frock coat. -"Uncle" too was in high spirits and far from being offended by the -brother's and sister's laughter (it could never enter his head that -they might be laughing at his way of life) he himself joined in the -merriment. - -"That's right, young countess, that's it, come on! I never saw -anyone like her!" said he, offering Nicholas a pipe with a long stem -and, with a practiced motion of three fingers, taking down another -that had been cut short. "She's ridden all day like a man, and is as -fresh as ever!" - -Soon after "Uncle's" reappearance the door was opened, evidently -from the sound by a barefooted girl, and a stout, rosy, good-looking -woman of about forty, with a double chin and full red lips, entered -carrying a large loaded tray. With hospitable dignity and cordiality -in her glance and in every motion, she looked at the visitors and, -with a pleasant smile, bowed respectfully. In spite of her exceptional -stoutness, which caused her to protrude her chest and stomach and -throw back her head, this woman (who was "Uncle's" housekeeper) trod -very lightly. She went to the table, set down the tray, and with her -plump white hands deftly took from it the bottles and various hors -d'oeuvres and dishes and arranged them on the table. When she had -finished, she stepped aside and stopped at the door with a smile on -her face. "Here I am. I am she! Now do you understand 'Uncle'?" her -expression said to Rostov. How could one help understanding? Not -only Nicholas, but even Natasha understood the meaning of his puckered -brow and the happy complacent smile that slightly puckered his lips -when Anisya Fedorovna entered. On the tray was a bottle of herb -wine, different kinds of vodka, pickled mushrooms, rye cakes made with -buttermilk, honey in the comb, still mead and sparkling mead, -apples, nuts (raw and roasted), and nut-and-honey sweets. Afterwards -she brought a freshly roasted chicken, ham, preserves made with honey, -and preserves made with sugar. - -All this was the fruit of Anisya Fedorovna's housekeeping, -gathered and prepared by her. The smell and taste of it all had a -smack of Anisya Fedorovna herself: a savor of juiciness, -cleanliness, whiteness, and pleasant smiles. - -"Take this, little Lady-Countess!" she kept saying, as she offered -Natasha first one thing and then another. - -Natasha ate of everything and thought she had never seen or eaten -such buttermilk cakes, such aromatic jam, such honey-and-nut sweets, -or such a chicken anywhere. Anisya Fedorovna left the room. - -After supper, over their cherry brandy, Rostov and "Uncle" talked of -past and future hunts, of Rugay and Ilagin's dogs, while Natasha sat -upright on the sofa and listened with sparkling eyes. She tried -several times to wake Petya that he might eat something, but he only -muttered incoherent words without waking up. Natasha felt so -lighthearted and happy in these novel surroundings that she only -feared the trap would come for her too soon. After a casual pause, -such as often occurs when receiving friends for the first time in -one's own house, "Uncle," answering a thought that was in his -visitors' mind, said: - -"This, you see, is how I am finishing my days... Death will come. -That's it, come on! Nothing will remain. Then why harm anyone?" - -"Uncle's" face was very significant and even handsome as he said -this. Involuntarily Rostov recalled all the good he had heard about -him from his father and the neighbors. Throughout the whole province -"Uncle" had the reputation of being the most honorable and -disinterested of cranks. They called him in to decide family disputes, -chose him as executor, confided secrets to him, elected him to be a -justice and to other posts; but he always persistently refused -public appointments, passing the autumn and spring in the fields on -his bay gelding, sitting at home in winter, and lying in his overgrown -garden in summer. - -"Why don't you enter the service, Uncle?" - -"I did once, but gave it up. I am not fit for it. That's it, come -on! I can't make head or tail of it. That's for you--I haven't -brains enough. Now, hunting is another matter--that's it, come on! -Open the door, there!" he shouted. "Why have you shut it?" - -The door at the end of the passage led to the huntsmen's room, as -they called the room for the hunt servants. - -There was a rapid patter of bare feet, and an unseen hand opened the -door into the huntsmen's room, from which came the clear sounds of a -balalayka on which someone, who was evidently a master of the art, was -playing. Natasha had been listening to those strains for some time and -now went out into the passage to hear better. - -"That's Mitka, my coachman.... I have got him a good balalayka. -I'm fond of it," said "Uncle." - -It was the custom for Mitka to play the balalayka in the -huntsmen's room when "Uncle" returned from the chase. "Uncle" was fond -of such music. - -"How good! Really very good!" said Nicholas with some -unintentional superciliousness, as if ashamed to confess that the -sounds pleased him very much. - -"Very good?" said Natasha reproachfully, noticing her brother's -tone. "Not 'very good' it's simply delicious!" - -Just as "Uncle's" pickled mushrooms, honey, and cherry brandy had -seemed to her the best in the world, so also that song, at that -moment, seemed to her the acme of musical delight. - -"More, please, more!" cried Natasha at the door as soon as the -balalayka ceased. Mitka tuned up afresh, and recommenced thrumming the -balalayka to the air of My Lady, with trills and variations. "Uncle" -sat listening, slightly smiling, with his head on one side. The air -was repeated a hundred times. The balalayka was retuned several -times and the same notes were thrummed again, but the listeners did -not grow weary of it and wished to hear it again and again. Anisya -Fedorovna came in and leaned her portly person against the doorpost. - -"You like listening?" she said to Natasha, with a smile extremely -like "Uncle's." "That's a good player of ours," she added. - -"He doesn't play that part right!" said "Uncle" suddenly, with an -energetic gesture. "Here he ought to burst out--that's it, come on!- -ought to burst out." - -"Do you play then?" asked Natasha. - -"Uncle" did not answer, but smiled. - -"Anisya, go and see if the strings of my guitar are all right. I -haven't touched it for a long time. That's it--come on! I've given -it up." - -Anisya Fedorovna, with her light step, willingly went to fulfill her -errand and brought back the guitar. - -Without looking at anyone, "Uncle" blew the dust off it and, tapping -the case with his bony fingers, tuned the guitar and settled himself -in his armchair. He took the guitar a little above the fingerboard, -arching his left elbow with a somewhat theatrical gesture, and, with a -wink at Anisya Fedorovna, struck a single chord, pure and sonorous, -and then quietly, smoothly, and confidently began playing in very slow -time, not My Lady, but the well-known song: Came a maiden down the -street. The tune, played with precision and in exact time, began to -thrill in the hearts of Nicholas and Natasha, arousing in them the -same kind of sober mirth as radiated from Anisya Fedorovna's whole -being. Anisya Fedorovna flushed, and drawing her kerchief over her -face went laughing out of the room. "Uncle" continued to play -correctly, carefully, with energetic firmness, looking with a -changed and inspired expression at the spot where Anisya Fedorovna had -just stood. Something seemed to be laughing a little on one side of -his face under his gray mustaches, especially as the song grew brisker -and the time quicker and when, here and there, as he ran his fingers -over the strings, something seemed to snap. - -"Lovely, lovely! Go on, Uncle, go on!" shouted Natasha as soon as he -had finished. She jumped up and hugged and kissed him. "Nicholas, -Nicholas!" she said, turning to her brother, as if asking him: "What -is it moves me so?" - -Nicholas too was greatly pleased by "Uncle's" playing, and "Uncle" -played the piece over again. Anisya Fedorovna's smiling face -reappeared in the doorway and behind hers other faces... - - Fetching water clear and sweet, - Stop, dear maiden, I entreat- - -played "Uncle" once more, running his fingers skillfully over the -strings, and then he stopped short and jerked his shoulders. - -"Go on, Uncle dear," Natasha wailed in an imploring tone as if her -life depended on it. - -"Uncle" rose, and it was as if there were two men in him: one of -them smiled seriously at the merry fellow, while the merry fellow -struck a naive and precise attitude preparatory to a folk dance. - -"Now then, niece!" he exclaimed, waving to Natasha the hand that had -just struck a chord. - -Natasha threw off the shawl from her shoulders, ran forward to -face "Uncle," and setting her arms akimbo also made a motion with -her shoulders and struck an attitude. - -Where, how, and when had this young countess, educated by an emigree -French governess, imbibed from the Russian air she breathed that -spirit and obtained that manner which the pas de chale* would, one -would have supposed, long ago have effaced? But the spirit and the -movements were those inimitable and unteachable Russian ones that -"Uncle" had expected of her. As soon as she had struck her pose, and -smiled triumphantly, proudly, and with sly merriment, the fear that -had at first seized Nicholas and the others that she might not do -the right thing was at an end, and they were already admiring her. - - -*The French shawl dance. - - -She did the right thing with such precision, such complete -precision, that Anisya Fedorovna, who had at once handed her the -handkerchief she needed for the dance, had tears in her eyes, though -she laughed as she watched this slim, graceful countess, reared in -silks and velvets and so different from herself, who yet was able to -understand all that was in Anisya and in Anisya's father and mother -and aunt, and in every Russian man and woman. - -"Well, little countess; that's it--come on!" cried "Uncle," with a -joyous laugh, having finished the dance. "Well done, niece! Now a fine -young fellow must be found as husband for you. That's it--come on!" - -"He's chosen already," said Nicholas smiling. - -"Oh?" said "Uncle" in surprise, looking inquiringly at Natasha, -who nodded her head with a happy smile. - -"And such a one!" she said. But as soon as she had said it a new -train of thoughts and feelings arose in her. "What did Nicholas' smile -mean when he said 'chosen already'? Is he glad of it or not? It is -as if he thought my Bolkonski would not approve of or understand our -gaiety. But he would understand it all. Where is he now?" she thought, -and her face suddenly became serious. But this lasted only a second. -"Don't dare to think about it," she said to herself, and sat down -again smilingly beside "Uncle," begging him to play something more. - -"Uncle" played another song and a valse; then after a pause he -cleared his throat and sang his favorite hunting song: - - As 'twas growing dark last night - Fell the snow so soft and light... - - -"Uncle" sang as peasants sing, with full and naive conviction that -the whole meaning of a song lies in the words and that the tune -comes of itself, and that apart from the words there is no tune, which -exists only to give measure to the words. As a result of this the -unconsidered tune, like the song of a bird, was extraordinarily -good. Natasha was in ecstasies over "Uncle's" singing. She resolved to -give up learning the harp and to play only the guitar. She asked -"Uncle" for his guitar and at once found the chords of the song. - -After nine o'clock two traps and three mounted men, who had been -sent to look for them, arrived to fetch Natasha and Petya. The count -and countess did not know where they were and were very anxious, -said one of the men. - -Petya was carried out like a log and laid in the larger of the two -traps. Natasha and Nicholas got into the other. "Uncle" wrapped -Natasha up warmly and took leave of her with quite a new tenderness. -He accompanied them on foot as far as the bridge that could not be -crossed, so that they had to go round by the ford, and he sent -huntsmen to ride in front with lanterns. - -"Good-by, dear niece," his voice called out of the darkness--not the -voice Natasha had known previously, but the one that had sung As 'twas -growing dark last night. - -In the village through which they passed there were red lights and a -cheerful smell of smoke. - -"What a darling Uncle is!" said Natasha, when they had come out onto -the highroad. - -"Yes," returned Nicholas. "You're not cold?" - -"No. I'm quite, quite all right. I feel so comfortable!" answered -Natasha, almost perplexed by her feelings. They remained silent a long -while. The night was dark and damp. They could not see the horses, but -only heard them splashing through the unseen mud. - -What was passing in that receptive childlike soul that so eagerly -caught and assimilated all the diverse impressions of life? How did -they all find place in her? But she was very happy. As they were -nearing home she suddenly struck up the air of As 'twas growing dark -last night--the tune of which she had all the way been trying to get -and had at last caught. - -"Got it?" said Nicholas. - -"What were you thinking about just now, Nicholas?" inquired Natasha. - -They were fond of asking one another that question. - -"I?" said Nicholas, trying to remember. "Well, you see, first I -thought that Rugay, the red hound, was like Uncle, and that if he were -a man he would always keep Uncle near him, if not for his riding, then -for his manner. What a good fellow Uncle is! Don't you think so?... -Well, and you?" - -"I? Wait a bit, wait.... Yes, first I thought that we are driving -along and imagining that we are going home, but that heaven knows -where we are really going in the darkness, and that we shall arrive -and suddenly find that we are not in Otradnoe, but in Fairyland. And -then I thought... No, nothing else." - -"I know, I expect you thought of him," said Nicholas, smiling as -Natasha knew by the sound of his voice. - -"No," said Natasha, though she had in reality been thinking about -Prince Andrew at the same time as of the rest, and of how he would -have liked "Uncle." "And then I was saying to myself all the way, 'How -well Anisya carried herself, how well!'" And Nicholas heard her -spontaneous, happy, ringing laughter. "And do you know," she -suddenly said, "I know that I shall never again be as happy and -tranquil as I am now." - -"Rubbish, nonsense, humbug!" exclaimed Nicholas, and he thought: -"How charming this Natasha of mine is! I have no other friend like her -and never shall have. Why should she marry? We might always drive -about together!" - -"What a darling this Nicholas of mine is!" thought Natasha. - -"Ah, there are still lights in the drawingroom!" she said, -pointing to the windows of the house that gleamed invitingly in the -moist velvety darkness of the night. - - - - - -CHAPTER VIII - - -Count Ilya Rostov had resigned the position of Marshal of the -Nobility because it involved him in too much expense, but still his -affairs did not improve. Natasha and Nicholas often noticed their -parents conferring together anxiously and privately and heard -suggestions of selling the fine ancestral Rostov house and estate near -Moscow. It was not necessary to entertain so freely as when the -count had been Marshal, and life at Otradnoe was quieter than in -former years, but still the enormous house and its lodges were full of -people and more than twenty sat down to table every day. These were -all their own people who had settled down in the house almost as -members of the family, or persons who were, it seemed, obliged to live -in the count's house. Such were Dimmler the musician and his wife, -Vogel the dancing master and his family, Belova, an old maiden lady, -an inmate of the house, and many others such as Petya's tutors, the -girls' former governess, and other people who simply found it -preferable and more advantageous to live in the count's house than -at home. They had not as many visitors as before, but the old habits -of life without which the count and countess could not conceive of -existence remained unchanged. There was still the hunting -establishment which Nicholas had even enlarged, the same fifty -horses and fifteen grooms in the stables, the same expensive -presents and dinner parties to the whole district on name days; -there were still the count's games of whist and boston, at which- -spreading out his cards so that everybody could see them--he let -himself be plundered of hundreds of rubles every day by his neighbors, -who looked upon an opportunity to play a rubber with Count Rostov as a -most profitable source of income. - -The count moved in his affairs as in a huge net, trying not to -believe that he was entangled but becoming more and more so at every -step, and feeling too feeble to break the meshes or to set to work -carefully and patiently to disentangle them. The countess, with her -loving heart, felt that her children were being ruined, that it was -not the count's fault for he could not help being what he was--that -(though he tried to hide it) he himself suffered from the -consciousness of his own and his children's ruin, and she tried to -find means of remedying the position. From her feminine point of -view she could see only one solution, namely, for Nicholas to marry -a rich heiress. She felt this to be their last hope and that if -Nicholas refused the match she had found for him, she would have to -abandon the hope of ever getting matters right. This match was with -Julie Karagina, the daughter of excellent and virtuous parents, a girl -the Rostovs had known from childhood, and who had now become a wealthy -heiress through the death of the last of her brothers. - -The countess had written direct to Julie's mother in Moscow -suggesting a marriage between their children and had received a -favorable answer from her. Karagina had replied that for her part -she was agreeable, and everything depend on her daughter's -inclination. She invited Nicholas to come to Moscow. - -Several times the countess, with tears in her eyes, told her son -that now both her daughters were settled, her only wish was to see him -married. She said she could lie down in her grave peacefully if that -were accomplished. Then she told him that she knew of a splendid -girl and tried to discover what he thought about marriage. - -At other times she praised Julie to him and advised him to go to -Moscow during the holidays to amuse himself. Nicholas guessed what his -mother's remarks were leading to and during one of these conversations -induced her to speak quite frankly. She told him that her only hope of -getting their affairs disentangled now lay in his marrying Julie -Karagina. - -"But, Mamma, suppose I loved a girl who has no fortune, would you -expect me to sacrifice my feelings and my honor for the sake of -money?" he asked his mother, not realizing the cruelty of his question -and only wishing to show his noble-mindedness. - -"No, you have not understood me," said his mother, not knowing how -to justify herself. "You have not understood me, Nikolenka. It is your -happiness I wish for," she added, feeling that she was telling an -untruth and was becoming entangled. She began to cry. - -"Mamma, don't cry! Only tell me that you wish it, and you know I -will give my life, anything, to put you at ease," said Nicholas. "I -would sacrifice anything for you--even my feelings." - -But the countess did not want the question put like that: she did -not want a sacrifice from her son, she herself wished to make a -sacrifice for him. - -"No, you have not understood me, don't let us talk about it," she -replied, wiping away her tears. - -"Maybe I do love a poor girl," said Nicholas to himself. "Am I to -sacrifice my feelings and my honor for money? I wonder how Mamma could -speak so to me. Because Sonya is poor I must not love her," he -thought, "must not respond to her faithful, devoted love? Yet I should -certainly be happier with her than with some doll-like Julie. I can -always sacrifice my feelings for my family's welfare," he said to -himself, "but I can't coerce my feelings. If I love Sonya, that -feeling is for me stronger and higher than all else." - -Nicholas did not go to Moscow, and the countess did not renew the -conversation with him about marriage. She saw with sorrow, and -sometimes with exasperation, symptoms of a growing attachment -between her son and the portionless Sonya. Though she blamed herself -for it, she could not refrain from grumbling at and worrying Sonya, -often pulling her up without reason, addressing her stiffly as "my -dear," and using the formal "you" instead of the intimate "thou" in -speaking to her. The kindhearted countess was the more vexed with -Sonya because that poor, dark-eyed niece of hers was so meek, so kind, -so devotedly grateful to her benefactors, and so faithfully, -unchangingly, and unselfishly in love with Nicholas, that there were -no grounds for finding fault with her. - -Nicholas was spending the last of his leave at home. A fourth letter -had come from Prince Andrew, from Rome, in which he wrote that he -would have been on his way back to Russia long ago had not his wound -unexpectedly reopened in the warm climate, which obliged him to -defer his return till the beginning of the new year. Natasha was still -as much in love with her betrothed, found the same comfort in that -love, and was still as ready to throw herself into all the pleasures -of life as before; but at the end of the fourth month of their -separation she began to have fits of depression which she could not -master. She felt sorry for herself: sorry that she was being wasted -all this time and of no use to anyone--while she felt herself so -capable of loving and being loved. - -Things were not cheerful in the Rostovs' home. - - - - - -CHAPTER IX - - -Christmas came and except for the ceremonial Mass, the solemn and -wearisome Christmas congratulations from neighbors and servants, and -the new dresses everyone put on, there were no special festivities, -though the calm frost of twenty degrees Reaumur, the dazzling sunshine -by day, and the starlight of the winter nights seemed to call for some -special celebration of the season. - -On the third day of Christmas week, after the midday dinner, all the -inmates of the house dispersed to various rooms. It was the dullest -time of the day. Nicholas, who had been visiting some neighbors that -morning, was asleep on the sitting-room sofa. The old count was -resting in his study. Sonya sat in the drawing room at the round -table, copying a design for embroidery. The countess was playing -patience. Nastasya Ivanovna the buffoon sat with a sad face at the -window with two old ladies. Natasha came into the room, went up to -Sonya, glanced at what she was doing, and then went up to her mother -and stood without speaking. - -"Why are you wandering about like an outcast?" asked her mother. -"What do you want?" - -"Him... I want him... now, this minute! I want him!" said Natasha, -with glittering eyes and no sign of a smile. - -The countess lifted her head and looked attentively at her daughter. - -"Don't look at me, Mamma! Don't look; I shall cry directly." - -"Sit down with me a little," said the countess. - -"Mamma, I want him. Why should I be wasted like this, Mamma?" - -Her voice broke, tears gushed from her eyes, and she turned -quickly to hide them and left the room. - -She passed into the sitting room, stood there thinking awhile, and -then went into the maids' room. There an old maidservant was grumbling -at a young girl who stood panting, having just run in through the cold -from the serfs' quarters. - -"Stop playing--there's a time for everything," said the old woman. - -"Let her alone, Kondratevna," said Natasha. "Go, Mavrushka, go." - -Having released Mavrushka, Natasha crossed the dancing hall and went -to the vestibule. There an old footman and two young ones were playing -cards. They broke off and rose as she entered. - -"What can I do with them?" thought Natasha. - -"Oh, Nikita, please go... where can I send him?... Yes, go to the -yard and fetch a fowl, please, a cock, and you, Misha, bring me some -oats." - -"Just a few oats?" said Misha, cheerfully and readily. - -"Go, go quickly," the old man urged him. - -"And you, Theodore, get me a piece of chalk." - -On her way past the butler's pantry she told them to set a -samovar, though it was not at all the time for tea. - -Foka, the butler, was the most ill-tempered person in the house. -Natasha liked to test her power over him. He distrusted the order -and asked whether the samovar was really wanted. - -"Oh dear, what a young lady!" said Foka, pretending to frown at -Natasha. - -No one in the house sent people about or gave them as much trouble -as Natasha did. She could not see people unconcernedly, but had to -send them on some errand. She seemed to be trying whether any of -them would get angry or sulky with her; but the serfs fulfilled no -one's orders so readily as they did hers. "What can I do, where can -I go?" thought she, as she went slowly along the passage. - -"Nastasya Ivanovna, what sort of children shall I have?" she asked -the buffoon, who was coming toward her in a woman's jacket. - -"Why, fleas, crickets, grasshoppers," answered the buffoon. - -"O Lord, O Lord, it's always the same! Oh, where am I to go? What am -I to do with myself?" And tapping with her heels, she ran quickly -upstairs to see Vogel and his wife who lived on the upper story. - -Two governesses were sitting with the Vogels at a table, on which -were plates of raisins, walnuts, and almonds. The governesses were -discussing whether it was cheaper to live in Moscow or Odessa. Natasha -sat down, listened to their talk with a serious and thoughtful air, -and then got up again. - -"The island of Madagascar," she said, "Ma-da-gas-car," she repeated, -articulating each syllable distinctly, and, not replying to Madame -Schoss who asked her what she was saying, she went out of the room. - -Her brother Petya was upstairs too; with the man in attendance on -him he was preparing fireworks to let off that night. - -"Petya! Petya!" she called to him. "Carry me downstairs." - -Petya ran up and offered her his back. She jumped on it, putting her -arms round his neck, and he pranced along with her. - -"No, don't... the island of Madagascar!" she said, and jumping off -his back she went downstairs. - -Having as it were reviewed her kingdom, tested her power, and made -sure that everyone was submissive, but that all the same it was -dull, Natasha betook herself to the ballroom, picked up her guitar, -sat down in a dark corner behind a bookcase, and began to run her -fingers over the strings in the bass, picking out a passage she -recalled from an opera she had heard in Petersburg with Prince Andrew. -What she drew from the guitar would have had no meaning for other -listeners, but in her imagination a whole series of reminiscences -arose from those sounds. She sat behind the bookcase with her eyes -fixed on a streak of light escaping from the pantry door and -listened to herself and pondered. She was in a mood for brooding on -the past. - -Sonya passed to the pantry with a glass in her hand. Natasha glanced -at her and at the crack in the pantry door, and it seemed to her -that she remembered the light failing through that crack once before -and Sonya passing with a glass in her hand. "Yes it was exactly the -same," thought Natasha. - -"Sonya, what is this?" she cried, twanging a thick string. - -"Oh, you are there!" said Sonya with a start, and came near and -listened. "I don't know. A storm?" she ventured timidly, afraid of -being wrong. - -"There! That's just how she started and just how she came up smiling -timidly when all this happened before," thought Natasha, "and in -just the same way I thought there was something lacking in her." - -"No, it's the chorus from The Water-Carrier, listen!" and Natasha -sang the air of the chorus so that Sonya should catch it. "Where -were you going?" she asked. - -"To change the water in this glass. I am just finishing the design." - -"You always find something to do, but I can't," said Natasha. "And -where's Nicholas?" - -"Asleep, I think." - -"Sonya, go and wake him," said Natasha. "Tell him I want him to come -and sing." - -She sat awhile, wondering what the meaning of it all having happened -before could be, and without solving this problem, or at all -regretting not having done so, she again passed in fancy to the time -when she was with him and he was looking at her with a lover's eyes. - -"Oh, if only he would come quicker! I am so afraid it will never be! -And, worst of all, I am growing old--that's the thing! There won't -then be in me what there is now. But perhaps he'll come today, will -come immediately. Perhaps he has come and is sitting in the drawing -room. Perhaps he came yesterday and I have forgotten it." She rose, -put down the guitar, and went to the drawing room. - -All the domestic circle, tutors, governesses, and guests, were -already at the tea table. The servants stood round the table--but -Prince Andrew was not there and life was going on as before. - -"Ah, here she is!" said the old count, when he saw Natasha enter. -"Well, sit down by me." But Natasha stayed by her mother and glanced -round as if looking for something. - -"Mamma!" she muttered, "give him to me, give him, Mamma, quickly, -quickly!" and she again had difficulty in repressing her sobs. - -She sat down at the table and listened to the conversation between -the elders and Nicholas, who had also come to the table. "My God, my -God! The same faces, the same talk, Papa holding his cup and blowing -in the same way!" thought Natasha, feeling with horror a sense of -repulsion rising up in her for the whole household, because they -were always the same. - -After tea, Nicholas, Sonya, and Natasha went to the sitting room, to -their favorite corner where their most intimate talks always began. - - - - - -CHAPTER X - - -"Does it ever happen to you," said Natasha to her brother, when -they settled down in the sitting room, "does it ever happen to you -to feel as if there were nothing more to come--nothing; that -everything good is past? And to feel not exactly dull, but sad?" - -"I should think so!" he replied. "I have felt like that when -everything was all right and everyone was cheerful. The thought has -come into my mind that I was already tired of it all, and that we must -all die. Once in the regiment I had not gone to some merrymaking where -there was music... and suddenly I felt so depressed..." - -"Oh yes, I know, I know, I know!" Natasha interrupted him. "When I -was quite little that used to be so with me. Do you remember when I -was punished once about some plums? You were all dancing, and I sat -sobbing in the schoolroom? I shall never forget it: I felt sad and -sorry for everyone, for myself, and for everyone. And I was -innocent--that was the chief thing," said Natasha. "Do you remember?" - -"I remember," answered Nicholas. "I remember that I came to you -afterwards and wanted to comfort you, but do you know, I felt -ashamed to. We were terribly absurd. I had a funny doll then and -wanted to give it to you. Do you remember?" - -"And do you remember," Natasha asked with a pensive smile, "how -once, long, long ago, when we were quite little, Uncle called us -into the study--that was in the old house--and it was dark--we went in -and suddenly there stood..." - -"A Negro," chimed in Nicholas with a smile of delight. "Of course -I remember. Even now I don't know whether there really was a Negro, or -if we only dreamed it or were told about him." - -"He was gray, you remember, and had white teeth, and stood and -looked at us..." - -"Sonya, do you remember?" asked Nicholas. - -"Yes, yes, I do remember something too," Sonya answered timidly. - -"You know I have asked Papa and Mamma about that Negro," said -Natasha, "and they say there was no Negro at all. But you see, you -remember!" - -"Of course I do, I remember his teeth as if I had just seen them." - -"How strange it is! It's as if it were a dream! I like that." - -"And do you remember how we rolled hard-boiled eggs in the ballroom, -and suddenly two old women began spinning round on the carpet? Was -that real or not? Do you remember what fun it was?" - -"Yes, and you remember how Papa in his blue overcoat fired a gun -in the porch?" - -So they went through their memories, smiling with pleasure: not -the sad memories of old age, but poetic, youthful ones--those -impressions of one's most distant past in which dreams and realities -blend--and they laughed with quiet enjoyment. - -Sonya, as always, did not quite keep pace with them, though they -shared the same reminiscences. - -Much that they remembered had slipped from her mind, and what she -recalled did not arouse the same poetic feeling as they experienced. -She simply enjoyed their pleasure and tried to fit in with it. - -She only really took part when they recalled Sonya's first -arrival. She told them how afraid she had been of Nicholas because -he had on a corded jacket and her nurse had told her that she, too, -would be sewn up with cords. - -"And I remember their telling me that you had been born under a -cabbage," said Natasha, "and I remember that I dared not disbelieve -it then, but knew that it was not true, and I felt so uncomfortable." - -While they were talking a maid thrust her head in at the other -door of the sitting room. - -"They have brought the cock, Miss," she said in a whisper. - -"It isn't wanted, Petya. Tell them to take it away," replied -Natasha. - -In the middle of their talk in the sitting room, Dimmler came in and -went up to the harp that stood there in a corner. He took off its -cloth covering, and the harp gave out a jarring sound. - -"Mr. Dimmler, please play my favorite nocturne by Field," came the -old countess' voice from the drawing room. - -Dimmler struck a chord and, turning to Natasha, Nicholas, and Sonya, -remarked: "How quiet you young people are!" - -"Yes, we're philosophizing," said Natasha, glancing round for a -moment and then continuing the conversation. They were now -discussing dreams. - -Dimmler began to play; Natasha went on tiptoe noiselessly to the -table, took up a candle, carried it out, and returned, seating herself -quietly in her former place. It was dark in the room especially -where they were sitting on the sofa, but through the big windows the -silvery light of the full moon fell on the floor. Dimmler had finished -the piece but still sat softly running his fingers over the strings, -evidently uncertain whether to stop or to play something else. - -"Do you know," said Natasha in a whisper, moving closer to -Nicholas and Sonya, "that when one goes on and on recalling -memories, one at last begins to remember what happened before one -was in the world..." - -"That is metempsychosis," said Sonya, who had always learned well, -and remembered everything. "The Egyptians believed that our souls have -lived in animals, and will go back into animals again." - -"No, I don't believe we ever were in animals," said Natasha, still -in a whisper though the music had ceased. "But I am certain that we -were angels somewhere there, and have been here, and that is why we -remember...." - -"May I join you?" said Dimmler who had come up quietly, and he sat -down by them. - -"If we have been angels, why have we fallen lower?" said Nicholas. -"No, that can't be!" - -"Not lower, who said we were lower?... How do I know what I was -before?" Natasha rejoined with conviction. "The soul is immortal--well -then, if I shall always live I must have lived before, lived for a -whole eternity." - -"Yes, but it is hard for us to imagine eternity," remarked -Dimmler, who had joined the young folk with a mildly condescending -smile but now spoke as quietly and seriously as they. - -"Why is it hard to imagine eternity?" said Natasha. "It is now -today, and it will be tomorrow, and always; and there was yesterday, -and the day before..." - -"Natasha! Now it's your turn. Sing me something," they heard the -countess say. "Why are you sitting there like conspirators?" - -"Mamma, I don't at all want to," replied Natasha, but all the same -she rose. - -None of them, not even the middle-aged Dimmler, wanted to break -off their conversation and quit that corner in the sitting room, but -Natasha got up and Nicholas sat down at the clavichord. Standing as -usual in the middle of the hall and choosing the place where the -resonance was best, Natasha began to sing her mother's favorite song. - -She had said she did not want to sing, but it was long since she had -sung, and long before she again sang, as she did that evening. The -count, from his study where he was talking to Mitenka, heard her -and, like a schoolboy in a hurry to run out to play, blundered in -his talk while giving orders to the steward, and at last stopped, -while Mitenka stood in front of him also listening and smiling. -Nicholas did not take his eyes off his sister and drew breath in -time with her. Sonya, as she listened, thought of the immense -difference there was between herself and her friend, and how -impossible it was for her to be anything like as bewitching as her -cousin. The old countess sat with a blissful yet sad smile and with -tears in her eyes, occasionally shaking her head. She thought of -Natasha and of her own youth, and of how there was something unnatural -and dreadful in this impending marriage of Natasha and Prince Andrew. - -Dimmler, who had seated himself beside the countess, listened with -closed eyes. - -"Ah, Countess," he said at last, "that's a European talent, she -has nothing to learn--what softness, tenderness, and strength...." - -"Ah, how afraid I am for her, how afraid I am!" said the countess, -not realizing to whom she was speaking. Her maternal instinct told her -that Natasha had too much of something, and that because of this she -would not be happy. Before Natasha had finished singing, -fourteen-year-old Petya rushed in delightedly, to say that some -mummers had arrived. - -Natasha stopped abruptly. - -"Idiot!" she screamed at her brother and, running to a chair, -threw herself on it, sobbing so violently that she could not stop -for a long time. - -"It's nothing, Mamma, really it's nothing; only Petya startled -me," she said, trying to smile, but her tears still flowed and sobs -still choked her. - -The mummers (some of the house serfs) dressed up as bears, Turks, -innkeepers, and ladies--frightening and funny--bringing in with them -the cold from outside and a feeling of gaiety, crowded, at first -timidly, into the anteroom, then hiding behind one another they pushed -into the ballroom where, shyly at first and then more and more merrily -and heartily, they started singing, dancing, and playing Christmas -games. The countess, when she had identified them and laughed at their -costumes, went into the drawing room. The count sat in the ballroom, -smiling radiantly and applauding the players. The young people had -disappeared. - -Half an hour later there appeared among the other mummers in the -ballroom an old lady in a hooped skirt--this was Nicholas. A Turkish -girl was Petya. A clown was Dimmler. An hussar was Natasha, and a -Circassian was Sonya with burnt-cork mustache and eyebrows. - -After the condescending surprise, nonrecognition, and praise, from -those who were not themselves dressed up, the young people decided -that their costumes were so good that they ought to be shown -elsewhere. - -Nicholas, who, as the roads were in splendid condition, wanted to -take them all for a drive in his troyka, proposed to take with them -about a dozen of the serf mummers and drive to "Uncle's." - -"No, why disturb the old fellow?" said the countess. "Besides, you -wouldn't have room to turn round there. If you must go, go to the -Melyukovs'." - -Melyukova was a widow, who, with her family and their tutors and -governesses, lived three miles from the Rostovs. - -"That's right, my dear," chimed in the old count, thoroughly -aroused. "I'll dress up at once and go with them. I'll make Pashette -open her eyes." - -But the countess would not agree to his going; he had had a bad -leg all these last days. It was decided that the count must not go, -but that if Louisa Ivanovna (Madame Schoss) would go with them, the -young ladies might go to the Melyukovs', Sonya, generally so timid and -shy, more urgently than anyone begging Louisa Ivanovna not to refuse. - -Sonya's costume was the best of all. Her mustache and eyebrows -were extraordinarily becoming. Everyone told her she looked very -handsome, and she was in a spirited and energetic mood unusual with -her. Some inner voice told her that now or never her fate would be -decided, and in her male attire she seemed quite a different person. -Louisa Ivanovna consented to go, and in half an hour four troyka -sleighs with large and small bells, their runners squeaking and -whistling over the frozen snow, drove up to the porch. - -Natasha was foremost in setting a merry holiday tone, which, passing -from one to another, grew stronger and reached its climax -when they all came out into the frost and got into the sleighs, -talking, calling to one another, laughing, and shouting. - -Two of the troykas were the usual household sleighs, the third was -the old count's with a trotter from the Orlov stud as shaft horse, the -fourth was Nicholas' own with a short shaggy black shaft horse. -Nicholas, in his old lady's dress over which he had belted his -hussar overcoat, stood in the middle of the sleigh, reins in hand. - -It was so light that he could see the moonlight reflected from the -metal harness disks and from the eyes of the horses, who looked -round in alarm at the noisy party under the shadow of the porch roof. - -Natasha, Sonya, Madame Schoss, and two maids got into Nicholas' -sleigh; Dimmler, his wife, and Petya, into the old count's, and the -rest of the mummers seated themselves in the other two sleighs. - -"You go ahead, Zakhar!" shouted Nicholas to his father's coachman, -wishing for a chance to race past him. - -The old count's troyka, with Dimmler and his party, started forward, -squeaking on its runners as though freezing to the snow, its -deep-toned bell clanging. The side horses, pressing against the shafts -of the middle horse, sank in the snow, which was dry and glittered -like sugar, and threw it up. - -Nicholas set off, following the first sleigh; behind him the -others moved noisily, their runners squeaking. At first they drove -at a steady trot along the narrow road. While they drove past the -garden the shadows of the bare trees often fell across the road and -hid the brilliant moonlight, but as soon as they were past the -fence, the snowy plain bathed in moonlight and motionless spread out -before them glittering like diamonds and dappled with bluish -shadows. Bang, bang! went the first sleigh over a cradle hole in the -snow of the road, and each of the other sleighs jolted in the same -way, and rudely breaking the frost-bound stillness, the troykas -began to speed along the road, one after the other. - -"A hare's track, a lot of tracks!" rang out Natasha's voice -through the frost-bound air. - -"How light it is, Nicholas!" came Sonya's voice. - -Nicholas glanced round at Sonya, and bent down to see her face -closer. Quite a new, sweet face with black eyebrows and mustaches -peeped up at him from her sable furs--so close and yet so distant- -in the moonlight. - -"That used to be Sonya," thought he, and looked at her closer and -smiled. - -"What is it, Nicholas?" - -"Nothing," said he and turned again to the horses. - -When they came out onto the beaten highroad--polished by sleigh -runners and cut up by rough-shod hoofs, the marks of which were -visible in the moonlight--the horses began to tug at the reins of -their own accord and increased their pace. The near side horse, -arching his head and breaking into a short canter, tugged at his -traces. The shaft horse swayed from side to side, moving his ears as -if asking: "Isn't it time to begin now?" In front, already far ahead -the deep bell of the sleigh ringing farther and farther off, the black -horses driven by Zakhar could be clearly seen against the white -snow. From that sleigh one could hear the shouts, laughter, and voices -of the mummers. - -"Gee up, my darlings!" shouted Nicholas, pulling the reins to one -side and flourishing the whip. - -It was only by the keener wind that met them and the jerks given -by the side horses who pulled harder--ever increasing their gallop- -that one noticed how fast the troyka was flying. Nicholas looked back. -With screams squeals, and waving of whips that caused even the shaft -horses to gallop--the other sleighs followed. The shaft horse swung -steadily beneath the bow over its head, with no thought of -slackening pace and ready to put on speed when required. - -Nicholas overtook the first sleigh. They were driving downhill and -coming out upon a broad trodden track across a meadow, near a river. - -"Where are we?" thought he. "It's the Kosoy meadow, I suppose. But -no--this is something new I've never seen before. This isn't the Kosoy -meadow nor the Demkin hill, and heaven only knows what it is! It is -something new and enchanted. Well, whatever it may be..." And shouting -to his horses, he began to pass the first sleigh. - -Zakhar held back his horses and turned his face, which was already -covered with hoarfrost to his eyebrows. - -Nicholas gave the horses the rein, and Zakhar, stretching out his -arms, clucked his tongue and let his horses go. - -"Now, look out, master!" he cried. - -Faster still the two troykas flew side by side, and faster moved the -feet of the galloping side horses. Nicholas began to draw ahead. -Zakhar, while still keeping his arms extended, raised one hand with -the reins. - -"No you won't, master!" he shouted. - -Nicholas put all his horses to a gallop and passed Zakhar. The -horses showered the fine dry snow on the faces of those in the sleigh- -beside them sounded quick ringing bells and they caught confused -glimpses of swiftly moving legs and the shadows of the troyka they -were passing. The whistling sound of the runners on the snow and the -voices of girls shrieking were heard from different sides. - -Again checking his horses, Nicholas looked around him. They were -still surrounded by the magic plain bathed in moonlight and spangled -with stars. - -"Zakhar is shouting that I should turn to the left, but why to the -left?" thought Nicholas. "Are we getting to the Melyukovs'? Is this -Melyukovka? Heaven only knows where we are going, and heaven knows -what is happening to us--but it is very strange and pleasant -whatever it is." And he looked round in the sleigh. - -"Look, his mustache and eyelashes are all white!" said one of the -strange, pretty, unfamiliar people--the one with fine eyebrows and -mustache. - -"I think this used to be Natasha," thought Nicholas, "and that was -Madame Schoss, but perhaps it's not, and this Circassian with the -mustache I don't know, but I love her." - -"Aren't you cold?" he asked. - -They did not answer but began to laugh. Dimmler from the sleigh -behind shouted something--probably something funny--but they could not -make out what he said. - -"Yes, yes!" some voices answered, laughing. - -"But here was a fairy forest with black moving shadows, and a -glitter of diamonds and a flight of marble steps and the silver -roofs of fairy buildings and the shrill yells of some animals. And -if this is really Melyukovka, it is still stranger that we drove -heaven knows where and have come to Melyukovka," thought Nicholas. - -It really was Melyukovka, and maids and footmen with merry faces -came running, out to the porch carrying candles. - -"Who is it?" asked someone in the porch. - -"The mummers from the count's. I know by the horses," replied some -voices. - - - - - -CHAPTER XI - - -Pelageya Danilovna Melyukova, a broadly built, energetic woman -wearing spectacles, sat in the drawing room in a loose dress, -surrounded by her daughters whom she was trying to keep from feeling -dull. They were quietly dropping melted wax into snow and looking at -the shadows the wax figures would throw on the wall, when they heard -the steps and voices of new arrivals in the vestibule. - -Hussars, ladies, witches, clowns, and bears, after clearing their -throats and wiping the hoarfrost from their faces in the vestibule, -came into the ballroom where candles were hurriedly lighted. The -clown--Dimmler--and the lady--Nicholas--started a dance. Surrounded by -the screaming children the mummers, covering their faces and -disguising their voices, bowed to their hostess and arranged -themselves about the room. - -"Dear me! there's no recognizing them! And Natasha! See whom she -looks like! She really reminds me of somebody. But Herr Dimmler--isn't -he good! I didn't know him! And how he dances. Dear me, there's a -Circassian. Really, how becoming it is to dear Sonya. And who is that? -Well, you have cheered us up! Nikita and Vanya--clear away the tables! -And we were sitting so quietly. Ha, ha, ha!... The hussar, the hussar! -Just like a boy! And the legs!... I can't look at him..." different -voices were saying. - -Natasha, the young Melyukovs' favorite, disappeared with them into -the back rooms where a cork and various dressing gowns and male -garments were called for and received from the footman by bare girlish -arms from behind the door. Ten minutes later, all the young -Melyukovs joined the mummers. - -Pelageya Danilovna, having given orders to clear the rooms for the -visitors and arranged about refreshments for the gentry and the serfs, -went about among the mummers without removing her spectacles, -peering into their faces with a suppressed smile and failing to -recognize any of them. It was not merely Dimmler and the Rostovs she -failed to recognize, she did not even recognize her own daughters, -or her late husband's, dressing gowns and uniforms, which they had put -on. - -"And who is is this?" she asked her governess, peering into the face -of her own daughter dressed up as a Kazan-Tartar. "I suppose it is one -of the Rostovs! Well, Mr. Hussar, and what regiment do you serve -in?" she asked Natasha. "Here, hand some fruit jelly to the Turk!" she -ordered the butler who was handing things round. "That's not forbidden -by his law." - -Sometimes, as she looked at the strange but amusing capers cut by -the dancers, who--having decided once for all that being disguised, no -one would recognize them--were not at all shy, Pelageya Danilovna -hid her face in her handkerchief, and her whole stout body shook -with irrepressible, kindly, elderly laughter. - -"My little Sasha! Look at Sasha!" she said. - -After Russian country dances and chorus dances, Pelageya Danilovna -made the serfs and gentry join in one large circle: a ring, a -string, and a silver ruble were fetched and they all played games -together. - -In an hour, all the costumes were crumpled and disordered. The -corked eyebrows and mustaches were smeared over the perspiring, -flushed, and merry faces. Pelageya Danilovna began to recognize the -mummers, admired their cleverly contrived costumes, and particularly -how they suited the young ladies, and she thanked them all for -having entertained her so well. The visitors were invited to supper in -the drawing room, and the serfs had something served to them in the -ballroom. - -"Now to tell one's fortune in the empty bathhouse is frightening!" -said an old maid who lived with the Melyukovs, during supper. - -"Why?" said the eldest Melyukov girl. - -"You wouldn't go, it takes courage..." - -"I'll go," said Sonya. - -"Tell what happened to the young lady!" said the second Melyukov -girl. - -"Well," began the old maid, "a young lady once went out, took a -cock, laid the table for two, all properly, and sat down. After -sitting a while, she suddenly hears someone coming... a sleigh -drives up with harness bells; she hears him coming! He comes in, -just in the shape of a man, like an officer--comes in and sits down to -table with her." - -"Ah! ah!" screamed Natasha, rolling her eyes with horror. - -"Yes? And how... did he speak?" - -"Yes, like a man. Everything quite all right, and he began -persuading her; and she should have kept him talking till cockcrow, -but she got frightened, just got frightened and hid her face in her -hands. Then he caught her up. It was lucky the maids ran in just -then..." - -"Now, why frighten them?" said Pelageya Danilovna. - -"Mamma, you used to try your fate yourself..." said her daughter. - -"And how does one do it in a barn?" inquired Sonya. - -"Well, say you went to the barn now, and listened. It depends on -what you hear; hammering and knocking--that's bad; but a sound of -shifting grain is good and one sometimes hears that, too." - -"Mamma, tell us what happened to you in the barn." - -Pelageya Danilovna smiled. - -"Oh, I've forgotten..." she replied. "But none of you would go?" - -"Yes, I will; Pelageya Danilovna, let me! I'll go," said Sonya. - -"Well, why not, if you're not afraid?" - -"Louisa Ivanovna, may I?" asked Sonya. - -Whether they were playing the ring and string game or the ruble game -or talking as now, Nicholas did not leave Sonya's side, and gazed at -her with quite new eyes. It seemed to him that it was only today, -thanks to that burnt-cork mustache, that he had fully learned to -know her. And really, that evening, Sonya was brighter, more animated, -and prettier than Nicholas had ever seen her before. - -"So that's what she is like; what a fool I have been!" he thought -gazing at her sparkling eyes, and under the mustache a happy rapturous -smile dimpled her cheeks, a smile he had never seen before. - -"I'm not afraid of anything," said Sonya. "May I go at once?" She -got up. - -They told her where the barn was and how she should stand and -listen, and they handed her a fur cloak. She threw this over her -head and shoulders and glanced at Nicholas. - -"What a darling that girl is!" thought he. "And what have I been -thinking of till now?" - -Sonya went out into the passage to go to the barn. Nicholas went -hastily to the front porch, saying he felt too hot. The crowd of -people really had made the house stuffy. - -Outside, there was the same cold stillness and the same moon, but -even brighter than before. The light was so strong and the snow -sparkled with so many stars that one did not wish to look up at the -sky and the real stars were unnoticed. The sky was black and dreary, -while the earth was gay. - -"I am a fool, a fool! what have I been waiting for?" thought -Nicholas, and running out from the porch he went round the corner of -the house and along the path that led to the back porch. He knew Sonya -would pass that way. Halfway lay some snow-covered piles of firewood -and across and along them a network of shadows from the bare old -lime trees fell on the snow and on the path. This path led to the -barn. The log walls of the barn and its snow-covered roof, that looked -as if hewn out of some precious stone, sparkled in the moonlight. A -tree in the garden snapped with the frost, and then all was again -perfectly silent. His bosom seemed to inhale not air but the -strength of eternal youth and gladness. - -From the back porch came the sound of feet descending the steps, the -bottom step upon which snow had fallen gave a ringing creak and he -heard the voice of an old maidservant saying, "Straight, straight, -along the path, Miss. Only, don't look back." - -"I am not afraid," answered Sonya's voice, and along the path toward -Nicholas came the crunching, whistling sound of Sonya's feet in her -thin shoes. - -Sonya came along, wrapped in her cloak. She was only a couple of -paces away when she saw him, and to her too he was not the Nicholas -she had known and always slightly feared. He was in a woman's dress, -with tousled hair and a happy smile new to Sonya. She ran rapidly -toward him. - -"Quite different and yet the same," thought Nicholas, looking at her -face all lit up by the moonlight. He slipped his arms under the -cloak that covered her head, embraced her, pressed her to him, and -kissed her on the lips that wore a mustache and had a smell of burnt -cork. Sonya kissed him full on the lips, and disengaging her little -hands pressed them to his cheeks. - -"Sonya!... Nicholas!"... was all they said. They ran to the barn and -then back again, re-entering, he by the front and she by the back -porch. - - - - - -CHAPTER XII - - -When they all drove back from Pelageya Danilovna's, Natasha, who -always saw and noticed everything, arranged that she and Madame Schoss -should go back in the sleigh with Dimmler, and Sonya with Nicholas and -the maids. - -On the way back Nicholas drove at a steady pace instead of racing -and kept peering by that fantastic all-transforming light into Sonya's -face and searching beneath the eyebrows and mustache for his former -and his present Sonya from whom he had resolved never to be parted -again. He looked and recognizing in her both the old and the new -Sonya, and being reminded by the smell of burnt cork of the -sensation of her kiss, inhaled the frosty air with a full breast -and, looking at the ground flying beneath him and at the sparkling -sky, felt himself again in fairyland. - -"Sonya, is it well with thee?" he asked from time to time. - -"Yes!" she replied. "And with thee?" - -When halfway home Nicholas handed the reins to the coachman and -ran for a moment to Natasha's sleigh and stood on its wing. - -"Natasha!" he whispered in French, "do you know I have made up my -mind about Sonya?" - -"Have you told her?" asked Natasha, suddenly beaming all over with -joy. - -"Oh, how strange you are with that mustache and those eyebrows!... -Natasha--are you glad?" - -"I am so glad, so glad! I was beginning to be vexed with you. I -did not tell you, but you have been treating her badly. What a heart -she has, Nicholas! I am horrid sometimes, but I was ashamed to be -happy while Sonya was not," continued Natasha. "Now I am so glad! -Well, run back to her." - -"No, wait a bit.... Oh, how funny you look!" cried Nicholas, peering -into her face and finding in his sister too something new, unusual, -and bewitchingly tender that he had not seen in her before. -"Natasha, it's magical, isn't it?" - -"Yes," she replied. "You have done splendidly." - -"Had I seen her before as she is now," thought Nicholas, "I should -long ago have asked her what to do and have done whatever she told me, -and all would have been well." - -"So you are glad and I have done right?" - -"Oh, quite right! I had a quarrel with Mamma some time ago about it. -Mamma said she was angling for you. How could she say such a thing! -I nearly stormed at Mamma. I will never let anyone say anything bad of -Sonya, for there is nothing but good in her." - -"Then it's all right?" said Nicholas, again scrutinizing the -expression of his sister's face to see if she was in earnest. Then -he jumped down and, his boots scrunching the snow, ran back to his -sleigh. The same happy, smiling Circassian, with mustache and -beaming eyes looking up from under a sable hood, was still sitting -there, and that Circassian was Sonya, and that Sonya was certainly his -future happy and loving wife. - -When they reached home and had told their mother how they had -spent the evening at the Melyukovs', the girls went to their -bedroom. When they had undressed, but without washing off the cork -mustaches, they sat a long time talking of their happiness. They -talked of how they would live when they were married, how their -husbands would be friends, and how happy they would be. On Natasha's -table stood two looking glasses which Dunyasha had prepared -beforehand. - -"Only when will all that be? I am afraid never.... It would be too -good!" said Natasha, rising and going to the looking glasses. - -"Sit down, Natasha; perhaps you'll see him," said Sonya. - -Natasha lit the candles, one on each side of one of the looking -glasses, and sat down. - -"I see someone with a mustache," said Natasha, seeing her own face. - -"You mustn't laugh, Miss," said Dunyasha. - -With Sonya's help and the maid's, Natasha got the glass she held -into the right position opposite the other; her face assumed a serious -expression and she sat silent. She sat a long time looking at the -receding line of candles reflected in the glasses and expecting -(from tales she had heard) to see a coffin, or him, Prince Andrew, -in that last dim, indistinctly outlined square. But ready as she was -to take the smallest speck for the image of a man or of a coffin, -she saw nothing. She began blinking rapidly and moved away from the -looking glasses. - -"Why is it others see things and I don't?" she said. "You sit down -now, Sonya. You absolutely must, tonight! Do it for me.... Today I -feel so frightened!" - -Sonya sat down before the glasses, got the right position, and began -looking. - -"Now, Miss Sonya is sure to see something," whispered Dunyasha; -"while you do nothing but laugh." - -Sonya heard this and Natasha's whisper: - -"I know she will. She saw something last year." - -For about three minutes all were silent. - -"Of course she will!" whispered Natasha, but did not finish... -suddenly Sonya pushed away the glass she was holding and covered her -eyes with her hand. - -"Oh, Natasha!" she cried. - -"Did you see? Did you? What was it?" exclaimed Natasha, holding up -the looking glass. - -Sonya had not seen anything, she was just wanting to blink and to -get up when she heard Natasha say, "Of course she will!" She did not -wish to disappoint either Dunyasha or Natasha, but it was hard to -sit still. She did not herself know how or why the exclamation escaped -her when she covered her eyes. - -"You saw him?" urged Natasha, seizing her hand. - -"Yes. Wait a bit... I... saw him," Sonya could not help saying, -not yet knowing whom Natasha meant by him, Nicholas or Prince Andrew. - -"But why shouldn't I say I saw something? Others do see! Besides who -can tell whether I saw anything or not?" flashed through Sonya's mind. - -"Yes, I saw him," she said. - -"How? Standing or lying?" - -"No, I saw... At first there was nothing, then I saw him lying -down." - -"Andrew lying? Is he ill?" asked Natasha, her frightened eyes -fixed on her friend. - -"No, on the contrary, on the contrary! His face was cheerful, and he -turned to me." And when saying this she herself fancied she had really -seen what she described. - -"Well, and then, Sonya?..." - -"After that, I could not make out what there was; something blue and -red..." - -"Sonya! When will he come back? When shall I see him! O, God, how -afraid I am for him and for myself and about everything!..." Natasha -began, and without replying to Sonya's words of comfort she got into -bed, and long after her candle was out lay open-eyed and motionless, -gazing at the moonlight through the frosty windowpanes. - - - - - -CHAPTER XIII - - -Soon after the Christmas holidays Nicholas told his mother of his -love for Sonya and of his firm resolve to marry her. The countess, who -had long noticed what was going on between them and was expecting this -declaration, listened to him in silence and then told her son that -he might marry whom he pleased, but that neither she nor his father -would give their blessing to such a marriage. Nicholas, for the -first time, felt that his mother was displeased with him and that, -despite her love for him, she would not give way. Coldly, without -looking at her son, she sent for her husband and, when he came, -tried briefly and coldly to inform him of the facts, in her son's -presence, but unable to restrain herself she burst into tears of -vexation and left the room. The old count began irresolutely to -admonish Nicholas and beg him to abandon his purpose. Nicholas replied -that he could not go back on his word, and his father, sighing and -evidently disconcerted, very soon became silent and went in to the -countess. In all his encounters with his son, the count was always -conscious of his own guilt toward him for having wasted the family -fortune, and so he could not be angry with him for refusing to marry -an heiress and choosing the dowerless Sonya. On this occasion, he -was only more vividly conscious of the fact that if his affairs had -not been in disorder, no better wife for Nicholas than Sonya could -have been wished for, and that no one but himself with his Mitenka and -his uncomfortable habits was to blame for the condition of the -family finances. - -The father and mother did not speak of the matter to their son -again, but a few days later the countess sent for Sonya and, with a -cruelty neither of them expected, reproached her niece for trying to -catch Nicholas and for ingratitude. Sonya listened silently with -downcast eyes to the countess' cruel words, without understanding what -was required of her. She was ready to sacrifice everything for her -benefactors. Self-sacrifice was her most cherished idea but in this -case she could not see what she ought to sacrifice, or for whom. She -could not help loving the countess and the whole Rostov family, but -neither could she help loving Nicholas and knowing that his -happiness depended on that love. She was silent and sad and did not -reply. Nicholas felt the situation to be intolerable and went to -have an explanation with his mother. He first implored her to -forgive him and Sonya and consent to their marriage, then he -threatened that if she molested Sonya he would at once marry her -secretly. - -The countess, with a coldness her son had never seen in her -before, replied that he was of age, that Prince Andrew was marrying -without his father's consent, and he could do the same, but that she -would never receive that intriguer as her daughter. - -Exploding at the word intriguer, Nicholas, raising his voice, told -his mother he had never expected her to try to force him to sell his -feelings, but if that were so, he would say for the last time.... -But he had no time to utter the decisive word which the expression -of his face caused his mother to await with terror, and which would -perhaps have forever remained a cruel memory to them both. He had -not time to say it, for Natasha, with a pale and set face, entered the -room from the door at which she had been listening. - -"Nicholas, you are talking nonsense! Be quiet, be quiet, be quiet, I -tell you!..." she almost screamed, so as to drown his voice. - -"Mamma darling, it's not at all so... my poor, sweet darling," she -said to her mother, who conscious that they had been on the brink of a -rupture gazed at her son with terror, but in the obstinacy and -excitement of the conflict could not and would not give way. - -"Nicholas, I'll explain to you. Go away! Listen, Mamma darling," -said Natasha. - -Her words were incoherent, but they attained the purpose at which -she was aiming. - -The countess, sobbing heavily, hid her face on her daughter's -breast, while Nicholas rose, clutching his head, and left the room. - -Natasha set to work to effect a reconciliation, and so far succeeded -that Nicholas received a promise from his mother that Sonya should not -be troubled, while he on his side promised not to undertake anything -without his parents' knowledge. - -Firmly resolved, after putting his affairs in order in the regiment, -to retire from the army and return and marry Sonya, Nicholas, serious, -sorrowful, and at variance with his parents, but, as it seemed to him, -passionately in love, left at the beginning of January to rejoin his -regiment. - -After Nicholas had gone things in the Rostov household were more -depressing than ever, and the countess fell ill from mental agitation. - -Sonya was unhappy at the separation from Nicholas and still more -so on account of the hostile tone the countess could not help adopting -toward her. The count was more perturbed than ever by the condition of -his affairs, which called for some decisive action. Their town house -and estate near Moscow had inevitably to be sold, and for this they -had to go to Moscow. But the countess' health obliged them to delay -their departure from day to day. - -Natasha, who had borne the first period of separation from her -betrothed lightly and even cheerfully, now grew more agitated and -impatient every day. The thought that her best days, which she would -have employed in loving him, were being vainly wasted, with no -advantage to anyone, tormented her incessantly. His letters for the -most part irritated her. It hurt her to think that while she lived -only in the thought of him, he was living a real life, seeing new -places and new people that interested him. The more interesting his -letters were the more vexed she felt. Her letters to him, far from -giving her any comfort, seemed to her a wearisome and artificial -obligation. She could not write, because she could not conceive the -possibility of expressing sincerely in a letter even a thousandth part -of what she expressed by voice, smile, and glance. She wrote to him -formal, monotonous, and dry letters, to which she attached no -importance herself, and in the rough copies of which the countess -corrected her mistakes in spelling. - -There was still no improvement in the countess' health, but it was -impossible to defer the journey to Moscow any longer. Natasha's -trousseau had to be ordered and the house sold. Moreover, Prince -Andrew was expected in Moscow, where old Prince Bolkonski was spending -the winter, and Natasha felt sure he had already arrived. - -So the countess remained in the country, and the count, taking Sonya -and Natasha with him, went to Moscow at the end of January. - - - - -BOOK EIGHT: 1811 --12 - - - - - -CHAPTER I - - -After Prince Andrews engagement to Natasha, Pierre without any -apparent cause suddenly felt it impossible to go on living as -before. Firmly convinced as he was of the truths revealed to him by -his benefactor, and happy as he had been in perfecting his inner -man, to which he had devoted himself with such ardor--all the zest -of such a life vanished after the engagement of Andrew and Natasha and -the death of Joseph Alexeevich, the news of which reached him almost -at the same time. Only the skeleton of life remained: his house, a -brilliant wife who now enjoyed the favors of a very important -personage, acquaintance with all Petersburg, and his court service -with its dull formalities. And this life suddenly seemed to Pierre -unexpectedly loathsome. He ceased keeping a diary, avoided the company -of the Brothers, began going to the Club again, drank a great deal, -and came once more in touch with the bachelor sets, leading such a -life that the Countess Helene thought it necessary to speak severely -to him about it. Pierre felt that she right, and to avoid compromising -her went away to Moscow. - -In Moscow as soon as he entered his huge house in which the faded -and fading princesses still lived, with its enormous retinue; as -soon as, driving through the town, he saw the Iberian shrine with -innumerable tapers burning before the golden covers of the icons, -the Kremlin Square with its snow undisturbed by vehicles, the sleigh -drivers and hovels of the Sivtsev Vrazhok, those old Moscovites who -desired nothing, hurried nowhere, and were ending their days -leisurely; when he saw those old Moscow ladies, the Moscow balls, -and the English Club, he felt himself at home in a quiet haven. In -Moscow he felt at peace, at home, warm and dirty as in an old dressing -gown. - -Moscow society, from the old women down to the children, received -Pierre like a long-expected guest whose place was always ready -awaiting him. For Moscow society Pierre was the nicest, kindest, -most intellectual, merriest, and most magnanimous of cranks, a -heedless, genial nobleman of the old Russian type. His purse was -always empty because it was open to everyone. - -Benefit performances, poor pictures, statues, benevolent -societies, gypsy choirs, schools, subscription dinners, sprees, -Freemasons, churches, and books--no one and nothing met with a refusal -from him, and had it not been for two friends who had borrowed large -sums from him and taken him under their protection, he would have -given everything away. There was never a dinner or soiree at the -Club without him. As soon as he sank into his place on the sofa -after two bottles of Margaux he was surrounded, and talking, -disputing, and joking began. When there were quarrels, his kindly -smile and well-timed jests reconciled the antagonists. The Masonic -dinners were dull and dreary when he was not there. - -When after a bachelor supper he rose with his amiable and kindly -smile, yielding to the entreaties of the festive company to drive -off somewhere with them, shouts of delight and triumph arose among the -young men. At balls he danced if a partner was needed. Young ladies, -married and unmarried, liked him because without making love to any of -them, he was equally amiable to all, especially after supper. "Il -est charmant; il n'a pas de sexe,"* they said of him. - - -*"He is charming; he has no sex." - - -Pierre was one of those retired gentlemen-in-waiting of whom there -were hundreds good-humoredly ending their days in Moscow. - -How horrified he would have been seven years before, when he first -arrived from abroad, had he been told that there was no need for him -to seek or plan anything, that his rut had long been shaped, eternally -predetermined, and that wriggle as he might, he would be what all in -his position were. He could not have believed it! Had he not at one -time longed with all his heart to establish a republic in Russia; then -himself to be a Napoleon; then to be a philosopher; and then a -strategist and the conqueror of Napoleon? Had he not seen the -possibility of, and passionately desired, the regeneration of the -sinful human race, and his own progress to the highest degree of -perfection? Had he not established schools and hospitals and liberated -his serfs? - -But instead of all that--here he was, the wealthy husband of an -unfaithful wife, a retired gentleman-in-waiting, fond of eating and -drinking and, as he unbuttoned his waistcoat, of abusing the -government a bit, a member of the Moscow English Club, and a universal -favorite in Moscow society. For a long time he could not reconcile -himself to the idea that he was one of those same retired Moscow -gentlemen-in-waiting he had so despised seven years before. - -Sometimes he consoled himself with the thought that he was only -living this life temporarily; but then he was shocked by the thought -of how many, like himself, had entered that life and that Club -temporarily, with all their teeth and hair, and had only left it -when not a single tooth or hair remained. - -In moments of pride, when he thought of his position it seemed to -him that he was quite different and distinct from those other -retired gentlemen-in-waiting he had formerly despised: they were -empty, stupid, contented fellows, satisfied with their position, -"while I am still discontented and want to do something for mankind. -But perhaps all these comrades of mine struggled just like me and -sought something new, a path in life of their own, and like me were -brought by force of circumstances, society, and race--by that -elemental force against which man is powerless--to the condition I -am in," said he to himself in moments of humility; and after living -some time in Moscow he no longer despised, but began to grow fond -of, to respect, and to pity his comrades in destiny, as he pitied -himself. - -Pierre longer suffered moments of despair, hypochondria, and disgust -with life, but the malady that had formerly found expression in such -acute attacks was driven inwards and never left him for a moment. -"What for? Why? What is going on in the world?" he would ask himself -in perplexity several times a day, involuntarily beginning to -reflect anew on the meaning of the phenomena of life; but knowing by -experience that there were no answers to these questions he made haste -to turn away from them, and took up a book, or hurried of to the -Club or to Apollon Nikolaevich's, to exchange the gossip of the town. - -"Helene, who has never cared for anything but her own body and is -one of the stupidest women in the world," thought Pierre, "is regarded -by people as the acme of intelligence and refinement, and they pay -homage to her. Napoleon Bonaparte was despised by all as long as he -was great, but now that he has become a wretched comedian the -Emperor Francis wants to offer him his daughter in an illegal -marriage. The Spaniards, through the Catholic clergy, offer praise -to God for their victory over the French on the fourteenth of June, -and the French, also through the Catholic clergy, offer praise because -on that same fourteenth of June they defeated the Spaniards. My -brother Masons swear by the blood that they are ready to sacrifice -everything for their neighbor, but they do not give a ruble each to -the collections for the poor, and they intrigue, the Astraea Lodge -against the Manna Seekers, and fuss about an authentic Scotch carpet -and a charter that nobody needs, and the meaning of which the very man -who wrote it does not understand. We all profess the Christian law -of forgiveness of injuries and love of our neighbors, the law in honor -of which we have built in Moscow forty times forty churches--but -yesterday a deserter was knouted to death and a minister of that -same law of love and forgiveness, a priest, gave the soldier a cross -to kiss before his execution." So thought Pierre, and the whole of -this general deception which everyone accepts, accustomed as he was to -it, astonished him each time as if it were something new. "I -understand the deception and confusion," he thought, "but how am I -to tell them all that I see? I have tried, and have always found -that they too in the depths of their souls understand it as I do, -and only try not to see it. So it appears that it must be so! But I- -what is to become of me?" thought he. He had the unfortunate -capacity many men, especially Russians, have of seeing and believing -in the possibility of goodness and truth, but of seeing the evil and -falsehood of life too clearly to be able to take a serious part in it. -Every sphere of work was connected, in his eyes, with evil and -deception. Whatever he tried to be, whatever he engaged in, the evil -and falsehood of it repulsed him and blocked every path of activity. -Yet he had to live and to find occupation. It was too dreadful to be -under the burden of these insoluble problems, so he abandoned -himself to any distraction in order to forget them. He frequented -every kind of society, drank much, bought pictures, engaged in -building, and above all--read. - -He read, and read everything that came to hand. On coming home, -while his valets were still taking off his things, he picked up a book -and began to read. From reading he passed to sleeping, from sleeping -to gossip in drawing rooms of the Club, from gossip to carousals and -women; from carousals back to gossip, reading, and wine. Drinking -became more and more a physical and also a moral necessity. Though the -doctors warned him that with his corpulence wine was dangerous for -him, he drank a great deal. He was only quite at ease when having -poured several glasses of wine mechanically into his large mouth he -felt a pleasant warmth in his body, an amiability toward all his -fellows, and a readiness to respond superficially to every idea -without probing it deeply. Only after emptying a bottle or two did -he feel dimly that the terribly tangled skein of life which previously -had terrified him was not as dreadful as he had thought. He was always -conscious of some aspect of that skein, as with a buzzing in his -head after dinner or supper he chatted or listened to conversation -or read. But under the influence of wine he said to himself: "It -doesn't matter. I'll get it unraveled. I have a solution ready, but -have no time now--I'll think it all out later on!" But the later on -never came. - -In the morning, on an empty stomach, all the old questions -appeared as insoluble and terrible as ever, and Pierre hastily -picked up a book, and if anyone came to see him he was glad. - -Sometimes he remembered how he had heard that soldiers in war when -entrenched under the enemy's fire, if they have nothing to do, try -hard to find some occupation the more easily to bear the danger. To -Pierre all men seemed like those soldiers, seeking refuge from life: -some in ambition, some in cards, some in framing laws, some in -women, some in toys, some in horses, some in politics, some in -sport, some in wine, and some in governmental affairs. "Nothing is -trivial, and nothing is important, it's all the same--only to save -oneself from it as best one can," thought Pierre. "Only not to see it, -that dreadful it!" - - - - - -CHAPTER II - - -At the beginning of winter Prince Nicholas Bolkonski and his -daughter moved to Moscow. At that time enthusiasm for the Emperor -Alexander's regime had weakened and a patriotic and anti-French -tendency prevailed there, and this, together with his past and his -intellect and his originality, at once made Prince Nicholas -Bolkonski an object of particular respect to the Moscovites and the -center of the Moscow opposition to the government. - -The prince had aged very much that year. He showed marked signs of -senility by a tendency to fall asleep, forgetfulness of quite recent -events, remembrance of remote ones, and the childish vanity with which -he accepted the role of head of the Moscow opposition. In spite of -this the old man inspired in all his visitors alike a feeling of -respectful veneration--especially of an evening when he came in to tea -in his old-fashioned coat and powdered wig and, aroused by anyone, -told his abrupt stories of the past, or uttered yet more abrupt and -scathing criticisms of the present. For them all, that old-fashioned -house with its gigantic mirrors, pre-Revolution furniture, powdered -footmen, and the stern shrewd old man (himself a relic of the past -century) with his gentle daughter and the pretty Frenchwoman who -were reverently devoted to him presented a majestic and agreeable -spectacle. But the visitors did not reflect that besides the couple of -hours during which they saw their host, there were also twenty-two -hours in the day during which the private and intimate life of the -house continued. - -Latterly that private life had become very trying for Princess Mary. -There in Moscow she was deprived of her greatest pleasures--talks with -the pilgrims and the solitude which refreshed her at Bald Hills--and -she had none of the advantages and pleasures of city life. She did not -go out into society; everyone knew that her father would not let her -go anywhere without him, and his failing health prevented his going -out himself, so that she was not invited to dinners and evening -parties. She had quite abandoned the hope of getting married. She -saw the coldness and malevolence with which the old prince received -and dismissed the young men, possible suitors, who sometimes -appeared at their house. She had no friends: during this visit to -Moscow she had been disappointed in the two who had been nearest to -her. Mademoiselle Bourienne, with whom she had never been able to be -quite frank, had now become unpleasant to her, and for various reasons -Princess Mary avoided her. Julie, with whom she had corresponded for -the last five years, was in Moscow, but proved to be quite alien to -her when they met. Just then Julie, who by the death of her brothers -had become one of the richest heiresses in Moscow, was in the full -whirl of society pleasures. She was surrounded by young men who, she -fancied, had suddenly learned to appreciate her worth. Julie was at -that stage in the life of a society woman when she feels that her last -chance of marrying has come and that her fate must be decided now or -never. On Thursdays Princess Mary remembered with a mournful smile -that she now had no one to write to, since Julie--whose presence -gave her no pleasure was here and they met every week. Like the old -emigre who declined to marry the lady with whom he had spent his -evenings for years, she regretted Julie's presence and having no one -to write to. In Moscow Princess Mary had no one to talk to, no one -to whom to confide her sorrow, and much sorrow fell to her lot just -then. The time for Prince Andrew's return and marriage was -approaching, but his request to her to prepare his father for it had -not been carried out; in fact, it seemed as if matters were quite -hopeless, for at every mention of the young Countess Rostova the old -prince (who apart from that was usually in a bad temper) lost -control of himself. Another lately added sorrow arose from the lessons -she gave her six year-old nephew. To her consternation she detected in -herself in relation to little Nicholas some symptoms of her father's -irritability. However often she told herself that she must not get -irritable when teaching her nephew, almost every time that, pointer in -hand, she sat down to show him the French alphabet, she so longed to -pour her own knowledge quickly and easily into the child--who was -already afraid that Auntie might at any moment get angry--that at -his slightest inattention she trembled, became flustered and heated, -raised her voice, and sometimes pulled him by the arm and put him in -the corner. Having put him in the corner she would herself begin to -cry over her cruel, evil nature, and little Nicholas, following her -example, would sob, and without permission would leave his corner, -come to her, pull her wet hands from her face, and comfort her. But -what distressed the princess most of all was her father's -irritability, which was always directed against her and had of late -amounted to cruelty. Had he forced her to prostrate herself to the -ground all night, had he beaten her or made her fetch wood or water, -it would never have entered her mind to think her position hard; but -this loving despot--the more cruel because he loved her and for that -reason tormented himself and her--knew how not merely to hurt and -humiliate her deliberately, but to show her that she was always to -blame for everything. Of late he had exhibited a new trait that -tormented Princess Mary more than anything else; this was his -ever-increasing intimacy with Mademoiselle Bourienne. The idea that at -the first moment of receiving the news of his son's intentions had -occurred to him in jest--that if Andrew got married he himself would -marry Bourienne--had evidently pleased him, and latterly he had -persistently, and as it seemed to Princess Mary merely to offend -her, shown special endearments to the companion and expressed his -dissatisfaction with his daughter by demonstrations of love of -Bourienne. - -One day in Moscow in Princess Mary's presence (she thought her -father did it purposely when she was there) the old prince kissed -Mademoiselle Bourienne's hand and, drawing her to him, embraced her -affectionately. Princess Mary flushed and ran out of the room. A few -minutes later Mademoiselle Bourienne came into Princess Mary's room -smiling and making cheerful remarks in her agreeable voice. Princess -Mary hastily wiped away her tears, went resolutely up to -Mademoiselle Bourienne, and evidently unconscious of what she was -doing began shouting in angry haste at the Frenchwoman, her voice -breaking: "It's horrible, vile, inhuman, to take advantage of the -weakness..." She did not finish. "Leave my room," she exclaimed, and -burst into sobs. - -Next day the prince did not say a word to his daughter, but she -noticed that at dinner he gave orders that Mademoiselle Bourienne -should be served first. After dinner, when the footman handed coffee -and from habit began with the princess, the prince suddenly grew -furious, threw his stick at Philip, and instantly gave instructions to -have him conscripted for the army. - -"He doesn't obey... I said it twice... and he doesn't obey! She is -the first person in this house; she's my best friend," cried the -prince. "And if you allow yourself," he screamed in a fury, addressing -Princess Mary for the first time, "to forget yourself again before her -as you dared to do yesterday, I will show you who is master in this -house. Go! Don't let me set eyes on you; beg her pardon!" - -Princess Mary asked Mademoiselle Bourienne's pardon, and also her -father's pardon for herself and for Philip the footman, who had begged -for her intervention. - -At such moments something like a pride of sacrifice gathered in -her soul. And suddenly that father whom she had judged would look -for his spectacles in her presence, fumbling near them and not -seeing them, or would forget something that had just occurred, or take -a false step with his failing legs and turn to see if anyone had -noticed his feebleness, or, worst of all, at dinner when there were no -visitors to excite him would suddenly fall asleep, letting his -napkin drop and his shaking head sink over his plate. "He is old and -feeble, and I dare to condemn him!" she thought at such moments, -with a feeling of revulsion against herself. - - - - - -CHAPTER III - - -In 1811 there was living in Moscow a French doctor--Metivier--who -had rapidly become the fashion. He was enormously tall, handsome, -amiable as Frenchmen are, and was, as all Moscow said, an -extraordinarily clever doctor. He was received in the best houses -not merely as a doctor, but as an equal. - -Prince Nicholas had always ridiculed medicine, but latterly on -Mademoiselle Bourienne's advice had allowed this doctor to visit him -and had grown accustomed to him. Metivier came to see the prince about -twice a week. - -On December 6--St. Nicholas' Day and the prince's name day--all -Moscow came to the prince's front door but he gave orders to admit -no one and to invite to dinner only a small number, a list of whom -he gave to Princess Mary. - -Metivier, who came in the morning with his felicitations, considered -it proper in his quality of doctor de forcer la consigne,* as he -told Princess Mary, and went in to see the prince. It happened that on -that morning of his name day the prince was in one of his worst moods. -He had been going about the house all the morning finding fault with -everyone and pretending not to understand what was said to him and not -to be understood himself. Princess Mary well knew this mood of quiet -absorbed querulousness, which generally culminated in a burst of rage, -and she went about all that morning as though facing a cocked and -loaded gun and awaited the inevitable explosion. Until the doctor's -arrival the morning had passed off safely. After admitting the doctor, -Princess Mary sat down with a book in the drawing room near the door -through which she could hear all that passed in the study. - - -*To force the guard. - - -At first she heard only Metivier's voice, then her father's, then -both voices began speaking at the same time, the door was flung -open, and on the threshold appeared the handsome figure of the -terrified Metivier with his shock of black hair, and the prince in his -dressing gown and fez, his face distorted with fury and the pupils -of his eyes rolled downwards. - -"You don't understand?" shouted the prince, "but I do! French spy, -slave of Buonaparte, spy, get out of my house! Be off, I tell you..." - -Metivier, shrugging his shoulders, went up to Mademoiselle Bourienne -who at the sound of shouting had run in from an adjoining room. - -"The prince is not very well: bile and rush of blood to the head. -Keep calm, I will call again tomorrow," said Metivier; and putting his -fingers to his lips he hastened away. - -Through the study door came the sound of slippered feet and the cry: -"Spies, traitors, traitors everywhere! Not a moment's peace in my -own house!" - -After Metivier's departure the old prince called his daughter in, -and the whole weight of his wrath fell on her. She was to blame that a -spy had been admitted. Had he not told her, yes, told her to make a -list, and not to admit anyone who was not on that list? Then why was -that scoundrel admitted? She was the cause of it all. With her, he -said, he could not have a moment's peace and could not die quietly. - -"No, ma'am! We must part, we must part! Understand that, -understand it! I cannot endure any more," he said, and left the -room. Then, as if afraid she might find some means of consolation, -he returned and trying to appear calm added: "And don't imagine I have -said this in a moment of anger. I am calm. I have thought it over, and -it will be carried out--we must part; so find some place for -yourself...." But he could not restrain himself and with the virulence -of which only one who loves is capable, evidently suffering himself, -he shook his fists at her and screamed: - -"If only some fool would marry her!" Then he slammed the door, -sent for Mademoiselle Bourienne, and subsided into his study. - -At two o'clock the six chosen guests assembled for dinner. - -These guests--the famous Count Rostopchin, Prince Lopukhin with -his nephew, General Chatrov an old war comrade of the prince's, and of -the younger generation Pierre and Boris Drubetskoy--awaited the prince -in the drawing room. - -Boris, who had come to Moscow on leave a few days before, had been -anxious to be presented to Prince Nicholas Bolkonski, and had -contrived to ingratiate himself so well that the old prince in his -case made an exception to the rule of not receiving bachelors in his -house. - -The prince's house did not belong to what is known as fashionable -society, but his little circle--though not much talked about in -town--was one it was more flattering to be received in than any other. -Boris had realized this the week before when the commander in chief in -his presence invited Rostopchin to dinner on St. Nicholas' Day, and -Rostopchin had replied that he could not come: - -"On that day I always go to pay my devotions to the relics of Prince -Nicholas Bolkonski." - -"Oh, yes, yes!" replied the commander in chief. "How is he?..." - -The small group that assembled before dinner in the lofty -old-fashioned drawing room with its old furniture resembled the solemn -gathering of a court of justice. All were silent or talked in low -tones. Prince Nicholas came in serious and taciturn. Princess Mary -seemed even quieter and more diffident than usual. The guests were -reluctant to address her, feeling that she was in no mood for their -conversation. Count Rostopchin alone kept the conversation going, -now relating the latest town news, and now the latest political -gossip. - -Lopukhin and the old general occasionally took part in the -conversation. Prince Bolkonski listened as a presiding judge -receives a report, only now and then, silently or by a brief word, -showing that he took heed of what was being reported to him. The -tone of the conversation was such as indicated that no one approved of -what was being done in the political world. Incidents were related -evidently confirming the opinion that everything was going from bad to -worse, but whether telling a story or giving an opinion the speaker -always stopped, or was stopped, at the point beyond which his -criticism might touch the sovereign himself. - -At dinner the talk turned on the latest political news: Napoleon's -seizure of the Duke of Oldenburg's territory, and the Russian Note, -hostile to Napoleon, which had been sent to all the European courts. - -"Bonaparte treats Europe as a pirate does a captured vessel," said -Count Rostopchin, repeating a phrase he had uttered several times -before. "One only wonders at the long-suffering or blindness of the -crowned heads. Now the Pope's turn has come and Bonaparte doesn't -scruple to depose the head of the Catholic Church--yet all keep -silent! Our sovereign alone has protested against the seizure of the -Duke of Oldenburg's territory, and even..." Count Rostopchin paused, -feeling that he had reached the limit beyond which censure was -impossible. - -"Other territories have been offered in exchange for the Duchy of -Oldenburg," said Prince Bolkonski. "He shifts the Dukes about as I -might move my serfs from Bald Hills to Bogucharovo or my Ryazan -estates." - -"The Duke of Oldenburg bears his misfortunes with admirable strength -of character and resignation," remarked Boris, joining in -respectfully. - -He said this because on his journey from Petersburg he had had the -honor of being presented to the Duke. Prince Bolkonski glanced at -the young man as if about to say something in reply, but changed his -mind, evidently considering him too young. - -"I have read our protests about the Oldenburg affair and was -surprised how badly the Note was worded," remarked Count Rostopchin in -the casual tone of a man dealing with a subject quite familiar to him. - -Pierre looked at Rostopchin with naive astonishment, not -understanding why he should be disturbed by the bad composition of the -Note. - -"Does it matter, Count, how the Note is worded," he asked, "so -long as its substance is forcible?" - -"My dear fellow, with our five hundred thousand troops it should -be easy to have a good style," returned Count Rostopchin. - -Pierre now understood the count's dissatisfaction with the wording -of the Note. - -"One would have thought quill drivers enough had sprung up," -remarked the old prince. "There in Petersburg they are always writing- -not notes only but even new laws. My Andrew there has written a -whole volume of laws for Russia. Nowadays they are always writing!" -and he laughed unnaturally. - -There was a momentary pause in the conversation; the old general -cleared his throat to draw attention. - -"Did you hear of the last event at the review in Petersburg? The -figure cut by the new French ambassador." - -"Eh? Yes, I heard something: he said something awkward in His -Majesty's presence." - -"His Majesty drew attention to the Grenadier division and to the -march past," continued the general, "and it seems the ambassador -took no notice and allowed himself to reply that: 'We in France pay no -attention to such trifles!' The Emperor did not condescend to reply. -At the next review, they say, the Emperor did not once deign to -address him." - -All were silent. On this fact relating to the Emperor personally, it -was impossible to pass any judgment. - -"Impudent fellows!" said the prince. "You know Metivier? I turned -him out of my house this morning. He was here; they admitted him spite -of my request that they should let no one in," he went on, glancing -angrily at his daughter. - -And he narrated his whole conversation with the French doctor and -the reasons that convinced him that Metivier was a spy. Though these -reasons were very insufficient and obscure, no one made any rejoinder. - -After the roast, champagne was served. The guests rose to -congratulate the old prince. Princess Mary, too, went round to him. - -He gave her a cold, angry look and offered her his wrinkled, -clean-shaven cheek to kiss. The whole expression of his face told -her that he had not forgotten the morning's talk, that his decision -remained in force, and only the presence of visitors hindered his -speaking of it to her now. - -When they went into the drawing room where coffee was served, the -old men sat together. - -Prince Nicholas grew more animated and expressed his views on the -impending war. - -He said that our wars with Bonaparte would be disastrous so long -as we sought alliances with the Germans and thrust ourselves into -European affairs, into which we had been drawn by the Peace of Tilsit. -"We ought not to fight either for or against Austria. Our political -interests are all in the East, and in regard to Bonaparte the only -thing is to have an armed frontier and a firm policy, and he will -never dare to cross the Russian frontier, as was the case in 1807!" - -"How can we fight the French, Prince?" said Count Rostopchin. "Can -we arm ourselves against our teachers and divinities? Look at our -youths, look at our ladies! The French are our Gods: Paris is our -Kingdom of Heaven." - -He began speaking louder, evidently to be heard by everyone. - -"French dresses, French ideas, French feelings! There now, you -turned Metivier out by the scruff of his neck because he is a -Frenchman and a scoundrel, but our ladies crawl after him on their -knees. I went to a party last night, and there out of five ladies -three were Roman Catholics and had the Pope's indulgence for doing -woolwork on Sundays. And they themselves sit there nearly naked, -like the signboards at our Public Baths if I may say so. Ah, when -one looks at our young people, Prince, one would like to take Peter -the Great's old cudgel out of the museum and belabor them in the -Russian way till all the nonsense jumps out of them." - -All were silent. The old prince looked at Rostopchin with a smile -and wagged his head approvingly. - -"Well, good-by, your excellency, keep well!" said Rostopchin, -getting up with characteristic briskness and holding out his hand to -the prince. - -"Good-by, my dear fellow.... His words are music, I never tire of -hearing him!" said the old prince, keeping hold of the hand and -offering his cheek to be kissed. - -Following Rostopchin's example the others also rose. - - - - - -CHAPTER IV - - -Princess Mary as she sat listening to the old men's talk and -faultfinding, understood nothing of what she heard; she only -wondered whether the guests had all observed her father's hostile -attitude toward her. She did not even notice the special attentions -and amiabilities shown her during dinner by Boris Drubetskoy, who -was visiting them for the third time already. - -Princess Mary turned with absent-minded questioning look to -Pierre, who hat in hand and with a smile on his face was the last of -the guests to approach her after the old prince had gone out and -they were left alone in the drawing room. - -"May I stay a little longer?" he said, letting his stout body sink -into an armchair beside her. - -"Oh yes," she answered. "You noticed nothing?" her look asked. - -Pierre was in an agreeable after-dinner mood. He looked straight -before him and smiled quietly. - -"Have you known that young man long, Princess?" he asked. - -"Who?" - -"Drubetskoy." - -"No, not long..." - -"Do you like him?" - -"Yes, he is an agreeable young man.... Why do you ask me that?" said -Princess Mary, still thinking of that morning's conversation with -her father. - -"Because I have noticed that when a young man comes on leave from -Petersburg to Moscow it is usually with the object of marrying an -heiress." - -"You have observed that?" said Princess Mary. - -"Yes," returned Pierre with a smile, "and this young man now manages -matters so that where there is a wealthy heiress there he is too. I -can read him like a book. At present he is hesitating whom to lay -siege to--you or Mademoiselle Julie Karagina. He is very attentive -to her." - -"He visits them?" - -"Yes, very often. And do you know the new way of courting?" said -Pierre with an amused smile, evidently in that cheerful mood of good -humored raillery for which he so often reproached himself in his -diary. - -"No," replied Princess Mary. - -"To please Moscow girls nowadays one has to be melancholy. He is -very melancholy with Mademoiselle Karagina," said Pierre. - -"Really?" asked Princess Mary, looking into Pierre's kindly face and -still thinking of her own sorrow. "It would be a relief," thought she, -"if I ventured to confide what I am feeling to someone. I should -like to tell everything to Pierre. He is kind and generous. It would -be a relief. He would give me advice." - -"Would you marry him?" - -"Oh, my God, Count, there are moments when I would marry anybody!" -she cried suddenly to her own surprise and with tears in her voice. -"Ah, how bitter it is to love someone near to you and to feel that..." -she went on in a trembling voice, "that you can do nothing for him but -grieve him, and to know that you cannot alter this. Then there is only -one thing left--to go away, but where could I go?" - -"What is wrong? What is it, Princess?" - -But without finishing what she was saying, Princess Mary burst -into tears. - -"I don't know what is the matter with me today. Don't take any -notice--forget what I have said!" - -Pierre's gaiety vanished completely. He anxiously questioned the -princess, asked her to speak out fully and confide her grief to him; -but she only repeated that she begged him to forget what she had said, -that she did not remember what she had said, and that she had no -trouble except the one he knew of--that Prince Andrew's marriage -threatened to cause a rupture between father and son. - -"Have you any news of the Rostovs?" she asked, to change the -subject. "I was told they are coming soon. I am also expecting -Andrew any day. I should like them to meet here." - -"And how does he now regard the matter?" asked Pierre, referring -to the old prince. - -Princess Mary shook her head. - -"What is to be done? In a few months the year will be up. The -thing is impossible. I only wish I could spare my brother the first -moments. I wish they would come sooner. I hope to be friends with her. -You have known them a long time," said Princess Mary. "Tell me -honestly the whole truth: what sort of girl is she, and what do you -think of her?--The real truth, because you know Andrew is risking so -much doing this against his father's will that I should like to -know..." - -An undefined instinct told Pierre that these explanations, and -repeated requests to be told the whole truth, expressed ill-will on -the princess' part toward her future sister-in-law and a wish that -he should disapprove of Andrew's choice; but in reply he said what -he felt rather than what he thought. - -"I don't know how to answer your question," he said, blushing -without knowing why. "I really don't know what sort of girl she is; -I can't analyze her at all. She is enchanting, but what makes her so I -don't know. That is all one can say about her." - -Princess Mary sighed, and the expression on her face said: "Yes, -that's what I expected and feared." - -"Is she clever?" she asked. - -Pierre considered. - -"I think not," he said, "and yet--yes. She does not deign to be -clever.... Oh no, she is simply enchanting, and that is all." - -Princess Mary again shook her head disapprovingly. - -"Ah, I so long to like her! Tell her so if you see her before I do." - -"I hear they are expected very soon," said Pierre. - -Princess Mary told Pierre of her plan to become intimate with her -future sister-in-law as soon as the Rostovs arrived and to try to -accustom the old prince to her. - - - - - -CHAPTER V - - -Boris had not succeeded in making a wealthy match in Petersburg, -so with the same object in view he came to Moscow. There he wavered -between the two richest heiresses, Julie and Princess Mary. Though -Princess Mary despite her plainness seemed to him more attractive than -Julie, he, without knowing why, felt awkward about paying court to -her. When they had last met on the old prince's name day, she had -answered at random all his attempts to talk sentimentally, evidently -not listening to what he was saying. - -Julie on the contrary accepted his attentions readily, though in a -manner peculiar to herself. - -She was twenty-seven. After the death of her brothers she had become -very wealthy. She was by now decidedly plain, but thought herself -not merely as good-looking as before but even far more attractive. She -was confirmed in this delusion by the fact that she had become a -very wealthy heiress and also by the fact that the older she grew -the less dangerous she became to men, and the more freely they could -associate with her and avail themselves of her suppers, soirees, and -the animated company that assembled at her house, without incurring -any obligation. A man who would have been afraid ten years before of -going every day to the house when there was a girl of seventeen there, -for fear of compromising her and committing himself, would now go -boldly every day and treat her not as a marriageable girl but as a -sexless acquaintance. - -That winter the Karagins' house was the most agreeable and -hospitable in Moscow. In addition to the formal evening and dinner -parties, a large company, chiefly of men, gathered there every day, -supping at midnight and staying till three in the morning. Julie never -missed a ball, a promenade, or a play. Her dresses were always of -the latest fashion. But in spite of that she seemed to be -disillusioned about everything and told everyone that she did not -believe either in friendship or in love, or any of the joys of life, -and expected peace only "yonder." She adopted the tone of one who -has suffered a great disappointment, like a girl who has either lost -the man she loved or been cruelly deceived by him. Though nothing of -the kind had happened to her she was regarded in that light, and had -even herself come to believe that she had suffered much in life. -This melancholy, which did not prevent her amusing herself, did not -hinder the young people who came to her house from passing the time -pleasantly. Every visitor who came to the house paid his tribute to -the melancholy mood of the hostess, and then amused himself with -society gossip, dancing, intellectual games, and bouts rimes, which -were in vogue at the Karagins'. Only a few of these young men, among -them Boris, entered more deeply into Julie's melancholy, and with -these she had prolonged conversations in private on the vanity of -all worldly things, and to them she showed her albums filled with -mournful sketches, maxims, and verses. - -To Boris, Julie was particularly gracious: she regretted his early -disillusionment with life, offered him such consolation of -friendship as she who had herself suffered so much could render, and -showed him her album. Boris sketched two trees in the album and wrote: -"Rustic trees, your dark branches shed gloom and melancholy upon me." - -On another page he drew a tomb, and wrote: - - La mort est secourable et la mort est tranquille. - Ah! contre les douleurs il n'y a pas d'autre asile.* - - -*Death gives relief and death is peaceful. - - Ah! from suffering there is no other refuge. - -Julia said this was charming - -"There is something so enchanting in the smile of melancholy," she -said to Boris, repeating word for word a passage she had copied from a -book. "It is a ray of light in the darkness, a shade between sadness -and despair, showing the possibility of consolation." - -In reply Boris wrote these lines: - - Aliment de poison d'une ame trop sensible, - Toi, sans qui le bonheur me serait impossible, - Tendre melancholie, ah, viens me consoler, - Viens calmer les tourments de ma sombre retraite, - Et mele une douceur secrete - A ces pleurs que je sens couler.* - - -*Poisonous nourishment of a too sensitive soul, - - Thou, without whom happiness would for me be impossible, - - Tender melancholy, ah, come to console me, - - Come to calm the torments of my gloomy retreat, - - And mingle a secret sweetness - - With these tears that I feel to be flowing. - - -For Boris, Julie played most doleful nocturnes on her harp. Boris -read Poor Liza aloud to her, and more than once interrupted the -reading because of the emotions that choked him. Meeting at large -gatherings Julie and Boris looked on one another as the only souls who -understood one another in a world of indifferent people. - -Anna Mikhaylovna, who often visited the Karagins, while playing -cards with the mother made careful inquiries as to Julie's dowry -(she was to have two estates in Penza and the Nizhegorod forests). -Anna Mikhaylovna regarded the refined sadness that united her son to -the wealthy Julie with emotion, and resignation to the Divine will. - -"You are always charming and melancholy, my dear Julie," she said to -the daughter. "Boris says his soul finds repose at your house. He -has suffered so many disappointments and is so sensitive," said she to -the mother. "Ah, my dear, I can't tell you how fond I have grown of -Julie latterly," she said to her son. "But who could help loving -her? She is an angelic being! Ah, Boris, Boris!"--she paused. "And how -I pity her mother," she went on; "today she showed me her accounts and -letters from Penza (they have enormous estates there), and she, poor -thing, has no one to help her, and they do cheat her so!" - -Boris smiled almost imperceptibly while listening to his mother. -He laughed blandly at her naive diplomacy but listened to what she had -to say, and sometimes questioned her carefully about the Penza and -Nizhegorod estates. - -Julie had long been expecting a proposal from her melancholy -adorer and was ready to accept it; but some secret feeling of -repulsion for her, for her passionate desire to get married, for her -artificiality, and a feeling of horror at renouncing the possibility -of real love still restrained Boris. His leave was expiring. He -spent every day and whole days at the Karagins', and every day on -thinking the matter over told himself that he would propose -tomorrow. But in Julie's presence, looking at her red face and chin -(nearly always powdered), her moist eyes, and her expression of -continual readiness to pass at once from melancholy to an unnatural -rapture of married bliss, Boris could not utter the decisive words, -though in imagination he had long regarded himself as the possessor of -those Penza and Nizhegorod estates and had apportioned the use of -the income from them. Julie saw Boris' indecision, and sometimes the -thought occurred to her that she was repulsive to him, but her -feminine self-deception immediately supplied her with consolation, and -she told herself that he was only shy from love. Her melancholy, -however, began to turn to irritability, and not long before Boris' -departure she formed a definite plan of action. Just as Boris' leave -of absence was expiring, Anatole Kuragin made his appearance in -Moscow, and of course in the Karagins' drawing room, and Julie, -suddenly abandoning her melancholy, became cheerful and very attentive -to Kuragin. - -"My dear," said Anna Mikhaylovna to her son, "I know from a reliable -source that Prince Vasili has sent his son to Moscow to get him -married to Julie. I am so fond of Julie that I should be sorry for -her. What do you think of it, my dear?" - -The idea of being made a fool of and of having thrown away that -whole month of arduous melancholy service to Julie, and of seeing -all the revenue from the Penza estates which he had already mentally -apportioned and put to proper use fall into the hands of another, -and especially into the hands of that idiot Anatole, pained Boris. -He drove to the Karagins' with the firm intention of proposing. -Julie met him in a gay, careless manner, spoke casually of how she had -enjoyed yesterday's ball, and asked when he was leaving. Though -Boris had come intentionally to speak of his love and therefore -meant to be tender, he began speaking irritably of feminine -inconstancy, of how easily women can turn from sadness to joy, and how -their moods depend solely on who happens to be paying court to them. -Julie was offended and replied that it was true that a woman needs -variety, and the same thing over and over again would weary anyone. - -"Then I should advise you..." Boris began, wishing to sting her; but -at that instant the galling thought occurred to him that he might have -to leave Moscow without having accomplished his aim, and have vainly -wasted his efforts--which was a thing he never allowed to happen. - -He checked himself in the middle of the sentence, lowered his eyes -to avoid seeing her unpleasantly irritated and irresolute face, and -said: - -"I did not come here at all to quarrel with you. On the contrary..." - -He glanced at her to make sure that he might go on. Her irritability -had suddenly quite vanished, and her anxious, imploring eyes were -fixed on him with greedy expectation. "I can always arrange so as -not to see her often," thought Boris. "The affair has been begun and -must be finished!" He blushed hotly, raised his eyes to hers, and -said: - -"You know my feelings for you!" - -There was no need to say more: Julie's face shone with triumph and -self-satisfaction; but she forced Boris to say all that is said on -such occasions--that he loved her and had never loved any other -woman more than her. She knew that for the Penza estates and -Nizhegorod forests she could demand this, and she received what she -demanded. - -The affianced couple, no longer alluding to trees that shed gloom -and melancholy upon them, planned the arrangements of a splendid house -in Petersburg, paid calls, and prepared everything for a brilliant -wedding. - - - - - -CHAPTER VI - - -At the end of January old Count Rostov went to Moscow with Natasha -and Sonya. The countess was still unwell and unable to travel but it -was impossible to wait for her recovery. Prince Andrew was expected in -Moscow any day, the trousseau had to be ordered and the estate near -Moscow had to be sold, besides which the opportunity of presenting his -future daughter-in-law to old Prince Bolkonski while he was in -Moscow could not be missed. The Rostovs' Moscow house had not been -heated that winter and, as they had come only for a short time and the -countess was not with them, the count decided to stay with Marya -Dmitrievna Akhrosimova, who had long been pressing her hospitality -on them. - -Late one evening the Rostovs' four sleighs drove into Marya -Dmitrievna's courtyard in the old Konyusheny street. Marya -Dmitrievna lived alone. She had already married off her daughter, -and her sons were all in the service. - -She held herself as erect, told everyone her opinion as candidly, -loudly, and bluntly as ever, and her whole bearing seemed a reproach -to others for any weakness, passion, or temptation--the possibility of -which she did not admit. From early in the morning, wearing a dressing -jacket, she attended to her household affairs, and then she drove out: -on holy days to church and after the service to jails and prisons on -affairs of which she never spoke to anyone. On ordinary days, after -dressing, she received petitioners of various classes, of whom there -were always some. Then she had dinner, a substantial and appetizing -meal at which there were always three or four guests; after dinner she -played a game of boston, and at night she had the newspapers or a -new book read to her while she knitted. She rarely made an exception -and went out to pay visits, and then only to the most important -persons in the town. - -She had not yet gone to bed when the Rostovs arrived and the -pulley of the hall door squeaked from the cold as it let in the -Rostovs and their servants. Marya Dmitrievna, with her spectacles -hanging down on her nose and her head flung back, stood in the hall -doorway looking with a stern, grim face at the new arrivals. One might -have thought she was angry with the travelers and would immediately -turn them out, had she not at the same time been giving careful -instructions to the servants for the accommodation of the visitors and -their belongings. - -"The count's things? Bring them here," she said, pointing to the -portmanteaus and not greeting anyone. "The young ladies'? There to the -left. Now what are you dawdling for?" she cried to the maids. "Get the -samovar ready!... You've grown plumper and prettier," she remarked, -drawing Natasha (whose cheeks were glowing from the cold) to her by -the hood. "Foo! You are cold! Now take off your things, quick!" she -shouted to the count who was going to kiss her hand. "You're half -frozen, I'm sure! Bring some rum for tea!... Bonjour, Sonya dear!" she -added, turning to Sonya and indicating by this French greeting her -slightly contemptuous though affectionate attitude toward her. - -When they came in to tea, having taken off their outdoor things -and tidied themselves up after their journey, Marya Dmitrievna -kissed them all in due order. - -"I'm heartily glad you have come and are staying with me. It was -high time," she said, giving Natasha a significant look. "The old -man is here and his son's expected any day. You'll have to make his -acquaintance. But we'll speak of that later on," she added, glancing at -Sonya with a look that showed she did not want to speak of it in her -presence. "Now listen," she said to the count. "What do you want -tomorrow? Whom will you send for? Shinshin?" she crooked one of her -fingers. "The sniveling Anna Mikhaylovna? That's two. She's here -with her son. The son is getting married! Then Bezukhov, eh? He is -here too, with his wife. He ran away from her and she came galloping -after him. He dined with me on Wednesday. As for them"--and she -pointed to the girls--"tomorrow I'll take them first to the Iberian -shrine of the Mother of God, and then we'll drive to the -Super-Rogue's. I suppose you'll have everything new. Don't judge by -me: sleeves nowadays are this size! The other day young Princess Irina -Vasilevna came to see me; she was an awful sight--looked as if she had -put two barrels on her arms. You know not a day passes now without -some new fashion.... And what have you to do yourself?" she asked -the count sternly. - -"One thing has come on top of another: her rags to buy, and now a -purchaser has turned up for the Moscow estate and for the house. If -you will be so kind, I'll fix a time and go down to the estate just -for a day, and leave my lassies with you." - -"All right. All right. They'll be safe with me, as safe as in -Chancery! I'll take them where they must go, scold them a bit, and pet -them a bit," said Marya Dmitrievna, touching her goddaughter and -favorite, Natasha, on the cheek with her large hand. - -Next morning Marya Dmitrievna took the young ladies to the Iberian -shrine of the Mother of God and to Madame Suppert-Roguet, who was so -afraid of Marya Dmitrievna that she always let her have costumes at -a loss merely to get rid of her. Marya Dmitrievna ordered almost the -whole trousseau. When they got home she turned everybody out of the -room except Nataisha, and then called her pet to her armchair. - -"Well, now we'll talk. I congratulate you on your betrothed. -You've hooked a fine fellow! I am glad for your sake and I've known -him since he was so high." She held her hand a couple of feet from the -ground. Natasha blushed happily. "I like him and all his family. Now -listen! You know that old Prince Nicholas much dislikes his son's -marrying. The old fellow's crotchety! Of course Prince Andrew is not a -child and can shift without him, but it's not nice to enter a family -against a father's will. One wants to do it peacefully and lovingly. -You're a clever girl and you'll know how to manage. Be kind, and use -your wits. Then all will be well." - -Natasha remained silent, from shyness Marya Dmitrievna supposed, but -really because she disliked anyone interfering in what touched her -love of Prince Andrew, which seemed to her so apart from all human -affairs that no one could understand it. She loved and knew Prince -Andrew, he loved her only, and was to come one of these days and -take her. She wanted nothing more. - -"You see I have known him a long time and am also fond of Mary, your -future sister-in-law. 'Husbands' sisters bring up blisters,' but -this one wouldn't hurt a fly. She has asked me to bring you two -together. Tomorrow you'll go with your father to see her. Be very nice -and affectionate to her: you're younger than she. When he comes, he'll -find you already know his sister and father and are liked by them. -Am I right or not? Won't that be best?" - -"Yes, it will," Natasha answered reluctantly. - - - - - -CHAPTER VII - - -Next day, by Marya Dmitrievna's advice, Count Rostov took Natasha to -call on Prince Nicholas Bolkonski. The count did not set out -cheerfully on this visit, at heart he felt afraid. He well -remembered the last interview he had had with the old prince at the -time of the enrollment, when in reply to an invitation to dinner he -had had to listen to an angry reprimand for not having provided his -full quota of men. Natasha, on the other hand, having put on her -best gown, was in the highest spirits. "They can't help liking me," -she thought. "Everybody always has liked me, and I am so willing to do -anything they wish, so ready to be fond of him--for being his -father--and of her--for being his sister--that there is no reason -for them not to like me..." - -They drove up to the gloomy old house on the Vozdvizhenka and -entered the vestibule. - -"Well, the Lord have mercy on us!" said the count, half in jest, -half in earnest; but Natasha noticed that her father was flurried on -entering the anteroom and inquired timidly and softly whether the -prince and princess were at home. - -When they had been announced a perturbation was noticeable among the -servants. The footman who had gone to announce them was stopped by -another in the large hall and they whispered to one another. Then a -maidservant ran into the hall and hurriedly said something, mentioning -the princess. At last an old, cross looking footman came and announced -to the Rostovs that the prince was not receiving, but that the -princess begged them to walk up. The first person who came to meet the -visitors was Mademoiselle Bourienne. She greeted the father and -daughter with special politeness and showed them to the princess' -room. The princess, looking excited and nervous, her face flushed in -patches, ran in to meet the visitors, treading heavily, and vainly -trying to appear cordial and at ease. From the first glance Princess -Mary did not like Natasha. She thought her too fashionably dressed, -frivolously gay and vain. She did not at all realize that before -having seen her future sister-in-law she was prejudiced against her by -involuntary envy of her beauty, youth, and happiness, as well as by -jealousy of her brother's love for her. Apart from this insuperable -antipathy to her, Princess Mary was agitated just then because on -the Rostovs' being announced, the old prince had shouted that he did -not wish to see them, that Princess Mary might do so if she chose, but -they were not to be admitted to him. She had decided to receive -them, but feared lest the prince might at any moment indulge in some -freak, as he seemed much upset by the Rostovs' visit. - -"There, my dear princess, I've brought you my songstress," said -the count, bowing and looking round uneasily as if afraid the old -prince might appear. "I am so glad you should get to know one -another... very sorry the prince is still ailing," and after a few -more commonplace remarks he rose. "If you'll allow me to leave my -Natasha in your hands for a quarter of an hour, Princess, I'll drive -round to see Anna Semenovna, it's quite near in the Dogs' Square, -and then I'll come back for her." - -The count had devised this diplomatic ruse (as he afterwards told -his daughter) to give the future sisters-in-law an opportunity to talk -to one another freely, but another motive was to avoid the danger of -encountering the old prince, of whom he was afraid. He did not mention -this to his daughter, but Natasha noticed her father's nervousness and -anxiety and felt mortified by it. She blushed for him, grew still -angrier at having blushed, and looked at the princess with a bold -and defiant expression which said that she was not afraid of -anybody. The princess told the count that she would be delighted, -and only begged him to stay longer at Anna Semenovna's, and he -departed. - -Despite the uneasy glances thrown at her by Princess Mary--who -wished to have a tete-a-tete with Natasha--Mademoiselle Bourienne -remained in the room and persistently talked about Moscow amusements -and theaters. Natasha felt offended by the hesitation she had -noticed in the anteroom, by her father's nervousness, and by the -unnatural manner of the princess who--she thought--was making a -favor of receiving her, and so everything displeased her. She did -not like Princess Mary, whom she thought very plain, affected, and -dry. Natasha suddenly shrank into herself and involuntarily assumed an -offhand air which alienated Princess Mary still more. After five -minutes of irksome, constrained conversation, they heard the sound -of slippered feet rapidly approaching. Princess Mary looked -frightened. - -The door opened and the old prince, in a dress, ing gown and a white -nightcap, came in. - -"Ah, madam!" he began. "Madam, Countess... Countess Rostova, if I am -not mistaken... I beg you to excuse me, to excuse me... I did not -know, madam. God is my witness, I did not know you had honored us with -a visit, and I came in such a costume only to see my daughter. I beg -you to excuse me... God is my witness, I didn't know-" he repeated, -stressing the word "God" so unnaturally and so unpleasantly that -Princess Mary stood with downcast eyes not daring to look either at -her father or at Natasha. - -Nor did the latter, having risen and curtsied, know what to do. -Mademoiselle Bourienne alone smiled agreeably. - -"I beg you to excuse me, excuse me! God is my witness, I did not -know," muttered the old man, and after looking Natasha over from -head to foot he went out. - -Mademoiselle Bourienne was the first to recover herself after this -apparition and began speaking about the prince's indisposition. -Natasha and Princess Mary looked at one another in silence, and the -longer they did so without saying what they wanted to say, the greater -grew their antipathy to one another. - -When the count returned, Natasha was impolitely pleased and hastened -to get away: at that moment she hated the stiff, elderly princess, who -could place her in such an embarrassing position and had spent half an -hour with her without once mentioning Prince Andrew. "I couldn't begin -talking about him in the presence of that Frenchwoman," thought -Natasha. The same thought was meanwhile tormenting Princess Mary. -She knew what she ought to have said to Natasha, but she had been -unable to say it because Mademoiselle Bourienne was in the way, and -because, without knowing why, she felt it very difficult to speak of -the marriage. When the count was already leaving the room, Princess -Mary went up hurriedly to Natasha, took her by the hand, and said with -a deep sigh: - -"Wait, I must..." - -Natasha glanced at her ironically without knowing why. - -"Dear Natalie," said Princess Mary, "I want you to know that I am -glad my brother has found happiness...." - -She paused, feeling that she was not telling the truth. Natasha -noticed this and guessed its reason. - -"I think, Princess, it is not convenient to speak of that now," -she said with external dignity and coldness, though she felt the tears -choking her. - -"What have I said and what have I done?" thought she, as soon as she -was out of the room. - -They waited a long time for Natasha to come to dinner that day. -She sat in her room crying like a child, blowing her nose and sobbing. -Sonya stood beside her, kissing her hair. - -"Natasha, what is it about?" she asked. "What do they matter to you? -It will all pass, Natasha." - -"But if you only knew how offensive it was... as if I..." - -"Don't talk about it, Natasha. It wasn't your fault so why should -you mind? Kiss me," said Sonya. - -Natasha raised her head and, kissing her friend on the lips, pressed -her wet face against her. - -"I can't tell you, I don't know. No one's to blame," said Natasha- -"It's my fault. But it all hurts terribly. Oh, why doesn't he -come?..." - -She came in to dinner with red eyes. Marya Dmitrievna, who knew -how the prince had received the Rostovs, pretended not to notice how -upset Natasha was and jested resolutely and loudly at table with the -count and the other guests. - - - - - -CHAPTER VIII - - -That evening the Rostovs went to the Opera, for which Marya -Dmitrievna had taken a box. - -Natasha did not want to go, but could not refuse Marya -Dmitrievna's kind offer which was intended expressly for her. When she -came ready dressed into the ballroom to await her father, and -looking in the large mirror there saw that she was pretty, very -pretty, she felt even more sad, but it was a sweet, tender sadness. - -"O God, if he were here now I would not behave as I did then, but -differently. I would not be silly and afraid of things, I would simply -embrace him, cling to him, and make him look at me with those -searching inquiring eyes with which he has so often looked at me, -and then I would make him laugh as he used to laugh. And his eyes--how -I see those eyes!" thought Natasha. "And what do his father and sister -matter to me? I love him alone, him, him, with that face and those -eyes, with his smile, manly and yet childlike.... No, I had better not -think of him; not think of him but forget him, quite forget him for -the present. I can't bear this waiting and I shall cry in a minute!" -and she turned away from the glass, making an effort not to cry. -"And how can Sonya love Nicholas so calmly and quietly and wait so -long and so patiently?" thought she, looking at Sonya, who also came -in quite ready, with a fan in her hand. "No, she's altogether -different. I can't!" - -Natasha at that moment felt so softened and tender that it was not -enough for her to love and know she was beloved, she wanted now, at -once, to embrace the man she loved, to speak and hear from him words -of love such as filled her heart. While she sat in the carriage beside -her father, pensively watching the lights of the street lamps -flickering on the frozen window, she felt still sadder and more in -love, and forgot where she was going and with whom. Having fallen into -the line of carriages, the Rostovs' carriage drove up to the -theater, its wheels squeaking over the snow. Natasha and Sonya, -holding up their dresses, jumped out quickly. The count got out helped -by the footmen, and, passing among men and women who were entering and -the program sellers, they all three went along the corridor to the -first row of boxes. Through the closed doors the music was already -audible. - -"Natasha, your hair!..." whispered Sonya. - -An attendant deferentially and quickly slipped before the ladies and -opened the door of their box. The music sounded louder and through the -door rows of brightly lit boxes in which ladies sat with bare arms and -shoulders, and noisy stalls brilliant with uniforms, glittered -before their eyes. A lady entering the next box shot a glance of -feminine envy at Natasha. The curtain had not yet risen and the -overture was being played. Natasha, smoothing her gown, went in with -Sonya and sat down, scanning the brilliant tiers of boxes opposite. -A sensation she had not experienced for a long time--that of -hundreds of eyes looking at her bare arms and neck--suddenly -affected her both agreeably and disagreeably and called up a whole -crowd of memories, desires and emotions associated with that feeling. - -The two remarkably pretty girls, Natasha and Sonya, with Count -Rostov who had not been seen in Moscow for a long time, attracted -general attention. Moreover, everybody knew vaguely of Natasha's -engagement to Prince Andrew, and knew that the Rostovs had lived in -the country ever since, and all looked with curiosity at a fiancee who -was making one of the best matches in Russia. - -Natasha's looks, as everyone told her, had improved in the -country, and that evening thanks to her agitation she was particularly -pretty. She struck those who saw her by her fullness of life and -beauty, combined with her indifference to everything about her. Her -black eyes looked at the crowd without seeking anyone, and her -delicate arm, bare to above the elbow, lay on the velvet edge of the -box, while, evidently unconsciously, she opened and closed her hand in -time to the music, crumpling her program. "Look, there's Alenina," -said Sonya, "with her mother, isn't it?" - -"Dear me, Michael Kirilovich has grown still stouter!" remarked -the count. - -"Look at our Anna Mikhaylovna--what a headdress she has on!" - -"The Karagins, Julie--and Boris with them. One can see at once -that they're engaged...." - -"Drubetskoy has proposed?" - -"Oh yes, I heard it today," said Shinshin, coming into the -Rostovs' box. - -Natasha looked in the direction in which her father's eyes were -turned and saw Julie sitting beside her mother with a happy look on -her face and a string of pearls round her thick red neck--which -Natasha knew was covered with powder. Behind them, wearing a smile and -leaning over with an ear to Julie's mouth, was Boris' handsome -smoothly brushed head. He looked the Rostovs from under his brows -and said something, smiling, to his betrothed. - -"They are talking about us, about me and him!" thought Natasha. "And -he no doubt is calming her jealousy of me. They needn't trouble -themselves! If only they knew how little I am concerned about any of -them." - -Behind them sat Anna Mikhaylovna wearing a green headdress and -with a happy look of resignation to the will of God on her face. Their -box was pervaded by that atmosphere of an affianced couple which -Natasha knew so well and liked so much. She turned away and suddenly -remembered all that had been so humiliating in her morning's visit. - -"What right has he not to wish to receive me into his family? Oh, -better not think of it--not till he comes back!" she told herself, and -began looking at the faces, some strange and some familiar, in the -stalls. In the front, in the very center, leaning back against the -orchestra rail, stood Dolokhov in a Persian dress, his curly hair -brushed up into a huge shock. He stood in full view of the audience, -well aware that he was attracting everyone's attention, yet as much at -ease as though he were in his own room. Around him thronged Moscow's -most brilliant young men, whom he evidently dominated. - -The count, laughing, nudged the blushing Sonya and pointed to her -former adorer. - -"Do you recognize him?" said he. "And where has he sprung from?" -he asked, turning to Shinshin. "Didn't he vanish somewhere?" - -"He did," replied Shinshin. "He was in the Caucasus and ran away -from there. They say he has been acting as minister to some ruling -prince in Persia, where he killed the Shah's brother. Now all the -Moscow ladies are mad about him! It's 'Dolokhov the Persian' that does -it! We never hear a word but Dolokhov is mentioned. They swear by him, -they offer him to you as they would a dish of choice sterlet. Dolokhov -and Anatole Kuragin have turned all our ladies' heads." - -A tall, beautiful woman with a mass of plaited hair and much exposed -plump white shoulders and neck, round which she wore a double string -of large pearls, entered the adjoining box rustling her heavy silk -dress and took a long time settling into her place. - -Natasha involuntarily gazed at that neck, those shoulders, and -pearls and coiffure, and admired the beauty of the shoulders and the -pearls. While Natasha was fixing her gaze on her for the second time -the lady looked round and, meeting the count's eyes, nodded to him and -smiled. She was the Countess Bezukhova, Pierre's wife, and the -count, who knew everyone in society, leaned over and spoke to her. - -"Have you been here long, Countess?" he inquired. "I'll call, I'll -call to kiss your hand. I'm here on business and have brought my girls -with me. They say Semenova acts marvelously. Count Pierre never used -to forget us. Is he here?" - -"Yes, he meant to look in," answered Helene, and glanced attentively -at Natasha. - -Count Rostov resumed his seat. - -"Handsome, isn't she?" he whispered to Natasha. - -"Wonderful!" answered Natasha. "She's a woman one could easily -fall in love with." - -Just then the last chords of the overture were heard and the -conductor tapped with his stick. Some latecomers took their seats in -the stalls, and the curtain rose. - -As soon as it rose everyone in the boxes and stalls became silent, -and all the men, old and young, in uniform and evening dress, and -all the women with gems on their bare flesh, turned their whole -attention with eager curiosity to the stage. Natasha too began to look -at it. - - - - - -CHAPTER IX - - -The floor of the stage consisted of smooth boards, at the sides -was some painted cardboard representing trees, and at the back was a -cloth stretched over boards. In the center of the stage sat some girls -in red bodices and white skirts. One very fat girl in a white silk -dress sat apart on a low bench, to the back of which a piece of -green cardboard was glued. They all sang something. When they had -finished their song the girl in white went up to the prompter's box -and a man with tight silk trousers over his stout legs, and holding -a plume and a dagger, went up to her and began singing, waving his -arms about. - -First the man in the tight trousers sang alone, then she sang, -then they both paused while the orchestra played and the man -fingered the hand of the girl in white, obviously awaiting the beat to -start singing with her. They sang together and everyone in the theater -began clapping and shouting, while the man and woman on the stage--who -represented lovers--began smiling, spreading out their arms, and -bowing. - -After her life in the country, and in her present serious mood, -all this seemed grotesque and amazing to Natasha. She could not follow -the opera nor even listen to the music; she saw only the painted -cardboard and the queerly dressed men and women who moved, spoke, -and sang so strangely in that brilliant light. She knew what it was -all meant to represent, but it was so pretentiously false and -unnatural that she first felt ashamed for the actors and then amused -at them. She looked at the faces of the audience, seeking in them -the same sense of ridicule and perplexity she herself experienced, but -they all seemed attentive to what was happening on the stage, and -expressed delight which to Natasha seemed feigned. "I suppose it has -to be like this!" she thought. She kept looking round in turn at the -rows of pomaded heads in the stalls and then at the seminude women -in the boxes, especially at Helene in the next box, who--apparently -quite unclothed--sat with a quiet tranquil smile, not taking her -eyes off the stage. And feeling the bright light that flooded the -whole place and the warm air heated by the crowd, Natasha little by -little began to pass into a state of intoxication she had not -experienced for a long while. She did not realize who and where she -was, nor what was going on before her. As she looked and thought, -the strangest fancies unexpectedly and disconnectedly passed through -her mind: the idea occurred to her of jumping onto the edge of the box -and singing the air the actress was singing, then she wished to -touch with her fan an old gentleman sitting not far from her, then -to lean over to Helene and tickle her. - -At a moment when all was quiet before the commencement of a song, -a door leading to the stalls on the side nearest the Rostovs' box -creaked, and the steps of a belated arrival were heard. "There's -Kuragin!" whispered Shinshin. Countess Bezukhova turned smiling to the -newcomer, and Natasha, following the direction of that look, saw an -exceptionally handsome adjutant approaching their box with a -self-assured yet courteous bearing. This was Anatole Kuragin whom -she had seen and noticed long ago at the ball in Petersburg. He was -now in an adjutant's uniform with one epaulet and a shoulder knot. -He moved with a restrained swagger which would have been ridiculous -had he not been so good-looking and had his handsome face not worn -such an expression of good-humored complacency and gaiety. Though -the performance was proceeding, he walked deliberately down the -carpeted gangway, his sword and spurs slightly jingling and his -handsome perfumed head held high. Having looked at Natasha he -approached his sister, laid his well gloved hand on the edge of her -box, nodded to her, and leaning forward asked a question, with a -motion toward Natasha. - -"Mais charmante!" said he, evidently referring to Natasha, who did -not exactly hear his words but understood them from the movement of -his lips. Then he took his place in the first row of the stalls and -sat down beside Dolokhov, nudging with his elbow in a friendly and -offhand way that Dolokhov whom others treated so fawningly. He -winked at him gaily, smiled, and rested his foot against the orchestra -screen. - -"How like the brother is to the sister," remarked the count. "And -how handsome they both are!" - -Shinshin, lowering his voice, began to tell the count of some -intrigue of Kuragin's in Moscow, and Natasha tried to overhear it just -because he had said she was "charmante." - -The first act was over. In the stalls everyone began moving about, -going out and coming in. - -Boris came to the Rostovs' box, received their congratulations -very simply, and raising his eyebrows with an absent-minded smile -conveyed to Natasha and Sonya his fiancee's invitation to her wedding, -and went away. Natasha with a gay, coquettish smile talked to him, and -congratulated on his approaching wedding that same Boris with whom she -had formerly been in love. In the state of intoxication she was in, -everything seemed simple and natural. - -The scantily clad Helene smiled at everyone in the same way, and -Natasha gave Boris a similar smile. - -Helene's box was filled and surrounded from the stalls by the most -distinguished and intellectual men, who seemed to vie with one another -in their wish to let everyone see that they knew her. - -During the whole of that entr'acte Kuragin stood with Dolokhov in -front of the orchestra partition, looking at the Rostovs' box. Natasha -knew he was talking about her and this afforded her pleasure. She even -turned so that he should see her profile in what she thought was its -most becoming aspect. Before the beginning of the second act Pierre -appeared in the stalls. The Rostovs had not seen him since their -arrival. His face looked sad, and he had grown still stouter since -Natasha last saw him. He passed up to the front rows, not noticing -anyone. Anatole went up to him and began speaking to him, looking at -and indicating the Rostovs' box. On seeing Natasha Pierre grew -animated and, hastily passing between the rows, came toward their box. -When he got there he leaned on his elbows and, smiling, talked to -her for a long time. While conversing with Pierre, Natasha heard a -man's voice in Countess Bezukhova's box and something told her it -was Kuragin. She turned and their eyes met. Almost smiling, he gazed -straight into her eyes with such an enraptured caressing look that -it seemed strange to be so near him, to look at him like that, to be -so sure he admired her, and not to be acquainted with him. - -In the second act there was scenery representing tombstones, there -was a round hole in the canvas to represent the moon, shades were -raised over the footlights, and from horns and contrabass came deep -notes while many people appeared from right and left wearing black -cloaks and holding things like daggers in their hands. They began -waving their arms. Then some other people ran in and began dragging -away the maiden who had been in white and was now in light blue. -They did not drag her away at once, but sang with her for a long -time and then at last dragged her off, and behind the scenes something -metallic was struck three times and everyone knelt down and sang a -prayer. All these things were repeatedly interrupted by the -enthusiastic shouts of the audience. - -During this act every time Natasha looked toward the stalls she -saw Anatole Kuragin with an arm thrown across the back of his chair, -staring at her. She was pleased to see that he was captivated by her -and it did not occur to her that there was anything wrong in it. - -When the second act was over Countess Bezukhova rose, turned to -the Rostovs' box--her whole bosom completely exposed--beckoned the old -count with a gloved finger, and paying no attention to those who had -entered her box began talking to him with an amiable smile. - -"Do make me acquainted with your charming daughters," said she. "The -whole town is singing their praises and I don't even know then!" - -Natasha rose and curtsied to the splendid countess. She was so -pleased by praise from this brilliant beauty that she blushed with -pleasure. - -"I want to become a Moscovite too, now," said Helene. "How is it -you're not ashamed to bury such pearls in the country?" - -Countess Bezukhova quite deserved her reputation of being a -fascinating woman. She could say what she did not think--especially -what was flattering--quite simply and naturally. - -"Dear count, you must let me look after your daughters! Though I -am not staying here long this time--nor are you--I will try to amuse -them. I have already heard much of you in Petersburg and wanted to get -to know you," said she to Natasha with her stereotyped and lovely -smile. "I had heard about you from my page, Drubetskoy. Have you heard -he is getting married? And also from my husband's friend Bolkonski, -Prince Andrew Bolkonski," she went on with special emphasis, -implying that she knew of his relation to Natasha. To get better -acquainted she asked that one of the young ladies should come into her -box for the rest of the performance, and Natasha moved over to it. - -The scene of the third act represented a palace in which many -candles were burning and pictures of knights with short beards hung on -the walls. In the middle stood what were probably a king and a -queen. The king waved his right arm and, evidently nervous, sang -something badly and sat down on a crimson throne. The maiden who had -been first in white and then in light blue, now wore only a smock, and -stood beside the throne with her hair down. She sang something -mournfully, addressing the queen, but the king waved his arm severely, -and men and women with bare legs came in from both sides and began -dancing all together. Then the violins played very shrilly and merrily -and one of the women with thick bare legs and thin arms, separating -from the others, went behind the wings, adjusted her bodice, -returned to the middle of the stage, and began jumping and striking -one foot rapidly against the other. In the stalls everyone clapped and -shouted "bravo!" Then one of the men went into a corner of the -stage. The cymbals and horns in the orchestra struck up more loudly, -and this man with bare legs jumped very high and waved his feet -about very rapidly. (He was Duport, who received sixty thousand rubles -a year for this art.) Everybody in the stalls, boxes, and galleries -began clapping and shouting with all their might, and the man -stopped and began smiling and bowing to all sides. Then other men -and women danced with bare legs. Then the king again shouted to the -sound of music, and they all began singing. But suddenly a storm -came on, chromatic scales and diminished sevenths were heard in the -orchestra, everyone ran off, again dragging one of their number -away, and the curtain dropped. Once more there was a terrible noise -and clatter among the audience, and with rapturous faces everyone -began shouting: "Duport! Duport! Duport!" Natasha no longer thought -this strange. She look about with pleasure, smiling joyfully. - -"Isn't Duport delightful?" Helene asked her. - -"Oh, yes," replied Natasha. - - - - - -CHAPTER X - - -During the entr'acte a whiff of cold air came into Helene's box, the -door opened, and Anatole entered, stooping and trying not to brush -against anyone. - -"Let me introduce my brother to you," said Helene, her eyes shifting -uneasily from Natasha to Anatole. - -Natasha turned her pretty little head toward the elegant young -officer and smiled at him over her bare shoulder. Anatole, who was -as handsome at close quarters as at a distance, sat down beside her -and told her he had long wished to have this happiness--ever since the -Naryshkins' ball in fact, at which he had had the well-remembered -pleasure of seeing her. Kuragin was much more sensible and simple with -women than among men. He talked boldly and naturally, and Natasha -was strangely and agreeably struck by the fact that there was -nothing formidable in this man about whom there was so much talk, -but that on the contrary his smile was most naive, cheerful, and -good-natured. - -Kuragin asked her opinion of the performance and told her how at a -previous performance Semenova had fallen down on the stage. - -"And do you know, Countess," he said, suddenly addressing her as -an old, familiar acquaintance, "we are getting up a costume -tournament; you ought to take part in it! It will be great fun. We -shall all meet at the Karagins'! Please come! No! Really, eh?" said -he. - -While saying this he never removed his smiling eyes from her face, -her neck, and her bare arms. Natasha knew for certain that he was -enraptured by her. This pleased her, yet his presence made her feel -constrained and oppressed. When she was not looking at him she felt -that he was looking at her shoulders, and she involuntarily caught his -eye so that he should look into hers rather than this. But looking -into his eyes she was frightened, realizing that there was not that -barrier of modesty she had always felt between herself and other -men. She did not know how it was that within five minutes she had come -to feel herself terribly near to this man. When she turned away she -feared he might seize her from behind by her bare arm and kiss her -on the neck. They spoke of most ordinary things, yet she felt that -they were closer to one another than she had ever been to any man. -Natasha kept turning to Helene and to her father, as if asking what it -all meant, but Helene was engaged in conversation with a general and -did not answer her look, and her father's eyes said nothing but what -they always said: "Having a good time? Well, I'm glad of it!" - -During one of these moments of awkward silence when Anatole's -prominent eyes were gazing calmly and fixedly at her, Natasha, to -break the silence, asked him how he liked Moscow. She asked the -question and blushed. She felt all the time that by talking to him she -was doing something improper. Anatole smiled as though to encourage -her. - -"At first I did not like it much, because what makes a town pleasant -ce sont les jolies femmes,* isn't that so? But now I like it very much -indeed," he said, looking at her significantly. "You'll come to the -costume tournament, Countess? Do come!" and putting out his hand to -her bouquet and dropping his voice, he added, "You will be the -prettiest there. Do come, dear countess, and give me this flower as -a pledge!" - - -*Are the pretty women. - - -Natasha did not understand what he was saying any more than he did -himself, but she felt that his incomprehensible words had an -improper intention. She did not know what to say and turned away as if -she had not heard his remark. But as soon as she had turned away she -felt that he was there, behind, so close behind her. - -"How is he now? Confused? Angry? Ought I to put it right?" she asked -herself, and she could not refrain from turning round. She looked -straight into his eyes, and his nearness, self-assurance, and the -good-natured tenderness of his smile vanquished her. She smiled just -as he was doing, gazing straight into his eyes. And again she felt -with horror that no barrier lay between him and her. - -The curtain rose again. Anatole left the box, serene and gay. -Natasha went back to her father in the other box, now quite submissive -to the world she found herself in. All that was going on before her -now seemed quite natural, but on the other hand all her previous -thoughts of her betrothed, of Princess Mary, or of life in the country -did not once recur to her mind and were as if belonging to a remote -past. - -In the fourth act there was some sort of devil who sang waving his -arm about, till the boards were withdrawn from under him and he -disappeared down below. That was the only part of the fourth act -that Natasha saw. She felt agitated and tormented, and the cause of -this was Kuragin whom she could not help watching. As they were -leaving the theater Anatole came up to them, called their carriage, -and helped them in. As he was putting Natasha in he pressed her arm -above the elbow. Agitated and flushed she turned round. He was looking -at her with glittering eyes, smiling tenderly. - - -Only after she had reached home was Natasha able clearly to think -over what had happened to her, and suddenly remembering Prince -Andrew she was horrified, and at tea to which all had sat down after -the opera, she gave a loud exclamation, flushed, and ran out of the -room. - -"O God! I am lost!" she said to herself. "How could I let him?" -She sat for a long time hiding her flushed face in her hands trying to -realize what had happened to her, but was unable either to -understand what had happened or what she felt. Everything seemed dark, -obscure, and terrible. There in that enormous, illuminated theater -where the bare-legged Duport, in a tinsel-decorated jacket, jumped -about to the music on wet boards, and young girls and old men, and the -nearly naked Helene with her proud, calm smile, rapturously cried -"bravo!"--there in the presence of that Helene it had all seemed clear -and simple; but now, alone by herself, it was incomprehensible. -"What is it? What was that terror I felt of him? What is this -gnawing of conscience I am feeling now?" she thought. - -Only to the old countess at night in bed could Natasha have told all -she was feeling. She knew that Sonya with her severe and simple -views would either not understand it at all or would be horrified at -such a confession. So Natasha tried to solve what was torturing her by -herself. - -"Am I spoiled for Andrew's love or not?" she asked herself, and with -soothing irony replied: "What a fool I am to ask that! What did happen -to me? Nothing! I have done nothing, I didn't lead him on at all. -Nobody will know and I shall never see him again," she told herself. -"So it is plain that nothing has happened and there is nothing to -repent of, and Andrew can love me still. But why 'still?' O God, why -isn't he here?" Natasha quieted herself for a moment, but again some -instinct told her that though all this was true, and though nothing -had happened, yet the former purity of her love for Prince Andrew -had perished. And again in imagination she went over her whole -conversation with Kuragin, and again saw the face, gestures, and -tender smile of that bold handsome man when he pressed her arm. - - - - - -CHAPTER XI - -Anatole Kuragin was staying in Moscow because his father had sent -him away from Petersburg, where he had been spending twenty thousand -rubles a year in cash, besides running up debts for as much more, -which his creditors demanded from his father. - -His father announced to him that he would now pay half his debts for -the last time, but only on condition that he went to Moscow as -adjutant to the commander in chief--a post his father had procured for -him--and would at last try to make a good match there. He indicated to -him Princess Mary and Julie Karagina. - -Anatole consented and went to Moscow, where he put up at Pierre's -house. Pierre received him unwillingly at first, but got used to him -after a while, sometimes even accompanied him on his carousals, and -gave him money under the guise of loans. - -As Shinshin had remarked, from the time of his arrival Anatole had -turned the heads of the Moscow ladies, especially by the fact that -he slighted them and plainly preferred the gypsy girls and French -actresses--with the chief of whom, Mademoiselle George, he was said to -be on intimate relations. He had never missed a carousal at -Danilov's or other Moscow revelers', drank whole nights through, -outvying everyone else, and was at all the balls and parties of the -best society. There was talk of his intrigues with some of the ladies, -and he flirted with a few of them at the balls. But he did not run -after the unmarried girls, especially the rich heiresses who were most -of them plain. There was a special reason for this, as he had got -married two years before--a fact known only to his most intimate -friends. At that time while with his regiment in Poland, a Polish -landowner of small means had forced him to marry his daughter. Anatole -had very soon abandoned his wife and, for a payment which he agreed to -send to his father-in-law, had arranged to be free to pass himself off -as a bachelor. - -Anatole was always content with his position, with himself, and with -others. He was instinctively and thoroughly convinced that was -impossible for him to live otherwise than as he did and that he had -never in his life done anything base. He was incapable of -considering how his actions might affect others or what the -consequences of this or that action of his might be. He was -convinced that, as a duck is so made that it must live in water, so -God had made him such that he must spend thirty thousand rubles a year -and always occupy a prominent position in society. He believed this so -firmly that others, looking at him, were persuaded of it too and did -not refuse him either a leading place in society or money, which he -borrowed from anyone and everyone and evidently would not repay. - -He was not a gambler, at any rate he did not care about winning. -He was not vain. He did not mind what people thought of him. Still -less could he be accused of ambition. More than once he had vexed -his father by spoiling his own career, and he laughed at -distinctions of all kinds. He was not mean, and did not refuse -anyone who asked of him. All he cared about was gaiety and women, -and as according to his ideas there was nothing dishonorable in -these tastes, and he was incapable of considering what the -gratification of his tastes entailed for others, he honestly -considered himself irreproachable, sincerely despised rogues and bad -people, and with a tranquil conscience carried his head high. - -Rakes, those male Magdalenes, have a secret feeling of innocence -similar to that which female Magdalenes have, based on the same hope -of forgiveness. "All will be forgiven her, for she loved much; and all -will be forgiven him, for he enjoyed much." - -Dolokhov, who had reappeared that year in Moscow after his exile and -his Persian adventures, and was leading a life of luxury, gambling, -and dissipation, associated with his old Petersburg comrade Kuragin -and made use of him for his own ends. - -Anatole was sincerely fond of Dolokhov for his cleverness and -audacity. Dolokhov, who needed Anatole Kuragin's name, position, and -connections as a bait to draw rich young men into his gambling set, -made use of him and amused himself at his expense without letting -the other feel it. Apart from the advantage he derived from Anatole, -the very process of dominating another's will was in itself a -pleasure, a habit, and a necessity to Dolokhov. - -Natasha had made a strong impression on Kuragin. At supper after the -opera he described to Dolokhov with the air of a connoisseur the -attractions of her arms, shoulders, feet, and hair and expressed his -intention of making love to her. Anatole had no notion and was -incapable of considering what might come of such love-making, as he -never had any notion of the outcome of any of his actions. - -"She's first-rate, my dear fellow, but not for us," replied -Dolokhov. - -"I will tell my sister to ask her to dinner," said Anatole. "Eh?" - -"You'd better wait till she's married...." - -"You know, I adore little girls, they lose their heads at once," -pursued Anatole. - -"You have been caught once already by a 'little girl,'" said -Dolokhov who knew of Kuragin's marriage. "Take care!" - -"Well, that can't happen twice! Eh?" said Anatole, with a -good-humored laugh. - - - - - -CHAPTER XII - - -The day after the opera the Rostovs went nowhere and nobody came -to see them. Marya Dmitrievna talked to the count about something -which they concealed from Natasha. Natasha guessed they were talking -about the old prince and planning something, and this disquieted and -offended her. She was expecting Prince Andrew any moment and twice -that day sent a manservant to the Vozdvizhenka to ascertain whether he -had come. He had not arrived. She suffered more now than during her -first days in Moscow. To her impatience and pining for him were now -added the unpleasant recollection of her interview with Princess -Mary and the old prince, and a fear and anxiety of which she did not -understand the cause. She continually fancied that either he would -never come or that something would happen to her before he came. She -could no longer think of him by herself calmly and continuously as she -had done before. As soon as she began to think of him, the -recollection of the old prince, of Princess Mary, of the theater, -and of Kuragin mingled with her thoughts. The question again presented -itself whether she was not guilty, whether she had not already -broken faith with Prince Andrew, and again she found herself recalling -to the minutest detail every word, every gesture, and every shade in -the play of expression on the face of the man who had been able to -arouse in her such an incomprehensible and terrifying feeling. To -the family Natasha seemed livelier than usual, but she was far less -tranquil and happy than before. - -On Sunday morning Marya Dmitrievna invited her visitors to Mass at -her parish church--the Church of the Assumption built over the -graves of victims of the plague. - -"I don't like those fashionable churches," she said, evidently -priding herself on her independence of thought. "God is the same every -where. We have an excellent priest, he conducts the service decently -and with dignity, and the deacon is the same. What holiness is there -in giving concerts in the choir? I don't like it, it's just -self-indulgence!" - -Marya Dmitrievna liked Sundays and knew how to keep them. Her -whole house was scrubbed and cleaned on Saturdays; neither she nor the -servants worked, and they all wore holiday dress and went to church. -At her table there were extra dishes at dinner, and the servants had -vodka and roast goose or suckling pig. But in nothing in the house was -the holiday so noticeable as in Marya Dmitrievna's broad, stern -face, which on that day wore an invariable look of solemn festivity. - -After Mass, when they had finished their coffee in the dining room -where the loose covers had been removed from the furniture, a -servant announced that the carriage was ready, and Marya Dmitrievna -rose with a stern air. She wore her holiday shawl, in which she paid -calls, and announced that she was going to see Prince Nicholas -Bolkonski to have an explanation with him about Natasha. - -After she had gone, a dressmaker from Madame Suppert-Roguet waited -on the Rostovs, and Natasha, very glad of this diversion, having -shut herself into a room adjoining the drawing room, occupied -herself trying on the new dresses. Just as she had put on a bodice -without sleeves and only tacked together, and was turning her head -to see in the glass how the back fitted, she heard in the drawing room -the animated sounds of her father's voice and another's--a woman's- -that made her flush. It was Helene. Natasha had not time to take off -the bodice before the door opened and Countess Bezukhova, dressed in a -purple velvet gown with a high collar, came into the room beaming with -good-humored amiable smiles. - -"Oh, my enchantress!" she cried to the blushing Natasha. -"Charming! No, this is really beyond anything, my dear count," said -she to Count Rostov who had followed her in. "How can you live in -Moscow and go nowhere? No, I won't let you off! Mademoiselle George -will recite at my house tonight and there'll be some people, and if -you don't bring your lovely girls--who are prettier than -Mademoiselle George--I won't know you! My husband is away in Tver or I -would send him to fetch you. You must come. You positively must! -Between eight and nine." - -She nodded to the dressmaker, whom she knew and who had curtsied -respectfully to her, and seated herself in an armchair beside the -looking glass, draping the folds of her velvet dress picturesquely. -She did not cease chattering good-naturedly and gaily, continually -praising Natasha's beauty. She looked at Natasha's dresses and praised -them, as well as a new dress of her own made of "metallic gauze," -which she had received from Paris, and advised Natasha to have one -like it. - -"But anything suits you, my charmer!" she remarked. - -A smile of pleasure never left Natasha's face. She felt happy and as -if she were blossoming under the praise of this dear Countess -Bezukhova who had formerly seemed to her so unapproachable and -important and was now so kind to her. Natasha brightened up and felt -almost in love with this woman, who was so beautiful and so kind. -Helene for her part was sincerely delighted with Natasha and wished to -give her a good time. Anatole had asked her to bring him and Natasha -together, and she was calling on the Rostovs for that purpose. The -idea of throwing her brother and Natasha together amused her. - -Though at one time, in Petersburg, she had been annoyed with Natasha -for drawing Boris away, she did not think of that now, and in her -own way heartily wished Natasha well. As she was leaving the Rostovs -she called her protegee aside. - -"My brother dined with me yesterday--we nearly died of laughter- -he ate nothing and kept sighing for you, my charmer! He is madly, -quite madly, in love with you, my dear." - -Natasha blushed scarlet when she heard this. - -"How she blushes, how she blushes, my pretty!" said Helene. "You -must certainly come. If you love somebody, my charmer, that is not a -reason to shut yourself up. Even if you are engaged, I am sure your -fiance would wish you to go into society rather than be bored to -death." - -"So she knows I am engaged, and she and her husband Pierre--that -good Pierre--have talked and laughed about this. So it's all right." -And again, under Helene's influence, what had seemed terrible now -seemed simple and natural. "And she is such a grande dame, so kind, -and evidently likes me so much. And why not enjoy myself?" thought -Natasha, gazing at Helene with wide-open, wondering eyes. - -Marya Dmitrievna came back to dinner taciturn and serious, having -evidently suffered a defeat at the old prince's. She was still too -agitated by the encounter to be able to talk of the affair calmly. -In answer to the count's inquiries she replied that things were all -right and that she would tell about it next day. On hearing of -Countess Bezukhova's visit and the invitation for that evening, -Marya Dmitrievna remarked: - -"I don't care to have anything to do with Bezukhova and don't advise -you to; however, if you've promised--go. It will divert your -thoughts," she added, addressing Natasha. - - - - - -CHAPTER XIII - - -Count Rostov took the girls to Countess Bezukhova's. There were a -good many people there, but nearly all strangers to Natasha. Count -Rostov was displeased to see that the company consisted almost -entirely of men and women known for the freedom of their conduct. -Mademoiselle George was standing in a corner of the drawing room -surrounded by young men. There were several Frenchmen present, among -them Metivier who from the time Helene reached Moscow had been an -intimate in her house. The count decided not to sit down to cards or -let his girls out of his sight and to get away as soon as Mademoiselle -George's performance was over. - -Anatole was at the door, evidently on the lookout for the Rostovs. -Immediately after greeting the count he went up to Natasha and -followed her. As soon as she saw him she was seized by the same -feeling she had had at the opera--gratified vanity at his admiration -of her and fear at the absence of a moral barrier between them. - -Helene welcomed Natasha delightedly and was loud in admiration of -her beauty and her dress. Soon after their arrival Mademoiselle George -went out of the room to change her costume. In the drawing room people -began arranging the chairs and taking their seats. Anatole moved a -chair for Natasha and was about to sit down beside her, but the count, -who never lost sight of her, took the seat himself. Anatole sat down -behind her. - -Mademoiselle George, with her bare, fat, dimpled arms, and a red -shawl draped over one shoulder, came into the space left vacant for -her, and assumed an unnatural pose. Enthusiastic whispering was -audible. - -Mademoiselle George looked sternly and gloomily at the audience -and began reciting some French verses describing her guilty love for -her son. In some places she raised her voice, in others she whispered, -lifting her head triumphantly; sometimes she paused and uttered hoarse -sounds, rolling her eyes. - -"Adorable! divine! delicious!" was heard from every side. - -Natasha looked at the fat actress, but neither saw nor heard nor -understood anything of what went on before her. She only felt -herself again completely borne away into this strange senseless world- -so remote from her old world--a world in which it was impossible to -know what was good or bad, reasonable or senseless. Behind her sat -Anatole, and conscious of his proximity she experienced a frightened -sense of expectancy. - -After the first monologue the whole company rose and surrounded -Mademoiselle George, expressing their enthusiasm. - -"How beautiful she is!" Natasha remarked to her father who had -also risen and was moving through the crowd toward the actress. - -"I don't think so when I look at you!" said Anatole, following -Natasha. He said this at a moment when she alone could hear him. -"You are enchanting... from the moment I saw you I have never -ceased..." - -"Come, come, Natasha!" said the count, as he turned back for his -daughter. "How beautiful she is!" Natasha without saying anything -stepped up to her father and looked at him with surprised inquiring -eyes. - -After giving several recitations, Mademoiselle George left, and -Countess Bezukhova asked her visitors into the ballroom. - -The count wished to go home, but Helene entreated him not to spoil -her improvised ball, and the Rostovs stayed on. Anatole asked -Natasha for a valse and as they danced he pressed her waist and hand -and told her she was bewitching and that he loved her. During the -ecossaise, which she also danced with him, Anatole said nothing when -they happened to be by themselves, but merely gazed at her. Natasha -lifted her frightened eyes to him, but there was such confident -tenderness in his affectionate look and smile that she could not, -whilst looking at him, say what she had to say. She lowered her eyes. - -"Don't say such things to me. I am betrothed and love another," -she said rapidly.... She glanced at him. - -Anatole was not upset or pained by what she had said. - -"Don't speak to me of that! What can I do?" said he. "I tell you I -am madly, madly, in love with you! Is it my fault that you are -enchanting?... It's our turn to begin." - -Natasha, animated and excited, looked about her with wide-open -frightened eyes and seemed merrier than usual. She understood hardly -anything that went on that evening. They danced the ecossaise and -the Grossvater. Her father asked her to come home, but she begged to -remain. Wherever she went and whomever she was speaking to, she felt -his eyes upon her. Later on she recalled how she had asked her -father to let her go to the dressing room to rearrange her dress, that -Helene had followed her and spoken laughingly of her brother's love, -and that she again met Anatole in the little sitting room. Helene -had disappeared leaving them alone, and Anatole had taken her hand and -said in a tender voice: - -"I cannot come to visit you but is it possible that I shall never -see you? I love you madly. Can I never...?" and, blocking her path, he -brought his face close to hers. - -His large, glittering, masculine eyes were so close to hers that she -saw nothing but them. - -"Natalie?" he whispered inquiringly while she felt her hands being -painfully pressed. "Natalie?" - -"I don't understand. I have nothing to say," her eyes replied. - -Burning lips were pressed to hers, and at the same instant she -felt herself released, and Helene's footsteps and the rustle of her -dress were heard in the room. Natasha looked round at her, and then, -red and trembling, threw a frightened look of inquiry at Anatole and -moved toward the door. - -"One word, just one, for God's sake!" cried Anatole. - -She paused. She so wanted a word from him that would explain to -her what had happened and to which she could find no answer. - -"Natalie, just a word, only one!" he kept repeating, evidently not -knowing what to say and he repeated it till Helene came up to them. - -Helene returned with Natasha to the drawing room. The Rostovs went -away without staying for supper. - -After reaching home Natasha did not sleep all night. She was -tormented by the insoluble question whether she loved Anatole or -Prince Andrew. She loved Prince Andrew--she remembered distinctly -how deeply she loved him. But she also loved Anatole, of that there -was no doubt. "Else how could all this have happened?" thought she. -"If, after that, I could return his smile when saying good-by, if I -was able to let it come to that, it means that I loved him from the -first. It means that he is kind, noble, and splendid, and I could -not help loving him. What am I to do if I love him and the other one -too?" she asked herself, unable to find an answer to these terrible -questions. - - - - - -CHAPTER XIV - - -Morning came with its cares and bustle. Everyone got up and began to -move about and talk, dressmakers came again. Marya Dmitrievna -appeared, and they were called to breakfast. Natasha kept looking -uneasily at everybody with wide-open eyes, as if wishing to -intercept every glance directed toward her, and tried to appear the -same as usual. - -After breakfast, which was her best time, Marya Dmitrievna sat -down in her armchair and called Natasha and the count to her. - -"Well, friends, I have now thought the whole matter over and this is -my advice," she began. "Yesterday, as you know, I went to see Prince -Bolkonski. Well, I had a talk with him.... He took it into his head to -begin shouting, but I am not one to be shouted down. I said what I had -to say!" - -"Well, and he?" asked the count. - -"He? He's crazy... he did not want to listen. But what's the use -of talking? As it is we have worn the poor girl out," said Marya -Dmitrievna. "My advice to you is finish your business and go back home -to Otradnoe... and wait there." - -"Oh, no!" exclaimed Natasha. - -"Yes, go back," said Marya Dmitrievna, "and wait there. If your -betrothed comes here now--there will be no avoiding a quarrel; but -alone with the old man he will talk things over and then come on to -you." - -Count Rostov approved of this suggestion, appreciating its -reasonableness. If the old man came round it would be all the better -to visit him in Moscow or at Bald Hills later on; and if not, the -wedding, against his wishes, could only be arranged at Otradnoe. - -"That is perfectly true. And I am sorry I went to see him and took -her," said the old count. - -"No, why be sorry? Being here, you had to pay your respects. But -if he won't--that's his affair," said Marya Dmitrievna, looking for -something in her reticule. "Besides, the trousseau is ready, so -there is nothing to wait for; and what is not ready I'll send after -you. Though I don't like letting you go, it is the best way. So go, -with God's blessing!" - -Having found what she was looking for in the reticule she handed -it to Natasha. It was a letter from Princess Mary. - -"She has written to you. How she torments herself, poor thing! She's -afraid you might think that she does not like you." - -"But she doesn't like me," said Natasha. - -"Don't talk nonsense!" cried Marya Dmitrievna. - -"I shan't believe anyone, I know she doesn't like me," replied -Natasha boldly as she took the letter, and her face expressed a cold -and angry resolution that caused Marya Dmitrievna to look at her -more intently and to frown. - -"Don't answer like that, my good girl!" she said. "What I say is -true! Write an answer!" Natasha did not reply and went to her own room -to read Princess Mary's letter. - -Princess Mary wrote that she was in despair at the -misunderstanding that had occurred between them. Whatever her father's -feelings might be, she begged Natasha to believe that she could not -help loving her as the one chosen by her brother, for whose -happiness she was ready to sacrifice everything. - -"Do not think, however," she wrote, "that my father is -ill-disposed toward you. He is an invalid and an old man who must be -forgiven; but he is good and magnanimous and will love her who makes -his son happy." Princess Mary went on to ask Natasha to fix a time -when she could see her again. - -After reading the letter Natasha sat down at the writing table to -answer it. "Dear Princess," she wrote in French quickly and -mechanically, and then paused. What more could she write after all -that had happened the evening before? "Yes, yes! All that has -happened, and now all is changed," she thought as she sat with the -letter she had begun before her. "Must I break off with him? Must I -really? That's awful..." and to escape from these dreadful thoughts -she went to Sonya and began sorting patterns with her. - -After dinner Natasha went to her room and again took up Princess -Mary's letter. "Can it be that it is all over?" she thought. "Can it -be that all this has happened so quickly and has destroyed all that -went before?" She recalled her love for Prince Andrew in all its -former strength, and at the same time felt that she loved Kuragin. She -vividly pictured herself as Prince Andrew's wife, and the scenes of -happiness with him she had so often repeated in her imagination, and -at the same time, aglow with excitement, recalled every detail of -yesterday's interview with Anatole. - -"Why could that not be as well?" she sometimes asked herself in -complete bewilderment. "Only so could I be completely happy; but now I -have to choose, and I can't be happy without either of them. Only," -she thought, "to tell Prince Andrew what has happened or to hide it -from him are both equally impossible. But with that one nothing is -spoiled. But am I really to abandon forever the joy of Prince Andrew's -love, in which I have lived so long?" - -"Please, Miss!" whispered a maid entering the room with a mysterious -air. "A man told me to give you this-" and she handed Natasha a -letter. - -"Only, for Christ's sake..." the girl went on, as Natasha, without -thinking, mechanically broke the seal and read a love letter from -Anatole, of which, without taking in a word, she understood only -that it was a letter from him--from the man she loved. Yes, she -loved him, or else how could that have happened which had happened? -And how could she have a love letter from him in her hand? - -With trembling hands Natasha held that passionate love letter -which Dolokhov had composed for Anatole, and as she read it she -found in it an echo of all that she herself imagined she was feeling. - -"Since yesterday evening my fate has been sealed; to be loved by you -or to die. There is no other way for me," the letter began. Then he -went on to say that he knew her parents would not give her to him--for -this there were secret reasons he could reveal only to her--but that -if she loved him she need only say the word yes, and no human power -could hinder their bliss. Love would conquer all. He would steal her -away and carry her off to the ends of the earth. - -"Yes, yes! I love him!" thought Natasha, reading the letter for -the twentieth time and finding some peculiarly deep meaning in each -word of it. - -That evening Marya Dmitrievna was going to the Akharovs' and -proposed to take the girls with her. Natasha, pleading a headache, -remained at home. - - - - - -CHAPTER XV - - -On returning late in the evening Sonya went to Natasha's room, and -to her surprise found her still dressed and asleep on the sofa. Open -on the table, beside her lay Anatole's letter. Sonya picked it up -and read it. - -As she read she glanced at the sleeping Natasha, trying to find in -her face an explanation of what she was reading, but did not find -it. Her face was calm, gentle, and happy. Clutching her breast to keep -herself from choking, Sonya, pale and trembling with fear and -agitation, sat down in an armchair and burst into tears. - -"How was it I noticed nothing? How could it go so far? Can she -have left off loving Prince Andrew? And how could she let Kuragin go -to such lengths? He is a deceiver and a villain, that's plain! What -will Nicholas, dear noble Nicholas, do when he hears of it? So this is -the meaning of her excited, resolute, unnatural look the day before -yesterday, yesterday, and today," thought Sonya. "But it can't be that -she loves him! She probably opened the letter without knowing who it -was from. Probably she is offended by it. She could not do such a -thing!" - -Sonya wiped away her tears and went up to Natasha, again scanning -her face. - -"Natasha!" she said, just audibly. - -Natasha awoke and saw Sonya. - -"Ah, you're back?" - -And with the decision and tenderness that often come at the moment -of awakening, she embraced her friend, but noticing Sonya's look of -embarrassment, her own face expressed confusion and suspicion. - -"Sonya, you've read that letter?" she demanded. - -"Yes," answered Sonya softly. - -Natasha smiled rapturously. - -"No, Sonya, I can't any longer!" she said. "I can't hide it from you -any longer. You know, we love one another! Sonya, darling, he -writes... Sonya..." - -Sonya stared open-eyed at Natasha, unable to believe her ears. - -"And Bolkonski?" she asked. - -"Ah, Sonya, if you only knew how happy I am!" cried Natasha. "You -don't know what love is...." - -"But, Natasha, can that be all over?" - -Natasha looked at Sonya with wide-open eyes as if she could not -grasp the question. - -"Well, then, are you refusing Prince Andrew?" said Sonya. - -"Oh, you don't understand anything! Don't talk nonsense, just -listen!" said Natasha, with momentary vexation. - -"But I can't believe it," insisted Sonya. "I don't understand. How -is it you have loved a man for a whole year and suddenly... Why, you -have only seen him three times! Natasha, I don't believe you, you're -joking! In three days to forget everything and so..." - -"Three days?" said Natasha. "It seems to me I've loved him a hundred -years. It seems to me that I have never loved anyone before. You can't -understand it.... Sonya, wait a bit, sit here," and Natasha embraced -and kissed her. - -"I had heard that it happens like this, and you must have heard it -too, but it's only now that I feel such love. It's not the same as -before. As soon as I saw him I felt he was my master and I his -slave, and that I could not help loving him. Yes, his slave! -Whatever he orders I shall do. You don't understand that. What can I -do? What can I do, Sonya?" cried Natasha with a happy yet frightened -expression. - -"But think what you are doing," cried Sonya. "I can't leave it -like this. This secret correspondence... How could you let him go so -far?" she went on, with a horror and disgust she could hardly conceal. - -"I told you that I have no will," Natasha replied. "Why can't you -understand? I love him!" - -"Then I won't let it come to that... I shall tell!" cried Sonya, -bursting into tears. - -"What do you mean? For God's sake... If you tell, you are my enemy!" -declared Natasha. "You want me to be miserable, you want us to be -separated...." - -When she saw Natasha's fright, Sonya shed tears of shame and pity -for her friend. - -"But what has happened between you?" she asked. "What has he said to -you? Why doesn't he come to the house?" - -Natasha did not answer her questions. - -"For God's sake, Sonya, don't tell anyone, don't torture me," -Natasha entreated. "Remember no one ought to interfere in such -matters! I have confided in you...." - -"But why this secrecy? Why doesn't he come to the house?" asked -Sonya. "Why doesn't he openly ask for your hand? You know Prince -Andrew gave you complete freedom--if it is really so; but I don't -believe it! Natasha, have you considered what these secret reasons can -be?" - -Natasha looked at Sonya with astonishment. Evidently this question -presented itself to her mind for the first time and she did not know -how to answer it. - -"I don't know what the reasons are. But there must be reasons!" - -Sonya sighed and shook her head incredulously. - -"If there were reasons..." she began. - -But Natasha, guessing her doubts, interrupted her in alarm. - -"Sonya, one can't doubt him! One can't, one can't! Don't you -understand?" she cried. - -"Does he love you?" - -"Does he love me?" Natasha repeated with a smile of pity at her -friend's lack of comprehension. "Why, you have read his letter and you -have seen him." - -"But if he is dishonorable?" - -"He! dishonorable? If you only knew!" exclaimed Natasha. - -"If he is an honorable man he should either declare his intentions -or cease seeing you; and if you won't do this, I will. I will write to -him, and I will tell Papa!" said Sonya resolutely. - -"But I can't live without him!" cried Natasha. - -"Natasha, I don't understand you. And what are you saying! Think -of your father and of Nicholas." - -"I don't want anyone, I don't love anyone but him. How dare you -say he is dishonorable? Don't you know that I love him?" screamed -Natasha. "Go away, Sonya! I don't want to quarrel with you, but go, -for God's sake go! You see how I am suffering!" Natasha cried angrily, -in a voice of despair and repressed irritation. Sonya burst into -sobs and ran from the room. - -Natasha went to the table and without a moment's reflection wrote -that answer to Princess Mary which she had been unable to write all -the morning. In this letter she said briefly that all their -misunderstandings were at an end; that availing herself of the -magnanimity of Prince Andrew who when he went abroad had given her her -freedom, she begged Princess Mary to forget everything and forgive her -if she had been to blame toward her, but that she could not be his wife. -At that moment this all seemed quite easy, simple, and clear to Natasha. - - -On Friday the Rostovs were to return to the country, but on -Wednesday the count went with the prospective purchaser to his -estate near Moscow. - -On the day the count left, Sonya and Natasha were invited to a big -dinner party at the Karagins', and Marya Dmitrievna took them there. -At that party Natasha again met Anatole, and Sonya noticed that she -spoke to him, trying not to be overheard, and that all through -dinner she was more agitated than ever. When they got home Natasha was -the first to begin the explanation Sonya expected. - -"There, Sonya, you were talking all sorts of nonsense about him," -Natasha began in a mild voice such as children use when they wish to -be praised. "We have had an explanation today." - -"Well, what happened? What did he say? Natasha, how glad I am you're -not angry with me! Tell me everything--the whole truth. What did he -say?" - -Natasha became thoughtful. - -"Oh, Sonya, if you knew him as I do! He said... He asked me what I -had promised Bolkonski. He was glad I was free to refuse him." - -Sonya sighed sorrowfully. - -"But you haven't refused Bolkonski?" said she. - -"Perhaps I have. Perhaps all is over between me and Bolkonski. Why -do you think so badly of me?" - -"I don't think anything, only I don't understand this..." - -"Wait a bit, Sonya, you'll understand everything. You'll see what -a man he is! Now don't think badly of me or of him. I don't think -badly of anyone: I love and pity everybody. But what am I to do?" - -Sonya did not succumb to the tender tone Natasha used toward her. -The more emotional and ingratiating the expression of Natasha's face -became, the more serious and stern grew Sonya's. - -"Natasha," said she, "you asked me not to speak to you, and I -haven't spoken, but now you yourself have begun. I don't trust him, -Natasha. Why this secrecy?" - -"Again, again!" interrupted Natasha. - -"Natasha, I am afraid for you!" - -"Afraid of what?" - -"I am afraid you're going to your ruin," said Sonya resolutely, -and was herself horrified at what she had said. - -Anger again showed in Natasha's face. - -"And I'll go to my ruin, I will, as soon as possible! It's not -your business! It won't be you, but I, who'll suffer. Leave me -alone, leave me alone! I hate you!" - -"Natasha!" moaned Sonya, aghast. - -"I hate you, I hate you! You're my enemy forever!" And Natasha ran -out of the room. - -Natasha did not speak to Sonya again and avoided her. With the -same expression of agitated surprise and guilt she went about the -house, taking up now one occupation, now another, and at once -abandoning them. - -Hard as it was for Sonya, she watched her friend and did not let her -out of her sight. - -The day before the count was to return, Sonya noticed that Natasha -sat by the drawingroom window all the morning as if expecting -something and that she made a sign to an officer who drove past, -whom Sonya took to be Anatole. - -Sonya began watching her friend still more attentively and noticed -that at dinner and all that evening Natasha was in a strange and -unnatural state. She answered questions at random, began sentences she -did not finish, and laughed at everything. - -After tea Sonya noticed a housemaid at Natasha's door timidly -waiting to let her pass. She let the girl go in, and then listening at -the door learned that another letter had been delivered. - -Then suddenly it became clear to Sonya that Natasha had some -dreadful plan for that evening. Sonya knocked at her door. Natasha did -not let her in. - -"She will run away with him!" thought Sonya. "She is capable of -anything. There was something particularly pathetic and resolute in -her face today. She cried as she said good-by to Uncle," Sonya -remembered. "Yes, that's it, she means to elope with him, but what -am I to do?" thought she, recalling all the signs that clearly -indicated that Natasha had some terrible intention. "The count is -away. What am I to do? Write to Kuragin demanding an explanation? -But what is there to oblige him to reply? Write to Pierre, as Prince -Andrew asked me to in case of some misfortune?... But perhaps she -really has already refused Bolkonski--she sent a letter to Princess -Mary yesterday. And Uncle is away...." To tell Marya Dmitrievna who -had such faith in Natasha seemed to Sonya terrible. "Well, anyway," -thought Sonya as she stood in the dark passage, "now or never I must -prove that I remember the family's goodness to me and that I love -Nicholas. Yes! If I don't sleep for three nights I'll not leave this -passage and will hold her back by force and will and not let the -family be disgraced," thought she. - - - - - -CHAPTER XVI - - -Anatole had lately moved to Dolokhov's. The plan for Natalie -Rostova's abduction had been arranged and the preparations made by -Dolokhov a few days before, and on the day that Sonya, after listening -at Natasha's door, resolved to safeguard her, it was to have been -put into execution. Natasha had promised to come out to Kuragin at the -back porch at ten that evening. Kuragin was to put her into a troyka -he would have ready and to drive her forty miles to the village of -Kamenka, where an unfrocked priest was in readiness to perform a -marriage ceremony over them. At Kamenka a relay of horses was to -wait which would take them to the Warsaw highroad, and from there they -would hasten abroad with post horses. - -Anatole had a passport, an order for post horses, ten thousand -rubles he had taken from his sister and another ten thousand -borrowed with Dolokhov's help. - -Two witnesses for the mock marriage--Khvostikov, a retired petty -official whom Dolokhov made use of in his gambling transactions, and -Makarin, a retired hussar, a kindly, weak fellow who had an -unbounded affection for Kuragin--were sitting at tea in Dolokhov's -front room. - -In his large study, the walls of which were hung to the ceiling with -Persian rugs, bearskins, and weapons, sat Dolokhov in a traveling -cloak and high boots, at an open desk on which lay abacus and some -bundles of paper money. Anatole, with uniform unbuttoned, walked to -and fro from the room where the witnesses were sitting, through the -study to the room behind, where his French valet and others were -packing the last of his things. Dolokhov was counting the money and -noting something down. - -"Well," he said, "Khvostikov must have two thousand." - -"Give it to him, then," said Anatole. - -"Makarka" (their name for Makarin) "will go through fire and water -for you for nothing. So here are our accounts all settled," said -Dolokhov, showing him the memorandum. "Is that right?" - -"Yes, of course," returned Anatole, evidently not listening to -Dolokhov and looking straight before him with a smile that did not -leave his face. - -Dolokhov banged down the or of his and turned to Anatole with an -ironic smile: - -"Do you know? You'd really better drop it all. There's still time!" - -"Fool," retorted Anatole. "Don't talk nonsense! If you only -knew... it's the devil knows what!" - -"No, really, give it up!" said Dolokhov. "I am speaking seriously. -It's no joke, this plot you've hatched." - -"What, teasing again? Go to the devil! Eh?" said Anatole, making a -grimace. "Really it's no time for your stupid jokes," and he left -the room. - -Dolokhov smiled contemptuously and condescendingly when Anatole -had gone out. - -"You wait a bit," he called after him. "I'm not joking, I'm -talking sense. Come here, come here!" - -Anatole returned and looked at Dolokhov, trying to give him his -attention and evidently submitting to him involuntarily. - -"Now listen to me. I'm telling you this for the last time. Why -should I joke about it? Did I hinder you? Who arranged everything -for you? Who found the priest and got the passport? Who raised the -money? I did it all." - -"Well, thank you for it. Do you think I am not grateful?" And -Anatole sighed and embraced Dolokhov. - -"I helped you, but all the same I must tell you the truth; it is a -dangerous business, and if you think about it--a stupid business. -Well, you'll carry her off--all right! Will they let it stop at -that? It will come out that you're already married. Why, they'll -have you in the criminal court...." - -"Oh, nonsense, nonsense!" Anatole ejaculated and again made a -grimace. "Didn't I explain to you? What?" And Anatole, with the -partiality dull-witted people have for any conclusion they have -reached by their own reasoning, repeated the argument he had already -put to Dolokhov a hundred times. "Didn't I explain to you that I -have come to this conclusion: if this marriage is invalid," he went -on, crooking one finger, "then I have nothing to answer for; but if it -is valid, no matter! Abroad no one will know anything about it. -Isn't that so? And don't talk to me, don't, don't." - -"Seriously, you'd better drop it! You'll only get yourself into a -mess!" - -"Go to the devil!" cried Anatole and, clutching his hair, left the -room, but returned at once and dropped into an armchair in front of -Dolokhov with his feet turned under him. "It's the very devil! What? -Feel how it beats!" He took Dolokhov's hand and put it on his heart. -"What a foot, my dear fellow! What a glance! A goddess!" he added in -French. "What?" - -Dolokhov with a cold smile and a gleam in his handsome insolent eyes -looked at him--evidently wishing to get some more amusement out of -him. - -"Well and when the money's gone, what then?" - -"What then? Eh?" repeated Anatole, sincerely perplexed by a -thought of the future. "What then?... Then, I don't know.... But why -talk nonsense!" He glanced at his watch. "It's time!" - -Anatole went into the back room. - -"Now then! Nearly ready? You're dawdling!" he shouted to the -servants. - -Dolokhov put away the money, called a footman whom he ordered to -bring something for them to eat and drink before the journey, and went -into the room where Khvostikov and Makarin were sitting. - -Anatole lay on the sofa in the study leaning on his elbow and -smiling pensively, while his handsome lips muttered tenderly to -himself. - -"Come and eat something. Have a drink!" Dolokhov shouted to him from -the other room. - -"I don't want to," answered Anatole continuing to smile. - -"Come! Balaga is here." - -Anatole rose and went into the dining room. Balaga was a famous -troyka driver who had known Dolokhov and Anatole some six years and -had given them good service with his troykas. More than once when -Anatole's regiment was stationed at Tver he had taken him from Tver in -the evening, brought him to Moscow by daybreak, and driven him back -again the next night. More than once he had enabled Dolokhov to escape -when pursued. More than once he had driven them through the town -with gypsies and "ladykins" as he called the cocottes. More than -once in their service he had run over pedestrians and upset vehicles -in the streets of Moscow and had always been protected from the -consequences by "my gentlemen" as he called them. He had ruined more -than one horse in their service. More than once they had beaten him, -and more than once they had made him drunk on champagne and Madeira, -which he loved; and he knew more than one thing about each of them -which would long ago have sent an ordinary man to Siberia. They -often called Balaga into their orgies and made him drink and dance -at the gypsies', and more than one thousand rubles of their money -had passed through his hands. In their service he risked his skin -and his life twenty times a year, and in their service had lost more -horses than the money he had from them would buy. But he liked them; -liked that mad driving at twelve miles an hour, liked upsetting a -driver or running down a pedestrian, and flying at full gallop through -the Moscow streets. He liked to hear those wild, tipsy shouts behind -him: "Get on! Get on!" when it was impossible to go any faster. He -liked giving a painful lash on the neck to some peasant who, more dead -than alive, was already hurrying out of his way. "Real gentlemen!" -he considered them. - -Anatole and Dolokhov liked Balaga too for his masterly driving and -because he liked the things they liked. With others Balaga -bargained, charging twenty-five rubles for a two hours' drive, and -rarely drove himself, generally letting his young men do so. But -with "his gentlemen" he always drove himself and never demanded -anything for his work. Only a couple of times a year--when he knew -from their valets that they had money in hand--he would turn up of a -morning quite sober and with a deep bow would ask them to help him. -The gentlemen always made him sit down. - -"Do help me out, Theodore Ivanych, sir," or "your excellency," he -would say. "I am quite out of horses. Let me have what you can to go -to the fair." - -And Anatole and Dolokhov, when they had money, would give him a -thousand or a couple of thousand rubles. - -Balaga was a fair-haired, short, and snub-nosed peasant of about -twenty-seven; red-faced, with a particularly red thick neck, -glittering little eyes, and a small beard. He wore a fine, -dark-blue, silk-lined cloth coat over a sheepskin. - -On entering the room now he crossed himself, turning toward the -front corner of the room, and went up to Dolokhov, holding out a -small, black hand. - -"Theodore Ivanych!" he said, bowing. - -"How d'you do, friend? Well, here he is!" - -"Good day, your excellency!" he said, again holding out his hand -to Anatole who had just come in. - -"I say, Balaga," said Anatole, putting his hands on the man's -shoulders, "do you care for me or not? Eh? Now, do me a service.... -What horses have you come with? Eh?" - -"As your messenger ordered, your special beasts," replied Balaga. - -"Well, listen, Balaga! Drive all three to death but get me there -in three hours. Eh?" - -"When they are dead, what shall I drive?" said Balaga with a wink. - -"Mind, I'll smash your face in! Don't make jokes!" cried Anatole, -suddenly rolling his eyes. - -"Why joke?" said the driver, laughing. "As if I'd grudge my -gentlemen anything! As fast as ever the horses can gallop, so fast -we'll go!" - -"Ah!" said Anatole. "Well, sit down." - -"Yes, sit down!" said Dolokhov. - -"I'll stand, Theodore Ivanych." - -"Sit down; nonsense! Have a drink!" said Anatole, and filled a large -glass of Madeira for him. - -The driver's eyes sparkled at the sight of the wine. After -refusing it for manners' sake, he drank it and wiped his mouth with -a red silk handkerchief he took out of his cap. - -"And when are we to start, your excellency?" - -"Well..." Anatole looked at his watch. "We'll start at once. Mind, -Balaga! You'll get there in time? Eh?" - -"That depends on our luck in starting, else why shouldn't we be -there in time?" replied Balaga. "Didn't we get you to Tver in seven -hours? I think you remember that, your excellency?" - -"Do you know, one Christmas I drove from Tver," said Anatole, -smilingly at the recollection and turning to Makarin who gazed -rapturously at him with wide-open eyes. "Will you believe it, Makarka, -it took one's breath away, the rate we flew. We came across a train of -loaded sleighs and drove right over two of them. Eh?" - -"Those were horses!" Balaga continued the tale. "That time I'd -harnessed two young side horses with the bay in the shafts," he went -on, turning to Dolokhov. "Will you believe it, Theodore Ivanych, those -animals flew forty miles? I couldn't hold them in, my hands grew -numb in the sharp frost so that I threw down the reins--'Catch hold -yourself, your excellency!' says I, and I just tumbled on the bottom -of the sleigh and sprawled there. It wasn't a case of urging them -on, there was no holding them in till we reached the place. The devils -took us there in three hours! Only the near one died of it." - - - - - -CHAPTER XVII - - -Anatole went out of the room and returned a few minutes later -wearing a fur coat girt with a silver belt, and a sable cap jauntily -set on one side and very becoming to his handsome face. Having -looked in a mirror, and standing before Dolokhov in the same pose he -had assumed before it, he lifted a glass of wine. - -"Well, good-by, Theodore. Thank you for everything and farewell!" -said Anatole. "Well, comrades and friends..." he considered for a -moment "...of my youth, farewell!" he said, turning to Makarin and the -others. - -Though they were all going with him, Anatole evidently wished to -make something touching and solemn out of this address to his -comrades. He spoke slowly in a loud voice and throwing out his chest -slightly swayed one leg. - -"All take glasses; you too, Balaga. Well, comrades and friends of my -youth, we've had our fling and lived and reveled. Eh? And now, when -shall we meet again? I am going abroad. We have had a good time--now -farewell, lads! To our health! Hurrah!..." he cried, and emptying -his glass flung it on the floor. - -"To your health!" said Balaga who also emptied his glass, and -wiped his mouth with his handkerchief. - -Makarin embraced Anatole with tears in his eyes. - -"Ah, Prince, how sorry I am to part from you! - -"Let's go. Let's go!" cried Anatole. - -Balaga was about to leave the room. - -"No, stop!" said Anatole. "Shut the door; we have first to sit down. -That's the way." - -They shut the door and all sat down. - -"Now, quick march, lads!" said Anatole, rising. - -Joseph, his valet, handed him his sabretache and saber, and they all -went out into the vestibule. - -"And where's the fur cloak?" asked Dolokhov. "Hey, Ignatka! Go to -Matrena Matrevna and ask her for the sable cloak. I have heard what -elopements are like," continued Dolokhov with a wink. "Why, she'll -rush out more dead than alive just in the things she is wearing; if -you delay at all there'll be tears and 'Papa' and 'Mamma,' and she's -frozen in a minute and must go back--but you wrap the fur cloak -round her first thing and carry her to the sleigh." - -The valet brought a woman's fox-lined cloak. - -"Fool, I told you the sable one! Hey, Matrena, the sable!" he -shouted so that his voice rang far through the rooms. - -A handsome, slim, and pale-faced gypsy girl with glittering black -eyes and curly blue-black hair, wearing a red shawl, ran out with a -sable mantle on her arm. - -"Here, I don't grudge it--take it!" she said, evidently afraid of -her master and yet regretful of her cloak. - -Dolokhov, without answering, took the cloak, threw it over -Matrena, and wrapped her up in it. - -"That's the way," said Dolokhov, "and then so!" and he turned the -collar up round her head, leaving only a little of the face uncovered. -"And then so, do you see?" and he pushed Anatole's head forward to -meet the gap left by the collar, through which Matrena's brilliant -smile was seen. - -"Well, good-by, Matrena," said Anatole, kissing her. "Ah, my -revels here are over. Remember me to Steshka. There, good-by! Good-by, -Matrena, wish me luck!" - -"Well, Prince, may God give you great luck!" said Matrena in her -gypsy accent. - -Two troykas were standing before the porch and two young drivers -were holding the horses. Balaga took his seat in the front one and -holding his elbows high arranged the reins deliberately. Anatole and -Dolokhov got in with him. Makarin, Khvostikov, and a valet seated -themselves in the other sleigh. - -"Well, are you ready?" asked Balaga. - -"Go!" he cried, twisting the reins round his hands, and the troyka -tore down the Nikitski Boulevard. - -"Tproo! Get out of the way! Hi!... Tproo!..." The shouting of Balaga -and of the sturdy young fellow seated on the box was all that could be -heard. On the Arbat Square the troyka caught against a carriage; -something cracked, shouts were heard, and the troyka flew along the -Arbat Street. - -After taking a turn along the Podnovinski Boulevard, Balaga began to -rein in, and turning back drew up at the crossing of the old -Konyusheny Street. - -The young fellow on the box jumped down to hold the horses and -Anatole and Dolokhov went along the pavement. When they reached the -gate Dolokhov whistled. The whistle was answered, and a maidservant -ran out. - -"Come into the courtyard or you'll be seen; she'll come out -directly," said she. - -Dolokhov stayed by the gate. Anatole followed the maid into the -courtyard, turned the corner, and ran up into the porch. - -He was met by Gabriel, Marya Dmitrievna's gigantic footman. - -"Come to the mistress, please," said the footman in his deep bass, -intercepting any retreat. - -"To what Mistress? Who are you?" asked Anatole in a breathless -whisper. - -"Kindly step in, my orders are to bring you in." - -"Kuragin! Come back!" shouted Dolokhov. "Betrayed! Back!" - -Dolokhov, after Anatole entered, had remained at the wicket gate and -was struggling with the yard porter who was trying to lock it. With -a last desperate effort Dolokhov pushed the porter aside, and when -Anatole ran back seized him by the arm, pulled him through the wicket, -and ran back with him to the troyka. - - - - - -CHAPTER XVIII - - -Marya Dmitrievna, having found Sonya weeping in the corridor, made -her confess everything, and intercepting the note to Natasha she -read it and went into Natasha's room with it in her hand. - -"You shameless good-for-nothing!" said she. "I won't hear a word." - -Pushing back Natasha who looked at her with astonished but -tearless eyes, she locked her in; and having given orders to the -yard porter to admit the persons who would be coming that evening, but -not to let them out again, and having told the footman to bring them -up to her, she seated herself in the drawing room to await the -abductors. - -When Gabriel came to inform her that the men who had come had run -away again, she rose frowning, and clasping her hands behind her paced -through the rooms a long time considering what she should do. Toward -midnight she went to Natasha's room fingering the key in her pocket. -Sonya was sitting sobbing in the corridor. "Marya Dmitrievna, for -God's sake let me in to her!" she pleaded, but Marya Dmitrievna -unlocked the door and went in without giving her an answer.... -"Disgusting, abominable... In my house... horrid girl, hussy! I'm only -sorry for her father!" thought she, trying to restrain her wrath. -"Hard as it may be, I'll tell them all to hold their tongues and -will hide it from the count." She entered the room with resolute -steps. Natasha lying on the sofa, her head hidden in her hands, and -she did not stir. She was in just the same position in which Marya -Dmitrievna had left her. - -"A nice girl! Very nice!" said Marya Dmitrievna. "Arranging meetings -with lovers in my house! It's no use pretending: you listen when I -speak to you!" And Marya Dmitrievna touched her arm. "Listen when when -I speak! You've disgraced yourself like the lowest of hussies. I'd -treat you differently, but I'm sorry for your father, so I will -conceal it." - -Natasha did not change her position, but her whole body heaved -with noiseless, convulsive sobs which choked her. Marya Dmitrievna -glanced round at Sonya and seated herself on the sofa beside Natasha. - -"It's lucky for him that he escaped me; but I'll find him!" she said -in her rough voice. "Do you hear what I am saying or not?" she added. - -She put her large hand under Natasha's face and turned it toward -her. Both Marya Dmitrievna and Sonya were amazed when they saw how -Natasha looked. Her eyes were dry and glistening, her lips compressed, -her cheeks sunken. - -"Let me be!... What is it to me?... I shall die!" she muttered, -wrenching herself from Marya Dmitrievna's hands with a vicious -effort and sinking down again into her former position. - -"Natalie!" said Marya Dmitrievna. "I wish for your good. Lie -still, stay like that then, I won't touch you. But listen. I won't -tell you how guilty you are. You know that yourself. But when your -father comes back tomorrow what am I to tell him? Eh?" - -Again Natasha's body shook with sobs. - -"Suppose he finds out, and your brother, and your betrothed?" - -"I have no betrothed: I have refused him!" cried Natasha. - -"That's all the same," continued Dmitrievna. "If they hear of -this, will they let it pass? He, your father, I know him... if he -challenges him to a duel will that be all right? Eh?" - -"Oh, let me be! Why have you interfered at all? Why? Why? Who -asked you to?" shouted Natasha, raising herself on the sofa and -looking malignantly at Marya Dmitrievna. - -"But what did you want?" cried Marya Dmitrievna, growing angry -again. "Were you kept under lock and key? Who hindered his coming to -the house? Why carry you off as if you were some gypsy singing -girl?... Well, if he had carried you off... do you think they wouldn't -have found him? Your father, or brother, or your betrothed? And he's a -scoundrel, a wretch--that's a fact!" - -"He is better than any of you!" exclaimed Natasha getting up. "If -you hadn't interfered... Oh, my God! What is it all? What is it? -Sonya, why?... Go away!" - -And she burst into sobs with the despairing vehemence with which -people bewail disasters they feel they have themselves occasioned. -Marya Dmitrievna was to speak again but Natasha cried out: - -"Go away! Go away! You all hate and despise me!" and she threw -herself back on the sofa. - -Marya Dmitrievna went on admonishing her for some time, enjoining on -her that it must all be kept from her father and assuring her that -nobody would know anything about it if only Natasha herself would -undertake to forget it all and not let anyone see that something had -happened. Natasha did not reply, nor did she sob any longer, but she -grew cold and had a shivering fit. Marya Dmitrievna put a pillow under -her head, covered her with two quilts, and herself brought her some -lime-flower water, but Natasha did not respond to her. - -"Well, let her sleep," said Marya Dmitrievna as she went of the room -supposing Natasha to be asleep. - -But Natasha was not asleep; with pale face and fixed wide-open -eyes she looked straight before her. All that night she did not -sleep or weep and did not speak to Sonya who got up and went to her -several times. - -Next day Count Rostov returned from his estate near Moscow in time -for lunch as he had promised. He was in very good spirits; the -affair with the purchaser was going on satisfactorily, and there was -nothing to keep him any longer in Moscow, away from the countess -whom he missed. Marya Dmitrievna met him and told him that Natasha had -been very unwell the day before and that they had sent for the doctor, -but that she was better now. Natasha had not left her room that -morning. With compressed and parched lips and dry fixed eyes, she -sat at the window, uneasily watching the people who drove past and -hurriedly glancing round at anyone who entered the room. She was -evidently expecting news of him and that he would come or would -write to her. - -When the count came to see her she turned anxiously round at the -sound of a man's footstep, and then her face resumed its cold and -malevolent expression. She did not even get up to greet him. "What -is the matter with you, my angel? Are you ill?" asked the count. - -After a moment's silence Natasha answered: "Yes, ill." - -In reply to the count's anxious inquiries as to why she was so -dejected and whether anything had happened to her betrothed, she -assured him that nothing had happened and asked him not to worry. -Marya Dmitrievna confirmed Natasha's assurances that nothing had -happened. From the pretense of illness, from his daughter's -distress, and by the embarrassed faces of Sonya and Marya -Dmitrievna, the count saw clearly that something had gone wrong during -his absence, but it was so terrible for him to think that anything -disgraceful had happened to his beloved daughter, and he so prized his -own cheerful tranquillity, that he avoided inquiries and tried to -assure himself that nothing particularly had happened; and he was only -dissatisfied that her indisposition delayed their return to the -country. - - - - - -CHAPTER XIX - - -From the day his wife arrived in Moscow Pierre had been intending to -go away somewhere, so as not to be near her. Soon after the Rostovs -came to Moscow the effect Natasha had on him made him hasten to -carry out his intention. He went to Tver to see Joseph Alexeevich's -widow, who had long since promised to hand over to him some papers -of her deceased husband's. - -When he returned to Moscow Pierre was handed a letter from Marya -Dmitrievna asking him to come and see her on a matter of great -importance relating to Andrew Bolkonski and his betrothed. Pierre -had been avoiding Natasha because it seemed to him that his feeling -for her was stronger than a married man's should be for his friend's -fiancee. Yet some fate constantly threw them together. - -"What can have happened? And what can they want with me?" thought he -as he dressed to go to Marya Dmitrievna's. "If only Prince Andrew -would hurry up and come and marry her!" thought he on his way to the -house. - -On the Tverskoy Boulevard a familiar voice called to him. - -"Pierre! Been back long?" someone shouted. Pierre raised his head. -In a sleigh drawn by two gray trotting-horses that were bespattering -the dashboard with snow, Anatole and his constant companion Makarin -dashed past. Anatole was sitting upright in the classic pose of -military dandies, the lower part of his face hidden by his beaver -collar and his head slightly bent. His face was fresh and rosy, his -white-plumed hat, tilted to one side, disclosed his curled and pomaded -hair besprinkled with powdery snow. - -"Yes, indeed, that's a true sage," thought Pierre. "He sees -nothing beyond the pleasure of the moment, nothing troubles him and so -he is always cheerful, satisfied, and serene. What wouldn't I give -to be like him!" he thought enviously. - -In Marya Dmitrievna's anteroom the footman who helped him off with -his fur coat said that the mistress asked him to come to her bedroom. - -When he opened the ballroom door Pierre saw Natasha sitting at the -window, with a thin, pale, and spiteful face. She glanced round at -him, frowned, and left the room with an expression of cold dignity. - -"What has happened?" asked Pierre, entering Marya Dmitrievna's room. - -"Fine doings!" answered Dmitrievna. "For fifty-eight years have I -lived in this world and never known anything so disgraceful!" - -And having put him on his honor not to repeat anything she told him, -Marya Dmitrievna informed him that Natasha had refused Prince Andrew -without her parents' knowledge and that the cause of this was -Anatole Kuragin into whose society Pierre's wife had thrown her and -with whom Natasha had tried to elope during her father's absence, in -order to be married secretly. - -Pierre raised his shoulders and listened open-mouthed to what was -told him, scarcely able to believe his own ears. That Prince -Andrew's deeply loved affianced wife--the same Natasha Rostova who -used to be so charming--should give up Bolkonski for that fool Anatole -who was already secretly married (as Pierre knew), and should be so in -love with him as to agree to run away with him, was something Pierre -could not conceive and could not imagine. - -He could not reconcile the charming impression he had of Natasha, -whom he had known from a child, with this new conception of her -baseness, folly, and cruelty. He thought of his wife. "They are all -alike!" he said to himself, reflecting that he was not the only man -unfortunate enough to be tied to a bad woman. But still he pitied -Prince Andrew to the point of tears and sympathized with his wounded -pride, and the more he pitied his friend the more did he think with -contempt and even with disgust of that Natasha who had just passed him -in the ballroom with such a look of cold dignity. He did not know that -Natasha's soul was overflowing with despair, shame, and humiliation, -and that it was not her fault that her face happened to assume an -expression of calm dignity and severity. - -"But how get married?" said Pierre, in answer to Marya Dmitrievna. -"He could not marry--he is married!" - -"Things get worse from hour to hour!" ejaculated Marya Dmitrievna. -"A nice youth! What a scoundrel! And she's expecting him--expecting -him since yesterday. She must be told! Then at least she won't go on -expecting him." - -After hearing the details of Anatole's marriage from Pierre, and -giving vent to her anger against Anatole in words of abuse, Marya -Dmitrievna told Pierre why she had sent for him. She was afraid that -the count or Bolkonski, who might arrive at any moment, if they knew -of this affair (which she hoped to hide from them) might challenge -Anatole to a duel, and she therefore asked Pierre to tell his -brother-in-law in her name to leave Moscow and not dare to let her set -eyes on him again. Pierre--only now realizing the danger to the old -count, Nicholas, and Prince Andrew--promised to do as she wished. -Having briefly and exactly explained her wishes to him, she let him go -to the drawing room. - -"Mind, the count knows nothing. Behave as if you know nothing -either," she said. "And I will go and tell her it is no use -expecting him! And stay to dinner if you care to!" she called after -Pierre. - -Pierre met the old count, who seemed nervous and upset. That morning -Natasha had told him that she had rejected Bolkonski. - -"Troubles, troubles, my dear fellow!" he said to Pierre. "What -troubles one has with these girls without their mother! I do so regret -having come here.... I will be frank with you. Have you heard she -has broken off her engagement without consulting anybody? It's true -this engagement never was much to my liking. Of course he is an -excellent man, but still, with his father's disapproval they -wouldn't have been happy, and Natasha won't lack suitors. Still, it -has been going on so long, and to take such a step without father's or -mother's consent! And now she's ill, and God knows what! It's hard, -Count, hard to manage daughters in their mother's absence...." - -Pierre saw that the count was much upset and tried to change the -subject, but the count returned to his troubles. - -Sonya entered the room with an agitated face. - -"Natasha is not quite well; she's in her room and would like to -see you. Marya Dmitrievna is with her and she too asks you to come." - -"Yes, you are a great friend of Bolkonski's, no doubt she wants to -send him a message," said the count. "Oh dear! Oh dear! How happy it -all was!" - -And clutching the spare gray locks on his temples the count left the -room. - -When Marya Dmitrievna told Natasha that Anatole was married, Natasha -did not wish to believe it and insisted on having it confirmed by -Pierre himself. Sonya told Pierre this as she led him along the -corridor to Natasha's room. - -Natasha, pale and stern, was sitting beside Marya Dmitrievna, and -her eyes, glittering feverishly, met Pierre with a questioning look -the moment he entered. She did not smile or nod, but only gazed -fixedly at him, and her look asked only one thing: was he a friend, or -like the others an enemy in regard to Anatole? As for Pierre, he -evidently did not exist for her. - -"He knows all about it," said Marya Dmitrievna pointing to Pierre -and addressing Natasha. "Let him tell you whether I have told the -truth." - -Natasha looked from one to the other as a hunted and wounded -animal looks at the approaching dogs and sportsmen. - -"Natalya Ilynichna," Pierre began, dropping his eyes with a -feeling of pity for her and loathing for the thing he had to do, -"whether it is true or not should make no difference to you, -because..." - -"Then it is not true that he's married!" - -"Yes, it is true." - -"Has he been married long?" she asked. "On your honor?..." - -Pierre gave his word of honor. - -"Is he still here?" she asked, quickly. - -"Yes, I have just seen him." - -She was evidently unable to speak and made a sign with her hands -that they should leave her alone. - - - - - -CHAPTER XX - - -Pierre did not stay for dinner, but left the room and went away at -once. He drove through the town seeking Anatole Kuragin, at the -thought of whom now the blood rushed to his heart and he felt a -difficulty in breathing. He was not at the ice hills, nor at the -gypsies', nor at Komoneno's. Pierre drove to the Club. In the Club all -was going on as usual. The members who were assembling for dinner were -sitting about in groups; they greeted Pierre and spoke of the town -news. The footman having greeted him, knowing his habits and his -acquaintances, told him there was a place left for him in the small -dining room and that Prince Michael Zakharych was in the library, -but Paul Timofeevich had not yet arrived. One of Pierre's -acquaintances, while they were talking about the weather, asked if -he had heard of Kuragin's abduction of Rostova which was talked of -in the town, and was it true? Pierre laughed and said it was -nonsense for he had just come from the Rostovs'. He asked everyone -about Anatole. One man told him he had not come yet, and another -that he was coming to dinner. Pierre felt it strange to see this calm, -indifferent crowd of people unaware of what was going on in his -soul. He paced through the ballroom, waited till everyone had come, -and as Anatole had not turned up did not stay for dinner but drove -home. - -Anatole, for whom Pierre was looking, dined that day with -Dolokhov, consulting him as to how to remedy this unfortunate -affair. It seemed to him essential to see Natasha. In the evening he -drove to his sister's to discuss with her how to arrange a meeting. -When Pierre returned home after vainly hunting all over Moscow, his -valet informed him that Prince Anatole was with the countess. The -countess' drawing room was full of guests. - -Pierre without greeting his wife whom he had not seen since his -return--at that moment she was more repulsive to him than ever- -entered the drawing room and seeing Anatole went up to him. - -"Ah, Pierre," said the countess going up to her husband. "You -don't know what a plight our Anatole..." - -She stopped, seeing in the forward thrust of her husband's head, -in his glowing eyes and his resolute gait, the terrible indications of -that rage and strength which she knew and had herself experienced -after his duel with Dolokhov. - -"Where you are, there is vice and evil!" said Pierre to his wife. -"Anatole, come with me! I must speak to you," he added in French. - -Anatole glanced round at his sister and rose submissively, ready -to follow Pierre. Pierre, taking him by the arm, pulled him toward -himself and was leading him from the room. - -"If you allow yourself in my drawing room..." whispered Helene, -but Pierre did not reply and went out of the room. - -Anatole followed him with his usual jaunty step but his face -betrayed anxiety. - -Having entered his study Pierre closed the door and addressed -Anatole without looking at him. - -"You promised Countess Rostova to marry her and were about to -elope with her, is that so?" - -"Mon cher," answered Anatole (their whole conversation was in -French), "I don't consider myself bound to answer questions put to -me in that tone." - -Pierre's face, already pale, became distorted by fury. He seized -Anatole by the collar of his uniform with his big hand and shook him -from side to side till Anatole's face showed a sufficient degree of -terror. - -"When I tell you that I must talk to you!..." repeated Pierre. - -"Come now, this is stupid. What?" said Anatole, fingering a button -of his collar that had been wrenched loose with a bit of the cloth. - -"You're a scoundrel and a blackguard, and I don't know what deprives -me from the pleasure of smashing your head with this!" said Pierre, -expressing himself so artificially because he was talking French. - -He took a heavy paperweight and lifted it threateningly, but at once -put it back in its place. - -"Did you promise to marry her?" - -"I... I didn't think of it. I never promised, because..." - -Pierre interrupted him. - -"Have you any letters of hers? Any letters?" he said, moving -toward Anatole. - -Anatole glanced at him and immediately thrust his hand into his -pocket and drew out his pocketbook. - -Pierre took the letter Anatole handed him and, pushing aside a table -that stood in his way, threw himself on the sofa. - -"I shan't be violent, don't be afraid!" said Pierre in answer to a -frightened gesture of Anatole's. "First, the letters," said he, as -if repeating a lesson to himself. "Secondly," he continued after a -short pause, again rising and again pacing the room, "tomorrow you -must get out of Moscow." - -"But how can I?..." - -"Thirdly," Pierre continued without listening to him, "you must -never breathe a word of what has passed between you and Countess -Rostova. I know I can't prevent your doing so, but if you have a spark -of conscience..." Pierre paced the room several times in silence. - -Anatole sat at a table frowning and biting his lips. - -"After all, you must understand that besides your pleasure there -is such a thing as other people's happiness and peace, and that you -are ruining a whole life for the sake of amusing yourself! Amuse -yourself with women like my wife--with them you are within your -rights, for they know what you want of them. They are armed against -you by the same experience of debauchery; but to promise a maid to -marry her... to deceive, to kidnap.... Don't you understand that it is -as mean as beating an old man or a child?..." - -Pierre paused and looked at Anatole no longer with an angry but with -a questioning look. - -"I don't know about that, eh?" said Anatole, growing more -confident as Pierre mastered his wrath. "I don't know that and don't -want to," he said, not looking at Pierre and with a slight tremor of -his lower jaw, "but you have used such words to me--'mean' and so -on--which as a man of honor I can't allow anyone to use." - -Pierre glanced at him with amazement, unable to understand what he -wanted. - -"Though it was tete-a-tete," Anatole continued, "still I can't..." - -"Is it satisfaction you want?" said Pierre ironically. - -"You could at least take back your words. What? If you want me to do -as you wish, eh?" - -"I take them back, I take them back!" said Pierre, "and I ask you to -forgive me." Pierre involuntarily glanced at the loose button. "And if -you require money for your journey..." - -Anatole smiled. The expression of that base and cringing smile, -which Pierre knew so well in his wife, revolted him. - -"Oh, vile and heartless brood!" he exclaimed, and left the room. - -Next day Anatole left for Petersburg. - - - - - -CHAPTER XXI - - -Pierre drove to Marya Dmitrievna's to tell her of the fulfillment of -her wish that Kuragin should be banished from Moscow. The whole -house was in a state of alarm and commotion. Natasha was very ill, -having, as Marya Dmitrievna told him in secret, poisoned herself the -night after she had been told that Anatole was married, with some -arsenic she had stealthily procured. After swallowing a little she had -been so frightened that she woke Sonya and told her what she had done. -The necessary antidotes had been administered in time and she was -now out of danger, though still so weak that it was out of the -question to move her to the country, and so the countess had been sent -for. Pierre saw the distracted count, and Sonya, who had a -tear-stained face, but he could not see Natasha. - -Pierre dined at the club that day and heard on all sides gossip -about the attempted abduction of Rostova. He resolutely denied these -rumors, assuring everyone that nothing had happened except that his -brother-in-law had proposed to her and been refused. It seemed to -Pierre that it was his duty to conceal the whole affair and -re-establish Natasha's reputation. - -He was awaiting Prince Andrew's return with dread and went every day -to the old prince's for news of him. - -Old Prince Bolkonski heard all the rumors current in the town from -Mademoiselle Bourienne and had read the note to Princess Mary in which -Natasha had broken off her engagement. He seemed in better spirits -than usual and awaited his son with great impatience. - -Some days after Anatole's departure Pierre received a note from -Prince Andrew, informing him of his arrival and asking him to come -to see him. - -As soon as he reached Moscow, Prince Andrew had received from his -father Natasha's note to Princess Mary breaking off her engagement -(Mademoiselle Bourienne had purloined it from Princess Mary and -given it to the old prince), and he heard from him the story of -Natasha's elopement, with additions. - -Prince Andrew had arrived in the evening and Pierre came to see -him next morning. Pierre expected to find Prince Andrew in almost -the same state as Natasha and was therefore surprised on entering -the drawing room to hear him in the study talking in a loud animated -voice about some intrigue going on in Petersburg. The old prince's -voice and another now and then interrupted him. Princess Mary came out -to meet Pierre. She sighed, looking toward the door of the room -where Prince Andrew was, evidently intending to express her sympathy -with his sorrow, but Pierre saw by her face that she was glad both -at what had happened and at the way her brother had taken the news -of Natasha's faithlessness. - -"He says he expected it," she remarked. "I know his pride will not -let him express his feelings, but still he has taken it better, far -better, than I expected. Evidently it had to be...." - -"But is it possible that all is really ended?" asked Pierre. - -Princess Mary looked at him with astonishment. She did not -understand how he could ask such a question. Pierre went into the -study. Prince Andrew, greatly changed and plainly in better health, -but with a fresh horizontal wrinkle between his brows, stood in -civilian dress facing his father and Prince Meshcherski, warmly -disputing and vigorously gesticulating. The conversation was about -Speranski--the news of whose sudden exile and alleged treachery had -just reached Moscow. - -"Now he is censured and accused by all who were enthusiastic about -him a month ago," Prince Andrew was saying, "and by those who were -unable to understand his aims. To judge a man who is in disfavor and -to throw on him all the blame of other men's mistakes is very easy, -but I maintain that if anything good has been accomplished in this -reign it was done by him, by him alone." - -He paused at the sight of Pierre. His face quivered and -immediately assumed a vindictive expression. - -"Posterity will do him justice," he concluded, and at once turned to -Pierre. - -"Well, how are you? Still getting stouter?" he said with -animation, but the new wrinkle on his forehead deepened. "Yes, I am -well," he said in answer to Pierre's question, and smiled. - -To Pierre that smile said plainly: "I am well, but my health is -now of no use to anyone." - -After a few words to Pierre about the awful roads from the Polish -frontier, about people he had met in Switzerland who knew Pierre, -and about M. Dessalles, whom he had brought from abroad to be his -son's tutor, Prince Andrew again joined warmly in the conversation -about Speranski which was still going on between the two old men. - -"If there were treason, or proofs of secret relations with Napoleon, -they would have been made public," he said with warmth and haste. "I -do not, and never did, like Speranski personally, but I like justice!" - -Pierre now recognized in his friend a need with which he was only -too familiar, to get excited and to have arguments about extraneous -matters in order to stifle thoughts that were too oppressive and too -intimate. When Prince Meshcherski had left, Prince Andrew took -Pierre's arm and asked him into the room that had been assigned him. A -bed had been made up there, and some open portmanteaus and trunks -stood about. Prince Andrew went to one and took out a small casket, -from which he drew a packet wrapped in paper. He did it all silently -and very quickly. He stood up and coughed. His face was gloomy and his -lips compressed. - -"Forgive me for troubling you..." - -Pierre saw that Prince Andrew was going to speak of Natasha, and his -broad face expressed pity and sympathy. This expression irritated -Prince Andrew, and in a determined, ringing, and unpleasant tone he -continued: - -"I have received a refusal from Countess Rostova and have heard -reports of your brother-in-law having sought her hand, or something of -that kind. Is that true?" - -"Both true and untrue," Pierre began; but Prince Andrew -interrupted him. - -"Here are her letters and her portrait," said he. - -He took the packet from the table and handed it to Pierre. - -"Give this to the countess... if you see her." - -"She is very ill," said Pierre. - -"Then she is here still?" said Prince Andrew. "And Prince -Kuragin?" he added quickly. - -"He left long ago. She has been at death's door." - -"I much regret her illness," said Prince Andrew; and he smiled -like his father, coldly, maliciously, and unpleasantly. - -"So Monsieur Kuragin has not honored Countess Rostova with his -hand?" said Prince Andrew, and he snorted several times. - -"He could not marry, for he was married already," said Pierre. - -Prince Andrew laughed disagreeably, again reminding one of his -father. - -"And where is your brother-in-law now, if I may ask?" he said. - -"He has gone to Peters... But I don't know," said Pierre. - -"Well, it doesn't matter," said Prince Andrew. "Tell Countess -Rostova that she was and is perfectly free and that I wish her all -that is good." - -Pierre took the packet. Prince Andrew, as if trying to remember -whether he had something more to say, or waiting to see if Pierre -would say anything, looked fixedly at him. - -"I say, do you remember our discussion in Petersburg?" asked Pierre, -"about..." - -"Yes," returned Prince Andrew hastily. "I said that a fallen woman -should be forgiven, but I didn't say I could forgive her. I can't." - -"But can this be compared...?" said Pierre. - -Prince Andrew interrupted him and cried sharply: "Yes, ask her -hand again, be magnanimous, and so on?... Yes, that would be very -noble, but I am unable to follow in that gentleman's footsteps. If you -wish to be my friend never speak to me of that... of all that! Well, -good-by. So you'll give her the packet?" - -Pierre left the room and went to the old prince and Princess Mary. - -The old man seemed livelier than usual. Princess Mary was the same -as always, but beneath her sympathy for her brother, Pierre noticed -her satisfaction that the engagement had been broken off. Looking at -them Pierre realized what contempt and animosity they all felt for the -Rostovs, and that it was impossible in their presence even to -mention the name of her who could give up Prince Andrew for anyone -else. - -At dinner the talk turned on the war, the approach of which was -becoming evident. Prince Andrew talked incessantly, arguing now with -his father, now with the Swiss tutor Dessalles, and showing an -unnatural animation, the cause of which Pierre so well understood. - - - - - -CHAPTER XXII - - -That same evening Pierre went to the Rostovs' to fulfill the -commission entrusted to him. Natasha was in bed, the count at the -Club, and Pierre, after giving the letters to Sonya, went to Marya -Dmitrievna who was interested to know how Prince Andrew had taken -the news. Ten minutes later Sonya came to Marya Dmitrievna. - -"Natasha insists on seeing Count Peter Kirilovich," said she. - -"But how? Are we to take him up to her? The room there has not -been tidied up." - -"No, she has dressed and gone into the drawing room," said Sonya. - -Marya Dmitrievna only shrugged her shoulders. - -"When will her mother come? She has worried me to death! Now mind, -don't tell her everything!" said she to Pierre. "One hasn't the -heart to scold her, she is so much to be pitied, so much to be -pitied." - -Natasha was standing in the middle of the drawing room, emaciated, -with a pale set face, but not at all shamefaced as Pierre expected -to find her. When he appeared at the door she grew flurried, evidently -undecided whether to go to meet him or to wait till he came up. - -Pierre hastened to her. He thought she would give him her hand as -usual; but she, stepping up to him, stopped, breathing heavily, her -arms hanging lifelessly just in the pose she used to stand in when she -went to the middle of the ballroom to sing, but with quite a different -expression of face. - -"Peter Kirilovich," she began rapidly, "Prince Bolkonski was your -friend--is your friend," she corrected herself. (It seemed to her that -everything that had once been must now be different.) "He told me once -to apply to you..." - -Pierre sniffed as he looked at her, but did not speak. Till then -he had reproached her in his heart and tried to despise her, but he -now felt so sorry for her that there was no room in his soul for -reproach. - -"He is here now: tell him... to for... forgive me!" She stopped -and breathed still more quickly, but did not shed tears. - -"Yes... I will tell him," answered Pierre; "but..." - -He did not know what to say. - -Natasha was evidently dismayed at the thought of what he might think -she had meant. - -"No, I know all is over," she said hurriedly. "No, that can never -be. I'm only tormented by the wrong I have done him. Tell him only -that I beg him to forgive, forgive, forgive me for everything...." - -She trembled all over and sat down on a chair. - -A sense of pity he had never before known overflowed Pierre's heart. - -"I will tell him, I will tell him everything once more," said -Pierre. "But... I should like to know one thing...." - -"Know what?" Natasha's eyes asked. - -"I should like to know, did you love..." Pierre did not know how -to refer to Anatole and flushed at the thought of him--"did you love -that bad man?" - -"Don't call him bad!" said Natasha. "But I don't know, don't know at -all...." - -She began to cry and a still greater sense of pity, tenderness, -and love welled up in Pierre. He felt the tears trickle under his -spectacles and hoped they would not be noticed. - -"We won't speak of it any more, my dear," said Pierre, and his -gentle, cordial tone suddenly seemed very strange to Natasha. - -"We won't speak of it, my dear--I'll tell him everything; but one -thing I beg of you, consider me your friend and if you want help, -advice, or simply to open your heart to someone--not now, but when -your mind is clearer think of me!" He took her hand and kissed it. -"I shall be happy if it's in my power..." - -Pierre grew confused. - -"Don't speak to me like that. I am not worth it!" exclaimed -Natasha and turned to leave the room, but Pierre held her hand. - -He knew he had something more to say to her. But when he said it -he was amazed at his own words. - -"Stop, stop! You have your whole life before you," said he to her. - -"Before me? No! All is over for me," she replied with shame and -self-abasement. - - "All over?" he repeated. "If I were not myself, but the handsomest, -cleverest, and best man in the world, and were free, I would this -moment ask on my knees for your hand and your love!" - -For the first time for many days Natasha wept tears of gratitude and -tenderness, and glancing at Pierre she went out of the room. - -Pierre too when she had gone almost ran into the anteroom, -restraining tears of tenderness and joy that choked him, and without -finding the sleeves of his fur cloak threw it on and got into his -sleigh. - -"Where to now, your excellency?" asked the coachman. - -"Where to?" Pierre asked himself. "Where can I go now? Surely not to -the Club or to pay calls?" All men seemed so pitiful, so poor, in -comparison with this feeling of tenderness and love he experienced: in -comparison with that softened, grateful, last look she had given him -through her tears. - -"Home!" said Pierre, and despite twenty-two degrees of frost -Fahrenheit he threw open the bearskin cloak from his broad chest and -inhaled the air with joy. - -It was clear and frosty. Above the dirty, ill-lit streets, above the -black roofs, stretched the dark starry sky. Only looking up at the sky -did Pierre cease to feel how sordid and humiliating were all mundane -things compared with the heights to which his soul had just been -raised. At the entrance to the Arbat Square an immense expanse of dark -starry sky presented itself to his eyes. Almost in the center of it, -above the Prechistenka Boulevard, surrounded and sprinkled on all -sides by stars but distinguished from them all by its nearness to -the earth, its white light, and its long uplifted tail, shone the -enormous and brilliant comet of 1812--the comet which was said to -portend all kinds of woes and the end of the world. In Pierre, -however, that comet with its long luminous tail aroused no feeling -of fear. On the contrary he gazed joyfully, his eyes moist with tears, -at this bright comet which, having traveled in its orbit with -inconceivable velocity through immeasurable space, seemed suddenly- -like an arrow piercing the earth--to remain fixed in a chosen spot, -vigorously holding its tail erect, shining and displaying its white -light amid countless other scintillating stars. It seemed to Pierre -that this comet fully responded to what was passing in his own -softened and uplifted soul, now blossoming into a new life. - - - - - -BOOK NINE: 1812 - - - - - -CHAPTER I - - -From the close of the year 1811 intensified arming and concentrating -of the forces of Western Europe began, and in 1812 these forces- -millions of men, reckoning those transporting and feeding the army- -moved from the west eastwards to the Russian frontier, toward which -since 1811 Russian forces had been similarly drawn. On the twelfth -of June, 1812, the forces of Western Europe crossed the Russian -frontier and war began, that is, an event took place opposed to -human reason and to human nature. Millions of men perpetrated -against one another such innumerable crimes, frauds, treacheries, -thefts, forgeries, issues of false money, burglaries, incendiarisms, -and murders as in whole centuries are not recorded in the annals of -all the law courts of the world, but which those who committed them -did not at the time regard as being crimes. - -What produced this extraordinary occurrence? What were its causes? -The historians tell us with naive assurance that its causes were the -wrongs inflicted on the Duke of Oldenburg, the nonobservance of the -Continental System, the ambition of Napoleon, the firmness of -Alexander, the mistakes of the diplomatists, and so on. - -Consequently, it would only have been necessary for Metternich, -Rumyantsev, or Talleyrand, between a levee and an evening party, to -have taken proper pains and written a more adroit note, or for -Napoleon to have written to Alexander: "My respected Brother, I -consent to restore the duchy to the Duke of Oldenburg"--and there -would have been no war. - -We can understand that the matter seemed like that to -contemporaries. It naturally seemed to Napoleon that the war was -caused by England's intrigues (as in fact he said on the island of St. -Helena). It naturally seemed to members of the English Parliament that -the cause of the war was Napoleon's ambition; to the Duke of -Oldenburg, that the cause of the war was the violence done to him; -to businessmen that the cause of the way was the Continental System -which was ruining Europe; to the generals and old soldiers that the -chief reason for the war was the necessity of giving them -employment; to the legitimists of that day that it was the need of -re-establishing les bons principes, and to the diplomatists of that -time that it all resulted from the fact that the alliance between -Russia and Austria in 1809 had not been sufficiently well concealed -from Napoleon, and from the awkward wording of Memorandum No. 178. -It is natural that these and a countless and infinite quantity of -other reasons, the number depending on the endless diversity of points -of view, presented themselves to the men of that day; but to us, to -posterity who view the thing that happened in all its magnitude and -perceive its plain and terrible meaning, these causes seem -insufficient. To us it is incomprehensible that millions of -Christian men killed and tortured each other either because Napoleon -was ambitious or Alexander was firm, or because England's policy was -astute or the Duke of Oldenburg wronged. We cannot grasp what -connection such circumstances have with the actual fact of slaughter -and violence: why because the Duke was wronged, thousands of men -from the other side of Europe killed and ruined the people of Smolensk -and Moscow and were killed by them. - -To us, their descendants, who are not historians and are not carried -away by the process of research and can therefore regard the event -with unclouded common sense, an incalculable number of causes -present themselves. The deeper we delve in search of these causes -the more of them we find; and each separate cause or whole series of -causes appears to us equally valid in itself and equally false by -its insignificance compared to the magnitude of the events, and by its -impotence--apart from the cooperation of all the other coincident -causes--to occasion the event. To us, the wish or objection of this or -that French corporal to serve a second term appears as much a cause as -Napoleon's refusal to withdraw his troops beyond the Vistula and to -restore the duchy of Oldenburg; for had he not wished to serve, and -had a second, a third, and a thousandth corporal and private also -refused, there would have been so many less men in Napoleon's army and -the war could not have occurred. - -Had Napoleon not taken offense at the demand that he should withdraw -beyond the Vistula, and not ordered his troops to advance, there would -have been no war; but had all his sergeants objected to serving a -second term then also there could have been no war. Nor could there -have been a war had there been no English intrigues and no Duke of -Oldenburg, and had Alexander not felt insulted, and had there not been -an autocratic government in Russia, or a Revolution in France and a -subsequent dictatorship and Empire, or all the things that produced -the French Revolution, and so on. Without each of these causes nothing -could have happened. So all these causes--myriads of causes--coincided -to bring it about. And so there was no one cause for that -occurrence, but it had to occur because it had to. Millions of men, -renouncing their human feelings and reason, had to go from west to -east to slay their fellows, just as some centuries previously hordes -of men had come from the east to the west, slaying their fellows. - -The actions of Napoleon and Alexander, on whose words the event -seemed to hang, were as little voluntary as the actions of any soldier -who was drawn into the campaign by lot or by conscription. This -could not be otherwise, for in order that the will of Napoleon and -Alexander (on whom the event seemed to depend) should be carried -out, the concurrence of innumerable circumstances was needed without -any one of which the event could not have taken place. It was -necessary that millions of men in whose hands lay the real power- -the soldiers who fired, or transported provisions and guns--should -consent to carry out the will of these weak individuals, and should -have been induced to do so by an infinite number of diverse and -complex causes. - -We are forced to fall back on fatalism as an explanation of -irrational events (that is to say, events the reasonableness of -which we do not understand). The more we try to explain such events in -history reasonably, the more unreasonable and incomprehensible do they -become to us. - -Each man lives for himself, using his freedom to attain his personal -aims, and feels with his whole being that he can now do or abstain -from doing this or that action; but as soon as he has done it, that -action performed at a certain moment in time becomes irrevocable and -belongs to history, in which it has not a free but a predestined -significance. - -There are two sides to the life of every man, his individual life, -which is the more free the more abstract its interests, and his -elemental hive life in which he inevitably obeys laws laid down for -him. - -Man lives consciously for himself, but is an unconscious -instrument in the attainment of the historic, universal, aims of -humanity. A deed done is irrevocable, and its result coinciding in -time with the actions of millions of other men assumes an historic -significance. The higher a man stands on the social ladder, the more -people he is connected with and the more power he has over others, the -more evident is the predestination and inevitability of his every -action. - -"The king's heart is in the hands of the Lord." - -A king is history's slave. - -History, that is, the unconscious, general, hive life of mankind, -uses every moment of the life of kings as a tool for its own purposes. - -Though Napoleon at that time, in 1812, was more convinced than -ever that it depended on him, verser (ou ne pas verser) le sang de ses -peuples*--as Alexander expressed it in the last letter he wrote him- -he had never been so much in the grip of inevitable laws, which -compelled him, while thinking that he was acting on his own -volition, to perform for the hive life--that is to say, for history- -whatever had to be performed. - - -*"To shed (or not to shed) the blood of his peoples." - - -The people of the west moved eastwards to slay their fellow men, and -by the law of coincidence thousands of minute causes fitted in and -co-ordinated to produce that movement and war: reproaches for the -nonobservance of the Continental System, the Duke of Oldenburg's -wrongs, the movement of troops into Prussia--undertaken (as it -seemed to Napoleon) only for the purpose of securing an armed peace, -the French Emperor's love and habit of war coinciding with his -people's inclinations, allurement by the grandeur of the preparations, -and the expenditure on those preparations and the need of obtaining -advantages to compensate for that expenditure, the intoxicating honors -he received in Dresden, the diplomatic negotiations which, in the -opinion of contemporaries, were carried on with a sincere desire to -attain peace, but which only wounded the self-love of both sides, -and millions of other causes that adapted themselves to -the event that was happening or coincided with it. - -When an apple has ripened and falls, why does it fall? Because of -its attraction to the earth, because its stalk withers, because it -is dried by the sun, because it grows heavier, because the wind shakes -it, or because the boy standing below wants to eat it? - -Nothing is the cause. All this is only the coincidence of conditions -in which all vital organic and elemental events occur. And the -botanist who finds that the apple falls because the cellular tissue -decays and so forth is equally right with the child who stands under -the tree and says the apple fell because he wanted to eat it and -prayed for it. Equally right or wrong is he who says that Napoleon -went to Moscow because he wanted to, and perished because Alexander -desired his destruction, and he who says that an undermined hill -weighing a million tons fell because the last navvy struck it for -the last time with his mattock. In historic events the so-called great -men are labels giving names to events, and like labels they have but -the smallest connection with the event itself. - -Every act of theirs, which appears to them an act of their own will, -is in an historical sense involuntary and is related to the whole -course of history and predestined from eternity. - - - - - -CHAPTER II - - -On the twenty-ninth of May Napoleon left Dresden, where he had spent -three weeks surrounded by a court that included princes, dukes, kings, -and even an emperor. Before leaving, Napoleon showed favor to the -emperor, kings, and princes who had deserved it, reprimanded the kings -and princes with whom he was dissatisfied, presented pearls and -diamonds of his own--that is, which he had taken from other kings- -to the Empress of Austria, and having, as his historian tells us, -tenderly embraced the Empress Marie Louise--who regarded him as her -husband, though he had left another wife in Paris--left her grieved by -the parting which she seemed hardly able to bear. Though the -diplomatists still firmly believed in the possibility of peace and -worked zealously to that end, and though the Emperor Napoleon -himself wrote a letter to Alexander, calling him Monsieur mon frere, -and sincerely assured him that he did not want war and would always -love and honor him--yet he set off to join his army, and at every -station gave fresh orders to accelerate the movement of his troops -from west to east. He went in a traveling coach with six horses, -surrounded by pages, aides-de-camp, and an escort, along the road to -Posen, Thorn, Danzig, and Konigsberg. At each of these towns thousands -of people met him with excitement and enthusiasm. - -The army was moving from west to east, and relays of six horses -carried him in the same direction. On the tenth of June,* coming up -with the army, he spent the night in apartments prepared for him on -the estate of a Polish count in the Vilkavisski forest. - - -*Old style. - - -Next day, overtaking the army, he went in a carriage to the -Niemen, and, changing into a Polish uniform, he drove to the riverbank -in order to select a place for the crossing. - -Seeing, on the other side, some Cossacks (les Cosaques) and the -wide-spreading steppes in the midst of which lay the holy city of -Moscow (Moscou, la ville sainte), the capital of a realm such as the -Scythia into which Alexander the Great had marched--Napoleon -unexpectedly, and contrary alike to strategic and diplomatic -considerations, ordered an advance, and the next day his army began to -cross the Niemen. - -Early in the morning of the twelfth of June he came out of his tent, -which was pitched that day on the steep left bank of the Niemen, and -looked through a spyglass at the streams of his troops pouring out -of the Vilkavisski forest and flowing over the three bridges thrown -across the river. The troops, knowing of the Emperor's presence, -were on the lookout for him, and when they caught sight of a figure in -an overcoat and a cocked hat standing apart from his suite in front of -his tent on the hill, they threw up their caps and shouted: "Vive -l'Empereur!" and one after another poured in a ceaseless stream out of -the vast forest that had concealed them and, separating, flowed on and -on by the three bridges to the other side. - -"Now we'll go into action. Oh, when he takes it in hand himself, -things get hot... by heaven!... There he is!... Vive l'Empereur! So -these are the steppes of Asia! It's a nasty country all the same. Au -revoir, Beauche; I'll keep the best palace in Moscow for you! Au -revoir. Good luck!... Did you see the Emperor? Vive l'Empereur!... -preur!--If they make me Governor of India, Gerard, I'll make you -Minister of Kashmir--that's settled. Vive l'Empereur! Hurrah! -hurrah! hurrah! The Cossacks--those rascals--see how they run! Vive -l'Empereur! There he is, do you see him? I've seen him twice, as I see -you now. The little corporal... I saw him give the cross to one of the -veterans.... Vive l'Empereur!" came the voices of men, old and -young, of most diverse characters and social positions. On the faces -of all was one common expression of joy at the commencement of the -long-expected campaign and of rapture and devotion to the man in the -gray coat who was standing on the hill. - -On the thirteenth of June a rather small, thoroughbred Arab horse -was brought to Napoleon. He mounted it and rode at a gallop to one -of the bridges over the Niemen, deafened continually by incessant -and rapturous acclamations which he evidently endured only because -it was impossible to forbid the soldiers to express their love of -him by such shouting, but the shouting which accompanied him -everywhere disturbed him and distracted him from the military cares -that had occupied him from the time he joined the army. He rode across -one of the swaying pontoon bridges to the farther side, turned sharply -to the left, and galloped in the direction of Kovno, preceded by -enraptured, mounted chasseurs of the Guard who, breathless with -delight, galloped ahead to clear a path for him through the troops. On -reaching the broad river Viliya, he stopped near a regiment of -Polish Uhlans stationed by the river. - -"Vivat!" shouted the Poles, ecstatically, breaking their ranks and -pressing against one another to see him. - -Napoleon looked up and down the river, dismounted, and sat down on a -log that lay on the bank. At a mute sign from him, a telescope was -handed him which he rested on the back of a happy page who had run -up to him, and he gazed at the opposite bank. Then he became -absorbed in a map laid out on the logs. Without lifting his head he -said something, and two of his aides-de-camp galloped off to the -Polish Uhlans. - -"What? What did he say?" was heard in the ranks of the Polish Uhlans -when one of the aides-de-camp rode up to them. - -The order was to find a ford and to cross the river. The colonel -of the Polish Uhlans, a handsome old man, flushed and, fumbling in his -speech from excitement, asked the aide-de-camp whether he would be -permitted to swim the river with his Uhlans instead of seeking a ford. -In evident fear of refusal, like a boy asking for permission to get on -a horse, he begged to be allowed to swim across the river before the -Emperor's eyes. The aide-de-camp replied that probably the Emperor -would not be displeased at this excess of zeal. - -As soon as the aide-de-camp had said this, the old mustached -officer, with happy face and sparkling eyes, raised his saber, shouted -"Vivat!" and, commanding the Uhlans to follow him, spurred his horse -and galloped into the river. He gave an angry thrust to his horse, -which had grown restive under him, and plunged into the water, heading -for the deepest part where the current was swift. Hundreds of Uhlans -galloped in after him. It was cold and uncanny in the rapid current in -the middle of the stream, and the Uhlans caught hold of one another as -they fell off their horses. Some of the horses were drowned and some -of the men; the others tried to swim on, some in the saddle and some -clinging to their horses' manes. They tried to make their way -forward to the opposite bank and, though there was a ford one third of -a mile away, were proud that they were swimming and drowning in this -river under the eyes of the man who sat on the log and was not even -looking at what they were doing. When the aide-de-camp, having -returned and choosing an opportune moment, ventured to draw the -Emperor's attention to the devotion of the Poles to his person, the -little man in the gray overcoat got up and, having summoned -Berthier, began pacing up and down the bank with him, giving him -instructions and occasionally glancing disapprovingly at the -drowning Uhlans who distracted his attention. - -For him it was no new conviction that his presence in any part of -the world, from Africa to the steppes of Muscovy alike, was enough -to dumfound people and impel them to insane self-oblivion. He called -for his horse and rode to his quarters. - -Some forty Uhlans were drowned in the river, though boats were -sent to their assistance. The majority struggled back to the bank from -which they had started. The colonel and some of his men got across and -with difficulty clambered out on the further bank. And as soon as they -had got out, in their soaked and streaming clothes, they shouted -"Vivat!" and looked ecstatically at the spot where Napoleon had been -but where he no longer was and at that moment considered themselves -happy. - -That evening, between issuing one order that the forged Russian -paper money prepared for use in Russia should be delivered as -quickly as possible and another that a Saxon should be shot, on whom a -letter containing information about the orders to the French army -had been found, Napoleon also gave instructions that the Polish -colonel who had needlessly plunged into the river should be enrolled -in the Legion d'honneur of which Napoleon was himself the head. - -Quos vult perdere dementat.* - - -*Those whom (God) wishes to destroy he drives mad. - - - - - -CHAPTER III - - -The Emperor of Russia had, meanwhile, been in Vilna for more than -a month, reviewing troops and holding maneuvers. Nothing was ready for -the war that everyone expected and to prepare for which the Emperor -had come from Petersburg. There was no general plan of action. The -vacillation between the various plans that were proposed had even -increased after the Emperor had been at headquarters for a month. Each -of the three armies had its own commander in chief, but there was no -supreme commander of all the forces, and the Emperor did not assume -that responsibility himself. - -The longer the Emperor remained in Vilna the less did everybody- -tired of waiting--prepare for the war. All the efforts of those who -surrounded the sovereign seemed directed merely to making him spend -his time pleasantly and forget that war was impending. - -In June, after many balls and fetes given by the Polish magnates, by -the courtiers, and by the Emperor himself, it occurred to one of the -Polish aides-de-camp in attendance that a dinner and ball should be -given for the Emperor by his aides-de-camp. This idea was eagerly -received. The Emperor gave his consent. The aides-de-camp collected -money by subscription. The lady who was thought to be most pleasing to -the Emperor was invited to act as hostess. Count Bennigsen, being a -landowner in the Vilna province, offered his country house for the -fete, and the thirteenth of June was fixed for a ball, dinner, -regatta, and fireworks at Zakret, Count Bennigsen's country seat. - - -The very day that Napoleon issued the order to cross the Niemen, and -his vanguard, driving off the Cossacks, crossed the Russian -frontier, Alexander spent the evening at the entertainment given by -his aides-de-camp at Bennigsen's country house. - -It was a gay and brilliant fete. Connoisseurs of such matters -declared that rarely had so many beautiful women been assembled in one -place. Countess Bezukhova was present among other Russian ladies who -had followed the sovereign from Petersburg to Vilna and eclipsed the -refined Polish ladies by her massive, so called Russian type of -beauty. The Emperor noticed her and honored her with a dance. - -Boris Drubetskoy, having left his wife in Moscow and being for the -present en garcon (as he phrased it), was also there and, though not -an aide-de-camp, had subscribed a large sum toward the expenses. Boris -was now a rich man who had risen to high honors and no longer sought -patronage but stood on an equal footing with the highest of those of -his own age. He was meeting Helene in Vilna after not having seen -her for a long time and did not recall the past, but as Helene was -enjoying the favors of a very important personage and Boris had only -recently married, they met as good friends of long standing. - -At midnight dancing was still going on. Helene, not having a -suitable partner, herself offered to dance the mazurka with Boris. -They were the third couple. Boris, coolly looking at Helene's dazzling -bare shoulders which emerged from a dark, gold-embroidered, gauze -gown, talked to her of old acquaintances and at the same time, unaware -of it himself and unnoticed by others, never for an instant ceased -to observe the Emperor who was in the same room. The Emperor was not -dancing, he stood in the doorway, stopping now one pair and now -another with gracious words which he alone knew how to utter. - -As the mazurka began, Boris saw that Adjutant General Balashev, -one of those in closest attendance on the Emperor, went up to him -and contrary to court etiquette stood near him while he was talking to -a Polish lady. Having finished speaking to her, the Emperor looked -inquiringly at Balashev and, evidently understanding that he only -acted thus because there were important reasons for so doing, nodded -slightly to the lady and turned to him. Hardly had Balashev begun to -speak before a look of amazement appeared on the Emperor's face. He -took Balashev by the arm and crossed the room with him, -unconsciously clearing a path seven yards wide as the people on both -sides made way for him. Boris noticed Arakcheev's excited face when -the sovereign went out with Balashev. Arakcheev looked at the -Emperor from under his brow and, sniffing with his red nose, stepped -forward from the crowd as if expecting the Emperor to address him. -(Boris understood that Arakcheev envied Balashev and was displeased -that evidently important news had reached the Emperor otherwise than -through himself.) - -But the Emperor and Balashev passed out into the illuminated -garden without noticing Arakcheev who, holding his sword and -glancing wrathfully around, followed some twenty paces behind them. - -All the time Boris was going through the figures of the mazurka, -he was worried by the question of what news Balashev had brought and -how he could find it out before others. In the figure in which he -had to choose two ladies, he whispered to Helene that he meant to -choose Countess Potocka who, he thought, had gone out onto the -veranda, and glided over the parquet to the door opening into the -garden, where, seeing Balashev and the Emperor returning to the -veranda, he stood still. They were moving toward the door. Boris, -fluttering as if he had not had time to withdraw, respectfully pressed -close to the doorpost with bowed head. - -The Emperor, with the agitation of one who has been personally -affronted, was finishing with these words: - -"To enter Russia without declaring war! I will not make peace as -long as a single armed enemy remains in my country!" It seemed to -Boris that it gave the Emperor pleasure to utter these words. He was -satisfied with the form in which he had expressed his thoughts, but -displeased that Boris had overheard it. - -"Let no one know of it!" the Emperor added with a frown. - -Boris understood that this was meant for him and, closing his -eyes, slightly bowed his head. The Emperor re-entered the ballroom and -remained there about another half-hour. - -Boris was thus the first to learn the news that the French army -had crossed the Niemen and, thanks to this, was able to show certain -important personages that much that was concealed from others was -usually known to him, and by this means he rose higher in their -estimation. - - -The unexpected news of the French having crossed the Niemen was -particularly startling after a month of unfulfilled expectations, -and at a ball. On first receiving the news, under the influence of -indignation and resentment the Emperor had found a phrase that pleased -him, fully expressed his feelings, and has since become famous. On -returning home at two o'clock that night he sent for his secretary, -Shishkov, and told him to write an order to the troops and a -rescript to Field Marshal Prince Saltykov, in which he insisted on the -words being inserted that he would not make peace so long as a -single armed Frenchman remained on Russian soil. - -Next day the following letter was sent to Napoleon: - - -Monsieur mon frere, - -Yesterday I learned that, despite the loyalty which I have kept my -engagements with Your Majesty, your troops have crossed the Russian -frontier, and I have this moment received from Petersburg a note, in -which Count Lauriston informs me, as a reason for this aggression, -that Your Majesty has considered yourself to be in a state of war with -me from the time Prince Kuragin asked for his passports. The reasons -on which the Duc de Bassano based his refusal to deliver them to him -would never have led me to suppose that that could serve as a -pretext for aggression. In fact, the ambassador, as he himself has -declared, was never authorized to make that demand, and as soon as I -was informed of it I let him know how much I disapproved of it and -ordered him to remain at his post. If Your Majesty does not intend -to shed the blood of our peoples for such a misunderstanding, and -consents to withdraw your troops from Russian territory, I will regard -what has passed as not having occurred and an understanding between us -will be possible. In the contrary case, Your Majesty, I shall see -myself forced to repel an attack that nothing on my part has provoked. -It still depends on Your Majesty to preserve humanity from the -calamity of another war. I am, etc., - (signed) Alexander - - - - - -CHAPTER IV - - -At two in the morning of the fourteenth of June, the Emperor, having -sent for Balashev and read him his letter to Napoleon, ordered him -to take it and hand it personally to the French Emperor. When -dispatching Balashev, the Emperor repeated to him the words that he -would not make peace so long as a single armed enemy remained on -Russian soil and told him to transmit those words to Napoleon. -Alexander did not insert them in his letter to Napoleon, because -with his characteristic tact he felt it would be injudicious to use -them at a moment when a last attempt at reconciliation was being made, -but he definitely instructed Balashev to repeat them personally to -Napoleon. - -Having set off in the small hours of the fourteenth, accompanied -by a bugler and two Cossacks, Balashev reached the French outposts -at the village of Rykonty, on the Russian side of the Niemen, by dawn. -There he was stopped by French cavalry sentinels. - -A French noncommissioned officer of hussars, in crimson uniform -and a shaggy cap, shouted to the approaching Balashev to halt. -Balashev did not do so at once, but continued to advance along the -road at a walking pace. - -The noncommissioned officer frowned and, muttering words of abuse, -advanced his horse's chest against Balashev, put his hand to his -saber, and shouted rudely at the Russian general, asking: was he -deaf that he did not do as he was told? Balashev mentioned who he was. -The noncommissioned officer began talking with his comrades about -regimental matters without looking at the Russian general. - -After living at the seat of the highest authority and power, after -conversing with the Emperor less than three hours before, and in -general being accustomed to the respect due to his rank in the -service, Balashev found it very strange here on Russian soil to -encounter this hostile, and still more this disrespectful, application -of brute force to himself. - -The sun was only just appearing from behind the clouds, the air -was fresh and dewy. A herd of cattle was being driven along the road -from the village, and over the fields the larks rose trilling, one -after another, like bubbles rising in water. - -Balashev looked around him, awaiting the arrival of an officer -from the village. The Russian Cossacks and bugler and the French -hussars looked silently at one another from time to time. - -A French colonel of hussars, who had evidently just left his bed, -came riding from the village on a handsome sleek gray horse, -accompanied by two hussars. The officer, the soldiers, and their -horses all looked smart and well kept. - -It was that first period of a campaign when troops are still in full -trim, almost like that of peacetime maneuvers, but with a shade of -martial swagger in their clothes, and a touch of the gaiety and spirit -of enterprise which always accompany the opening of a campaign. - -The French colonel with difficulty repressed a yawn, but was -polite and evidently understood Balashev's importance. He led him past -his soldiers and behind the outposts and told him that his wish to -be presented to the Emperor would most likely be satisfied -immediately, as the Emperor's quarters were, he believed, not far off. - -They rode through the village of Rykonty, past tethered French -hussar horses, past sentinels and men who saluted their colonel and -stared with curiosity at a Russian uniform, and came out at the -other end of the village. The colonel said that the commander of the -division was a mile and a quarter away and would receive Balashev -and conduct him to his destination. - -The sun had by now risen and shone gaily on the bright verdure. - -They had hardly ridden up a hill, past a tavern, before they saw a -group of horsemen coming toward them. In front of the group, on a -black horse with trappings that glittered in the sun, rode a tall -man with plumes in his hat and black hair curling down to his -shoulders. He wore a red mantle, and stretched his long legs forward -in French fashion. This man rode toward Balashev at a gallop, his -plumes flowing and his gems and gold lace glittering in the bright -June sunshine. - -Balashev was only two horses' length from the equestrian with the -bracelets, plunies, necklaces, and gold embroidery, who was -galloping toward him with a theatrically solemn countenance, when -Julner, the French colonel, whispered respectfully: "The King of -Naples!" It was, in fact, Murat, now called "King of Naples." Though -it was quite incomprehensible why he should be King of Naples, he -was called so, and was himself convinced that he was so, and therefore -assumed a more solemn and important air than formerly. He was so -sure that he really was the King of Naples that when, on the eve of -his departure from that city, while walking through the streets with -his wife, some Italians called out to him: "Viva il re!"* he turned to -his wife with a pensive smile and said: "Poor fellows, they don't know -that I am leaving them tomorrow!" - - -*"Long live the king." - - -But though he firmly believed himself to be King of Naples and -pitied the grief felt by the subjects he was abandoning, latterly, -after he had been ordered to return to military service--and -especially since his last interview with Napoleon in Danzig, when -his august brother-in-law had told him: "I made you King that you -should reign in my way, but not in yours!"--he had cheerfully taken up -his familiar business, and--like a well-fed but not overfat horse that -feels himself in harness and grows skittish between the shafts--he -dressed up in clothes as variegated and expensive as possible, and -gaily and contentedly galloped along the roads of Poland, without -himself knowing why or whither. - -On seeing the Russian general he threw back his head, with its -long hair curling to his shoulders, in a majestically royal manner, -and looked inquiringly at the French colonel. The colonel respectfully -informed His Majesty of Balashev's mission, whose name he could not -pronounce. - -"De Bal-macheve!" said the King (overcoming by his assurance the -difficulty that had presented itself to the colonel). "Charmed to make -your acquaintance, General!" he added, with a gesture of kingly -condescension. - -As soon as the King began to speak loud and fast his royal dignity -instantly forsook him, and without noticing it he passed into his -natural tone of good-natured familiarity. He laid his hand on the -withers of Balashev's horse and said: - -"Well, General, it all looks like war," as if regretting a -circumstance of which he was unable to judge. - -"Your Majesty," replied Balashev, "my master, the Emperor, does -not desire war and as Your Majesty sees..." said Balashev, using the -words Your Majesty at every opportunity, with the affectation -unavoidable in frequently addressing one to whom the title was still a -novelty. - -Murat's face beamed with stupid satisfaction as he listened to -"Monsieur de Bal-macheve." But royaute oblige!* and he felt it -incumbent on him, as a king and an ally, to confer on state affairs -with Alexander's envoy. He dismounted, took Balashev's arm, and moving -a few steps away from his suite, which waited respectfully, began to -pace up and down with him, trying to speak significantly. He -referred to the fact that the Emperor Napoleon had resented the demand -that he should withdraw his troops from Prussia, especially when -that demand became generally known and the dignity of France was -thereby offended. - - -*"Royalty has its obligations." - - -Balashev replied that there was "nothing offensive in the demand, -because..." but Murat interrupted him. - -"Then you don't consider the Emperor Alexander the aggressor?" he -asked unexpectedly, with a kindly and foolish smile. - -Balashev told him why he considered Napoleon to be the originator of -the war. - -"Oh, my dear general!" Murat again interrupted him, "with all my -heart I wish the Emperors may arrange the affair between them, and -that the war begun by no wish of mine may finish as quickly as -possible!" said he, in the tone of a servant who wants to remain -good friends with another despite a quarrel between their masters. - -And he went on to inquiries about the Grand Duke and the state of -his health, and to reminiscences of the gay and amusing times he had -spent with him in Naples. Then suddenly, as if remembering his royal -dignity, Murat solemnly drew himself up, assumed the pose in which -he had stood at his coronation, and, waving his right arm, said: - -"I won't detain you longer, General. I wish success to your -mission," and with his embroidered red mantle, his flowing feathers, -and his glittering ornaments, he rejoined his suite who were -respectfully awaiting him. - -Balashev rode on, supposing from Murat's words that he would very -soon be brought before Napoleon himself. But instead of that, at the -next village the sentinels of Davout's infantry corps detained him -as the pickets of the vanguard had done, and an adjutant of the -corps commander, who was fetched, conducted him into the village to -Marshal Davout. - - - - - -CHAPTER V - - -Davout was to Napoleon what Arakcheev was to Alexander--though not a -coward like Arakcheev, he was as precise, as cruel, and as unable to -express his devotion to his monarch except by cruelty. - -In the organism of states such men are necessary, as wolves are -necessary in the organism of nature, and they always exist, always -appear and hold their own, however incongruous their presence and -their proximity to the head of the government may be. This -inevitability alone can explain how the cruel Arakcheev, who tore -out a grenadier's mustache with his own hands, whose weak nerves -rendered him unable to face danger, and who was neither an educated -man nor a courtier, was able to maintain his powerful position with -Alexander, whose own character was chivalrous, noble, and gentle. - -Balashev found Davout seated on a barrel in the shed of a -peasant's hut, writing--he was auditing accounts. Better quarters -could have been found him, but Marshal Davout was one of those men who -purposely put themselves in most depressing conditions to have a -justification for being gloomy. For the same reason they are always -hard at work and in a hurry. "How can I think of the bright side of -life when, as you see, I am sitting on a barrel and working in a dirty -shed?" the expression of his face seemed to say. The chief pleasure -and necessity of such men, when they encounter anyone who shows -animation, is to flaunt their own dreary, persistent activity. -Davout allowed himself that pleasure when Balashev was brought in. -He became still more absorbed in his task when the Russian general -entered, and after glancing over his spectacles at Balashev's face, -which was animated by the beauty of the morning and by his talk with -Murat, he did not rise or even stir, but scowled still more and -sneered malevolently. - -When he noticed in Balashev's face the disagreeable impression -this reception produced, Davout raised his head and coldly asked -what he wanted. - -Thinking he could have been received in such a manner only because -Davout did not know that he was adjutant general to the Emperor -Alexander and even his envoy to Napoleon, Balashev hastened to -inform him of his rank and mission. Contrary to his expectation, -Davout, after hearing him, became still surlier and ruder. - -"Where is your dispatch?" he inquired. "Give it to me. I will send -it to the Emperor." - -Balashev replied that he had been ordered to hand it personally to -the Emperor. - -"Your Emperor's orders are obeyed in your army, but here," said -Davout, "you must do as you're told." - -And, as if to make the Russian general still more conscious of his -dependence on brute force, Davout sent an adjutant to call the officer -on duty. - -Balashev took out the packet containing the Emperor's letter and -laid it on the table (made of a door with its hinges still hanging -on it, laid across two barrels). Davout took the packet and read the -inscription. - -"You are perfectly at liberty to treat me with respect or not," -protested Balashev, "but permit me to observe that I have the honor to -be adjutant general to His Majesty...." - -Davout glanced at him silently and plainly derived pleasure from the -signs of agitation and confusion which appeared on Balashev's face. - -"You will be treated as is fitting," said he and, putting the packet -in his pocket, left the shed. - -A minute later the marshal's adjutant, de Castres, came in and -conducted Balashev to the quarters assigned him. - -That day he dined with the marshal, at the same board on the -barrels. - -Next day Davout rode out early and, after asking Balashev to come to -him, peremptorily requested him to remain there, to move on with the -baggage train should orders come for it to move, and to talk to no one -except Monsieur de Castres. - -After four days of solitude, ennui, and consciousness of his -impotence and insignificance--particularly acute by contrast with -the sphere of power in which he had so lately moved--and after several -marches with the marshal's baggage and the French army, which occupied -the whole district, Balashev was brought to Vilna--now occupied by the -French--through the very gate by which he had left it four days -previously. - -Next day the imperial gentleman-in-waiting, the Comte de Turenne, -came to Balashev and informed him of the Emperor Napoleon's wish to -honor him with an audience. - -Four days before, sentinels of the Preobrazhensk regiment had -stood in front of the house to which Balashev was conducted, and now -two French grenadiers stood there in blue uniforms unfastened in front -and with shaggy caps on their heads, and an escort of hussars and -Uhlans and a brilliant suite of aides-de-camp, pages, and generals, -who were waiting for Napoleon to come out, were standing at the porch, -round his saddle horse and his Mameluke, Rustan. Napoleon received -Balashev in the very house in Vilna from which Alexander had -dispatched him on his mission. - - - - - -CHAPTER VI - - -Though Balashev was used to imperial pomp, he was amazed at the -luxury and magnificence of Napoleon's court. - -The Comte de Turenne showed him into a big reception room where many -generals, gentlemen-in-waiting, and Polish magnates--several of whom -Balashev had seen at the court of the Emperor of Russia--were waiting. -Duroc said that Napoleon would receive the Russian general before -going for his ride. - -After some minutes, the gentleman-in-waiting who was on duty came -into the great reception room and, bowing politely, asked Balashev -to follow him. - -Balashev went into a small reception room, one door of which led -into a study, the very one from which the Russian Emperor had -dispatched him on his mission. He stood a minute or two, waiting. He -heard hurried footsteps beyond the door, both halves of it were opened -rapidly; all was silent and then from the study the sound was heard of -other steps, firm and resolute--they were those of Napoleon. He had -just finished dressing for his ride, and wore a blue uniform, -opening in front over a white waistcoat so long that it covered his -rotund stomach, white leather breeches tightly fitting the fat -thighs of his short legs, and Hessian boots. His short hair had -evidently just been brushed, but one lock hung down in the middle of -his broad forehead. His plump white neck stood out sharply above the -black collar of his uniform, and he smelled of Eau de Cologne. His -full face, rather young-looking, with its prominent chin, wore a -gracious and majestic expression of imperial welcome. - -He entered briskly, with a jerk at every step and his head -slightly thrown back. His whole short corpulent figure with broad -thick shoulders, and chest and stomach involuntarily protruding, had -that imposing and stately appearance one sees in men of forty who live -in comfort. It was evident, too, that he was in the best of spirits -that day. - -He nodded in answer to Balashav's low and respectful bow, and coming -up to him at once began speaking like a man who values every moment of -his time and does not condescend to prepare what he has to say but -is sure he will always say the right thing and say it well. - -"Good day, General!" said he. "I have received the letter you -brought from the Emperor Alexander and am very glad to see you." He -glanced with his large eyes into Balashav's face and immediately -looked past him. - -It was plain that Balashev's personality did not interest him at -all. Evidently only what took place within his own mind interested -him. Nothing outside himself had any significance for him, because -everything in the world, it seemed to him, depended entirely on his -will. - -"I do not, and did not, desire war," he continued, "but it has -been forced on me. Even now" (he emphasized the word) "I am ready to -receive any explanations you can give me." - -And he began clearly and concisely to explain his reasons for -dissatisfaction with the Russian government. Judging by the calmly -moderate and amicable tone in which the French Emperor spoke, Balashev -was firmly persuaded that he wished for peace and intended to enter -into negotiations. - -When Napoleon, having finished speaking, looked inquiringly at the -Russian envoy, Balashev began a speech he had prepared long before: -"Sire! The Emperor, my master..." but the sight of the Emperor's -eyes bent on him confused him. "You are flurried--compose yourself!" -Napoleon seemed to say, as with a scarcely perceptible smile he looked -at Balashev's uniform and sword. - -Balashev recovered himself and began to speak. He said that the -Emperor Alexander did not consider Kurakin's demand for his -passports a sufficient cause for war; that Kurakin had acted on his -own initiative and without his sovereign's assent, that the Emperor -Alexander did not desire war, and had no relations with England. - -"Not yet!" interposed Napoleon, and, as if fearing to give vent to -his feelings, he frowned and nodded slightly as a sign that Balashev -might proceed. - -After saying all he had been instructed to say, Balashev added -that the Emperor Alexander wished for peace, but would not enter -into negotiations except on condition that... Here Balashev hesitated: -he remembered the words the Emperor Alexander had not written in his -letter, but had specially inserted in the rescript to Saltykov and had -told Balashev to repeat to Napoleon. Balashev remembered these -words, "So long as a single armed foe remains on Russian soil," but -some complex feeling restrained him. He could not utter them, though -he wished to do so. He grew confused and said: "On condition that -the French army retires beyond the Niemen." - -Napoleon noticed Balashev's embarrassment when uttering these last -words; his face twitched and the calf of his left leg began to -quiver rhythmically. Without moving from where he stood he began -speaking in a louder tone and more hurriedly than before. During the -speech that followed, Balashev, who more than once lowered his eyes, -involuntarily noticed the quivering of Napoleon's left leg which -increased the more Napoleon raised his voice. - -"I desire peace, no less than the Emperor Alexander," he began. -"Have I not for eighteen months been doing everything to obtain it? -I have waited eighteen months for explanations. But in order to -begin negotiations, what is demanded of me?" he said, frowning and -making an energetic gesture of inquiry with his small white plump -hand. - -"The withdrawal of your army beyond the Niemen, sire," replied -Balashev. - -"The Niemen?" repeated Napoleon. "So now you want me to retire -beyond the Niemen--only the Niemen?" repeated Napoleon, looking -straight at Balashev. - -The latter bowed his head respectfully. - -Instead of the demand of four months earlier to withdraw from -Pomerania, only a withdrawal beyond the Niemen was now demanded. -Napoleon turned quickly and began to pace the room. - -"You say the demand now is that I am to withdraw beyond the Niemen -before commencing negotiations, but in just the same way two months -ago the demand was that I should withdraw beyond the Vistula and the -Oder, and yet you are willing to negotiate." - -He went in silence from one corner of the room to the other and -again stopped in front of Balashev. Balashev noticed that his left leg -was quivering faster than before and his face seemed petrified in -its stern expression. This quivering of his left leg was a thing -Napoleon was conscious of. "The vibration of my left calf is a great -sign with me," he remarked at a later date. - -"Such demands as to retreat beyond the Vistula and Oder may be -made to a Prince of Baden, but not to me!" Napoleon almost screamed, -quite to his own surprise. "If you gave me Petersburg and Moscow I -could not accept such conditions. You say I have begun this war! But -who first joined his army? The Emperor Alexander, not I! And you offer -me negotiations when I have expended millions, when you are in -alliance with England, and when your position is a bad one. You -offer me negotiations! But what is the aim of your alliance with -England? What has she given you?" he continued hurriedly, evidently no -longer trying to show the advantages of peace and discuss its -possibility, but only to prove his own rectitude and power and -Alexander's errors and duplicity. - -The commencement of his speech had obviously been made with the -intention of demonstrating the advantages of his position and -showing that he was nevertheless willing to negotiate. But he had -begun talking, and the more he talked the less could he control his -words. - -The whole purport of his remarks now was evidently to exalt -himself and insult Alexander--just what he had least desired at the -commencement of the interview. - -"I hear you have made peace with Turkey?" - -Balashev bowed his head affirmatively. - -"Peace has been concluded..." he began. - -But Napoleon did not let him speak. He evidently wanted to do all -the talking himself, and continued to talk with the sort of -eloquence and unrestrained irritability to which spoiled people are so -prone. - -"Yes, I know you have made peace with the Turks without obtaining -Moldavia and Wallachia; I would have given your sovereign those -provinces as I gave him Finland. Yes," he went on, "I promised and -would have given the Emperor Alexander Moldavia and Wallachia, and now -he won't have those splendid provinces. Yet he might have united -them to his empire and in a single reign would have extended Russia -from the Gulf of Bothnia to the mouths of the Danube. Catherine the -Great could not have done more," said Napoleon, growing more and -more excited as he paced up and down the room, repeating to Balashev -almost the very words he had used to Alexander himself at Tilsit. "All -that, he would have owed to my friendship. Oh, what a splendid reign!" -he repeated several times, then paused, drew from his pocket a gold -snuffbox, lifted it to his nose, and greedily sniffed at it. - -"What a splendid reign the Emperor Alexander's might have been!" - -He looked compassionately at Balashev, and as soon as the latter -tried to make some rejoinder hastily interrupted him. - -"What could he wish or look for that he would not have obtained -through my friendship?" demanded Napoleon, shrugging his shoulders -in perplexity. "But no, he has preferred to surround himself with my -enemies, and with whom? With Steins, Armfeldts, Bennigsens, and -Wintzingerodes! Stein, a traitor expelled from his own country; -Armfeldt, a rake and an intriguer; Wintzingerode, a fugitive French -subject; Bennigsen, rather more of a soldier than the others, but -all the same an incompetent who was unable to do anything in 1807 -and who should awaken terrible memories in the Emperor Alexander's -mind.... Granted that were they competent they might be made use -of," continued Napoleon--hardly able to keep pace in words with the -rush of thoughts that incessantly sprang up, proving how right and -strong he was (in his perception the two were one and the same)- -"but they are not even that! They are neither fit for war nor peace! -Barclay is said to be the most capable of them all, but I cannot say -so, judging by his first movements. And what are they doing, all these -courtiers? Pfuel proposes, Armfeldt disputes, Bennigsen considers, and -Barclay, called on to act, does not know what to decide on, and time -passes bringing no result. Bagration alone is a military man. He's -stupid, but he has experience, a quick eye, and resolution.... And -what role is your young monarch playing in that monstrous crowd? -They compromise him and throw on him the responsibility for all that -happens. A sovereign should not be with the army unless he is a -general!" said Napoleon, evidently uttering these words as a direct -challenge to the Emperor. He knew how Alexander desired to be a -military commander. - -"The campaign began only a week ago, and you haven't even been -able to defend Vilna. You are cut in two and have been driven out of -the Polish provinces. Your army is grumbling." - -"On the contrary, Your Majesty," said Balashev, hardly able to -remember what had been said to him and following these verbal -fireworks with difficulty, "the troops are burning with eagerness..." - -"I know everything!" Napoleon interrupted him. "I know everything. I -know the number of your battalions as exactly as I know my own. You -have not two hundred thousand men, and I have three times that number. -I give you my word of honor," said Napoleon, forgetting that his -word of honor could carry no weight--"I give you my word of honor that -I have five hundred and thirty thousand men this side of the -Vistula. The Turks will be of no use to you; they are worth nothing -and have shown it by making peace with you. As for the Swedes--it is -their fate to be governed by mad kings. Their king was insane and they -changed him for another--Bernadotte, who promptly went mad--for no -Swede would ally himself with Russia unless he were mad." - -Napoleon grinned maliciously and again raised his snuffbox to his -nose. - -Balashev knew how to reply to each of Napoleon's remarks, and -would have done so; he continually made the gesture of a man wishing -to say something, but Napoleon always interrupted him. To the -alleged insanity of the Swedes, Balashev wished to reply that when -Russia is on her side Sweden is practically an island: but Napoleon -gave an angry exclamation to drown his voice. Napoleon was in that -state of irritability in which a man has to talk, talk, and talk, -merely to convince himself that he is in the right. Balashev began -to feel uncomfortable: as envoy he feared to demean his dignity and -felt the necessity of replying; but, as a man, he shrank before the -transport of groundless wrath that had evidently seized Napoleon. He -knew that none of the words now uttered by Napoleon had any -significance, and that Napoleon himself would be ashamed of them -when he came to his senses. Balashev stood with downcast eyes, looking -at the movements of Napoleon's stout legs and trying to avoid -meeting his eyes. - -"But what do I care about your allies?" said Napoleon. "I have -allies--the Poles. There are eighty thousand of them and they fight -like lions. And there will be two hundred thousand of them." - -And probably still more perturbed by the fact that he had uttered -this obvious falsehood, and that Balashev still stood silently -before him in the same attitude of submission to fate, Napoleon -abruptly turned round, drew close to Balashev's face, and, -gesticulating rapidly and energetically with his white hands, almost -shouted: - -"Know that if you stir up Prussia against me, I'll wipe it off the -map of Europe!" he declared, his face pale and distorted by anger, and -he struck one of his small hands energetically with the other. "Yes, I -will throw you back beyond the Dvina and beyond the Dnieper, and -will re-erect against you that barrier which it was criminal and blind -of Europe to allow to be destroyed. Yes, that is what will happen to -you. That is what you have gained by alienating me!" And he walked -silently several times up and down the room, his fat shoulders -twitching. - -He put his snuffbox into his waistcoat pocket, took it out again, -lifted it several times to his nose, and stopped in front of Balashev. -He paused, looked ironically straight into Balashev's eyes, and said -in a quiet voice: - -"And yet what a splendid reign your master might have had!" - -Balashev, feeling it incumbent on him to reply, said that from the -Russian side things did not appear in so gloomy a light. Napoleon -was silent, still looking derisively at him and evidently not -listening to him. Balashev said that in Russia the best results were -expected from the war. Napoleon nodded condescendingly, as if to -say, "I know it's your duty to say that, but you don't believe it -yourself. I have convinced you." - -When Balashev had ended, Napoleon again took out his snuffbox, -sniffed at it, and stamped his foot twice on the floor as a signal. -The door opened, a gentleman-in-waiting, bending respectfully, -handed the Emperor his hat and gloves; another brought him a pocket -handkerchief. Napoleon, without giving them a glance, turned to -Balashev: - -"Assure the Emperor Alexander from me," said he, taking his hat, -"that I am as devoted to him as before: I know him thoroughly and very -highly esteem his lofty qualities. I will detain you no longer, -General; you shall receive my letter to the Emperor." - -And Napoleon went quickly to the door. Everyone in the reception -room rushed forward and descended the staircase. - - - - - -CHAPTER VII - - -After all that Napoleon had said to him--those bursts of anger and -the last dryly spoken words: "I will detain you no longer, General; -you shall receive my letter," Balashev felt convinced that Napoleon -would not wish to see him, and would even avoid another meeting with -him--an insulted envoy--especially as he had witnessed his unseemly -anger. But, to his surprise, Balashev received, through Duroc, an -invitation to dine with the Emperor that day. - -Bessieres, Caulaincourt, and Berthier were present at that dinner. - -Napoleon met Balashev cheerfully and amiably. He not only showed -no sign of constraint or self-reproach on account of his outburst that -morning, but, on the contrary, tried to reassure Balashev. It was -evident that he had long been convinced that it was impossible for him -to make a mistake, and that in his perception whatever he did was -right, not because it harmonized with any idea of right and wrong, but -because he did it. - -The Emperor was in very good spirits after his ride through Vilna, -where crowds of people had rapturously greeted and followed him. -From all the windows of the streets through which he rode, rugs, -flags, and his monogram were displayed, and the Polish ladies, -welcoming him, waved their handkerchiefs to him. - -At dinner, having placed Balashev beside him, Napoleon not only -treated him amiably but behaved as if Balashev were one of his own -courtiers, one of those who sympathized with his plans and ought to -rejoice at his success. In the course of conversation he mentioned -Moscow and questioned Balashev about the Russian capital, not merely -as an interested traveler asks about a new city he intends to visit, -but as if convinced that Balashev, as a Russian, must be flattered -by his curiosity. - -"How many inhabitants are there in Moscow? How many houses? Is it -true that Moscow is called 'Holy Moscow'? How many churches are -there in Moscow?" he asked. - -And receiving the reply that there were more than two hundred -churches, he remarked: - -"Why such a quantity of churches?" - -"The Russians are very devout," replied Balashev. - -"But a large number of monasteries and churches is always a sign -of the backwardness of a people," said Napoleon, turning to -Caulaincourt for appreciation of this remark. - -Balashev respectfully ventured to disagree with the French Emperor. - -"Every country has its own character," said he. - -"But nowhere in Europe is there anything like that," said Napoleon. - -"I beg your Majesty's pardon," returned Balashev, "besides Russia -there is Spain, where there are also many churches and monasteries." - -This reply of Balashev's, which hinted at the recent defeats of -the French in Spain, was much appreciated when he related it at -Alexander's court, but it was not much appreciated at Napoleon's -dinner, where it passed unnoticed. - -The uninterested and perplexed faces of the marshals showed that -they were puzzled as to what Balashev's tone suggested. "If there is a -point we don't see it, or it is not at all witty," their expressions -seemed to say. So little was his rejoinder appreciated that Napoleon -did not notice it at all and naively asked Balashev through what towns -the direct road from there to Moscow passed. Balashev, who was on -the alert all through the dinner, replied that just as "all roads lead -to Rome," so all roads lead to Moscow: there were many roads, and -"among them the road through Poltava, which Charles XII chose." -Balashev involuntarily flushed with pleasure at the aptitude of this -reply, but hardly had he uttered the word Poltava before -Caulaincourt began speaking of the badness of the road from Petersburg -to Moscow and of his Petersburg reminiscences. - -After dinner they went to drink coffee in Napoleon's study, which -four days previously had been that of the Emperor Alexander. -Napoleon sat down, toying with his Sevres coffee cup, and motioned -Balashev to a chair beside him. - -Napoleon was in that well-known after-dinner mood which, more than -any reasoned cause, makes a man contented with himself and disposed to -consider everyone his friend. It seemed to him that he was -surrounded by men who adored him: and he felt convinced that, after -his dinner, Balashev too was his friend and worshiper. Napoleon turned -to him with a pleasant, though slightly ironic, smile. - -"They tell me this is the room the Emperor Alexander occupied? -Strange, isn't it, General?" he said, evidently not doubting that this -remark would be agreeable to his hearer since it went to prove his, -Napoleon's, superiority to Alexander. - -Balashev made no reply and bowed his head in silence. - -"Yes. Four days ago in this room, Wintzingerode and Stein were -deliberating," continued Napoleon with the same derisive and -self-confident smile. "What I can't understand," he went on, "is -that the Emperor Alexander has surrounded himself with my personal -enemies. That I do not... understand. Has he not thought that I may -the same?" and he turned inquiringly to Balashev, and evidently this -thought turned him back on to the track of his morning's anger, -which was still fresh in him. - -"And let him know that I will do so!" said Napoleon, rising and -pushing his cup away with his hand. "I'll drive all his Wurttemberg, -Baden, and Weimar relations out of Germany.... Yes. I'll drive them -out. Let him prepare an asylum for them in Russia!" - -Balashev bowed his head with an air indicating that he would like to -make his bow and leave, and only listened because he could not help -hearing what was said to him. Napoleon did not notice this expression; -he treated Balashev not as an envoy from his enemy, but as a man now -fully devoted to him and who must rejoice at his former master's -humiliation. - -"And why has the Emperor Alexander taken command of the armies? What -is the good of that? War is my profession, but his business is to -reign and not to command armies! Why has he taken on himself such a -responsibility?" - -Again Napoleon brought out his snuffbox, paced several times up -and down the room in silence, and then, suddenly and unexpectedly, -went up to Balashev and with a slight smile, as confidently, -quickly, and simply as if he were doing something not merely -important but pleasing to Balashev, he raised his hand to the -forty-year-old Russian general's face and, taking him by the ear, -pulled it gently, smiling with his lips only. - -To have one's ear pulled by the Emperor was considered the -greatest honor and mark of favor at the French court. - -"Well, adorer and courtier of the Emperor Alexander, why don't you -say anything?" said he, as if it was ridiculous, in his presence, to -be the adorer and courtier of anyone but himself, Napoleon. "Are the -horses ready for the general?" he added, with a slight inclination -of his head in reply to Balashev's bow. "Let him have mine, he has a -long way to go!" - -The letter taken by Balashev was the last Napoleon sent to -Alexander. Every detail of the interview was communicated to the -Russian monarch, and the war began... - - - - - -CHAPTER VIII - - -After his interview with Pierre in Moscow, Prince Andrew went to -Petersburg, on business as he told his family, but really to meet -Anatole Kuragin whom he felt it necessary to encounter. On reaching -Petersburg he inquired for Kuragin but the latter had already left the -city. Pierre had warned his brother-in-law that Prince Andrew was on -his track. Anatole Kuragin promptly obtained an appointment from the -Minister of War and went to join the army in Moldavia. While in -Petersburg Prince Andrew met Kutuzov, his former commander who was -always well disposed toward him, and Kutuzov suggested that he -should accompany him to the army in Moldavia, to which the old general -had been appointed commander in chief. So Prince Andrew, having -received an appointment on the headquarters staff, left for Turkey. - -Prince Andrew did not think it proper to write and challenge -Kuragin. He thought that if he challenged him without some fresh cause -it might compromise the young Countess Rostova and so he wanted to -meet Kuragin personally in order to find a fresh pretext for a duel. -But he again failed to meet Kuragin in Turkey, for soon after Prince -Andrew arrived, the latter returned to Russia. In a new country, -amid new conditions, Prince Andrew found life easier to bear. After -his betrothed had broken faith with him--which he felt the more -acutely the more he tried to conceal its effects--the surroundings -in which he had been happy became trying to him, and the freedom and -independence he had once prized so highly were still more so. Not only -could he no longer think the thoughts that had first come to him as he -lay gazing at the sky on the field of Austerlitz and had later -enlarged upon with Pierre, and which had filled his solitude at -Bogucharovo and then in Switzerland and Rome, but he even dreaded to -recall them and the bright and boundless horizons they had -revealed. He was now concerned only with the nearest practical matters -unrelated to his past interests, and he seized on these the more -eagerly the more those past interests were closed to him. It was as if -that lofty, infinite canopy of heaven that had once towered above -him had suddenly turned into a low, solid vault that weighed him down, -in which all was clear, but nothing eternal or mysterious. - -Of the activities that presented themselves to him, army service was -the simplest and most familiar. As a general on duty on Kutuzov's -staff, he applied himself to business with zeal and perseverance and -surprised Kutuzov by his willingness and accuracy in work. Not -having found Kuragin in Turkey, Prince Andrew did not think it -necessary to rush back to Russia after him, but all the same he knew -that however long it might be before he met Kuragin, despite his -contempt for him and despite all the proofs he deduced to convince -himself that it was not worth stooping to a conflict with him--he knew -that when he did meet him he would not be able to resist calling him -out, any more than a ravenous man can help snatching at food. And -the consciousness that the insult was not yet avenged, that his rancor -was still unspent, weighed on his heart and poisoned the artificial -tranquillity which he managed to obtain in Turkey by means of -restless, plodding, and rather vainglorious and ambitious activity. - -In the year 1812, when news of the war with Napoleon reached -Bucharest--where Kutuzov had been living for two months, passing his -days and nights with a Wallachian woman--Prince Andrew asked Kutuzov -to transfer him to the Western Army. Kutuzov, who was already weary of -Bolkonski's activity which seemed to reproach his own idleness, very -readily let him go and gave him a mission to Barclay de Tolly. - -Before joining the Western Army which was then, in May, encamped -at Drissa, Prince Andrew visited Bald Hills which was directly on -his way, being only two miles off the Smolensk highroad. During the -last three years there had been so many changes in his life, he had -thought, felt, and seen so much (having traveled both in the east -and the west), that on reaching Bald Hills it struck him as strange -and unexpected to find the way of life there unchanged and still the -same in every detail. He entered through the gates with their stone -pillars and drove up the avenue leading to the house as if he were -entering an enchanted, sleeping castle. The same old stateliness, -the same cleanliness, the same stillness reigned there, and inside -there was the same furniture, the same walls, sounds, and smell, and -the same timid faces, only somewhat older. Princess Mary was still the -same timid, plain maiden getting on in years, uselessly and -joylessly passing the best years of her life in fear and constant -suffering. Mademoiselle Bourienne was the same coquettish, -self-satisfied girl, enjoying every moment of her existence and full -of joyous hopes for the future. She had merely become more -self-confident, Prince Andrew thought. Dessalles, the tutor he had -brought from Switzerland, was wearing a coat of Russian cut and -talking broken Russian to the servants, but was still the same -narrowly intelligent, conscientious, and pedantic preceptor. The old -prince had changed in appearance only by the loss of a tooth, which -left a noticeable gap on one side of his mouth; in character he was -the same as ever, only showing still more irritability and -skepticism as to what was happening in the world. Little Nicholas -alone had changed. He had grown, become rosier, had curly dark hair, -and, when merry and laughing, quite unconsciously lifted the upper lip -of his pretty little mouth just as the little princess used to do. -He alone did not obey the law of immutability in the enchanted, -sleeping castle. But though externally all remained as of old, the -inner relations of all these people had changed since Prince Andrew -had seen them last. The household was divided into two alien and -hostile camps, who changed their habits for his sake and only met -because he was there. To the one camp belonged the old prince, -Madmoiselle Bourienne, and the architect; to the other Princess -Mary, Dessalles, little Nicholas, and all the old nurses and maids. - -During his stay at Bald Hills all the family dined together, but -they were ill at ease and Prince Andrew felt that he was a visitor for -whose sake an exception was being made and that his presence made them -all feel awkward. Involuntarily feeling this at dinner on the first -day, he was taciturn, and the old prince noticing this also became -morosely dumb and retired to his apartments directly after dinner. -In the evening, when Prince Andrew went to him and, trying to rouse -him, began to tell him of the young Count Kamensky's campaign, the old -prince began unexpectedly to talk about Princess Mary, blaming her for -her superstitions and her dislike of Mademoiselle Bourienne, who, he -said, was the only person really attached to him. - -The old prince said that if he was ill it was only because of -Princess Mary: that she purposely worried and irritated him, and -that by indulgence and silly talk she was spoiling little Prince -Nicholas. The old prince knew very well that he tormented his daughter -and that her life was very hard, but he also knew that he could not -help tormenting her and that she deserved it. "Why does Prince Andrew, -who sees this, say nothing to me about his sister? Does he think me -a scoundrel, or an old fool who, without any reason, keeps his own -daughter at a distance and attaches this Frenchwoman to himself? He -doesn't understand, so I must explain it, and he must hear me out," -thought the old prince. And he began explaining why he could not put -up with his daughter's unreasonable character. - -"If you ask me," said Prince Andrew, without looking up (he was -censuring his father for the first time in his life), "I did not -wish to speak about it, but as you ask me I will give you my frank -opinion. If there is any misunderstanding and discord between you -and Mary, I can't blame her for it at all. I know how she loves and -respects you. Since you ask me," continued Prince Andrew, becoming -irritable--as he was always liable to do of late--"I can only say that -if there are any misunderstandings they are caused by that worthless -woman, who is not fit to be my sister's companion." - -The old man at first stared fixedly at his son, and an unnatural -smile disclosed the fresh gap between his teeth to which Prince Andrew -could not get accustomed. - -"What companion, my dear boy? Eh? You've already been talking it -over! Eh?" - -"Father, I did not want to judge," said Prince Andrew, in a hard and -bitter tone, "but you challenged me, and I have said, and always shall -say, that Mary is not to blame, but those to blame--the one to -blame--is that Frenchwoman." - -"Ah, he has passed judgment... passed judgement!" said the old man -in a low voice and, as it seemed to Prince Andrew, with some -embarrassment, but then he suddenly jumped up and cried: "Be off, be -off! Let not a trace of you remain here!..." - - -Prince Andrew wished to leave at once, but Princess Mary persuaded -him to stay another day. That day he did not see his father, who did -not leave his room and admitted no one but Mademoiselle Bourienne -and Tikhon, but asked several times whether his son had gone. Next -day, before leaving, Prince Andrew went to his son's rooms. The boy, -curly-headed like his mother and glowing with health, sat on his knee, -and Prince Andrew began telling him the story of Bluebeard, but fell -into a reverie without finishing the story. He thought not of this -pretty child, his son whom he held on his knee, but of himself. He -sought in himself either remorse for having angered his father or -regret at leaving home for the first time in his life on bad terms -with him, and was horrified to find neither. What meant still more -to him was that he sought and did not find in himself the former -tenderness for his son which he had hoped to reawaken by caressing the -boy and taking him on his knee. - -"Well, go on!" said his son. - -Prince Andrew, without replying, put him down from his knee and went -out of the room. - -As soon as Prince Andrew had given up his daily occupations, and -especially on returning to the old conditions of life amid which he -had been happy, weariness of life overcame him with its former -intensity, and he hastened to escape from these memories and to find -some work as soon as possible. - -"So you've decided to go, Andrew?" asked his sister. - -"Thank God that I can," replied Prince Andrew. "I am very sorry -you can't." - -"Why do you say that?" replied Princess Mary. "Why do you say -that, when you are going to this terrible war, and he is so old? -Mademoiselle Bourienne says he has been asking about you...." - -As soon as she began to speak of that, her lips trembled and her -tears began to fall. Prince Andrew turned away and began pacing the -room. - -"Ah, my God! my God! When one thinks who and what--what trash--can -cause people misery!" he said with a malignity that alarmed Princess -Mary. - -She understood that when speaking of "trash" he referred not only to -Mademoiselle Bourienne, the cause of her misery, but also to the man -who had ruined his own happiness. - -"Andrew! One thing I beg, I entreat of you!" she said, touching -his elbow and looking at him with eyes that shone through her tears. -"I understand you" (she looked down). "Don't imagine that sorrow is -the work of men. Men are His tools." She looked a little above -Prince Andrew's head with the confident, accustomed look with which -one looks at the place where a familiar portrait hangs. "Sorrow is -sent by Him, not by men. Men are His instruments, they are not to -blame. If you think someone has wronged you, forget it and forgive! We -have no right to punish. And then you will know the happiness of -forgiving." - -"If I were a woman I would do so, Mary. That is a woman's virtue. -But a man should not and cannot forgive and forget," he replied, and -though till that moment he had not been thinking of Kuragin, all his -unexpended anger suddenly swelled up in his heart. - -"If Mary is already persuading me forgive, it means that I ought -long ago to have punished him," he thought. And giving her no -further reply, he began thinking of the glad vindictive moment when he -would meet Kuragin who he knew was now in the army. - -Princess Mary begged him to stay one day more, saying that she -knew how unhappy her father would be if Andrew left without being -reconciled to him, but Prince Andrew replied that he would probably -soon be back again from the army and would certainly write to his -father, but that the longer he stayed now the more embittered their -differences would become. - -"Good-by, Andrew! Remember that misfortunes come from God, and men -are never to blame," were the last words he heard from his sister when -he took leave of her. - -"Then it must be so!" thought Prince Andrew as he drove out of the -avenue from the house at Bald Hills. "She, poor innocent creature, -is left to be victimized by an old man who has outlived his wits. -The old man feels he is guilty, but cannot change himself. My boy is -growing up and rejoices in life, in which like everybody else he -will deceive or be deceived. And I am off to the army. Why? I myself -don't know. I want to meet that man whom I despise, so as to give -him a chance to kill and laugh at me!" - -These conditions of life had been the same before, but then they -were all connected, while now they had all tumbled to pieces. Only -senseless things, lacking coherence, presented themselves one after -another to Prince Andrew's mind. - - - - - -CHAPTER IX - - -Prince Andrew reached the general headquarters of the army at the -end of June. The first army, with which was the Emperor, occupied -the fortified camp at Drissa; the second army was retreating, trying -to effect a junction with the first one from which it was said to be -cut off by large French forces. Everyone was dissatisfied with the -general course of affairs in the Russian army, but no one -anticipated any danger of invasion of the Russian provinces, and no -one thought the war would extend farther than the western, the Polish, -provinces. - -Prince Andrew found Barclay de Tolly, to whom he had been -assigned, on the bank of the Drissa. As there was not a single town or -large village in the vicinity of the camp, the immense number of -generals and courtiers accompanying the army were living in the best -houses of the villages on both sides of the river, over a radius of -six miles. Barclay de Tolly was quartered nearly three miles from -the Emperor. He received Bolkonski stiffly and coldly and told him -in his foreign accent that he would mention him to the Emperor for a -decision as to his employment, but asked him meanwhile to remain on -his staff. Anatole Kuragin, whom Prince Andrew had hoped to find -with the army, was not there. He had gone to Petersburg, but Prince -Andrew was glad to hear this. His mind was occupied by the interests -of the center that was conducting a gigantic war, and he was glad to -be free for a while from the distraction caused by the thought of -Kuragin. During the first four days, while no duties were required -of him, Prince Andrew rode round the whole fortified camp and, by -the aid of his own knowledge and by talks with experts, tried to -form a definite opinion about it. But the question whether the camp -was advantageous or disadvantageous remained for him undecided. -Already from his military experience and what he had seen in the -Austrian campaign, he had come to the conclusion that in war the -most deeply considered plans have no significance and that all depends -on the way unexpected movements of the enemy--that cannot be foreseen- -are met, and on how and by whom the whole matter is handled. To -clear up this last point for himself, Prince Andrew, utilizing his -position and acquaintances, tried to fathom the character of the -control of the army and of the men and parties engaged in it, and he -deduced for himself the following of the state of affairs. - -While the Emperor had still been at Vilna, the forces had been -divided into three armies. First, the army under Barclay de Tolly, -secondly, the army under Bagration, and thirdly, the one commanded -by Tormasov. The Emperor was with the first army, but not as commander -in chief. In the orders issued it was stated, not that the Emperor -would take command, but only that he would be with the army. The -Emperor, moreover, had with him not a commander in chief's staff but -the imperial headquarters staff. In attendance on him was the head -of the imperial staff, Quartermaster General Prince Volkonski, as well -as generals, imperial aides-de-camp, diplomatic officials, and a large -number of foreigners, but not the army staff. Besides these, there -were in attendance on the Emperor without any definite appointments: -Arakcheev, the ex-Minister of War; Count Bennigsen, the senior general -in rank; the Grand Duke Tsarevich Constantine Pavlovich; Count -Rumyantsev, the Chancellor; Stein, a former Prussian minister; -Armfeldt, a Swedish general; Pfuel, the chief author of the plan of -campaign; Paulucci, an adjutant general and Sardinian emigre; -Wolzogen--and many others. Though these men had no military -appointment in the army, their position gave them influence, and often -a corps commander, or even the commander in chief, did not know in -what capacity he was questioned by Bennigsen, the Grand Duke, -Arakcheev, or Prince Volkonski, or was given this or that advice and -did not know whether a certain order received in the form of advice -emanated from the man who gave it or from the Emperor and whether it -had to be executed or not. But this was only the external condition; -the essential significance of the presence of the Emperor and of all -these people, from a courtier's point of view (and in an Emperor's -vicinity all became courtiers), was clear to everyone. It was this: -the Emperor did not assume the title of commander in chief, but -disposed of all the armies; the men around him were his assistants. -Arakcheev was a faithful custodian to enforce order and acted as the -sovereign's bodyguard. Bennigsen was a landlord in the Vilna -province who appeared to be doing the honors of the district, but -was in reality a good general, useful as an adviser and ready at -hand to replace Barclay. The Grand Duke was there because it suited -him to be. The ex-Minister Stein was there because his advice was -useful and the Emperor Alexander held him in high esteem personally. -Armfeldt virulently hated Napoleon and was a general full of -self-confidence, a quality that always influenced Alexander. -Paulucci was there because he was bold and decided in speech. The -adjutants general were there because they always accompanied the -Emperor, and lastly and chiefly Pfuel was there because he had drawn -up the plan of campaign against Napoleon and, having induced Alexander -to believe in the efficacy of that plan, was directing the whole -business of the war. With Pfuel was Wolzogen, who expressed Pfuel's -thoughts in a more comprehensible way than Pfuel himself (who was a -harsh, bookish theorist, self-confident to the point of despising -everyone else) was able to do. - -Besides these Russians and foreigners who propounded new and -unexpected ideas every day--especially the foreigners, who did so with -a boldness characteristic of people employed in a country not their -own--there were many secondary personages accompanying the army -because their principals were there. - -Among the opinions and voices in this immense, restless, -brilliant, and proud sphere, Prince Andrew noticed the following -sharply defined subdivisions of and parties: - -The first party consisted of Pfuel and his adherents--military -theorists who believed in a science of war with immutable laws--laws -of oblique movements, outflankings, and so forth. Pfuel and his -adherents demanded a retirement into the depths of the country in -accordance with precise laws defined by a pseudo-theory of war, and -they saw only barbarism, ignorance, or evil intention in every -deviation from that theory. To this party belonged the foreign nobles, -Wolzogen, Wintzingerode, and others, chiefly Germans. - -The second party was directly opposed to the first; one extreme, -as always happens, was met by representatives of the other. The -members of this party were those who had demanded an advance from -Vilna into Poland and freedom from all prearranged plans. Besides -being advocates of bold action, this section also represented -nationalism, which made them still more one-sided in the dispute. They -were Russians: Bagration, Ermolov (who was beginning to come to the -front), and others. At that time a famous joke of Ermolov's was -being circulated, that as a great favor he had petitioned the -Emperor to make him a German. The men of that party, remembering -Suvorov, said that what one had to do was not to reason, or stick pins -into maps, but to fight, beat the enemy, keep him out of Russia, and -not let the army get discouraged. - -To the third party--in which the Emperor had most confidence- -belonged the courtiers who tried to arrange compromises between the -other two. The members of this party, chiefly civilians and to whom -Arakcheev belonged, thought and said what men who have no -convictions but wish to seem to have some generally say. They said -that undoubtedly war, particularly against such a genius as -Bonaparte (they called him Bonaparte now), needs most deeply devised -plans and profound scientific knowledge and in that respect Pfuel -was a genius, but at the same time it had to be acknowledged that -the theorists are often one sided, and therefore one should not -trust them absolutely, but should also listen to what Pfuel's -opponents and practical men of experience in warfare had to say, and -then choose a middle course. They insisted on the retention of the -camp at Drissa, according to Pfuel's plan, but on changing the -movements of the other armies. Though, by this course, neither one aim -nor the other could be attained, yet it seemed best to the adherents -of this third party. - -Of a fourth opinion the most conspicuous representative was the -Tsarevich, who could not forget his disillusionment at Austerlitz, -where he had ridden out at the head of the Guards, in his casque and -cavalry uniform as to a review, expecting to crush the French -gallantly; but unexpectedly finding himself in the front line had -narrowly escaped amid the general confusion. The men of this party had -both the quality and the defect of frankness in their opinions. They -feared Napoleon, recognized his strength and their own weakness, and -frankly said so. They said: "Nothing but sorrow, shame, and ruin -will come of all this! We have abandoned Vilna and Vitebsk and shall -abandon Drissa. The only reasonable thing left to do is to conclude -peace as soon as possible, before we are turned out of Petersburg." - -This view was very general in the upper army circles and found -support also in Petersburg and from the chancellor, Rumyantsev, who, -for other reasons of state, was in favor of peace. - -The fifth party consisted of those who were adherents of Barclay -de Tolly, not so much as a man but as minister of war and commander in -chief. "Be he what he may" (they always began like that), "he is an -honest, practical man and we have nobody better. Give him real -power, for war cannot be conducted successfully without unity of -command, and he will show what he can do, as he did in Finland. If our -army is well organized and strong and has withdrawn to Drissa -without suffering any defeats, we owe this entirely to Barclay. If -Barclay is now to be superseded by Bennigsen all will be lost, for -Bennigsen showed his incapacity already in 1807." - -The sixth party, the Bennigsenites, said, on the contrary, that at -any rate there was no one more active and experienced than -Bennigsen: "and twist about as you may, you will have to come to -Bennigsen eventually. Let the others make mistakes now!" said they, -arguing that our retirement to Drissa was a most shameful reverse -and an unbroken series of blunders. "The more mistakes that are made -the better. It will at any rate be understood all the sooner that -things cannot go on like this. What is wanted is not some Barclay or -other, but a man like Bennigsen, who made his mark in 1807, and to -whom Napoleon himself did justice--a man whose authority would be -willingly recognized, and Bennigsen is the only such man." - -The seventh party consisted of the sort of people who are always -to be found, especially around young sovereigns, and of whom there -were particularly many round Alexander--generals and imperial -aides-de-camp passionately devoted to the Emperor, not merely as a -monarch but as a man, adoring him sincerely and disinterestedly, as -Rostov had done in 1805, and who saw in him not only all the virtues -but all human capabilities as well. These men, though enchanted with -the sovereign for refusing the command of the army, yet blamed him for -such excessive modesty, and only desired and insisted that their -adored sovereign should abandon his diffidence and openly announce -that he would place himself at the head of the army, gather round -him a commander in chief's staff, and, consulting experienced -theoreticians and practical men where necessary, would himself lead -the troops, whose spirits would thereby be raised to the highest -pitch. - -The eighth and largest group, which in its enormous numbers was to -the others as ninety-nine to one, consisted of men who desired neither -peace nor war, neither an advance nor a defensive camp at the Drissa -or anywhere else, neither Barclay nor the Emperor, neither Pfuel nor -Bennigsen, but only the one most essential thing--as much advantage -and pleasure for themselves as possible. In the troubled waters of -conflicting and intersecting intrigues that eddied about the Emperor's -headquarters, it was possible to succeed in many ways unthinkable at -other times. A man who simply wished to retain his lucrative post -would today agree with Pfuel, tomorrow with his opponent, and the -day after, merely to avoid responsibility or to please the Emperor, -would declare that he had no opinion at all on the matter. Another who -wished to gain some advantage would attract the Emperor's attention by -loudly advocating the very thing the Emperor had hinted at the day -before, and would dispute and shout at the council, beating his breast -and challenging those who did not agree with him to duels, thereby -proving that he was prepared to sacrifice himself for the common good. -A third, in the absence of opponents, between two councils would -simply solicit a special gratuity for his faithful services, well -knowing that at that moment people would be too busy to refuse him. -A fourth while seemingly overwhelmed with work would often come -accidentally under the Emperor's eye. A fifth, to achieve his -long-cherished aim of dining with the Emperor, would stubbornly insist -on the correctness or falsity of some newly emerging opinion and for -this object would produce arguments more or less forcible and correct. - -All the men of this party were fishing for rubles, decorations, -and promotions, and in this pursuit watched only the weathercock of -imperial favor, and directly they noticed it turning in any direction, -this whole drone population of the army began blowing hard that way, -so that it was all the harder for the Emperor to turn it elsewhere. -Amid the uncertainties of the position, with the menace of serious -danger giving a peculiarly threatening character to everything, amid -this vortex of intrigue, egotism, conflict of views and feelings, -and the diversity of race among these people--this eighth and -largest party of those preoccupied with personal interests imparted -great confusion and obscurity to the common task. Whatever question -arose, a swarm of these drones, without having finished their -buzzing on a previous theme, flew over to the new one and by their hum -drowned and obscured the voices of those who were disputing honestly. - -From among all these parties, just at the time Prince Andrew reached -the army, another, a ninth party, was being formed and was beginning -to raise its voice. This was the party of the elders, reasonable men -experienced and capable in state affairs, who, without sharing any -of those conflicting opinions, were able to take a detached view of -what was going on at the staff at headquarters and to consider means -of escape from this muddle, indecision, intricacy, and weakness. - -The men of this party said and thought that what was wrong -resulted chiefly from the Emperor's presence in the army with his -military court and from the consequent presence there of an -indefinite, conditional, and unsteady fluctuation of relations, -which is in place at court but harmful in an army; that a sovereign -should reign but not command the army, and that the only way out of -the position would be for the Emperor and his court to leave the army; -that the mere presence of the Emperor paralyzed the action of fifty -thousand men required to secure his personal safety, and that the -worst commander in chief if independent would be better than the -very best one trammeled by the presence and authority of the monarch. - -Just at the time Prince Andrew was living unoccupied at Drissa, -Shishkov, the Secretary of State and one of the chief -representatives of this party, wrote a letter to the Emperor which -Arakcheev and Balashev agreed to sign. In this letter, availing -himself of permission given him by the Emperor to discuss the -general course of affairs, he respectfully suggested--on the plea that -it was necessary for the sovereign to arouse a warlike spirit in the -people of the capital--that the Emperor should leave the army. - -That arousing of the people by their sovereign and his call to -them to defend their country--the very incitement which was the -chief cause of Russia's triumph in so far as it was produced by the -Tsar's personal presence in Moscow--was suggested to the Emperor, -and accepted by him, as a pretext for quitting the army. - - - - - -CHAPTER X - - -This letter had not yet been presented to the Emperor when -Barclay, one day at dinner, informed Bolkonski that the sovereign -wished to see him personally, to question him about Turkey, and that -Prince Andrew was to present himself at Bennigsen's quarters at six -that evening. - -News was received at the Emperor's quarters that very day of a fresh -movement by Napoleon which might endanger the army--news -subsequently found to be false. And that morning Colonel Michaud had -ridden round the Drissa fortifications with the Emperor and had -pointed out to him that this fortified camp constructed by Pfuel, -and till then considered a chef-d'oeuvre of tactical science which -would ensure Napoleon's destruction, was an absurdity, threatening the -destruction of the Russian army. - -Prince Andrew arrived at Bennigsen's quarters--a country gentleman's -house of moderate size, situated on the very banks of the river. -Neither Bennigsen nor the Emperor was there, but Chernyshev, the -Emperor's aide-de-camp, received Bolkonski and informed him that the -Emperor, accompanied by General Bennigsen and Marquis Paulucci, had -gone a second time that day to inspect the fortifications of the -Drissa camp, of the suitability of which serious doubts were beginning -to be felt. - -Chernyshev was sitting at a window in the first room with a French -novel in his hand. This room had probably been a music room; there was -still an organ in it on which some rugs were piled, and in one -corner stood the folding bedstead of Bennigsen's adjutant. This -adjutant was also there and sat dozing on the rolled-up bedding, -evidently exhausted by work or by feasting. Two doors led from the -room, one straight on into what had been the drawing room, and -another, on the right, to the study. Through the first door came the -sound of voices conversing in German and occasionally in French. In -that drawing room were gathered, by the Emperor's wish, not a military -council (the Emperor preferred indefiniteness), but certain persons -whose opinions he wished to know in view of the impending -difficulties. It was not a council of war, but, as it were, a -council to elucidate certain questions for the Emperor personally. -To this semicouncil had been invited the Swedish General Armfeldt, -Adjutant General Wolzogen, Wintzingerode (whom Napoleon had referred -to as a renegade French subject), Michaud, Toll, Count Stein who was -not a military man at all, and Pfuel himself, who, as Prince Andrew -had heard, was the mainspring of the whole affair. Prince Andrew had -an opportunity of getting a good look at him, for Pfuel arrived soon -after himself and, in passing through to the drawing room, stopped a -minute to speak to Chernyshev. - -At first sight, Pfuel, in his ill-made uniform of a Russian general, -which fitted him badly like a fancy costume, seemed familiar to Prince -Andrew, though he saw him now for the first time. There was about -him something of Weyrother, Mack, and Schmidt, and many other German -theorist-generals whom Prince Andrew had seen in 1805, but he was more -typical than any of them. Prince Andrew had never yet seen a German -theorist in whom all the characteristics of those others were united -to such an extent. - -Pfuel was short and very thin but broad-boned, of coarse, robust -build, broad in the hips, and with prominent shoulder blades. His face -was much wrinkled and his eyes deep set. His hair had evidently been -hastily brushed smooth in front of the temples, but stuck up behind in -quaint little tufts. He entered the room, looking restlessly and -angrily around, as if afraid of everything in that large apartment. -Awkwardly holding up his sword, he addressed Chernyshev and asked in -German where the Emperor was. One could see that he wished to pass -through the rooms as quickly as possible, finish with the bows and -greetings, and sit down to business in front of a map, where he -would feel at home. He nodded hurriedly in reply to Chernyshev, and -smiled ironically on hearing that the sovereign was inspecting the -fortifications that he, Pfuel, had planned in accord with his -theory. He muttered something to himself abruptly and in a bass voice, -as self-assured Germans do--it might have been "stupid fellow"... or -"the whole affair will be ruined," or "something absurd will come of -it."... Prince Andrew did not catch what he said and would have passed -on, but Chernyshev introduced him to Pfuel, remarking that Prince -Andrew was just back from Turkey where the war had terminated so -fortunately. Pfuel barely glanced--not so much at Prince Andrew as -past him--and said, with a laugh: "That must have been a fine tactical -war"; and, laughing contemptuously, went on into the room from which -the sound of voices was heard. - -Pfuel, always inclined to be irritably sarcastic, was particularly -disturbed that day, evidently by the fact that they had dared to -inspect and criticize his camp in his absence. From this short -interview with Pfuel, Prince Andrew, thanks to his Austerlitz -experiences, was able to form a clear conception of the man. Pfuel was -one of those hopelessly and immutably self-confident men, -self-confident to the point of martyrdom as only Germans are, -because only Germans are self-confident on the basis of an abstract -notion--science, that is, the supposed knowledge of absolute truth. -A Frenchman is self-assured because he regards himself personally, -both in mind and body, as irresistibly attractive to men and women. An -Englishman is self-assured, as being a citizen of the best-organized -state in the world, and therefore as an Englishman always knows what -he should do and knows that all he does as an Englishman is -undoubtedly correct. An Italian is self-assured because he is -excitable and easily forgets himself and other people. A Russian is -self-assured just because he knows nothing does not want to know -anything, since he does not believe that anything can be known. The -German's self-assurance is worst of all, stronger and more repulsive -than any other, because he imagines that he knows the truth- -science--which he himself has invented but which is for him the -absolute truth. - -Pfuel was evidently of that sort. He had a science--the theory of -oblique movements deduced by him from the history of Frederick the -Great's wars, and all he came across in the history of more recent -warfare seemed to him absurd and barbarous--monstrous collisions in -which so many blunders were committed by both sides that these wars -could not be called wars, they did not accord with the theory, and -therefore could not serve as material for science. - -In 1806 Pfuel had been one of those responsible, for the plan of -campaign that ended in Jena and Auerstadt, but he did not see the -least proof of the fallibility of his theory in the disasters of -that war. On the contrary, the deviations made from his theory were, -in his opinion, the sole cause of the whole disaster, and with -characteristically gleeful sarcasm he would remark, "There, I said the -whole affair would go to the devil!" Pfuel was one of those -theoreticians who so love their theory that they lose sight of the -theory's object--its practical application. His love of theory made -him hate everything practical, and he would not listen to it. He was -even pleased by failures, for failures resulting from deviations in -practice from the theory only proved to him the accuracy of his -theory. - -He said a few words to Prince Andrew and Chernyshev about the -present war, with the air of a man who knows beforehand that all -will go wrong, and who is not displeased that it should be so. The -unbrushed tufts of hair sticking up behind and the hastily brushed -hair on his temples expressed this most eloquently. - -He passed into the next room, and the deep, querulous sounds of -his voice were at once heard from there. - - - - - -CHAPTER XI - - -Prince Andrew's eyes were still following Pfuel out of the room when -Count Bennigsen entered hurriedly, and nodding to Bolkonski, but not -pausing, went into the study, giving instructions to his adjutant as -he went. The Emperor was following him, and Bennigsen had hastened -on to make some preparations and to be ready to receive the sovereign. -Chernyshev and Prince Andrew went out into the porch, where the -Emperor, who looked fatigued, was dismounting. Marquis Paulucci was -talking to him with particular warmth and the Emperor, with his head -bent to the left, was listening with a dissatisfied air. The Emperor -moved forward evidently wishing to end the conversation, but the -flushed and excited Italian, oblivious of decorum, followed him and -continued to speak. - -"And as for the man who advised forming this camp--the Drissa camp," -said Paulucci, as the Emperor mounted the steps and noticing Prince -Andrew scanned his unfamiliar face, "as to that person, sire..." -continued Paulucci, desperately, apparently unable to restrain -himself, "the man who advised the Drissa camp--I see no alternative -but the lunatic asylum or the gallows!" - -Without heeding the end of the Italian's remarks, and as though -not hearing them, the Emperor, recognizing Bolkonski, addressed him -graciously. - -"I am very glad to see you! Go in there where they are meeting, -and wait for me." - -The Emperor went into the study. He was followed by Prince Peter -Mikhaylovich Volkonski and Baron Stein, and the door closed behind -them. Prince Andrew, taking advantage of the Emperor's permission, -accompanied Paulucci, whom he had known in Turkey, into the drawing -room where the council was assembled. - -Prince Peter Mikhaylovich Volkonski occupied the position, as it -were, of chief of the Emperor's staff. He came out of the study into -the drawing room with some maps which he spread on a table, and put -questions on which he wished to hear the opinion of the gentlemen -present. What had happened was that news (which afterwards proved to -be false) had been received during the night of a movement by the -French to outflank the Drissa camp. - -The first to speak was General Armfeldt who, to meet the -difficulty that presented itself, unexpectedly proposed a perfectly -new position away from the Petersburg and Moscow roads. The reason for -this was inexplicable (unless he wished to show that he, too, could -have an opinion), but he urged that at this point the army should -unite and there await the enemy. It was plain that Armfeldt had -thought out that plan long ago and now expounded it not so much to -answer the questions put--which, in fact, his plan did not answer- -as to avail himself of the opportunity to air it. It was one of the -millions of proposals, one as good as another, that could be made as -long as it was quite unknown what character the war would take. Some -disputed his arguments, others defended them. Young Count Toll -objected to the Swedish general's views more warmly than anyone -else, and in the course of the dispute drew from his side pocket a -well-filled notebook, which he asked permission to read to them. In -these voluminous notes Toll suggested another scheme, totally -different from Armfeldt's or Pfuel's plan of campaign. In answer to -Toll, Paulucci suggested an advance and an attack, which, he urged, -could alone extricate us from the present uncertainty and from the -trap (as he called the Drissa camp) in which we were situated. - -During all these discussions Pfuel and his interpreter, Wolzogen -(his "bridge" in court relations), were silent. Pfuel only snorted -contemptuously and turned away, to show that he would never demean -himself by replying to such nonsense as he was now hearing. So when -Prince Volkonski, who was in the chair, called on him to give his -opinion, he merely said: - -"Why ask me? General Armfeldt has proposed a splendid position -with an exposed rear, or why not this Italian gentleman's attack--very -fine, or a retreat, also good! Why ask me?" said he. "Why, you -yourselves know everything better than I do." - -But when Volkonski said, with a frown, that it was in the -Emperor's name that he asked his opinion, Pfuel rose and, suddenly -growing animated, began to speak: - -"Everything has been spoiled, everything muddled, everybody -thought they knew better than I did, and now you come to me! How -mend matters? There is nothing to mend! The principles laid down by me -must be strictly adhered to," said he, drumming on the table with -his bony fingers. "What is the difficulty? Nonsense, childishness!" - -He went up to the map and speaking rapidly began proving that no -eventuality could alter the efficiency of the Drissa camp, that -everything had been foreseen, and that if the enemy were really -going to outflank it, the enemy would inevitably be destroyed. - -Paulucci, who did not know German, began questioning him in -French. Wolzogen came to the assistance of his chief, who spoke French -badly, and began translating for him, hardly able to keep pace with -Pfuel, who was rapidly demonstrating that not only all that had -happened, but all that could happen, had been foreseen in his -scheme, and that if there were now any difficulties the whole fault -lay in the fact that his plan had not been precisely executed. He kept -laughing sarcastically, he demonstrated, and at last contemptuously -ceased to demonstrate, like a mathematician who ceases to prove in -various ways the accuracy of a problem that has already been proved. -Wolzogen took his place and continued to explain his views in -French, every now and then turning to Pfuel and saying, "Is it not so, -your excellency?" But Pfuel, like a man heated in a fight who - -strikes those on his own side, shouted angrily at his own supporter, -Wolzogen: - -"Well, of course, what more is there to explain?" - -Paulucci and Michaud both attacked Wolzogen simultaneously in -French. Armfeldt addressed Pfuel in German. Toll explained to -Volkonski in Russian. Prince Andrew listened and observed in silence. - -Of all these men Prince Andrew sympathized most with Pfuel, angry, -determined, and absurdly self-confident as he was. Of all those -present, evidently he alone was not seeking anything for himself, -nursed no hatred against anyone, and only desired that the plan, -formed on a theory arrived at by years of toil, should be carried out. -He was ridiculous, and unpleasantly sarcastic, but yet he inspired -involuntary respect by his boundless devotion to an idea. Besides -this, the remarks of all except Pfuel had one common trait that had -not been noticeable at the council of war in 1805: there was now a -panic fear of Napoleon's genius, which, though concealed, was -noticeable in every rejoinder. Everything was assumed to be possible -for Napoleon, they expected him from every side, and invoked his -terrible name to shatter each other's proposals. Pfuel alone seemed to -consider Napoleon a barbarian like everyone else who opposed his -theory. But besides this feeling of respect, Pfuel evoked pity in -Prince Andrew. From the tone in which the courtiers addressed him -and the way Paulucci had allowed himself to speak of him to the -Emperor, but above all from a certain desperation in Pfuel's own -expressions, it was clear that the others knew, and Pfuel himself -felt, that his fall was at hand. And despite his self-confidence and -grumpy German sarcasm he was pitiable, with his hair smoothly -brushed on the temples and sticking up in tufts behind. Though he -concealed the fact under a show of irritation and contempt, he was -evidently in despair that the sole remaining chance of verifying his -theory by a huge experiment and proving its soundness to the whole -world was slipping away from him. - -The discussions continued a long time, and the longer they lasted -the more heated became the disputes, culminating in shouts and -personalities, and the less was it possible to arrive at any general -conclusion from all that had been said. Prince Andrew, listening to -this polyglot talk and to these surmises, plans, refutations, and -shouts, felt nothing but amazement at what they were saying. A thought -that had long since and often occurred to him during his military -activities--the idea that there is not and cannot be any science of -war, and that therefore there can be no such thing as a military -genius--now appeared to him an obvious truth. "What theory and science -is possible about a matter the conditions and circumstances of which -are unknown and cannot be defined, especially when the strength of the -acting forces cannot be ascertained? No one was or is able to -foresee in what condition our or the enemy's armies will be in a day's -time, and no one can gauge the force of this or that detachment. -Sometimes--when there is not a coward at the front to shout, 'We are -cut off!' and start running, but a brave and jolly lad who shouts, -'Hurrah!'--a detachment of five thousand is worth thirty thousand, -as at Schon Grabern, while at times fifty thousand run from eight -thousand, as at Austerlitz. What science can there be in a matter in -which, as in all practical matters, nothing can be defined and -everything depends on innumerable conditions, the significance of -which is determined at a particular moment which arrives no one -knows when? Armfeldt says our army is cut in half, and Paulucci says -we have got the French army between two fires; Michaud says that the -worthlessness of the Drissa camp lies in having the river behind it, -and Pfuel says that is what constitutes its strength; Toll proposes -one plan, Armfeldt another, and they are all good and all bad, and the -advantages of any suggestions can be seen only at the moment of trial. -And why do they all speak of a 'military genius'? Is a man a genius -who can order bread to be brought up at the right time and say who -is to go to the right and who to the left? It is only because military -men are invested with pomp and power and crowds of sychophants flatter -power, attributing to it qualities of genius it does not possess. -The best generals I have known were, on the contrary, stupid or -absent-minded men. Bagration was the best, Napoleon himself admitted -that. And of Bonaparte himself! I remember his limited, self-satisfied -face on the field of Austerlitz. Not only does a good army commander -not need any special qualities, on the contrary he needs the absence -of the highest and best human attributes--love, poetry, tenderness, -and philosophic inquiring doubt. He should be limited, firmly -convinced that what he is doing is very important (otherwise he will -not have sufficient patience), and only then will he be a brave -leader. God forbid that he should be humane, should love, or pity, -or think of what is just and unjust. It is understandable that a -theory of their 'genius' was invented for them long ago because they -have power! The success of a military action depends not on them, -but on the man in the ranks who shouts, 'We are lost!' or who -shouts, 'Hurrah!' And only in the ranks can one serve with assurance -of being useful." - -So thought Prince Andrew as he listened to the talking, and he -roused himself only when Paulucci called him and everyone was leaving. - -At the review next day the Emperor asked Prince Andrew where he -would like to serve, and Prince Andrew lost his standing in court -circles forever by not asking to remain attached to the sovereign's -person, but for permission to serve in the army. - - - - - -CHAPTER XII - - -Before the beginning of the campaign, Rostov had received a letter -from his parents in which they told him briefly of Natasha's illness -and the breaking off of her engagement to Prince Andrew (which they -explained by Natasha's having rejected him) and again asked Nicholas -to retire from the army and return home. On receiving this letter, -Nicholas did not even make any attempt to get leave of absence or to -retire from the army, but wrote to his parents that he was sorry -Natasha was ill and her engagement broken off, and that he would do -all he could to meet their wishes. To Sonya he wrote separately. - -"Adored friend of my soul!" he wrote. "Nothing but honor could -keep me from returning to the country. But now, at the commencement of -the campaign, I should feel dishonored, not only in my comrades' -eyes but in my own, if I preferred my own happiness to my love and -duty to the Fatherland. But this shall be our last separation. Believe -me, directly the war is over, if I am still alive and still loved by -you, I will throw up everything and fly to you, to press you forever -to my ardent breast." - -It was, in fact, only the commencement of the campaign that -prevented Rostov from returning home as he had promised and marrying -Sonya. The autumn in Otradnoe with the hunting, and the winter with -the Christmas holidays and Sonya's love, had opened out to him a vista -of tranquil rural joys and peace such as he had never known before, -and which now allured him. "A splendid wife, children, a good pack -of hounds, a dozen leashes of smart borzois, agriculture, neighbors, -service by election..." thought he. But now the campaign was -beginning, and he had to remain with his regiment. And since it had to -be so, Nicholas Rostov, as was natural to him, felt contented with the -life he led in the regiment and was able to find pleasure in that -life. - -On his return from his furlough Nicholas, having been joyfully -welcomed by his comrades, was sent to obtain remounts and brought back -from the Ukraine excellent horses which pleased him and earned him -commendation from his commanders. During his absence he had been -promoted captain, and when the regiment was put on war footing with an -increase in numbers, he was again allotted his old squadron. - -The campaign began, the regiment was moved into Poland on double -pay, new officers arrived, new men and horses, and above all everybody -was infected with the merrily excited mood that goes with the -commencement of a war, and Rostov, conscious of his advantageous -position in the regiment, devoted himself entirely to the pleasures -and interests of military service, though he knew that sooner or later -he would have to relinquish them. - -The troops retired from Vilna for various complicated reasons of -state, political and strategic. Each step of the retreat was -accompanied by a complicated interplay of interests, arguments, and -passions at headquarters. For the Pavlograd hussars, however, the -whole of this retreat during the finest period of summer and with -sufficient supplies was a very simple and agreeable business. - -It was only at headquarters that there was depression, uneasiness, -and intriguing; in the body of the army they did not ask themselves -where they were going or why. If they regretted having to retreat, -it was only because they had to leave billets they had grown -accustomed to, or some pretty young Polish lady. If the thought that -things looked bad chanced to enter anyone's head, he tried to be as -cheerful as befits a good soldier and not to think of the general -trend of affairs, but only of the task nearest to hand. First they -camped gaily before Vilna, making acquaintance with the Polish -landowners, preparing for reviews and being reviewed by the Emperor -and other high commanders. Then came an order to retreat to Sventsyani -and destroy any provisions they could not carry away with them. -Sventsyani was remembered by the hussars only as the drunken camp, a -name the whole army gave to their encampment there, and because many -complaints were made against the troops, who, taking advantage of -the order to collect provisions, took also horses, carriages, and -carpets from the Polish proprietors. Rostov remembered Sventsyani, -because on the first day of their arrival at that small town he -changed his sergeant major and was unable to manage all the drunken -men of his squadron who, unknown to him, had appropriated five barrels -of old beer. From Sventsyani they retired farther and farther to -Drissa, and thence again beyond Drissa, drawing near to the frontier -of Russia proper. - -On the thirteenth of July the Pavlograds took part in a serious -action for the first time. - -On the twelfth of July, on the eve of that action, there was a heavy -storm of rain and hail. In general, the summer of 1812 was -remarkable for its storms. - -The two Pavlograd squadrons were bivouacking on a field of rye, -which was already in ear but had been completely trodden down by -cattle and horses. The rain was descending in torrents, and Rostov, -with a young officer named Ilyin, his protege, was sitting in a -hastily constructed shelter. An officer of their regiment, with long -mustaches extending onto his cheeks, who after riding to the staff had -been overtaken by the rain, entered Rostov's shelter. - -"I have come from the staff, Count. Have you heard of Raevski's -exploit?" - -And the officer gave them details of the Saltanov battle, which he -had heard at the staff. - -Rostov, smoking his pipe and turning his head about as the water -trickled down his neck, listened inattentively, with an occasional -glance at Ilyin, who was pressing close to him. This officer, a lad of -sixteen who had recently joined the regiment, was now in the same -relation to Nicholas that Nicholas had been to Denisov seven years -before. Ilyin tried to imitate Rostov in everything and adored him -as a girl might have done. - -Zdrzhinski, the officer with the long mustache, spoke -grandiloquently of the Saltanov dam being "a Russian Thermopylae," and -of how a deed worthy of antiquity had been performed by General -Raevski. He recounted how Raevski had led his two sons onto the dam -under terrific fire and had charged with them beside him. Rostov heard -the story and not only said nothing to encourage Zdrzhinski's -enthusiasm but, on the contrary, looked like a man ashamed of what -he was hearing, though with no intention of contradicting it. Since -the campaigns of Austerlitz and of 1807 Rostov knew by experience that -men always lie when describing military exploits, as he himself had -done when recounting them; besides that, he had experience enough to -know that nothing happens in war at all as we can imagine or relate -it. And so he did not like Zdrzhinski's tale, nor did he like -Zdrzhinski himself who, with his mustaches extending over his -cheeks, bent low over the face of his hearer, as was his habit, and -crowded Rostov in the narrow shanty. Rostov looked at him in -silence. "In the first place, there must have been such a confusion -and crowding on the dam that was being attacked that if Raevski did -lead his sons there, it could have had no effect except perhaps on -some dozen men nearest to him," thought he, "the rest could not have -seen how or with whom Raevski came onto the dam. And even those who -did see it would not have been much stimulated by it, for what had -they to do with Raevski's tender paternal feelings when their own -skins were in danger? And besides, the fate of the Fatherland did -not depend on whether they took the Saltanov dam or not, as we are -told was the case at Thermopylae. So why should he have made such a -sacrifice? And why expose his own children in the battle? I would -not have taken my brother Petya there, or even Ilyin, who's a stranger -to me but a nice lad, but would have tried to put them somewhere under -cover," Nicholas continued to think, as he listened to Zdrzhinski. But -he did not express his thoughts, for in such matters, too, he had -gained experience. He knew that this tale redounded to the glory of -our arms and so one had to pretend not to doubt it. And he acted -accordingly. - -"I can't stand this any more," said Ilyin, noticing that Rostov -did not relish Zdrzhinski's conversation. "My stockings and shirt... -and the water is running on my seat! I'll go and look for shelter. The -rain seems less heavy." - -Ilyin went out and Zdrzhinski rode away. - -Five minutes later Ilyin, splashing through the mud, came running -back to the shanty. - -"Hurrah! Rostov, come quick! I've found it! About two hundred -yards away there's a tavern where ours have already gathered. We can -at least get dry there, and Mary Hendrikhovna's there." - -Mary Hendrikhovna was the wife of the regimental doctor, a pretty -young German woman he had married in Poland. The doctor, whether -from lack of means or because he did not like to part from his young -wife in the early days of their marriage, took her about with him -wherever the hussar regiment went and his jealousy had become a -standing joke among the hussar officers. - -Rostov threw his cloak over his shoulders, shouted to Lavrushka to -follow with the things, and--now slipping in the mud, now splashing -right through it--set off with Ilyin in the lessening rain and the -darkness that was occasionally rent by distant lightning. - -"Rostov, where are you?" - -"Here. What lightning!" they called to one another. - - - - - -CHAPTER XIII - - -In the tavern, before which stood the doctor's covered cart, there -were already some five officers. Mary Hendrikhovna, a plump little -blonde German, in a dressing jacket and nightcap, was sitting on a -broad bench in the front corner. Her husband, the doctor, lay asleep -behind her. Rostov and Ilyin, on entering the room, were welcomed with -merry shouts and laughter. - -"Dear me, how jolly we are!" said Rostov laughing. - -"And why do you stand there gaping?" - -"What swells they are! Why, the water streams from them! Don't -make our drawing room so wet." - -"Don't mess Mary Hendrikhovna's dress!" cried other voices. - -Rostov and Ilyin hastened to find a corner where they could change -into dry clothes without offending Mary Hendrikhovna's modesty. They -were going into a tiny recess behind a partition to change, but -found it completely filled by three officers who sat playing cards -by the light of a solitary candle on an empty box, and these -officers would on no account yield their position. Mary Hendrikhovna -obliged them with the loan of a petticoat to be used as a curtain, and -behind that screen Rostov and Ilyin, helped by Lavrushka who had -brought their kits, changed their wet things for dry ones. - -A fire was made up in the dilapidated brick stove. A board was -found, fixed on two saddles and covered with a horsecloth, a small -samovar was produced and a cellaret and half a bottle of rum, and -having asked Mary Hendrikhovna to preside, they all crowded round her. -One offered her a clean handkerchief to wipe her charming hands, -another spread a jacket under her little feet to keep them from the -damp, another hung his coat over the window to keep out the draft, and -yet another waved the flies off her husband's face, lest he should -wake up. - -"Leave him alone," said Mary Hendrikhovna, smiling timidly and -happily. "He is sleeping well as it is, after a sleepless night." - -"Oh, no, Mary Hendrikhovna," replied the officer, "one must look -after the doctor. Perhaps he'll take pity on me someday, when it comes -to cutting off a leg or an arm for me." - -There were only three tumblers, the water was so muddy that one -could not make out whether the tea was strong or weak, and the samovar -held only six tumblers of water, but this made it all the pleasanter -to take turns in order of seniority to receive one's tumbler from Mary -Hendrikhovna's plump little hands with their short and not overclean -nails. All the officers appeared to be, and really were, in love -with her that evening. Even those playing cards behind the partition -soon left their game and came over to the samovar, yielding to the -general mood of courting Mary Hendrikhovna. She, seeing herself -surrounded by such brilliant and polite young men, beamed with -satisfaction, try as she might to hide it, and perturbed as she -evidently was each time her husband moved in his sleep behind her. - -There was only one spoon, sugar was more plentiful than anything -else, but it took too long to dissolve, so it was decided that Mary -Hendrikhovna should stir the sugar for everyone in turn. Rostov -received his tumbler, and adding some rum to it asked Mary -Hendrikhovna to stir it. - -"But you take it without sugar?" she said, smiling all the time, -as if everything she said and everything the others said was very -amusing and had a double meaning. - -"It is not the sugar I want, but only that your little hand should -stir my tea." - -Mary Hendrikhovna assented and began looking for the spoon which -someone meanwhile had pounced on. - -"Use your finger, Mary Hendrikhovna, it will be still nicer," said -Rostov. - -"Too hot!" she replied, blushing with pleasure. - -Ilyin put a few drops of rum into the bucket of water and brought it -to Mary Hendrikhovna, asking her to stir it with her finger. - -"This is my cup," said he. "Only dip your finger in it and I'll -drink it all up." - -When they had emptied the samovar, Rostov took a pack of cards and -proposed that they should play "Kings" with Mary Hendrikhovna. They -drew lots to settle who should make up her set. At Rostov's suggestion -it was agreed that whoever became "King" should have the right to kiss -Mary Hendrikhovna's hand, and that the "Booby" should go to refill and -reheat the samovar for the doctor when the latter awoke. - -"Well, but supposing Mary Hendrikhovna is 'King'?" asked Ilyin. - -"As it is, she is Queen, and her word is law!" - -They had hardly begun to play before the doctor's disheveled head -suddenly appeared from behind Mary Hendrikhovna. He had been awake for -some time, listening to what was being said, and evidently found -nothing entertaining or amusing in what was going on. His face was sad -and depressed. Without greeting the officers, he scratched himself and -asked to be allowed to pass as they were blocking the way. As soon -as he had left the room all the officers burst into loud laughter -and Mary Hendrikhovna blushed till her eyes filled with tears and -thereby became still more attractive to them. Returning from the yard, -the doctor told his wife (who had ceased to smile so happily, and -looked at him in alarm, awaiting her sentence) that the rain had -ceased and they must go to sleep in their covered cart, or -everything in it would be stolen. - -"But I'll send an orderly.... Two of them!" said Rostov. "What an -idea, doctor!" - -"I'll stand guard on it myself!" said Ilyin. - -"No, gentlemen, you have had your sleep, but I have not slept for -two nights," replied the doctor, and he sat down morosely beside his -wife, waiting for the game to end. - -Seeing his gloomy face as he frowned at his wife, the officers -grew still merrier, and some of them could not refrain from -laughter, for which they hurriedly sought plausible pretexts. When -he had gone, taking his wife with him, and had settled down with her -in their covered cart, the officers lay down in the tavern, covering -themselves with their wet cloaks, but they did not sleep for a long -time; now they exchanged remarks, recalling the doctor's uneasiness -and his wife's delight, now they ran out into the porch and reported -what was taking place in the covered trap. Several times Rostov, -covering his head, tried to go to sleep, but some remark would -arouse him and conversation would be resumed, to the accompaniment -of unreasoning, merry, childlike laughter. - - - - - -CHAPTER XIV - - -It was nearly three o'clock but no one was yet asleep, when the -quartermaster appeared with an order to move on to the little town -of Ostrovna. Still laughing and talking, the officers began -hurriedly getting ready and again boiled some muddy water -in the samovar. But Rostov went off to his squadron without waiting -for tea. Day was breaking, the rain had ceased, and the clouds were -dispersing. It felt damp and cold, especially in clothes that were -still moist. As they left the tavern in the twilight of the dawn, -Rostov and Ilyin both glanced under the wet and glistening leather -hood of the doctor's cart, from under the apron of which his feet were -sticking out, and in the middle of which his wife's nightcap was -visible and her sleepy breathing audible. - -"She really is a dear little thing," said Rostov to Ilyin, who was -following him. - -"A charming woman!" said Ilyin, with all the gravity of a boy of -sixteen. - -Half an hour later the squadron was lined up on the road. The -command was heard to "mount" and the soldiers crossed themselves and -mounted. Rostov riding in front gave the order "Forward!" and the -hussars, with clanking sabers and subdued talk, their horses' hoofs -splashing in the mud, defiled in fours and moved along the broad -road planted with birch trees on each side, following the infantry and -a battery that had gone on in front. - -Tattered, blue-purple clouds, reddening in the east, were scudding -before the wind. It was growing lighter and lighter. That curly -grass which always grows by country roadsides became clearly -visible, still wet with the night's rain; the drooping branches of the -birches, also wet, swayed in the wind and flung down bright drops of -water to one side. The soldiers' faces were more and more clearly -visible. Rostov, always closely followed by Ilyin, rode along the side -of the road between two rows of birch trees. - -When campaigning, Rostov allowed himself the indulgence of riding -not a regimental but a Cossack horse. A judge of horses and a -sportsman, he had lately procured himself a large, fine, mettlesome, -Donets horse, dun-colored, with light mane and tail, and when he -rode it no one could outgallop him. To ride this horse was a -pleasure to him, and he thought of the horse, of the morning, of the -doctor's wife, but not once of the impending danger. - -Formerly, when going into action, Rostov had felt afraid; now he had -not the least feeling of fear. He was fearless, not because he had -grown used to being under fire (one cannot grow used to danger), but -because he had learned how to manage his thoughts when in danger. He -had grown accustomed when going into action to think about anything -but what would seem most likely to interest him--the impending danger. -During the first period of his service, hard as he tried and much as -he reproached himself with cowardice, he had not been able to do this, -but with time it had come of itself. Now he rode beside Ilyin under -the birch trees, occasionally plucking leaves from a branch that met -his hand, sometimes touching his horse's side with his foot, or, -without turning round, handing a pipe he had finished to an hussar -riding behind him, with as calm and careless an air as though he -were merely out for a ride. He glanced with pity at the excited face -of Ilyin, who talked much and in great agitation. He knew from -experience the tormenting expectation of terror and death the cornet -was suffering and knew that only time could help him. - -As soon as the sun appeared in a clear strip of sky beneath the -clouds, the wind fell, as if it dared not spoil the beauty of the -summer morning after the storm; drops still continued to fall, but -vertically now, and all was still. The whole sun appeared on the -horizon and disappeared behind a long narrow cloud that hung above it. -A few minutes later it reappeared brighter still from behind the top -of the cloud, tearing its edge. Everything grew bright and -glittered. And with that light, and as if in reply to it, came the -sound of guns ahead of them. - -Before Rostov had had time to consider and determine the distance of -that firing, Count Ostermann-Tolstoy's adjutant came galloping from -Vitebsk with orders to advance at a trot along the road. - -The squadron overtook and passed the infantry and the battery--which -had also quickened their pace--rode down a hill, and passing through -an empty and deserted village again ascended. The horses began to -lather and the men to flush. - -"Halt! Dress your ranks!" the order of the regimental commander -was heard ahead. "Forward by the left. Walk, march!" came the order -from in front. - -And the hussars, passing along the line of troops on the left -flank of our position, halted behind our Uhlans who were in the -front line. To the right stood our infantry in a dense column: they -were the reserve. Higher up the hill, on the very horizon, our guns -were visible through the wonderfully clear air, brightly illuminated -by slanting morning sunbeams. In front, beyond a hollow dale, could be -seen the enemy's columns and guns. Our advanced line, already in -action, could be heard briskly exchanging shots with the enemy in -the dale. - -At these sounds, long unheard, Rostov's spirits rose, as at the -strains of the merriest music. Trap-ta-ta-tap! cracked the shots, -now together, now several quickly one after another. Again all was -silent and then again it sounded as if someone were walking on -detonators and exploding them. - -The hussars remained in the same place for about an hour. A -cannonade began. Count Ostermann with his suite rode up behind the -squadron, halted, spoke to the commander of the regiment, and rode -up the hill to the guns. - -After Ostermann had gone, a command rang out to the Uhlans. - -"Form column! Prepare to charge!" - -The infantry in front of them parted into platoons to allow the -cavalry to pass. The Uhlans started, the streamers on their spears -fluttering, and trotted downhill toward the French cavalry which was -seen below to the left. - -As soon as the Uhlans descended the hill, the hussars were ordered -up the hill to support the battery. As they took the places vacated by -the Uhlans, bullets came from the front, whining and whistling, but -fell spent without taking effect. - -The sounds, which he had not heard for so long, had an even more -pleasurable and exhilarating effect on Rostov than the previous sounds -of firing. Drawing himself up, he viewed the field of battle opening -out before him from the hill, and with his whole soul followed the -movement of the Uhlans. They swooped down close to the French -dragoons, something confused happened there amid the smoke, and five -minutes later our Uhlans were galloping back, not to the place they -had occupied but more to the left, and among the orange-colored Uhlans -on chestnut horses and behind them, in a large group, blue French -dragoons on gray horses could be seen. - - - - - -CHAPTER XV - - -Rostov, with his keen sportsman's eye, was one of the first to catch -sight of these blue French dragoons pursuing our Uhlans. Nearer and -nearer in disorderly crowds came the Uhlans and the French dragoons -pursuing them. He could already see how these men, who looked so small -at the foot of the hill, jostled and overtook one another, waving -their arms and their sabers in the air. - -Rostov gazed at what was happening before him as at a hunt. He -felt instinctively that if the hussars struck at the French dragoons -now, the latter could not withstand them, but if a charge was to be -made it must be done now, at that very moment, or it would be too -late. He looked around. A captain, standing beside him, was gazing -like himself with eyes fixed on the cavalry below them. - -"Andrew Sevastyanych!" said Rostov. "You know, we could crush -them...." - -"A fine thing too!" replied the captain, "and really..." - -Rostov, without waiting to hear him out, touched his horse, galloped -to the front of his squadron, and before he had time to finish -giving the word of command, the whole squadron, sharing his feeling, -was following him. Rostov himself did not know how or why he did it. -He acted as he did when hunting, without reflecting or considering. He -saw the dragoons near and that they were galloping in disorder; he -knew they could not withstand an attack--knew there was only that -moment and that if he let it slip it would not return. The bullets -were whining and whistling so stimulatingly around him and his horse -was so eager to go that he could not restrain himself. He touched -his horse, gave the word of command, and immediately, hearing behind -him the tramp of the horses of his deployed squadron, rode at full -trot downhill toward the dragoons. Hardly had they reached the -bottom of the hill before their pace instinctively changed to a -gallop, which grew faster and faster as they drew nearer to our Uhlans -and the French dragoons who galloped after them. The dragoons were now -close at hand. On seeing the hussars, the foremost began to turn, -while those behind began to halt. With the same feeling with which -he had galloped across the path of a wolf, Rostov gave rein to his -Donets horse and galloped to intersect the path of the dragoons' -disordered lines. One Uhlan stopped, another who was on foot flung -himself to the ground to avoid being knocked over, and a riderless -horse fell in among the hussars. Nearly all the French dragoons were -galloping back. Rostov, picking out one on a gray horse, dashed -after him. On the way he came upon a bush, his gallant horse cleared -it, and almost before he had righted himself in his saddle he saw that -he would immediately overtake the enemy he had selected. That -Frenchman, by his uniform an officer, was going at a gallop, crouching -on his gray horse and urging it on with his saber. In another moment -Rostov's horse dashed its breast against the hindquarters of the -officer's horse, almost knocking it over, and at the same instant -Rostov, without knowing why, raised his saber and struck the Frenchman -with it. - -The instant he had done this, all Rostov's animation vanished. The -officer fell, not so much from the blow--which had but slightly cut -his arm above the elbow--as from the shock to his horse and from -fright. Rostov reined in his horse, and his eyes sought his foe to see -whom he had vanquished. The French dragoon officer was hopping with -one foot on the ground, the other being caught in the stirrup. His -eyes, screwed up with fear as if he every moment expected another -blow, gazed up at Rostov with shrinking terror. His pale and -mud-stained face--fair and young, with a dimple in the chin and -light-blue eyes--was not an enemy's face at all suited to a -battlefield, but a most ordinary, homelike face. Before Rostov had -decided what to do with him, the officer cried, "I surrender!" He -hurriedly but vainly tried to get his foot out of the stirrup and -did not remove his frightened blue eyes from Rostov's face. Some -hussars who galloped up disengaged his foot and helped him into the -saddle. On all sides, the hussars were busy with the dragoons; one was -wounded, but though his face was bleeding, he would not give up his -horse; another was perched up behind an hussar with his arms round -him; a third was being helped by an hussar to mount his horse. In -front, the French infantry were firing as they ran. The hussars -galloped hastily back with their prisoners. Rostov galloped back -with the rest, aware of an unpleasant feeling of depression in his -heart. Something vague and confused, which he could not at all account -for, had come over him with the capture of that officer and the blow -he had dealt him. - -Count Ostermann-Tolstoy met the returning hussars, sent for -Rostov, thanked him, and said he would report his gallant deed to -the Emperor and would recommend him for a St. George's Cross. When -sent for by Count Ostermann, Rostov, remembering that he had charged -without orders, felt sure his commander was sending for him to -punish him for breach of discipline. Ostermann's flattering words -and promise of a reward should therefore have struck him all the -more pleasantly, but he still felt that same vaguely disagreeable -feeling of moral nausea. "But what on earth is worrying me?" he -asked himself as he rode back from the general. "Ilyin? No, he's safe. -Have I disgraced myself in any way? No, that's not it." Something -else, resembling remorse, tormented him. "Yes, oh yes, that French -officer with the dimple. And I remember how my arm paused when I -raised it." - -Rostov saw the prisoners being led away and galloped after them to -have a look at his Frenchman with the dimple on his chin. He was -sitting in his foreign uniform on an hussar packhorse and looked -anxiously about him; The sword cut on his arm could scarcely be called -a wound. He glanced at Rostov with a feigned smile and waved his -hand in greeting. Rostov still had the same indefinite feeling, as -of shame. - -All that day and the next his friends and comrades noticed that -Rostov, without being dull or angry, was silent, thoughtful, and -preoccupied. He drank reluctantly, tried to remain alone, and kept -turning something over in his mind. - -Rostov was always thinking about that brilliant exploit of his, -which to his amazement had gained him the St. George's Cross and -even given him a reputation for bravery, and there was something he -could not at all understand. "So others are even more afraid than I -am!" he thought. "So that's all there is in what is called heroism! -And heroism! And did I do it for my country's sake? And how was he -to blame, with his dimple and blue eyes? And how frightened he was! He -thought that I should kill him. Why should I kill him? My hand -trembled. And they have given me a St. George's Cross.... I can't make -it out at all." - -But while Nicholas was considering these questions and still could -reach no clear solution of what puzzled him so, the wheel of fortune -in the service, as often happens, turned in his favor. After the -affair at Ostrovna he was brought into notice, received command of -an hussar battalion, and when a brave officer was needed he was -chosen. - - - - - -CHAPTER XVI - - -On receiving news of Natasha's illness, the countess, though not -quite well yet and still weak, went to Moscow with Petya and the -rest of the household, and the whole family moved from Marya -Dmitrievna's house to their own and settled down in town. - -Natasha's illness was so serious that, fortunately for her and for -her parents, the consideration of all that had caused the illness, her -conduct and the breaking off of her engagement, receded into the -background. She was so ill that it was impossible for them to consider -in how far she was to blame for what had happened. She could not eat -or sleep, grew visibly thinner, coughed, and, as the doctors made them -feel, was in danger. They could not think of anything but how to -help her. Doctors came to see her singly and in consultation, talked -much in French, German, and Latin, blamed one another, and -prescribed a great variety of medicines for all the diseases known -to them, but the simple idea never occurred to any of them that they -could not know the disease Natasha was suffering from, as no disease -suffered by a live man can be known, for every living person has his -own peculiarities and always has his own peculiar, personal, novel, -complicated disease, unknown to medicine--not a disease of the -lungs, liver, skin, heart, nerves, and so on mentioned in medical -books, but a disease consisting of one of the innumerable combinations -of the maladies of those organs. This simple thought could not occur -to the doctors (as it cannot occur to a wizard that he is unable to -work his charms) because the business of their lives was to cure, -and they received money for it and had spent the best years of their -lives on that business. But, above all, that thought was kept out of -their minds by the fact that they saw they were really useful, as in -fact they were to the whole Rostov family. Their usefulness did not -depend on making the patient swallow substances for the most part -harmful (the harm was scarcely perceptible, as they were given in -small doses), but they were useful, necessary, and indispensable -because they satisfied a mental need of the invalid and of those who -loved her--and that is why there are, and always will be, -pseudo-healers, wise women, homeopaths, and allopaths. They -satisfied that eternal human need for hope of relief, for sympathy, -and that something should be done, which is felt by those who are -suffering. They satisfied the need seen in its most elementary form in -a child, when it wants to have a place rubbed that has been hurt. A -child knocks itself and runs at once to the arms of its mother or -nurse to have the aching spot rubbed or kissed, and it feels better -when this is done. The child cannot believe that the strongest and -wisest of its people have no remedy for its pain, and the hope of -relief and the expression of its mother's sympathy while she rubs -the bump comforts it. The doctors were of use to Natasha because -they kissed and rubbed her bump, assuring her that it would soon -pass if only the coachman went to the chemist's in the Arbat and got a -powder and some pills in a pretty box of a ruble and seventy kopeks, -and if she took those powders in boiled water at intervals of -precisely two hours, neither more nor less. - -What would Sonya and the count and countess have done, how would -they have looked, if nothing had been done, if there had not been -those pills to give by the clock, the warm drinks, the chicken -cutlets, and all the other details of life ordered by the doctors, the -carrying out of which supplied an occupation and consolation to the -family circle? How would the count have borne his dearly loved -daughter's illness had he not known that it was costing him a thousand -rubles, and that he would not grudge thousands more to benefit her, or -had he not known that if her illness continued he would not grudge yet -other thousands and would take her abroad for consultations there, and -had he not been able to explain the details of how Metivier and Feller -had not understood the symptoms, but Frise had, and Mudrov had -diagnosed them even better? What would the countess have done had -she not been able sometimes to scold the invalid for not strictly -obeying the doctor's orders? - -"You'll never get well like that," she would say, forgetting her -grief in her vexation, "if you won't obey the doctor and take your -medicine at the right time! You mustn't trifle with it, you know, or -it may turn to pneumonia," she would go on, deriving much comfort from -the utterance of that foreign word, incomprehensible to others as well -as to herself. - -What would Sonya have done without the glad consciousness that she -had not undressed during the first three nights, in order to be -ready to carry out all the doctor's injunctions with precision, and -that she still kept awake at night so as not to miss the proper time -when the slightly harmful pills in the little gilt box had to be -administered? Even to Natasha herself it was pleasant to see that so -many sacrifices were being made for her sake, and to know that she had -to take medicine at certain hours, though she declared that no -medicine would cure her and that it was all nonsense. And it was -even pleasant to be able to show, by disregarding the orders, that she -did not believe in medical treatment and did not value her life. - -The doctor came every day, felt her pulse, looked at her tongue, and -regardless of her grief-stricken face joked with her. But when he -had gone into another room, to which the countess hurriedly followed -him, he assumed a grave air and thoughtfully shaking his head said -that though there was danger, he had hopes of the effect of this -last medicine and one must wait and see, that the malady was chiefly -mental, but... And the countess, trying to conceal the action from -herself and from him, slipped a gold coin into his hand and always -returned to the patient with a more tranquil mind. - -The symptoms of Natasha's illness were that she ate little, slept -little, coughed, and was always low-spirited. The doctors said that -she could not get on without medical treatment, so they kept her in -the stifling atmosphere of the town, and the Rostovs did not move to -the country that summer of 1812. - -In spite of the many pills she swallowed and the drops and powders -out of the little bottles and boxes of which Madame Schoss who was -fond of such things made a large collection, and in spite of being -deprived of the country life to which she was accustomed, youth -prevailed. Natasha's grief began to be overlaid by the impressions -of daily life, it ceased to press so painfully on her heart, it -gradually faded into the past, and she began to recover physically. - - - - - -CHAPTER XVII - - -Natasha was calmer but no happier. She not merely avoided all -external forms of pleasure--balls, promenades, concerts, and theaters- -but she never laughed without a sound of tears in her laughter. She -could not sing. As soon as she began to laugh, or tried to sing by -herself, tears choked her: tears of remorse, tears at the recollection -of those pure times which could never return, tears of vexation that -she should so uselessly have ruined her young life which might have -been so happy. Laughter and singing in particular seemed to her like a -blasphemy, in face of her sorrow. Without any need of -self-restraint, no wish to coquet ever entered her head. She said -and felt at that time that no man was more to her than Nastasya -Ivanovna, the buffoon. Something stood sentinel within her and forbade -her every joy. Besides, she had lost all the old interests of her -carefree girlish life that had been so full of hope. The previous -autumn, the hunting, "Uncle," and the Christmas holidays spent with -Nicholas at Otradnoe were what she recalled oftenest and most -painfully. What would she not have given to bring back even a single -day of that time! But it was gone forever. Her presentiment at the -time had not deceived her--that that state of freedom and readiness -for any enjoyment would not return again. Yet it was necessary to live -on. - -It comforted her to reflect that she was not better as she had -formerly imagined, but worse, much worse, than anybody else in the -world. But this was not enough. She knew that, and asked herself, -"What next?" But there was nothing to come. There was no joy in -life, yet life was passing. Natasha apparently tried not to be a -burden or a hindrance to anyone, but wanted nothing for herself. She -kept away from everyone in the house and felt at ease only with her -brother Petya. She liked to be with him better than with the others, -and when alone with him she sometimes laughed. She hardly ever left -the house and of those who came to see them was glad to see only one -person, Pierre. It would have been impossible to treat her with more -delicacy, greater care, and at the same time more seriously than did -Count Bezukhov. Natasha unconsciously felt this delicacy and so -found great pleasure in his society. But she was not even grateful -to him for it; nothing good on Pierre's part seemed to her to be an -effort, it seemed so natural for him to be kind to everyone that there -was no merit in his kindness. Sometimes Natasha noticed -embarrassment and awkwardness on his part in her presence, -especially when he wanted to do something to please her, or feared -that something they spoke of would awaken memories distressing to her. -She noticed this and attributed it to his general kindness and -shyness, which she imagined must be the same toward everyone as it was -to her. After those involuntary words--that if he were free he would -have asked on his knees for her hand and her love--uttered at a moment -when she was so strongly agitated, Pierre never spoke to Natasha of -his feelings; and it seemed plain to her that those words, which had -then so comforted her, were spoken as all sorts of meaningless words -are spoken to comfort a crying child. It was not because Pierre was -a married man, but because Natasha felt very strongly with him that -moral barrier the absence of which she had experienced with Kuragin -that it never entered her head that the relations between him and -herself could lead to love on her part, still less on his, or even -to the kind of tender, self-conscious, romantic friendship between a -man and a woman of which she had known several instances. - -Before the end of the fast of St. Peter, Agrafena Ivanovna Belova, a -country neighbor of the Rostovs, came to Moscow to pay her devotions -at the shrines of the Moscow saints. She suggested that Natasha should -fast and prepare for Holy Communion, and Natasha gladly welcomed the -idea. Despite the doctor's orders that she should not go out early -in the morning, Natasha insisted on fasting and preparing for the -sacrament, not as they generally prepared for it in the Rostov -family by attending three services in their own house, but as Agrafena -Ivanovna did, by going to church every day for a week and not once -missing Vespers, Matins, or Mass. - -The countess was pleased with Natasha's zeal; after the poor results -of the medical treatment, in the depths of her heart she hoped that -prayer might help her daughter more than medicines and, though not -without fear and concealing it from the doctor, she agreed to -Natasha's wish and entrusted her to Belova. Agrafena Ivanovna used -to come to wake Natasha at three in the morning, but generally found -her already awake. She was afraid of being late for Matins. Hastily -washing, and meekly putting on her shabbiest dress and an old -mantilla, Natasha, shivering in the fresh air, went out into the -deserted streets lit by the clear light of dawn. By Agrafena -Ivanovna's advice Natasha prepared herself not in their own parish, -but at a church where, according to the devout Agrafena Ivanovna, -the priest was a man of very severe and lofty life. There were never -many people in the church; Natasha always stood beside Belova in the -customary place before an icon of the Blessed Virgin, let into the -screen before the choir on the left side, and a feeling, new to her, -of humility before something great and incomprehensible, seized her -when at that unusual morning hour, gazing at the dark face of the -Virgin illuminated by the candles burning before it and by the morning -light falling from the window, she listened to the words of the -service which she tried to follow with understanding. When she -understood them her personal feeling became interwoven in the -prayers with shades of its own. When she did not understand, it was -sweeter still to think that the wish to understand everything is -pride, that it is impossible to understand all, that it is only -necessary to believe and to commit oneself to God, whom she felt -guiding her soul at those moments. She crossed herself, bowed low, and -when she did not understand, in horror at her own vileness, simply -asked God to forgive her everything, everything, to have mercy upon -her. The prayers to which she surrendered herself most of all were -those of repentance. On her way home at an early hour when she met -no one but bricklayers going to work or men sweeping the street, and -everybody within the houses was still asleep, Natasha experienced a -feeling new to her, a sense of the possibility of correcting her -faults, the possibility of a new, clean life, and of happiness. - -During the whole week she spent in this way, that feeling grew every -day. And the happiness of taking communion, or "communing" as Agrafena -Ivanovna, joyously playing with the word, called it, seemed to Natasha -so great that she felt she should never live till that blessed Sunday. - -But the happy day came, and on that memorable Sunday, when, -dressed in white muslin, she returned home after communion, for the -first time for many months she felt calm and not oppressed by the -thought of the life that lay before her. - -The doctor who came to see her that day ordered her to continue -the powders he had prescribed a fortnight previously. - -"She must certainly go on taking them morning and evening," said he, -evidently sincerely satisfied with his success. "Only, please be -particular about it. - -"Be quite easy," he continued playfully, as he adroitly took the -gold coin in his palm. "She will soon be singing and frolicking about. -The last medicine has done her a very great deal of good. She has -freshened up very much." - -The countess, with a cheerful expression on her face, looked down at -her nails and spat a little for luck as she returned to the drawing -room. - - - - - -CHAPTER XVIII - - -At the beginning of July more and more disquieting reports about the -war began to spread in Moscow; people spoke of an appeal by the -Emperor to the people, and of his coming himself from the army to -Moscow. And as up to the eleventh of July no manifesto or appeal had -been received, exaggerated reports became current about them and about -the position of Russia. It was said that the Emperor was leaving the -army because it was in danger, it was said that Smolensk had -surrendered, that Napoleon had an army of a million and only a miracle -could save Russia. - -On the eleventh of July, which was Saturday, the manifesto was -received but was not yet in print, and Pierre, who was at the -Rostovs', promised to come to dinner next day, Sunday, and bring a -copy of the manifesto and appeal, which he would obtain from Count -Rostopchin. - -That Sunday, the Rostovs went to Mass at the Razumovskis' private -chapel as usual. It was a hot July day. Even at ten o'clock, when -the Rostovs got out of their carriage at the chapel, the sultry air, -the shouts of hawkers, the light and gay summer clothes of the -crowd, the dusty leaves of the trees on the boulevard, the sounds of -the band and the white trousers of a battalion marching to parade, the -rattling of wheels on the cobblestones, and the brilliant, hot -sunshine were all full of that summer languor, that content and -discontent with the present, which is most strongly felt on a -bright, hot day in town. All the Moscow notabilities, all the Rostovs' -acquaintances, were at the Razumovskis' chapel, for, as if expecting -something to happen, many wealthy families who usually left town for -their country estates had not gone away that summer. As Natasha, at -her mother's side, passed through the crowd behind a liveried -footman who cleared the way for them, she heard a young man speaking -about her in too loud a whisper. - -"That's Rostova, the one who..." - -"She's much thinner, but all the same she's pretty!" - -She heard, or thought she heard, the names of Kuragin and Bolkonski. -But she was always imagining that. It always seemed to her that -everyone who looked at her was thinking only of what had happened to -her. With a sinking heart, wretched as she always was now when she -found herself in a crowd, Natasha in her lilac silk dress trimmed with -black lace walked--as women can walk--with the more repose and -stateliness the greater the pain and shame in her soul. She knew for -certain that she was pretty, but this no longer gave her -satisfaction as it used to. On the contrary it tormented her more than -anything else of late, and particularly so on this bright, hot -summer day in town. "It's Sunday again--another week past," she -thought, recalling that she had been here the Sunday before, "and -always the same life that is no life, and the same surroundings in -which it used to be so easy to live. I'm pretty, I'm young, and I know -that now I am good. I used to be bad, but now I know I am good," she -thought, "but yet my best years are slipping by and are no good to -anyone." She stood by her mother's side and exchanged nods with -acquaintances near her. From habit she scrutinized the ladies' -dresses, condemned the bearing of a lady standing close by who was not -crossing herself properly but in a cramped manner, and again she -thought with vexation that she was herself being judged and was -judging others, and suddenly, at the sound of the service, she felt -horrified at her own vileness, horrified that the former purity of her -soul was again lost to her. - -A comely, fresh-looking old man was conducting the service with that -mild solemnity which has so elevating and soothing an effect on the -souls of the worshipers. The gates of the sanctuary screen were -closed, the curtain was slowly drawn, and from behind it a soft -mysterious voice pronounced some words. Tears, the cause of which -she herself did not understand, made Natasha's breast heave, and a -joyous but oppressive feeling agitated her. - -"Teach me what I should do, how to live my life, how I may grow good -forever, forever!" she pleaded. - -The deacon came out onto the raised space before the altar screen -and, holding his thumb extended, drew his long hair from under his -dalmatic and, making the sign of the cross on his breast, began in a -loud and solemn voice to recite the words of the prayer... - -"In peace let us pray unto the Lord." - -"As one community, without distinction of class, without enmity, -united by brotherly love--let us pray!" thought Natasha. - -"For the peace that is from above, and for the salvation of our -souls." - -"For the world of angels and all the spirits who dwell above us," -prayed Natasha. - -When they prayed for the warriors, she thought of her brother and -Denisov. When they prayed for all traveling by land and sea, she -remembered Prince Andrew, prayed for him, and asked God to forgive her -all the wrongs she had done him. When they prayed for those who love -us, she prayed for the members of her own family, her father and -mother and Sonya, realizing for the first time how wrongly she had -acted toward them, and feeling all the strength of her love for -them. When they prayed for those who hate us, she tried to think of -her enemies and people who hated her, in order to pray for them. She -included among her enemies the creditors and all who had business -dealings with her father, and always at the thought of enemies and -those who hated her she remembered Anatole who had done her so much -harm--and though he did not hate her she gladly prayed for him as -for an enemy. Only at prayer did she feel able to think clearly and -calmly of Prince Andrew and Anatole, as men for whom her feelings were -as nothing compared with her awe and devotion to God. When they prayed -for the Imperial family and the Synod, she bowed very low and made the -sign of the cross, saying to herself that even if she did not -understand, still she could not doubt, and at any rate loved the -governing Synod and prayed for it. - -When he had finished the Litany the deacon crossed the stole over -his breast and said, "Let us commit ourselves and our whole lives to -Christ the Lord!" - -"Commit ourselves to God," Natasha inwardly repeated. "Lord God, I -submit myself to Thy will!" she thought. "I want nothing, wish for -nothing; teach me what to do and how to use my will! Take me, take -me!" prayed Natasha, with impatient emotion in her heart, not crossing -herself but letting her slender arms hang down as if expecting some -invisible power at any moment to take her and deliver her from -herself, from her regrets, desires, remorse, hopes, and sins. - -The countess looked round several times at her daughter's softened -face and shining eyes and prayed God to help her. - -Unexpectedly, in the middle of the service, and not in the usual -order Natasha knew so well, the deacon brought out a small stool, -the one he knelt on when praying on Trinity Sunday, and placed it -before the doors of the sanctuary screen. The priest came out with his -purple velvet biretta on his head, adjusted his hair, and knelt down -with an effort. Everybody followed his example and they looked at -one another in surprise. Then came the prayer just received from the -Synod--a prayer for the deliverance of Russia from hostile invasion. - -"Lord God of might, God of our salvation!" began the priest in -that voice, clear, not grandiloquent but mild, in which only the -Slav clergy read and which acts so irresistibly on a Russian heart. - -"Lord God of might, God of our salvation! Look this day in mercy and -blessing on Thy humble people, and graciously hear us, spare us, and -have mercy upon us! This foe confounding Thy land, desiring to lay -waste the whole world, rises against us; these lawless men are -gathered together to overthrow Thy kingdom, to destroy Thy dear -Jerusalem, Thy beloved Russia; to defile Thy temples, to overthrow -Thine altars, and to desecrate our holy shrines. How long, O Lord, how -long shall the wicked triumph? How long shall they wield unlawful -power? - -"Lord God! Hear us when we pray to Thee; strengthen with Thy might -our most gracious sovereign lord, the Emperor Alexander Pavlovich; -be mindful of his uprightness and meekness, reward him according to -his righteousness, and let it preserve us, Thy chosen Israel! Bless -his counsels, his undertakings, and his work; strengthen his kingdom -by Thine almighty hand, and give him victory over his enemy, even as -Thou gavest Moses the victory over Amalek, Gideon over Midian, and -David over Goliath. Preserve his army, put a bow of brass in the hands -of those who have armed themselves in Thy Name, and gird their loins -with strength for the fight. Take up the spear and shield and arise to -help us; confound and put to shame those who have devised evil against -us, may they be before the faces of Thy faithful warriors as dust -before the wind, and may Thy mighty Angel confound them and put them -to flight; may they be ensnared when they know it not, and may the -plots they have laid in secret be turned against them; let them fall -before Thy servants' feet and be laid low by our hosts! Lord, Thou art -able to save both great and small; Thou art God, and man cannot -prevail against Thee! - -"God of our fathers! Remember Thy bounteous mercy and -loving-kindness which are from of old; turn not Thy face from us, -but be gracious to our unworthiness, and in Thy great goodness and Thy -many mercies regard not our transgressions and iniquities! Create in -us a clean heart and renew a right spirit within us, strengthen us all -in Thy faith, fortify our hope, inspire us with true love one for -another, arm us with unity of spirit in the righteous defense of the -heritage Thou gavest to us and to our fathers, and let not the scepter -of the wicked be exalted against the destiny of those Thou hast -sanctified. - -"O Lord our God, in whom we believe and in whom we put our trust, -let us not be confounded in our hope of Thy mercy, and give us a token -of Thy blessing, that those who hate us and our Orthodox faith may see -it and be put to shame and perish, and may all the nations know that -Thou art the Lord and we are Thy people. Show Thy mercy upon us this -day, O Lord, and grant us Thy salvation; make the hearts of Thy -servants to rejoice in Thy mercy; smite down our enemies and destroy -them swiftly beneath the feet of Thy faithful servants! For Thou art -the defense, the succor, and the victory of them that put their -trust in Thee, and to Thee be all glory, to Father, Son, and Holy -Ghost, now and forever, world without end. Amen." - -In Natasha's receptive condition of soul this prayer affected her -strongly. She listened to every word about the victory of Moses over -Amalek, of Gideon over Midian, and of David over Goliath, and about -the destruction of "Thy Jerusalem," and she prayed to God with the -tenderness and emotion with which her heart was overflowing, but -without fully understanding what she was asking of God in that prayer. -She shared with all her heart in the prayer for the spirit of -righteousness, for the strengthening of the heart by faith and hope, -and its animation by love. But she could not pray that her enemies -might be trampled under foot when but a few minutes before she had -been wishing she had more of them that she might pray for them. But -neither could she doubt the righteousness of the prayer that was being -read on bended knees. She felt in her heart a devout and tremulous awe -at the thought of the punishment that overtakes men for their sins, -and especially of her own sins, and she prayed to God to forgive -them all, and her too, and to give them all, and her too, peace and -happiness. And it seemed to her that God heard her prayer. - - - - - -CHAPTER XIX - - -From the day when Pierre, after leaving the Rostovs' with -Natasha's grateful look fresh in his mind, had gazed at the comet that -seemed to be fixed in the sky and felt that something new was -appearing on his own horizon--from that day the problem of the -vanity and uselessness of all earthly things, that had incessantly -tormented him, no longer presented itself. That terrible question -"Why?" "Wherefore?" which had come to him amid every occupation, was -now replaced, not by another question or by a reply to the former -question, but by her image. When he listened to, or himself took -part in, trivial conversations, when he read or heard of human -baseness or folly, he was not horrified as formerly, and did not ask -himself why men struggled so about these things when all is so -transient and incomprehensible--but he remembered her as he had last -seen her, and all his doubts vanished--not because she had answered -the questions that had haunted him, but because his conception of -her transferred him instantly to another, a brighter, realm of -spiritual activity in which no one could be justified or guilty--a -realm of beauty and love which it was worth living for. Whatever -worldly baseness presented itself to him, he said to himself: - -"Well, supposing N. N. swindled the country and the Tsar, and the -country and the Tsar confer honors upon him, what does that matter? -She smiled at me yesterday and asked me to come again, and I love her, -and no one will ever know it." And his soul felt calm and peaceful. - -Pierre still went into society, drank as much and led the same -idle and dissipated life, because besides the hours he spent at the -Rostovs' there were other hours he had to spend somehow, and the -habits and acquaintances he had made in Moscow formed a current that -bore him along irresistibly. But latterly, when more and more -disquieting reports came from the seat of war and Natasha's health -began to improve and she no longer aroused in him the former feeling -of careful pity, an ever-increasing restlessness, which he could not -explain, took possession of him. He felt that the condition he was -in could not continue long, that a catastrophe was coming which -would change his whole life, and he impatiently sought everywhere -for signs of that approaching catastrophe. One of his brother Masons -had revealed to Pierre the following prophecy concerning Napoleon, -drawn from the Revelation of St. John. - -In chapter 13, verse 18, of the Apocalypse, it is said: - - -Here is wisdom. Let him that hath understanding count the number -of the beast: for it is the number of a man; and his number is Six -hundred threescore and six. - -And in the fifth verse of the same chapter: - - -And there was given unto him a mouth speaking great things and -blasphemies; and power was given unto him to continue forty and two -months. - - -The French alphabet, written out with the same numerical values as -the Hebrew, in which the first nine letters denote units and the -others tens, will have the following significance: - - a b c d e f g h i k - 1 2 3 4 5 6 7 8 9 10 - l m n o p q r s - 20 30 40 50 60 70 80 90 - t u v w x y - 100 110 120 130 140 150 - z - 160 - - -Writing the words L'Empereur Napoleon in numbers, it appears that -the sum of them is 666, and that Napoleon therefore the beast foretold -in the Apocalypse. Moreover, by applying the same system to the -words quarante-deux,* which was the term allowed to the beast that -"spoke great things and blasphemies," the same number 666 was -obtained; from which it followed that the limit fixed for Napoleon's -power had come in the year 1812 when the French emperor was forty-two. -This prophecy pleased Pierre very much and he often asked himself what -would put an end to the power of the beast, that is, of Napoleon, -and tried by the same system of using letters as numbers and adding -them up, to find an answer to the question that engrossed him. He -wrote the words L'Empereur Alexandre, La nation russe and added up -their numbers, but the sums were either more or less than 666. Once -when making such calculations he wrote down his own name in French, -Comte Pierre Besouhoff, but the sum of the numbers did not come right. -Then he changed the spelling, substituting a z for the s and adding de -and the article le, still without obtaining the desired result. Then -it occurred to him: if the answer to the question were contained in -his name, his nationality would also be given in the answer. So he -wrote Le russe Besuhof and adding up the numbers got 671. This was -only five too much, and five was represented by e, the very letter -elided from the article le before the word Empereur. By omitting the -e, though incorrectly, Pierre got the answer he sought. L'russe -Besuhof made 666. This discovery excited him. How, or by what means, -he was connected with the great event foretold in the Apocalypse he -did not know, but he did not doubt that connection for a moment. His -love for Natasha, Antichrist, Napoleon, the invasion, the comet, -666, L'Empereur Napoleon, and L'russe Besuhof--all this had to -mature and culminate, to lift him out of that spellbound, petty sphere -of Moscow habits in which he felt himself held captive and lead him to -a great achievement and great happiness. - - -*Forty-two. - - - -On the eve of the Sunday when the special prayer was read, Pierre -had promised the Rostovs to bring them, from Count Rostopchin whom -he knew well, both the appeal to the people and the news from the -army. In the morning, when he went to call at Rostopchin's he met -there a courier fresh from the army, an acquaintance of his own, who -often danced at Moscow balls. - -"Do, please, for heaven's sake, relieve me of something!" said the -courier. "I have a sackful of letters to parents." - -Among these letters was one from Nicholas Rostov to his father. -Pierre took that letter, and Rostopchin also gave him the Emperor's -appeal to Moscow, which had just been printed, the last army orders, -and his own most recent bulletin. Glancing through the army orders, -Pierre found in one of them, in the lists of killed, wounded, and -rewarded, the name of Nicholas Rostov, awarded a St. George's Cross of -the Fourth Class for courage shown in the Ostrovna affair, and in -the same order the name of Prince Andrew Bolkonski, appointed to the -command of a regiment of Chasseurs. Though he did not want to remind -the Rostovs of Bolkonski, Pierre could not refrain from making them -happy by the news of their son's having received a decoration, so he -sent that printed army order and Nicholas' letter to the Rostovs, -keeping the appeal, the bulletin, and the other orders to take with -him when he went to dinner. - -His conversation with Count Rostopchin and the latter's tone of -anxious hurry, the meeting with the courier who talked casually of how -badly things were going in the army, the rumors of the discovery of -spies in Moscow and of a leaflet in circulation stating that -Napoleon promised to be in both the Russian capitals by the autumn, -and the talk of the Emperor's being expected to arrive next day--all -aroused with fresh force that feeling of agitation and expectation -in Pierre which he had been conscious of ever since the appearance -of the comet, and especially since the beginning of the war. - -He had long been thinking of entering the army and would have done -so had he not been hindered, first, by his membership of the Society -of Freemasons to which he was bound by oath and which preached -perpetual peace and the abolition of war, and secondly, by the fact -that when he saw the great mass of Muscovites who had donned uniform -and were talking patriotism, he somehow felt ashamed to take the step. -But the chief reason for not carrying out his intention to enter the -army lay in the vague idea that he was L'russe Besuhof who had the -number of the beast, 666; that his part in the great affair of setting -a limit to the power of the beast that spoke great and blasphemous -things had been predestined from eternity, and that therefore he ought -not to undertake anything, but wait for what was bound to come to -pass. - - - - - -CHAPTER XX - - -A few intimate friends were dining with the Rostovs that day, as -usual on Sundays. - -Pierre came early so as to find them alone. - -He had grown so stout this year that he would have been abnormal had -he not been so tall, so broad of limb, and so strong that he carried -his bulk with evident ease. - -He went up the stairs, puffing and muttering something. His coachman -did not even ask whether he was to wait. He knew that when his -master was at the Rostovs' he stayed till midnight. The Rostovs' -footman rushed eagerly forward to help him off with his cloak and take -his hat and stick. Pierre, from club habit, always left both hat and -stick in the anteroom. - -The first person he saw in the house was Natasha. Even before he saw -her, while taking off his cloak, he heard her. She was practicing -solfa exercises in the music room. He knew that she had not sung since -her illness, and so the sound of her voice surprised and delighted -him. He opened the door softly and saw her, in the lilac dress she had -worn at church, walking about the room singing. She had her back to -him when he opened the door, but when, turning quickly, she saw his -broad, surprised face, she blushed and came rapidly up to him. - -"I want to try to sing again," she said, adding as if by way of -excuse, "it is, at least, something to do." - -"That's capital!" - -"How glad I am you've come! I am so happy today," she said, with the -old animation Pierre had not seen in her for along time. "You know -Nicholas has received a St. George's Cross? I am so proud of him." - -"Oh yes, I sent that announcement. But I don't want to interrupt -you," he added, and was about to go to the drawing room. - -Natasha stopped him. - -"Count, is it wrong of me to sing?" she said blushing, and fixing -her eyes inquiringly on him. - -"No... Why should it be? On the contrary... But why do you ask me?" - -"I don't know myself," Natasha answered quickly, "but I should not -like to do anything you disapproved of. I believe in you completely. -You don't know how important you are to me, how much you've done for -me...." She spoke rapidly and did not notice how Pierre flushed at her -words. "I saw in that same army order that he, Bolkonski" (she -whispered the name hastily), "is in Russia, and in the army again. -What do you think?"--she was speaking hurriedly, evidently afraid -her strength might fail her--"Will he ever forgive me? Will he not -always have a bitter feeling toward me? What do you think? What do you -think?" - -"I think..." Pierre replied, "that he has nothing to forgive.... -If I were in his place..." - -By association of ideas, Pierre was at once carried back to the -day when, trying to comfort her, he had said that if he were not -himself but the best man in the world and free, he would ask on his -knees for her hand; and the same feeling of pity, tenderness, and love -took possession of him and the same words rose to his lips. But she -did not give him time to say them. - -"Yes, you... you..." she said, uttering the word you rapturously- -"that's a different thing. I know no one kinder, more generous, or -better than you; nobody could be! Had you not been there then, and now -too, I don't know what would have become of me, because..." - -Tears suddenly rose in her eyes, she turned away, lifted her music -before her eyes, began singing again, and again began walking up and -down the room. - -Just then Petya came running in from the drawing room. - -Petya was now a handsome rosy lad of fifteen with full red lips -and resembled Natasha. He was preparing to enter the university, but -he and his friend Obolenski had lately, in secret, agreed to join -the hussars. - -Petya had come rushing out to talk to his namesake about this -affair. He had asked Pierre to find out whether he would be accepted -in the hussars. - -Pierre walked up and down the drawing room, not listening to what -Petya was saying. - -Petya pulled him by the arm to attract his attention. - -"Well, what about my plan? Peter Kirilych, for heaven's sake! You -are my only hope," said Petya. - -"Oh yes, your plan. To join the hussars? I'll mention it, I'll bring -it all up today." - -"Well, mon cher, have you got the manifesto?" asked the old count. -"The countess has been to Mass at the Razumovskis' and heard the new -prayer. She says it's very fine." - -"Yes, I've got it," said Pierre. "The Emperor is to be here -tomorrow... there's to be an Extraordinary Meeting of the nobility, -and they are talking of a levy of ten men per thousand. Oh yes, let me -congratulate you!" - -"Yes, yes, thank God! Well, and what news from the army?" - -"We are again retreating. They say we're already near Smolensk," -replied Pierre. - -"O Lord, O Lord!" exclaimed the count. "Where is the manifesto?" - -"The Emperor's appeal? Oh yes!" - -Pierre began feeling in his pockets for the papers, but could not -find them. Still slapping his pockets, he kissed the hand of the -countess who entered the room and glanced uneasily around, evidently -expecting Natasha, who had left off singing but had not yet come -into the drawing room. - -"On my word, I don't know what I've done with it," he said. - -"There he is, always losing everything!" remarked the countess. - -Natasha entered with a softened and agitated expression of face -and sat down looking silently at Pierre. As soon as she entered, -Pierre's features, which had been gloomy, suddenly lighted up, and -while still searching for the papers he glanced at her several times. - -"No, really! I'll drive home, I must have left them there. I'll -certainly..." - -"But you'll be late for dinner." - -"Oh! And my coachman has gone." - -But Sonya, who had gone to look for the papers in the anteroom, -had found them in Pierre's hat, where he had carefully tucked them -under the lining. Pierre was about to begin reading. - -"No, after dinner," said the old count, evidently expecting much -enjoyment from that reading. - -At dinner, at which champagne was drunk to the health of the new -chevalier of St. George, Shinshin told them the town news, of the -illness of the old Georgian princess, of Metivier's disappearance from -Moscow, and of how some German fellow had been brought to Rostopchin -and accused of being a French "spyer" (so Count Rostopchin had told -the story), and how Rostopchin let him go and assured the people -that he was "not a spire at all, but only an old German ruin." - -"People are being arrested..." said the count. "I've told the -countess she should not speak French so much. It's not the time for it -now." - -"And have you heard?" Shinshin asked. "Prince Golitsyn has engaged a -master to teach him Russian. It is becoming dangerous to speak -French in the streets." - -"And how about you, Count Peter Kirilych? If they call up the -militia, you too will have to mount a horse," remarked the old -count, addressing Pierre. - -Pierre had been silent and preoccupied all through dinner, seeming -not to grasp what was said. He looked at the count. - -"Oh yes, the war," he said. "No! What sort of warrior should I make? -And yet everything is so strange, so strange! I can't make it out. I -don't know, I am very far from having military tastes, but in these -times no one can answer for himself." - -After dinner the count settled himself comfortably in an easy -chair and with a serious face asked Sonya, who was considered an -excellent reader, to read the appeal. - - -"To Moscow, our ancient Capital! - -"The enemy has entered the borders of Russia with immense forces. He -comes to despoil our beloved country," - - -Sonya read painstakingly in her high-pitched voice. The count -listened with closed eyes, heaving abrupt sighs at certain passages. - -Natasha sat erect, gazing with a searching look now at her father -and now at Pierre. - -Pierre felt her eyes on him and tried not to look round. The -countess shook her head disapprovingly and angrily at every solemn -expression in the manifesto. In all these words she saw only that -the danger threatening her son would not soon be over. Shinshin, -with a sarcastic smile on his lips, was evidently preparing to make -fun of anything that gave him the opportunity: Sonya's reading, any -remark of the count's, or even the manifesto itself should no better -pretext present itself. - -After reading about the dangers that threatened Russia, the hopes -the Emperor placed on Moscow and especially on its illustrious -nobility, Sonya, with a quiver in her voice due chiefly to the -attention that was being paid to her, read the last words: - - -"We ourselves will not delay to appear among our people in that -Capital and in others parts of our realm for consultation, and for the -direction of all our levies, both those now barring the enemy's path -and those freshly formed to defeat him wherever he may appear. May the -ruin he hopes to bring upon us recoil on his own head, and may -Europe delivered from bondage glorify the name of Russia!" - - -"Yes, that's it!" cried the count, opening his moist eyes and -sniffing repeatedly, as if a strong vinaigrette had been held to his -nose; and he added, "Let the Emperor but say the word and we'll -sacrifice everything and begrudge nothing." - -Before Shinshin had time to utter the joke he was ready to make on -the count's patriotism, Natasha jumped up from her place and ran to -her father. - -"What a darling our Papa is!" she cried, kissing him, and she -again looked at Pierre with the unconscious coquetry that had returned -to her with her better spirits. - -"There! Here's a patriot for you!" said Shinshin. - -"Not a patriot at all, but simply..." Natasha replied in an -injured tone. "Everything seems funny to you, but this isn't at all -a joke...." - -"A joke indeed!" put in the count. "Let him but say the word and -we'll all go.... We're not Germans!" - -"But did you notice, it says, 'for consultation'?" said Pierre. - -"Never mind what it's for...." - -At this moment, Petya, to whom nobody was paying any attention, came -up to his father with a very flushed face and said in his breaking -voice that was now deep and now shrill: - -"Well, Papa, I tell you definitely, and Mamma too, it's as you -please, but I say definitely that you must let me enter the army, -because I can't... that's all...." - -The countess, in dismay, looked up to heaven, clasped her hands, and -turned angrily to her husband. - -"That comes of your talking!" said she. - -But the count had already recovered from his excitement. - -"Come, come!" said he. "Here's a fine warrior! No! Nonsense! You -must study." - -"It's not nonsense, Papa. Fedya Obolenski is younger than I, and -he's going too. Besides, all the same I can't study now when..." Petya -stopped short, flushed till he perspired, but still got out the words, -"when our Fatherland is in danger." - -"That'll do, that'll do--nonsense...." - -"But you said yourself that we would sacrifice everything." - -"Petya! Be quiet, I tell you!" cried the count, with a glance at his -wife, who had turned pale and was staring fixedly at her son. - -"And I tell you--Peter Kirilych here will also tell you..." - -"Nonsense, I tell you. Your mother's milk has hardly dried on your -lips and you want to go into the army! There, there, I tell you," -and the count moved to go out of the room, taking the papers, probably -to reread them in his study before having a nap. - -"Well, Peter Kirilych, let's go and have a smoke," he said. - -Pierre was agitated and undecided. Natasha's unwontedly brilliant -eyes, continually glancing at him with a more than cordial look, had -reduced him to this condition. - -"No, I think I'll go home." - -"Home? Why, you meant to spend the evening with us.... You don't -often come nowadays as it is, and this girl of mine," said the count -good-naturedly, pointing to Natasha, "only brightens up when you're -here." - -"Yes, I had forgotten... I really must go home... business..." -said Pierre hurriedly. - -"Well, then, au revoir!" said the count, and went out of the room. - -"Why are you going? Why are you upset?" asked Natasha, and she -looked challengingly into Pierre's eyes. - -"Because I love you!" was what he wanted to say, but he did not -say it, and only blushed till the tears came, and lowered his eyes. - -"Because it is better for me to come less often... because... No, -simply I have business...." - -"Why? No, tell me!" Natasha began resolutely and suddenly stopped. - -They looked at each other with dismayed and embarrassed faces. He -tried to smile but could not: his smile expressed suffering, and he -silently kissed her hand and went out. - -Pierre made up his mind not to go to the Rostovs' any more. - - - - - -CHAPTER XXI - - -After the definite refusal he had received, Petya went to his room -and there locked himself in and wept bitterly. When he came in to tea, -silent, morose, and with tear-stained face, everybody pretended not to -notice anything. - -Next day the Emperor arrived in Moscow, and several of the -Rostovs' domestic serfs begged permission to go to have a look at him. -That morning Petya was a long time dressing and arranging his hair and -collar to look like a grown-up man. He frowned before his looking -glass, gesticulated, shrugged his shoulders, and finally, without -saying a word to anyone, took his cap and left the house by the back -door, trying to avoid notice. Petya decided to go straight to where -the Emperor was and to explain frankly to some gentleman-in-waiting -(he imagined the Emperor to be always surrounded by -gentlemen-in-waiting) that he, Count Rostov, in spite of his youth -wished to serve his country; that youth could be no hindrance to -loyalty, and that he was ready to... While dressing, Petya had -prepared many fine things he meant to say to the gentleman-in-waiting. - -It was on the very fact of being so young that Petya counted for -success in reaching the Emperor--he even thought how surprised -everyone would be at his youthfulness--and yet in the arrangement of -his collar and hair and by his sedate deliberate walk he wished to -appear a grown-up man. But the farther he went and the more his -attention was diverted by the ever-increasing crowds moving toward the -Kremlin, the less he remembered to walk with the sedateness and -deliberation of a man. As he approached the Kremlin he even began to -avoid being crushed and resolutely stuck out his elbows in a -menacing way. But within the Trinity Gateway he was so pressed to -the wall by people who probably were unaware of the patriotic -intentions with which he had come that in spite of all his -determination he had to give in, and stop while carriages passed in, -rumbling beneath the archway. Beside Petya stood a peasant woman, a -footman, two tradesmen, and a discharged soldier. After standing -some time in the gateway, Petya tried to move forward in front of -the others without waiting for all the carriages to pass, and he began -resolutely working his way with his elbows, but the woman just in -front of him, who was the first against whom he directed his -efforts, angrily shouted at him: - -"What are you shoving for, young lordling? Don't you see we're all -standing still? Then why push?" - -"Anybody can shove," said the footman, and also began working his -elbows to such effect that he pushed Petya into a very filthy corner -of the gateway. - -Petya wiped his perspiring face with his hands and pulled up the -damp collar which he had arranged so well at home to seem like a -man's. - -He felt that he no longer looked presentable, and feared that if -he were now to approach the gentlemen-in-waiting in that plight he -would not be admitted to the Emperor. But it was impossible to smarten -oneself up or move to another place, because of the crowd. One of -the generals who drove past was an acquaintance of the Rostovs', and -Petya thought of asking his help, but came to the conclusion that that -would not be a manly thing to do. When the carriages had all passed -in, the crowd, carrying Petya with it, streamed forward into the -Kremlin Square which was already full of people. There were people not -only in the square, but everywhere--on the slopes and on the roofs. As -soon as Petya found himself in the square he clearly heard the sound -of bells and the joyous voices of the crowd that filled the whole -Kremlin. - -For a while the crowd was less dense, but suddenly all heads were -bared, and everyone rushed forward in one direction. Petya was being -pressed so that he could scarcely breathe, and everybody shouted, -"Hurrah! hurrah! hurrah!" Petya stood on tiptoe and pushed and -pinched, but could see nothing except the people about him. - -All the faces bore the same expression of excitement and enthusiasm. -A tradesman's wife standing beside Petya sobbed, and the tears ran -down her cheeks. - -"Father! Angel! Dear one!" she kept repeating, wiping away her tears -with her fingers. - -"Hurrah!" was heard on all sides. - -For a moment the crowd stood still, but then it made another rush -forward. - -Quite beside himself, Petya, clinching his teeth and rolling his -eyes ferociously, pushed forward, elbowing his way and shouting -"hurrah!" as if he were prepared that instant to kill himself and -everyone else, but on both sides of him other people with similarly -ferocious faces pushed forward and everybody shouted "hurrah!" - -"So this is what the Emperor is!" thought Petya. "No, I can't -petition him myself--that would be too bold." But in spite of this -he continued to struggle desperately forward, and from between the -backs of those in front he caught glimpses of an open space with a -strip of red cloth spread out on it; but just then the crowd swayed -back--the police in front were pushing back those who had pressed -too close to the procession: the Emperor was passing from the palace -to the Cathedral of the Assumption--and Petya unexpectedly received -such a blow on his side and ribs and was squeezed so hard that -suddenly everything grew dim before his eyes and he lost -consciousness. When he came to himself, a man of clerical appearance -with a tuft of gray hair at the back of his head and wearing a -shabby blue cassock--probably a church clerk and chanter--was -holding him under the arm with one hand while warding off the pressure -of the crowd with the other. - -"You've crushed the young gentleman!" said the clerk. "What are -you up to? Gently!... They've crushed him, crushed him!" - -The Emperor entered the Cathedral of the Assumption. The crowd -spread out again more evenly, and the clerk led Petya--pale and -breathless--to the Tsar-cannon. Several people were sorry for Petya, -and suddenly a crowd turned toward him and pressed round him. Those -who stood nearest him attended to him, unbuttoned his coat, seated him -on the raised platform of the cannon, and reproached those others -(whoever they might be) who had crushed him. - -"One might easily get killed that way! What do they mean by it? -Killing people! Poor dear, he's as white as a sheet!"--various -voices were heard saying. - -Petya soon came to himself, the color returned to his face, the pain -had passed, and at the cost of that temporary unpleasantness he had -obtained a place by the cannon from where he hoped to see the -Emperor who would be returning that way. Petya no longer thought of -presenting his petition. If he could only see the Emperor he would -be happy! - -While the service was proceeding in the Cathedral of the Assumption- -it was a combined service of prayer on the occasion of the Emperor's -arrival and of thanksgiving for the conclusion of peace with the -Turks--the crowd outside spread out and hawkers appeared, selling -kvas, gingerbread, and poppyseed sweets (of which Petya was -particularly fond), and ordinary conversation could again be heard. -A tradesman's wife was showing a rent in her shawl and telling how -much the shawl had cost; another was saying that all silk goods had -now got dear. The clerk who had rescued Petya was talking to a -functionary about the priests who were officiating that day with the -bishop. The clerk several times used the word "plenary" (of the -service), a word Petya did not understand. Two young citizens were -joking with some serf girls who were cracking nuts. All these -conversations, especially the joking with the girls, were such as -might have had a particular charm for Petya at his age, but they did -not interest him now. He sat on his elevation--the pedestal of the -cannon--still agitated as before by the thought of the Emperor and -by his love for him. The feeling of pain and fear he had experienced -when he was being crushed, together with that of rapture, still -further intensified his sense of the importance of the occasion. - -Suddenly the sound of a firing of cannon was heard from the -embankment, to celebrate the signing of peace with the Turks, and -the crowd rushed impetuously toward the embankment to watch the -firing. Petya too would have run there, but the clerk who had taken -the young gentleman under his protection stopped him. The firing was -still proceeding when officers, generals, and gentlemen-in-waiting -came running out of the cathedral, and after them others in a more -leisurely manner: caps were again raised, and those who had run to -look at the cannon ran back again. At last four men in uniforms and -sashes emerged from the cathedral doors. "Hurrah! hurrah!" shouted the -crowd again. - -"Which is he? Which?" asked Petya in a tearful voice, of those -around him, but no one answered him, everybody was too excited; and -Petya, fixing on one of those four men, whom he could not clearly -see for the tears of joy that filled his eyes, concentrated all his -enthusiasm on him--though it happened not to be the Emperor- -frantically shouted "Hurrah!" and resolved that tomorrow, come what -might, he would join the army. - -The crowd ran after the Emperor, followed him to the palace, and -began to disperse. It was already late, and Petya had not eaten -anything and was drenched with perspiration, yet he did not go home -but stood with that diminishing, but still considerable, crowd -before the palace while the Emperor dined--looking in at the palace -windows, expecting he knew not what, and envying alike the notables he -saw arriving at the entrance to dine with the Emperor and the court -footmen who served at table, glimpses of whom could be seen through -the windows. - -While the Emperor was dining, Valuev, looking out of the window, -said: - -"The people are still hoping to see Your Majesty again." - -The dinner was nearly over, and the Emperor, munching a biscuit, -rose and went out onto the balcony. The people, with Petya among them, -rushed toward the balcony. - -"Angel! Dear one! Hurrah! Father!..." cried the crowd, and Petya -with it, and again the women and men of weaker mold, Petya among them, -wept with joy. - -A largish piece of the biscuit the Emperor was holding in his hand -broke off, fell on the balcony parapet, and then to the ground. A -coachman in a jerkin, who stood nearest, sprang forward and snatched -it up. Several people in the crowd rushed at the coachman. Seeing this -the Emperor had a plateful of biscuits brought him and began -throwing them down from the balcony. Petya's eyes grew bloodshot, -and still more excited by the danger of being crushed, he rushed at -the biscuits. He did not know why, but he had to have a biscuit from -the Tsar's hand and he felt that he must not give way. He sprang -forward and upset an old woman who was catching at a biscuit; the -old woman did not consider herself defeated though she was lying on -the ground--she grabbed at some biscuits but her hand did not reach -them. Petya pushed her hand away with his knee, seized a biscuit, -and as if fearing to be too late, again shouted "Hurrah!" with a voice -already hoarse. - -The Emperor went in, and after that the greater part of the crowd -began to disperse. - -"There! I said if only we waited--and so it was!" was being joyfully -said by various people. - -Happy as Petya was, he felt sad at having to go home knowing that -all the enjoyment of that day was over. He did not go straight home -from the Kremlin, but called on his friend Obolenski, who was -fifteen and was also entering the regiment. On returning home Petya -announced resolutely and firmly that if he was not allowed to enter -the service he would run away. And next day, Count Ilya Rostov--though -he had not yet quite yielded--went to inquire how he could arrange for -Petya to serve where there would be least danger. - - - - - -CHAPTER XXII - - -Two days later, on the fifteenth of July, an immense number of -carriages were standing outside the Sloboda Palace. - -The great halls were full. In the first were the nobility and gentry -in their uniforms, in the second bearded merchants in full-skirted -coats of blue cloth and wearing medals. In the noblemen's hall there -was an incessant movement and buzz of voices. The chief magnates sat -on high-backed chairs at a large table under the portrait of the -Emperor, but most of the gentry were strolling about the room. - -All these nobles, whom Pierre met every day at the Club or in -their own houses, were in uniform--some in that of Catherine's day, -others in that of Emperor Paul, others again in the new uniforms of -Alexander's time or the ordinary uniform of the nobility, and the -general characteristic of being in uniform imparted something -strange and fantastic to these diverse and familiar personalities, -both old and young. The old men, dim-eyed, toothless, bald, sallow, -and bloated, or gaunt and wrinkled, were especially striking. For -the most part they sat quietly in their places and were silent, or, if -they walked about and talked, attached themselves to someone -younger. On all these faces, as on the faces of the crowd Petya had -seen in the Square, there was a striking contradiction: the general -expectation of a solemn event, and at the same time the everyday -interests in a boston card party, Peter the cook, Zinaida Dmitrievna's -health, and so on. - -Pierre was there too, buttoned up since early morning in a -nobleman's uniform that had become too tight for him. He was agitated; -this extraordinary gathering not only of nobles but also of the -merchant-class--les etats generaux (States-General)--evoked in him a -whole series of ideas he had long laid aside but which were deeply -graven in his soul: thoughts of the Contrat social and the French -Revolution. The words that had struck him in the Emperor's appeal- -that the sovereign was coming to the capital for consultation with his -people--strengthened this idea. And imagining that in this direction -something important which he had long awaited was drawing near, he -strolled about watching and listening to conversations, but nowhere -finding any confirmation of the ideas that occupied him. - -The Emperor's manifesto was read, evoking enthusiasm, and then all -moved about discussing it. Besides the ordinary topics of -conversation, Pierre heard questions of where the marshals of the -nobility were to stand when the Emperor entered, when a ball should be -given in the Emperor's honor, whether they should group themselves -by districts or by whole provinces... and so on; but as soon as the -war was touched on, or what the nobility had been convened for, the -talk became undecided and indefinite. Then all preferred listening -to speaking. - -A middle-aged man, handsome and virile, in the uniform of a -retired naval officer, was speaking in one of the rooms, and a small -crowd was pressing round him. Pierre went up to the circle that had -formed round the speaker and listened. Count Ilya Rostov, in a -military uniform of Catherine's time, was sauntering with a pleasant -smile among the crowd, with all of whom he was acquainted. He too -approached that group and listened with a kindly smile and nods of -approval, as he always did, to what the speaker was saying. The -retired naval man was speaking very boldly, as was evident from the -expression on the faces of the listeners and from the fact that some -people Pierre knew as the meekest and quietest of men walked away -disapprovingly or expressed disagreement with him. Pierre pushed his -way into the middle of the group, listened, and convinced himself that -the man was indeed a liberal, but of views quite different from his -own. The naval officer spoke in a particularly sonorous, musical, -and aristocratic baritone voice, pleasantly swallowing his r's and -generally slurring his consonants: the voice of a man calling out to -his servant, "Heah! Bwing me my pipe!" It was indicative of -dissipation and the exercise of authority. - -"What if the Smolensk people have offahd to waise militia for the -Empewah? Ah we to take Smolensk as our patte'n? If the noble -awistocwacy of the pwovince of Moscow thinks fit, it can show its -loyalty to our sov'weign the Empewah in other ways. Have we -fo'gotten the waising of the militia in the yeah 'seven? All that -did was to enwich the pwiests' sons and thieves and wobbahs...." - -Count Ilya Rostov smiled blandly and nodded approval. - -"And was our militia of any use to the Empia? Not at all! It only -wuined our farming! Bettah have another conscwiption... o' ou' men -will wetu'n neithah soldiers no' peasants, and we'll get only -depwavity fwom them. The nobility don't gwudge theah lives--evewy -one of us will go and bwing in more wecwuits, and the sov'weign" (that -was the way he referred to the Emperor) "need only say the word and -we'll all die fo' him!" added the orator with animation. - -Count Rostov's mouth watered with pleasure and he nudged Pierre, but -Pierre wanted to speak himself. He pushed forward, feeling stirred, -but not yet sure what stirred him or what he would say. Scarcely had -he opened his mouth when one of the senators, a man without a tooth in -his head, with a shrewd though angry expression, standing near the -first speaker, interrupted him. Evidently accustomed to managing -debates and to maintaining an argument, he began in low but distinct -tones: - -"I imagine, sir," said he, mumbling with his toothless mouth, -"that we have been summoned here not to discuss whether it's best -for the empire at the present moment to adopt conscription or to -call out the militia. We have been summoned to reply to the appeal -with which our sovereign the Emperor has honored us. But to judge what -is best--conscription or the militia--we can leave to the supreme -authority...." - -Pierre suddenly saw an outlet for his excitement. He hardened his -heart against the senator who was introducing this set and narrow -attitude into the deliberations of the nobility. Pierre stepped -forward and interrupted him. He himself did not yet know what he would -say, but he began to speak eagerly, occasionally lapsing into French -or expressing himself in bookish Russian. - -"Excuse me, your excellency," he began. (He was well acquainted with -the senator, but thought it necessary on this occasion to address -him formally.) "Though I don't agree with the gentleman..." (he -hesitated: he wished to say, "Mon tres honorable preopinant"--"My very -honorable opponent") "with the gentleman... whom I have not the -honor of knowing, I suppose that the nobility have been summoned not -merely to express their sympathy and enthusiasm but also to consider -the means by which we can assist our Fatherland! I imagine," he went -on, warming to his subject, "that the Emperor himself would not be -satisfied to find in us merely owners of serfs whom we are willing -to devote to his service, and chair a canon* we are ready to make of -ourselves--and not to obtain from us any co-co-counsel." - - -*"Food for cannon." - - -Many persons withdrew from the circle, noticing the senator's -sarcastic smile and the freedom of Pierre's remarks. Only Count Rostov -was pleased with them as he had been pleased with those of the naval -officer, the senator, and in general with whatever speech he had -last heard. - -"I think that before discussing these questions," Pierre -continued, "we should ask the Emperor--most respectfully ask His -Majesty--to let us know the number of our troops and the position in -which our army and our forces now are, and then..." - -But scarcely had Pierre uttered these words before he was attacked -from three sides. The most vigorous attack came from an old -acquaintance, a boston player who had always been well disposed toward -him, Stepan Stepanovich Adraksin. Adraksin was in uniform, and whether -as a result of the uniform or from some other cause Pierre saw -before him quite a different man. With a sudden expression of -malevolence on his aged face, Adraksin shouted at Pierre: - -"In the first place, I tell you we have no right to question the -Emperor about that, and secondly, if the Russian nobility had that -right, the Emperor could not answer such a question. The troops are -moved according to the enemy's movements and the number of men -increases and decreases..." - -Another voice, that of a nobleman of medium height and about forty -years of age, whom Pierre had formerly met at the gypsies' and knew as -a bad cardplayer, and who, also transformed by his uniform, came up to -Pierre, interrupted Adraksin. - -"Yes, and this is not a time for discussing," he continued, "but for -acting: there is war in Russia! The enemy is advancing to destroy -Russia, to desecrate the tombs of our fathers, to carry off our -wives and children." The nobleman smote his breast. "We will all -arise, every one of us will go, for our father the Tsar!" he -shouted, rolling his bloodshot eyes. Several approving voices were -heard in the crowd. "We are Russians and will not grudge our blood -in defense of our faith, the throne, and the Fatherland! We must cease -raving if we are sons of our Fatherland! We will show Europe how -Russia rises to the defense of Russia!" - -Pierre wished to reply, but could not get in a word. He felt that -his words, apart from what meaning they conveyed, were less audible -than the sound of his opponent's voice. - -Count Rostov at the back of the crowd was expressing approval; -several persons, briskly turning a shoulder to the orator at the end -of a phrase, said: - -"That's right, quite right! Just so!" - -Pierre wished to say that he was ready to sacrifice his money, his -serfs, or himself, only one ought to know the state of affairs in -order to be able to improve it, but he was unable to speak. Many -voices shouted and talked at the same time, so that Count Rostov had -not time to signify his approval of them all, and the group increased, -dispersed, re-formed, and then moved with a hum of talk into the -largest hall and to the big table. Not only was Pierre's attempt to -speak unsuccessful, but he was rudely interrupted, pushed aside, and -people turned away from him as from a common enemy. This happened -not because they were displeased by the substance of his speech, which -had even been forgotten after the many subsequent speeches, but to -animate it the crowd needed a tangible object to love and a tangible -object to hate. Pierre became the latter. Many other orators spoke -after the excited nobleman, and all in the same tone. Many spoke -eloquently and with originality. - -Glinka, the editor of the Russian Messenger, who was recognized -(cries of "author! author!" were heard in the crowd), said that -"hell must be repulsed by hell," and that he had seen a child -smiling at lightning flashes and thunderclaps, but "we will not be -that child." - -"Yes, yes, at thunderclaps!" was repeated approvingly in the back -rows of the crowd. - -The crowd drew up to the large table, at which sat gray-haired or -bald seventy-year-old magnates, uniformed and besashed almost all of -whom Pierre had seen in their own homes with their buffoons, or -playing boston at the clubs. With an incessant hum of voices the crowd -advanced to the table. Pressed by the throng against the high backs of -the chairs, the orators spoke one after another and sometimes two -together. Those standing behind noticed what a speaker omitted to -say and hastened to supply it. Others in that heat and crush racked -their brains to find some thought and hastened to utter it. The old -magnates, whom Pierre knew, sat and turned to look first at one and -then at another, and their faces for the most part only expressed -the fact that they found it very hot. Pierre, however, felt excited, -and the general desire to show that they were ready to go to all -lengths--which found expression in the tones and looks more than in -the substance of the speeches--infected him too. He did not renounce -his opinions, but felt himself in some way to blame and wished to -justify himself. - -"I only said that it would be more to the purpose to make sacrifices -when we know what is needed!" said he, trying to be heard above the -other voices. - -One of the old men nearest to him looked round, but his attention -was immediately diverted by an exclamation at the other side of the -table. - -"Yes, Moscow will be surrendered! She will be our expiation!" -shouted one man. - -"He is the enemy of mankind!" cried another. "Allow me to speak...." -"Gentlemen, you are crushing me!..." - - - - - -CHAPTER XXIII - - -At that moment Count Rostopchin with his protruding chin and alert -eyes, wearing the uniform of a general with sash over his shoulder, -entered the room, stepping briskly to the front of the crowd of -gentry. - -"Our sovereign the Emperor will be here in a moment," said -Rostopchin. "I am straight from the palace. Seeing the position we are -in, I think there is little need for discussion. The Emperor has -deigned to summon us and the merchants. Millions will pour forth -from there"--he pointed to the merchants' hall--"but our business is -to supply men and not spare ourselves... That is the least we can do!" - -A conference took place confined to the magnates sitting at the -table. The whole consultation passed more than quietly. After all -the preceding noise the sound of their old voices saying one after -another, "I agree," or for variety, "I too am of that opinion," and so -on had even a mournful effect. - -The secretary was told to write down the resolution of the Moscow -nobility and gentry, that they would furnish ten men, fully -equipped, out of every thousand serfs, as the Smolensk gentry had -done. Their chairs made a scraping noise as the gentlemen who had -conferred rose with apparent relief, and began walking up and down, -arm in arm, to stretch their legs and converse in couples. - -"The Emperor! The Emperor!" a sudden cry resounded through the halls -and the whole throng hurried to the entrance. - -The Emperor entered the hall through a broad path between two -lines of nobles. Every face expressed respectful, awe-struck -curiosity. Pierre stood rather far off and could not hear all that the -Emperor said. From what he did hear he understood that the Emperor -spoke of the danger threatening the empire and of the hopes he -placed on the Moscow nobility. He was answered by a voice which -informed him of the resolution just arrived at. - -"Gentlemen!" said the Emperor with a quivering voice. - -There was a rustling among the crowd and it again subsided, so -that Pierre distinctly heard the pleasantly human voice of the Emperor -saying with emotion: - -"I never doubted the devotion of the Russian nobles, but today it -has surpassed my expectations. I thank you in the name of the -Fatherland! Gentlemen, let us act! Time is most precious..." - -The Emperor ceased speaking, the crowd began pressing round him, and -rapturous exclamations were heard from all sides. - -"Yes, most precious... a royal word," said Count Rostov, with a sob. -He stood at the back, and, though he had heard hardly anything, -understood everything in his own way. - -From the hall of the nobility the Emperor went to that of the -merchants. There he remained about ten minutes. Pierre was among those -who saw him come out from the merchants' hall with tears of emotion in -his eyes. As became known later, he had scarcely begun to address -the merchants before tears gushed from his eyes and he concluded in -a trembling voice. When Pierre saw the Emperor he was coming out -accompanied by two merchants, one of whom Pierre knew, a fat -otkupshchik. The other was the mayor, a man with a thin sallow face -and narrow beard. Both were weeping. Tears filled the thin man's eyes, -and the fat otkupshchik sobbed outright like a child and kept -repeating: - -"Our lives and property--take them, Your Majesty!" - -Pierre's one feeling at the moment was a desire to show that he -was ready to go all lengths and was prepared to sacrifice -everything. He now felt ashamed of his speech with its -constitutional tendency and sought an opportunity of effacing it. -Having heard that Count Mamonov was furnishing a regiment, Bezukhov at -once informed Rostopchin that he would give a thousand men and their -maintenance. - -Old Rostov could not tell his wife of what had passed without tears, -and at once consented to Petya's request and went himself to enter his -name. - -Next day the Emperor left Moscow. The assembled nobles all took -off their uniforms and settled down again in their homes and clubs, -and not without some groans gave orders to their stewards about the -enrollment, feeling amazed themselves at what they had done. - - - - - -BOOK TEN: 1812 - - - - - -CHAPTER I - - -Napoleon began the war with Russia because he could not resist going -to Dresden, could not help having his head turned by the homage he -received, could not help donning a Polish uniform and yielding to -the stimulating influence of a June morning, and could not refrain -from bursts of anger in the presence of Kurakin and then of Balashev. - -Alexander refused negotiations because he felt himself to be -personally insulted. Barclay de Tolly tried to command the army in the -best way, because he wished to fulfill his duty and earn fame as a -great commander. Rostov charged the French because he could not -restrain his wish for a gallop across a level field; and in the same -way the innumerable people who took part in the war acted in accord -with their personal characteristics, habits, circumstances, and -aims. They were moved by fear or vanity, rejoiced or were indignant, -reasoned, imagining that they knew what they were doing and did it -of their own free will, but they all were involuntary tools of -history, carrying on a work concealed from them but comprehensible -to us. Such is the inevitable fate of men of action, and the higher -they stand in the social hierarchy the less are they free. - -The actors of 1812 have long since left the stage, their personal -interests have vanished leaving no trace, and nothing remains of -that time but its historic results. - -Providence compelled all these men, striving to attain personal -aims, to further the accomplishment of a stupendous result no one of -them at all expected--neither Napoleon, nor Alexander, nor still -less any of those who did the actual fighting. - -The cause of the destruction of the French army in 1812 is clear -to us now. No one will deny that that cause was, on the one hand, -its advance into the heart of Russia late in the season without any -preparation for a winter campaign and, on the other, the character -given to the war by the burning of Russian towns and the hatred of the -foe this aroused among the Russian people. But no one at the time -foresaw (what now seems so evident) that this was the only way an army -of eight hundred thousand men--the best in the world and led by the -best general--could be destroyed in conflict with a raw army of half -its numerical strength, and led by inexperienced commanders as the -Russian army was. Not only did no one see this, but on the Russian -side every effort was made to hinder the only thing that could save -Russia, while on the French side, despite Napoleon's experience and -so-called military genius, every effort was directed to pushing on -to Moscow at the end of the summer, that is, to doing the very thing -that was bound to lead to destruction. - -In historical works on the year 1812 French writers are very fond of -saying that Napoleon felt the danger of extending his line, that he -sought a battle and that his marshals advised him to stop at Smolensk, -and of making similar statements to show that the danger of the -campaign was even then understood. Russian authors are still fonder of -telling us that from the commencement of the campaign a Scythian war -plan was adopted to lure Napoleon into the depths of Russia, and -this plan some of them attribute to Pfuel, others to a certain -Frenchman, others to Toll, and others again to Alexander himself- -pointing to notes, projects, and letters which contain hints of such a - -line of action. But all these hints at what happened, both from the -French side and the Russian, are advanced only because they fit in -with the event. Had that event not occurred these hints would have -been forgotten, as we have forgotten the thousands and millions of -hints and expectations to the contrary which were current then but -have now been forgotten because the event falsified them. There are -always so many conjectures as to the issue of any event that however -it may end there will always be people to say: "I said then that it -would be so," quite forgetting that amid their innumerable conjectures -many were to quite the contrary effect. - -Conjectures as to Napoleon's awareness of the danger of extending -his line, and (on the Russian side) as to luring the enemy into the -depths of Russia, are evidently of that kind, and only by much -straining can historians attribute such conceptions to Napoleon and -his marshals, or such plans to the Russian commanders. All the facts -are in flat contradiction to such conjectures. During the whole period -of the war not only was there no wish on the Russian side to draw -the French into the heart of the country, but from their first entry -into Russia everything was done to stop them. And not only was -Napoleon not afraid to extend his line, but he welcomed every step -forward as a triumph and did not seek battle as eagerly as in former -campaigns, but very lazily. - -At the very beginning of the war our armies were divided, and our -sole aim was to unite them, though uniting the armies was no advantage -if we meant to retire and lure the enemy into the depths of the -country. Our Emperor joined the army to encourage it to defend every -inch of Russian soil and not to retreat. The enormous Drissa camp -was formed on Pfuel's plan, and there was no intention of retiring -farther. The Emperor reproached the commanders in chief for every step -they retired. He could not bear the idea of letting the enemy even -reach Smolensk, still less could he contemplate the burning of Moscow, -and when our armies did unite he was displeased that Smolensk was -abandoned and burned without a general engagement having been fought -under its walls. - -So thought the Emperor, and the Russian commanders and people were -still more provoked at the thought that our forces were retreating -into the depths of the country. - -Napoleon having cut our armies apart advanced far into the country -and missed several chances of forcing an engagement. In August he -was at Smolensk and thought only of how to advance farther, though -as we now see that advance was evidently ruinous to him. - -The facts clearly show that Napoleon did not foresee the danger of -the advance on Moscow, nor did Alexander and the Russian commanders -then think of luring Napoleon on, but quite the contrary. The luring -of Napoleon into the depths of the country was not the result of any -plan, for no one believed it to be possible; it resulted from a most -complex interplay of intrigues, aims, and wishes among those who -took part in the war and had no perception whatever of the inevitable, -or of the one way of saving Russia. Everything came about -fortuitously. The armies were divided at the commencement of the -campaign. We tried to unite them, with the evident intention of giving -battle and checking the enemy's advance, and by this effort to unite -them while avoiding battle with a much stronger enemy, and necessarily -withdrawing the armies at an acute angle--we led the French on to -Smolensk. But we withdrew at an acute angle not only because the -French advanced between our two armies; the angle became still more -acute and we withdrew still farther, because Barclay de Tolly was an -unpopular foreigner disliked by Bagration (who would come his -command), and Bagration--being in command of the second army--tried to -postpone joining up and coming under Barclay's command as long as he -could. Bagration was slow in effecting the junction--though that was -the chief aim of all at headquarters--because, as he alleged, he -exposed his army to danger on this march, and it was best for him to -retire more to the left and more to the south, worrying the enemy from -flank and rear and securing from the Ukraine recruits for his army; -and it looks as if he planned this in order not to come under the -command of the detested foreigner Barclay, whose rank was inferior -to his own. - -The Emperor was with the army to encourage it, but his presence -and ignorance of what steps to take, and the enormous number of -advisers and plans, destroyed the first army's energy and it retired. - -The intention was to make a stand at the Drissa camp, but -Paulucci, aiming at becoming commander in chief, unexpectedly employed -his energy to influence Alexander, and Pfuel's whole plan was -abandoned and the command entrusted to Barclay. But as Barclay did not -inspire confidence his power was limited. The armies were divided, -there was no unity of command, and Barclay was unpopular; but from -this confusion, division, and the unpopularity of the foreign -commander in chief, there resulted on the one hand indecision and -the avoidance of a battle (which we could not have refrained from -had the armies been united and had someone else, instead of Barclay, -been in command) and on the other an ever-increasing indignation -against the foreigners and an increase in patriotic zeal. - -At last the Emperor left the army, and as the most convenient and -indeed the only pretext for his departure it was decided that it was -necessary for him to inspire the people in the capitals and arouse the -nation in general to a patriotic war. And by this visit of the Emperor -to Moscow the strength of the Russian army was trebled. - -He left in order not to obstruct the commander in chief's -undivided control of the army, and hoping that more decisive action -would then be taken, but the command of the armies became still more -confused and enfeebled. Bennigsen, the Tsarevich, and a swarm of -adjutants general remained with the army to keep the commander in -chief under observation and arouse his energy, and Barclay, feeling -less free than ever under the observation of all these "eyes of the -Emperor," became still more cautious of undertaking any decisive -action and avoided giving battle. - -Barclay stood for caution. The Tsarevich hinted at treachery and -demanded a general engagement. Lubomirski, Bronnitski, Wlocki, and the -others of that group stirred up so much trouble that Barclay, under -pretext of sending papers to the Emperor, dispatched these Polish -adjutants general to Petersburg and plunged into an open struggle with -Bennigsen and the Tsarevich. - -At Smolensk the armies at last reunited, much as Bagration -disliked it. - -Bagration drove up in a carriage to to the house occupied by -Barclay. Barclay donned his sash and came out to meet and report to -his senior officer Bagration. - -Despite his seniority in rank Bagration, in this contest of -magnanimity, took his orders from Barclay, but, having submitted, -agreed with him less than ever. By the Emperor's orders Bagration -reported direct to him. He wrote to Arakcheev, the Emperor's -confidant: "It must be as my sovereign pleases, but I cannot work with -the Minister (meaning Barclay). For God's sake send me somewhere -else if only in command of a regiment. I cannot stand it here. -Headquarters are so full of Germans that a Russian cannot exist and -there is no sense in anything. I thought I was really serving my -sovereign and the Fatherland, but it turns out that I am serving -Barclay. I confess I do not want to." - -The swarm of Bronnitskis and Wintzingerodes and their like still -further embittered the relations between the commanders in chief, -and even less unity resulted. Preparations were made to fight the -French before Smolensk. A general was sent to survey the position. -This general, hating Barclay, rode to visit a friend of his own, a -corps commander, and, having spent the day with him, returned to -Barclay and condemned, as unsuitable from every point of view, the -battleground he had not seen. - -While disputes and intrigues were going on about the future field of -battle, and while we were looking for the French--having lost touch -with them--the French stumbled upon Neverovski's division and -reached the walls of Smolensk. - -It was necessary to fight an unexpected battle at Smolensk to save -our lines of communication. The battle was fought and thousands were -killed on both sides. - -Smolensk was abandoned contrary to the wishes of the Emperor and -of the whole people. But Smolensk was burned by its own -inhabitants-who had been misled by their governor. And these ruined -inhabitants, setting an example to other Russians, went to Moscow -thinking only of their own losses but kindling hatred of the foe. -Napoleon advanced farther and we retired, thus arriving at the very -result which caused his destruction. - - - - - -CHAPTER II - - -The day after his son had left, Prince Nicholas sent for Princess -Mary to come to his study. - -"Well? Are you satisfied now?" said he. "You've made me quarrel with -my son! Satisfied, are you? That's all you wanted! Satisfied?... It -hurts me, it hurts. I'm old and weak and this is what you wanted. Well -then, gloat over it! Gloat over it!" - -After that Princess Mary did not see her father for a whole week. He -was ill and did not leave his study. - -Princess Mary noticed to her surprise that during this illness the -old prince not only excluded her from his room, but did not admit -Mademoiselle Bourienne either. Tikhon alone attended him. - -At the end of the week the prince reappeared and resumed his -former way of life, devoting himself with special activity to building -operations and the arrangement of the gardens and completely -breaking off his relations with Mademoiselle Bourienne. His looks -and cold tone to his daughter seemed to say: "There, you see? You -plotted against me, you lied to Prince Andrew about my relations -with that Frenchwoman and made me quarrel with him, but you see I need -neither her nor you!" - -Princess Mary spent half of every day with little Nicholas, watching -his lessons, teaching him Russian and music herself, and talking to -Dessalles; the rest of the day she spent over her books, with her -old nurse, or with "God's folk" who sometimes came by the back door to -see her. - -Of the war Princess Mary thought as women do think about wars. She -feared for her brother who was in it, was horrified by and amazed at -the strange cruelty that impels men to kill one another, but she did -not understand the significance of this war, which seemed to her -like all previous wars. She did not realize the significance of this -war, though Dessalles with whom she constantly conversed was -passionately interested in its progress and tried to explain his own -conception of it to her, and though the "God's folk" who came to see -her reported, in their own way, the rumors current among the people of -an invasion by Antichrist, and though Julie (now Princess -Drubetskaya), who had resumed correspondence with her, wrote patriotic -letters from Moscow. - -"I write you in Russian, my good friend," wrote Julie in her -Frenchified Russian, "because I have a detestation for all the French, -and the same for their language which I cannot support to hear -spoken.... We in Moscow are elated by enthusiasm for our adored -Emperor. - -"My poor husband is enduring pains and hunger in Jewish taverns, but -the news which I have inspires me yet more. - -"You heard probably of the heroic exploit of Raevski, embracing -his two sons and saying: 'I will perish with them but we will not be -shaken!' And truly though the enemy was twice stronger than we, we -were unshakable. We pass the time as we can, but in war as in war! The -princesses Aline and Sophie sit whole days with me, and we, unhappy -widows of live men, make beautiful conversations over our charpie, -only you, my friend, are missing..." and so on. - -The chief reason Princess Mary did not realize the full significance -of this war was that the old prince never spoke of it, did not -recognize it, and laughed at Dessalles when he mentioned it at dinner. -The prince's tone was so calm and confident that Princess Mary -unhesitatingly believed him. - -All that July the old prince was exceedingly active and even -animated. He planned another garden and began a new building for the -domestic serfs. The only thing that made Princess Mary anxious about -him was that he slept very little and, instead of sleeping in his -study as usual, changed his sleeping place every day. One day he would -order his camp bed to be set up in the glass gallery, another day he -remained on the couch or on the lounge chair in the drawing room and -dozed there without undressing, while--instead of Mademoiselle -Bourienne--a serf boy read to him. Then again he would spend a night -in the dining room. - -On August 1, a second letter was received from Prince Andrew. In his -first letter which came soon after he had left home, Prince Andrew had -dutifully asked his father's forgiveness for what he had allowed -himself to say and begged to be restored to his favor. To this -letter the old prince had replied affectionately, and from that time -had kept the Frenchwoman at a distance. Prince Andrew's second letter, -written near Vitebsk after the French had occupied that town, gave a -brief account of the whole campaign, enclosed for them a plan he had -drawn and forecasts as to the further progress of the war. In this -letter Prince Andrew pointed out to his father the danger of staying -at Bald Hills, so near the theater of war and on the army's direct -line of march, and advised him to move to Moscow. - -At dinner that day, on Dessalles' mentioning that the French were -said to have already entered Vitebsk, the old prince remembered his -son's letter. - -"There was a letter from Prince Andrew today," he said to Princess -Mary--"Haven't you read it?" - -"No, Father," she replied in a frightened voice. - -She could not have read the letter as she did not even know it had -arrived. - -"He writes about this war," said the prince, with the ironic smile -that had become habitual to him in speaking of the present war. - -"That must be very interesting," said Dessalles. "Prince Andrew is -in a position to know..." - -"Oh, very interesting!" said Mademoiselle Bourienne. - -"Go and get it for me," said the old prince to Mademoiselle -Bourienne. "You know--under the paperweight on the little table." - -Mademoiselle Bourienne jumped up eagerly. - -"No, don't!" he exclaimed with a frown. "You go, Michael Ivanovich." - -Michael Ivanovich rose and went to the study. But as soon as he -had left the room the old prince, looking uneasily round, threw down -his napkin and went himself. - -"They can't do anything... always make some muddle," he muttered. - -While he was away Princess Mary, Dessalles, Mademoiselle -Bourienne, and even little Nicholas exchanged looks in silence. The -old prince returned with quick steps, accompanied by Michael -Ivanovich, bringing the letter and a plan. These he put down beside -him--not letting anyone read them at dinner. - -On moving to the drawing room he handed the letter to Princess -Mary and, spreading out before him the plan of the new building and -fixing his eyes upon it, told her to read the letter aloud. When she -had done so Princess Mary looked inquiringly at her father. He was -examining the plan, evidently engrossed in his own ideas. - -"What do you think of it, Prince?" Dessalles ventured to ask. - -"I? I?..." said the prince as if unpleasantly awakened, and not -taking his eyes from the plan of the building. - -"Very possibly the theater of war will move so near to us that..." - -"Ha ha ha! The theater of war!" said the prince. "I have said and -still say that the theater of war is Poland and the enemy will never -get beyond the Niemen." - -Dessalles looked in amazement at the prince, who was talking of -the Niemen when the enemy was already at the Dnieper, but Princess -Mary, forgetting the geographical position of the Niemen, thought that -what her father was saying was correct. - -"When the snow melts they'll sink in the Polish swamps. Only they -could fail to see it," the prince continued, evidently thinking of the -campaign of 1807 which seemed to him so recent. "Bennigsen should have -advanced into Prussia sooner, then things would have taken a different -turn..." - -"But, Prince," Dessalles began timidly, "the letter mentions -Vitebsk...." - -"Ah, the letter? Yes..." replied the prince peevishly. "Yes... -yes..." His face suddenly took on a morose expression. He paused. -"Yes, he writes that the French were beaten at... at... what river -is it?" - -Dessalles dropped his eyes. - -"The prince says nothing about that," he remarked gently. - -"Doesn't he? But I didn't invent it myself." - -No one spoke for a long time. - -"Yes... yes... Well, Michael Ivanovich," he suddenly went on, -raising his head and pointing to the plan of the building, "tell me -how you mean to alter it...." - -Michael Ivanovich went up to the plan, and the prince after speaking -to him about the building looked angrily at Princess Mary and -Dessalles and went to his own room. - -Princess Mary saw Dessalles' embarrassed and astonished look fixed -on her father, noticed his silence, and was struck by the fact that -her father had forgotten his son's letter on the drawing-room table; -but she was not only afraid to speak of it and ask Dessalles the -reason of his confusion and silence, but was afraid even to think -about it. - -In the evening Michael Ivanovich, sent by the prince, came to -Princess Mary for Prince Andrew's letter which had been forgotten in -the drawing room. She gave it to him and, unpleasant as it was to -her to do so, ventured to ask him what her father was doing. - -"Always busy," replied Michael Ivanovich with a respectfully -ironic smile which caused Princess Mary to turn pale. "He's worrying -very much about the new building. He has been reading a little, but -now"--Michael Ivanovich went on, lowering his voice--"now he's at -his desk, busy with his will, I expect." (One of the prince's favorite -occupations of late had been the preparation of some papers he meant -to leave at his death and which he called his "will.") - -"And Alpatych is being sent to Smolensk?" asked Princess Mary. - -"Oh, yes, he has been waiting to start for some time." - - - - - -CHAPTER III - - -When Michael Ivanovich returned to the study with the letter, the -old prince, with spectacles on and a shade over his eyes, was -sitting at his open bureau with screened candles, holding a paper in -his outstretched hand, and in a somewhat dramatic attitude was reading -his manuscript--his "Remarks" as he termed it--which was to be -transmitted to the Emperor after his death. - -When Michael Ivanovich went in there were tears in the prince's eyes -evoked by the memory of the time when the paper he was now reading had -been written. He took the letter from Michael Ivanovich's hand, put it -in his pocket, folded up his papers, and called in Alpatych who had -long been waiting. - -The prince had a list of things to be bought in Smolensk and, -walking up and down the room past Alpatych who stood by the door, he -gave his instructions. - -"First, notepaper--do you hear? Eight quires, like this sample, -gilt-edged... it must be exactly like the sample. Varnish, sealing -wax, as in Michael Ivanovich's list." - -He paced up and down for a while and glanced at his notes. - -"Then hand to the governor in person a letter about the deed." - -Next, bolts for the doors of the new building were wanted and had to -be of a special shape the prince had himself designed, and a leather -case had to be ordered to keep the "will" in. - -The instructions to Alpatych took over two hours and still the -prince did not let him go. He sat down, sank into thought, closed -his eyes, and dozed off. Alpatych made a slight movement. - -"Well, go, go! If anything more is wanted I'll send after you." - -Alpatych went out. The prince again went to his bureau, glanced into -it, fingered his papers, closed the bureau again, and sat down at -the table to write to the governor. - -It was already late when he rose after sealing the letter. He wished -to sleep, but he knew he would not be able to and that most depressing -thoughts came to him in bed. So he called Tikhon and went through -the rooms with him to show him where to set up the bed for that night. - -He went about looking at every corner. Every place seemed -unsatisfactory, but worst of all was his customary couch in the study. -That couch was dreadful to him, probably because of the oppressive -thoughts he had had when lying there. It was unsatisfactory -everywhere, but the corner behind the piano in the sitting room was -better than other places: he had never slept there yet. - -With the help of a footman Tikhon brought in the bedstead and -began putting it up. - -"That's not right! That's not right!" cried the prince, and -himself pushed it a few inches from the corner and then closer in -again. - -"Well, at last I've finished, now I'll rest," thought the prince, -and let Tikhon undress him. - -Frowning with vexation at the effort necessary to divest himself -of his coat and trousers, the prince undressed, sat down heavily on -the bed, and appeared to be meditating as he looked contemptuously -at his withered yellow legs. He was not meditating, but only deferring -the moment of making the effort to lift those legs up and turn over on -the bed. "Ugh, how hard it is! Oh, that this toil might end and you -would release me!" thought he. Pressing his lips together he made that -effort for the twenty-thousandth time and lay down. But hardly had -he done so before he felt the bed rocking backwards and forwards -beneath him as if it were breathing heavily and jolting. This happened -to him almost every night. He opened his eyes as they were closing. - -"No peace, damn them!" he muttered, angry he knew not with whom. "Ah -yes, there was something else important, very important, that I was -keeping till I should be in bed. The bolts? No, I told him about them. -No, it was something, something in the drawing room. Princess Mary -talked some nonsense. Dessalles, that fool, said something. -Something in my pocket--can't remember..." - -"Tikhon, what did we talk about at dinner?" - -"About Prince Michael..." - -"Be quiet, quiet!" The prince slapped his hand on the table. "Yes, I -know, Prince Andrew's letter! Princess Mary read it. Dessalles said -something about Vitebsk. Now I'll read it." - -He had the letter taken from his pocket and the table--on which -stood a glass of lemonade and a spiral wax candle--moved close to -the bed, and putting on his spectacles he began reading. Only now in -the stillness of the night, reading it by the faint light under the -green shade, did he grasp its meaning for a moment. - -"The French at Vitebsk, in four days' march they may be at Smolensk; -perhaps are already there! Tikhon!" Tikhon jumped up. "No, no, I don't -want anything!" he shouted. - -He put the letter under the candlestick and closed his eyes. And -there rose before him the Danube at bright noonday: reeds, the Russian -camp, and himself a young general without a wrinkle on his ruddy face, -vigorous and alert, entering Potemkin's gaily colored tent, and a -burning sense of jealousy of "the favorite" agitated him now as -strongly as it had done then. He recalled all the words spoken at that -first meeting with Potemkin. And he saw before him a plump, rather -sallow-faced, short, stout woman, the Empress Mother, with her smile -and her words at her first gracious reception of him, and then that -same face on the catafalque, and the encounter he had with Zubov -over her coffin about his right to kiss her hand. - -"Oh, quicker, quicker! To get back to that time and have done with -all the present! Quicker, quicker--and that they should leave me in -peace!" - - - - - -CHAPTER IV - - -Bald Hills, Prince Nicholas Bolkonski's estate, lay forty miles east -from Smolensk and two miles from the main road to Moscow. - -The same evening that the prince gave his instructions to -Alpatych, Dessalles, having asked to see Princess Mary, told her that, -as the prince was not very well and was taking no steps to secure -his safety, though from Prince Andrew's letter it was evident that -to remain at Bald Hills might be dangerous, he respectfully advised -her to send a letter by Alpatych to the Provincial Governor at -Smolensk, asking him to let her know the state of affairs and the -extent of the danger to which Bald Hills was exposed. Dessalles -wrote this letter to the Governor for Princess Mary, she signed it, -and it was given to Alpatych with instructions to hand it to the -Governor and to come back as quickly as possible if there was danger. - -Having received all his orders Alpatych, wearing a white beaver hat- -a present from the prince--and carrying a stick as the prince did, -went out accompanied by his family. Three well-fed roans stood ready -harnessed to a small conveyance with a leather hood. - -The larger bell was muffled and the little bells on the harness -stuffed with paper. The prince allowed no one at Bald Hills to drive -with ringing bells; but on a long journey Alpatych liked to have them. -His satellites--the senior clerk, a countinghouse clerk, a scullery -maid, a cook, two old women, a little pageboy, the coachman, and -various domestic serfs--were seeing him off. - -His daughter placed chintz-covered down cushions for him to sit on -and behind his back. His old sister-in-law popped in a small bundle, -and one of the coachmen helped him into the vehicle. - -"There! There! Women's fuss! Women, women!" said Alpatych, puffing -and speaking rapidly just as the prince did, and he climbed into the -trap. - -After giving the clerk orders about the work to be done, Alpatych, -not trying to imitate the prince now, lifted the hat from his bald -head and crossed himself three times. - -"If there is anything... come back, Yakov Alpatych! For Christ's -sake think of us!" cried his wife, referring to the rumors of war -and the enemy. - -"Women, women! Women's fuss!" muttered Alpatych to himself and -started on his journey, looking round at the fields of yellow rye -and the still-green, thickly growing oats, and at other quite black -fields just being plowed a second time. - -As he went along he looked with pleasure at the year's splendid crop -of corn, scrutinized the strips of ryefield which here and there -were already being reaped, made his calculations as to the sowing -and the harvest, and asked himself whether he had not forgotten any of -the prince's orders. - -Having baited the horses twice on the way, he arrived at the town -toward evening on the fourth of August. - -Alpatych kept meeting and overtaking baggage trains and troops on -the road. As he approached Smolensk he heard the sounds of distant -firing, but these did not impress him. What struck him most was the -sight of a splendid field of oats in which a camp had been pitched and -which was being mown down by the soldiers, evidently for fodder. -This fact impressed Alpatych, but in thinking about his own business -he soon forgot it. - -All the interests of his life for more than thirty years had been -bounded by the will of the prince, and he never went beyond that -limit. Everything not connected with the execution of the prince's -orders did not interest and did not even exist for Alpatych. - -On reaching Smolensk on the evening of the fourth of August he put -up in the Gachina suburb across the Dnieper, at the inn kept by -Ferapontov, where he had been in the habit of putting up for the -last thirty years. Some thirty years ago Ferapontov, by Alpatych's -advice, had bought a wood from the prince, had begun to trade, and now -had a house, an inn, and a corn dealer's shop in that province. He was -a stout, dark, red-faced peasant in the forties, with thick lips, a -broad knob of a nose, similar knobs over his black frowning brows, and -a round belly. - -Wearing a waistcoat over his cotton shirt, Ferapontov was standing -before his shop which opened onto the street. On seeing Alpatych he -went up to him. - -"You're welcome, Yakov Alpatych. Folks are leaving the town, but you -have come to it," said he. - -"Why are they leaving the town?" asked Alpatych. - -"That's what I say. Folks are foolish! Always afraid of the French." - -"Women's fuss, women's fuss!" said Alpatych. - -"Just what I think, Yakov Alpatych. What I say is: orders have -been given not to let them in, so that must be right. And the peasants -are asking three rubles for carting--it isn't Christian!" - -Yakov Alpatych heard without heeding. He asked for a samovar and for -hay for his horses, and when he had had his tea he went to bed. - -All night long troops were moving past the inn. Next morning -Alpatych donned a jacket he wore only in town and went out on -business. It was a sunny morning and by eight o'clock it was already -hot. "A good day for harvesting," thought Alpatych. - -From beyond the town firing had been heard since early morning. At -eight o'clock the booming of cannon was added to the sound of -musketry. Many people were hurrying through the streets and there were -many soldiers, but cabs were still driving about, tradesmen stood at -their shops, and service was being held in the churches as usual. -Alpatych went to the shops, to government offices, to the post office, -and to the Governor's. In the offices and shops and at the post office -everyone was talking about the army and about the enemy who was -already attacking the town, everybody was asking what should be -done, and all were trying to calm one another. - -In front of the Governor's house Alpatych found a large number of -people, Cossacks, and a traveling carriage of the Governor's. At the -porch he met two of the landed gentry, one of whom he knew. This -man, an ex-captain of police, was saying angrily: - -"It's no joke, you know! It's all very well if you're single. 'One -man though undone is but one,' as the proverb says, but with -thirteen in your family and all the property... They've brought us -to utter ruin! What sort of governors are they to do that? They -ought to be hanged--the brigands!..." - -"Oh come, that's enough!" said the other. - -"What do I care? Let him hear! We're not dogs," said the -ex-captain of police, and looking round he noticed Alpatych. - -"Oh, Yakov Alpatych! What have you come for?" - -"To see the Governor by his excellency's order," answered -Alpatych, lifting his head and proudly thrusting his hand into the -bosom of his coat as he always did when he mentioned the prince.... -"He has ordered me to inquire into the position of affairs," he added. - -"Yes, go and find out!" shouted the angry gentleman. "They've -brought things to such a pass that there are no carts or -anything!... There it is again, do you hear?" said he, pointing -in the direction whence came the sounds of firing. - -"They've brought us all to ruin... the brigands!" he repeated, and -descended the porch steps. - -Alpatych swayed his head and went upstairs. In the waiting room were -tradesmen, women, and officials, looking silently at one another. -The door of the Governor's room opened and they all rose and moved -forward. An official ran out, said some words to a merchant, called -a stout official with a cross hanging on his neck to follow him, and -vanished again, evidently wishing to avoid the inquiring looks and -questions addressed to him. Alpatych moved forward and next time the -official came out addressed him, one hand placed in the breast of -his buttoned coat, and handed him two letters. - -"To his Honor Baron Asch, from General-in-Chief Prince Bolkonski," -he announced with such solemnity and significance that the official -turned to him and took the letters. - -A few minutes later the Governor received Alpatych and hurriedly -said to him: - -"Inform the prince and princess that I knew nothing: I acted on -the highest instructions--here..." and he handed a paper to -Alpatych. "Still, as the prince is unwell my advice is that they -should go to Moscow. I am just starting myself. Inform them..." - -But the Governor did not finish: a dusty perspiring officer ran into -the room and began to say something in French. The Governor's face -expressed terror. - -"Go," he said, nodding his head to Alpatych, and began questioning -the officer. - -Eager, frightened, helpless glances were turned on Alpatych when -he came out of the Governor's room. Involuntarily listening now to the -firing, which had drawn nearer and was increasing in strength, -Alpatych hurried to his inn. The paper handed to him by the Governor -said this: - - -"I assure you that the town of Smolensk is not in the slightest -danger as yet and it is unlikely that it will be threatened with -any. I from the one side and Prince Bagration from the other are -marching to unite our forces before Smolensk, which junction will be -effected on the 22nd instant, and both armies with their united forces -will defend our compatriots of the province entrusted to your care -till our efforts shall have beaten back the enemies of our Fatherland, -or till the last warrior in our valiant ranks has perished. From -this you will see that you have a perfect right to reassure the -inhabitants of Smolensk, for those defended by two such brave armies -may feel assured of victory." (Instructions from Barclay de Tolly to -Baron Asch, the civil governor of Smolensk, 1812.) - - -People were anxiously roaming about the streets. - -Carts piled high with household utensils, chairs, and cupboards kept -emerging from the gates of the yards and moving along the streets. -Loaded carts stood at the house next to Ferapontov's and women were -wailing and lamenting as they said good-by. A small watchdog ran round -barking in front of the harnessed horses. - -Alpatych entered the innyard at a quicker pace than usual and went -straight to the shed where his horses and trap were. The coachman -was asleep. He woke him up, told him to harness, and went into the -passage. From the host's room came the sounds of a child crying, the -despairing sobs of a woman, and the hoarse angry shouting of -Ferapontov. The cook began running hither and thither in the passage -like a frightened hen, just as Alpatych entered. - -"He's done her to death. Killed the mistress!... Beat her... dragged -her about so!..." - -"What for?" asked Alpatych. - -"She kept begging to go away. She's a woman! 'Take me away,' says -she, 'don't let me perish with my little children! Folks,' she says, -'are all gone, so why,' she says, 'don't we go?' And he began -beating and pulling her about so!" - -At these words Alpatych nodded as if in approval, and not wishing to -hear more went to the door of the room opposite the innkeeper's, where -he had left his purchases. - -"You brute, you murderer!" screamed a thin, pale woman who, with a -baby in her arms and her kerchief torn from her head, burst through -the door at that moment and down the steps into the yard. - -Ferapontov came out after her, but on seeing Alpatych adjusted his -waistcoat, smoothed his hair, yawned, and followed Alpatych into the -opposite room. - -"Going already?" said he. - -Alpatych, without answering or looking at his host, sorted his -packages and asked how much he owed. - -"We'll reckon up! Well, have you been to the Governor's?" asked -Ferapontov. "What has been decided?" - -Alpatych replied that the Governor had not told him anything -definite. - -"With our business, how can we get away?" said Ferapontov. "We'd -have to pay seven rubles a cartload to Dorogobuzh and I tell them -they're not Christians to ask it! Selivanov, now, did a good stroke -last Thursday--sold flour to the army at nine rubles a sack. Will -you have some tea?" he added. - -While the horses were being harnessed Alpatych and Ferapontov over -their tea talked of the price of corn, the crops, and the good weather -for harvesting. - -"Well, it seems to be getting quieter," remarked Ferapontov, -finishing his third cup of tea and getting up. "Ours must have got the -best of it. The orders were not to let them in. So we're in force, -it seems.... They say the other day Matthew Ivanych Platov drove -them into the river Marina and drowned some eighteen thousand in one -day." - -Alpatych collected his parcels, handed them to the coachman who -had come in, and settled up with the innkeeper. The noise of wheels, -hoofs, and bells was heard from the gateway as a little trap passed -out. - -It was by now late in the afternoon. Half the street was in -shadow, the other half brightly lit by the sun. Alpatych looked out of -the window and went to the door. Suddenly the strange sound of a -far-off whistling and thud was heard, followed by a boom of cannon -blending into a dull roar that set the windows rattling. - -He went out into the street: two men were running past toward the -bridge. From different sides came whistling sounds and the thud of -cannon balls and bursting shells falling on the town. But these sounds -were hardly heard in comparison with the noise of the firing outside -the town and attracted little attention from the inhabitants. The town -was being bombarded by a hundred and thirty guns which Napoleon had -ordered up after four o'clock. The people did not at once realize -the meaning of this bombardment. - -At first the noise of the falling bombs and shells only aroused -curiosity. Ferapontov's wife, who till then had not ceased wailing -under the shed, became quiet and with the baby in her arms went to the -gate, listening to the sounds and looking in silence at the people. - -The cook and a shop assistant came to the gate. With lively -curiosity everyone tried to get a glimpse of the projectiles as they -flew over their heads. Several people came round the corner talking -eagerly. - -"What force!" remarked one. "Knocked the roof and ceiling all to -splinters!" - -"Routed up the earth like a pig," said another. - -"That's grand, it bucks one up!" laughed the first. "Lucky you -jumped aside, or it would have wiped you out!" - -Others joined those men and stopped and told how cannon balls had -fallen on a house close to them. Meanwhile still more projectiles, now -with the swift sinister whistle of a cannon ball, now with the -agreeable intermittent whistle of a shell, flew over people's heads -incessantly, but not one fell close by, they all flew over. Alpatych -was getting into his trap. The innkeeper stood at the gate. - -"What are you staring at?" he shouted to the cook, who in her red -skirt, with sleeves rolled up, swinging her bare elbows, had stepped -to the corner to listen to what was being said. - -"What marvels!" she exclaimed, but hearing her master's voice she -turned back, pulling down her tucked-up skirt. - -Once more something whistled, but this time quite close, swooping -downwards like a little bird; a flame flashed in the middle of the -street, something exploded, and the street was shrouded in smoke. - -"Scoundrel, what are you doing?" shouted the innkeeper, rushing to -the cook. - -At that moment the pitiful wailing of women was heard from different -sides, the frightened baby began to cry, and people crowded silently -with pale faces round the cook. The loudest sound in that crowd was -her wailing. - -"Oh-h-h! Dear souls, dear kind souls! Don't let me die! My good -souls!..." - -Five minutes later no one remained in the street. The cook, with her -thigh broken by a shell splinter, had been carried into the kitchen. -Alpatych, his coachman, Ferapontov's wife and children and the house -porter were all sitting in the cellar, listening. The roar of guns, -the whistling of projectiles, and the piteous moaning of the cook, -which rose above the other sounds, did not cease for a moment. The -mistress rocked and hushed her baby and when anyone came into the -cellar asked in a pathetic whisper what had become of her husband -who had remained in the street. A shopman who entered told her that -her husband had gone with others to the cathedral, whence they were -fetching the wonder-working icon of Smolensk. - -Toward dusk the cannonade began to subside. Alpatych left the cellar -and stopped in the doorway. The evening sky that had been so clear was -clouded with smoke, through which, high up, the sickle of the new moon -shone strangely. Now that the terrible din of the guns had ceased a -hush seemed to reign over the town, broken only by the rustle of -footsteps, the moaning, the distant cries, and the crackle of fires -which seemed widespread everywhere. The cook's moans had now subsided. -On two sides black curling clouds of smoke rose and spread from the -fires. Through the streets soldiers in various uniforms walked or -ran confusedly in different directions like ants from a ruined -ant-hill. Several of them ran into Ferapontov's yard before Alpatych's -eyes. Alpatych went out to the gate. A retreating regiment, -thronging and hurrying, blocked the street. - -Noticing him, an officer said: "The town is being abandoned. Get -away, get away!" and then, turning to the soldiers, shouted: - -"I'll teach you to run into the yards!" - -Alpatych went back to the house, called the coachman, and told him -to set off. Ferapontov's whole household came out too, following -Alpatych and the coachman. The women, who had been silent till then, -suddenly began to wail as they looked at the fires--the smoke and even -the flames of which could be seen in the failing twilight--and as if -in reply the same kind of lamentation was heard from other parts of -the street. Inside the shed Alpatych and the coachman arranged the -tangled reins and traces of their horses with trembling hands. - -As Alpatych was driving out of the gate he saw some ten soldiers -in Ferapontov's open shop, talking loudly and filling their bags and -knapsacks with flour and sunflower seeds. Just then Ferapontov -returned and entered his shop. On seeing the soldiers he was about -to shout at them, but suddenly stopped and, clutching at his hair, -burst into sobs and laughter: - -"Loot everything, lads! Don't let those devils get it!" he cried, -taking some bags of flour himself and throwing them into the street. - -Some of the soldiers were frightened and ran away, others went on -filling their bags. On seeing Alpatych, Ferapontov turned to him: - -"Russia is done for!" he cried. "Alpatych, I'll set the place on -fire myself. We're done for!..." and Ferapontov ran into the yard. - -Soldiers were passing in a constant stream along the street blocking -it completely, so that Alpatych could not pass out and had to wait. -Ferapontov's wife and children were also sitting in a cart waiting -till it was possible to drive out. - -Night had come. There were stars in the sky and the new moon shone -out amid the smoke that screened it. On the sloping descent to the -Dnieper Alpatych's cart and that of the innkeeper's wife, which were -slowly moving amid the rows of soldiers and of other vehicles, had -to stop. In a side street near the crossroads where the vehicles had -stopped, a house and some shops were on fire. This fire was already -burning itself out. The flames now died down and were lost in the -black smoke, now suddenly flared up again brightly, lighting up with -strange distinctness the faces of the people crowding at the -crossroads. Black figures flitted about before the fire, and through -the incessant crackling of the flames talking and shouting could be -heard. Seeing that his trap would not be able to move on for some -time, Alpatych got down and turned into the side street to look at the -fire. Soldiers were continually rushing backwards and forwards near -it, and he saw two of them and a man in a frieze coat dragging burning -beams into another yard across the street, while others carried -bundles of hay. - -Alpatych went up to a large crowd standing before a high barn -which was blazing briskly. The walls were all on fire and the back -wall had fallen in, the wooden roof was collapsing, and the rafters -were alight. The crowd was evidently watching for the roof to fall in, -and Alpatych watched for it too. - -"Alpatych!" a familiar voice suddenly hailed the old man. - -"Mercy on us! Your excellency!" answered Alpatych, immediately -recognizing the voice of his young prince. - -Prince Andrew in his riding cloak, mounted on a black horse, was -looking at Alpatych from the back of the crowd. - -"Why are you here?" he asked. - -"Your... your excellency," stammered Alpatych and broke into sobs. -"Are we really lost? Master!..." - -"Why are you here?" Prince Andrew repeated. - -At that moment the flames flared up and showed his young master's -pale worn face. Alpatych told how he had been sent there and how -difficult it was to get away. - -"Are we really quite lost, your excellency?" he asked again. - -Prince Andrew without replying took out a notebook and raising his -knee began writing in pencil on a page he tore out. He wrote to his -sister: - - -"Smolensk is being abandoned. Bald Hills will be occupied by the -enemy within a week. Set off immediately for Moscow. Let me know at -once when you will start. Send by special messenger to Usvyazh." - - -Having written this and given the paper to Alpatych, he told him how -to arrange for departure of the prince, the princess, his son, and the -boy's tutor, and how and where to let him know immediately. Before -he had had time to finish giving these instructions, a chief of -staff followed by a suite galloped up to him. - -"You are a colonel?" shouted the chief of staff with a German -accent, in a voice familiar to Prince Andrew. "Houses are set on -fire in your presence and you stand by! What does this mean? You -will answer for it!" shouted Berg, who was now assistant to the -chief of staff of the commander of the left flank of the infantry of -the first army, a place, as Berg said, "very agreeable and well en -evidence." - -Prince Andrew looked at him and without replying went on speaking to -Alpatych. - -"So tell them that I shall await a reply till the tenth, and if by -the tenth I don't receive news that they have all got away I shall -have to throw up everything and come myself to Bald Hills." - -"Prince," said Berg, recognizing Prince Andrew, "I only spoke -because I have to obey orders, because I always do obey exactly.... -You must please excuse me," he went on apologetically. - -Something cracked in the flames. The fire died down for a moment and -wreaths of black smoke rolled from under the roof. There was another -terrible crash and something huge collapsed. - -"Ou-rou-rou!" yelled the crowd, echoing the crash of the -collapsing roof of the barn, the burning grain in which diffused a -cakelike aroma all around. The flames flared up again, lighting the -animated, delighted, exhausted faces of the spectators. - -The man in the frieze coat raised his arms and shouted: - -"It's fine, lads! Now it's raging... It's fine!" - -"That's the owner himself," cried several voices. - -"Well then," continued Prince Andrew to Alpatych, "report to them as -I have told you"; and not replying a word to Berg who was now mute -beside him, he touched his horse and rode down the side street. - - - - - -CHAPTER V - - -From Smolensk the troops continued to retreat, followed by the -enemy. On the tenth of August the regiment Prince Andrew commanded was -marching along the highroad past the avenue leading to Bald Hills. -Heat and drought had continued for more than three weeks. Each day -fleecy clouds floated across the sky and occasionally veiled the -sun, but toward evening the sky cleared again and the sun set in -reddish-brown mist. Heavy night dews alone refreshed the earth. The -unreaped corn was scorched and shed its grain. The marshes dried up. -The cattle lowed from hunger, finding no food on the sun-parched -meadows. Only at night and in the forests while the dew lasted was -there any freshness. But on the road, the highroad along which the -troops marched, there was no such freshness even at night or when -the road passed through the forest; the dew was imperceptible on the -sandy dust churned up more than six inches deep. As soon as day dawned -the march began. The artillery and baggage wagons moved noiselessly -through the deep dust that rose to the very hubs of the wheels, and -the infantry sank ankle-deep in that soft, choking, hot dust that -never cooled even at night. Some of this dust was kneaded by the -feet and wheels, while the rest rose and hung like a cloud over the -troops, settling in eyes, ears, hair, and nostrils, and worst of all -in the lungs of the men and beasts as they moved along that road. -The higher the sun rose the higher rose that cloud of dust, and -through the screen of its hot fine particles one could look with naked -eye at the sun, which showed like a huge crimson ball in the unclouded -sky. There was no wind, and the men choked in that motionless -atmosphere. They marched with handkerchiefs tied over their noses -and mouths. When they passed through a village they all rushed to -the wells and fought for the water and drank it down to the mud. - -Prince Andrew was in command of a regiment, and the management of -that regiment, the welfare of the men and the necessity of receiving -and giving orders, engrossed him. The burning of Smolensk and its -abandonment made an epoch in his life. A novel feeling of anger -against the foe made him forget his own sorrow. He was entirely -devoted to the affairs of his regiment and was considerate and kind to -his men and officers. In the regiment they called him "our prince," -were proud of him and loved him. But he was kind and gentle only to -those of his regiment, to Timokhin and the like--people quite new to -him, belonging to a different world and who could not know and -understand his past. As soon as he came across a former acquaintance -or anyone from the staff, he bristled up immediately and grew -spiteful, ironical, and contemptuous. Everything that reminded him -of his past was repugnant to him, and so in his relations with that -former circle he confined himself to trying to do his duty and not -to be unfair. - -In truth everything presented itself in a dark and gloomy light to -Prince Andrew, especially after the abandonment of Smolensk on the -sixth of August (he considered that it could and should have been -defended) and after his sick father had had to flee to Moscow, -abandoning to pillage his dearly beloved Bald Hills which he had built -and peopled. But despite this, thanks to his regiment, Prince Andrew -had something to think about entirely apart from general questions. -Two days previously he had received news that his father, son, and -sister had left for Moscow; and though there was nothing for him to do -at Bald Hills, Prince Andrew with a characteristic desire to foment -his own grief decided that he must ride there. - -He ordered his horse to be saddled and, leaving his regiment on -the march, rode to his father's estate where he had been born and -spent his childhood. Riding past the pond where there used always to -be dozens of women chattering as they rinsed their linen or beat it -with wooden beetles, Prince Andrew noticed that there was not a soul -about and that the little washing wharf, torn from its place and -half submerged, was floating on its side in the middle of the pond. He -rode to the keeper's lodge. No one at the stone entrance gates of -the drive and the door stood open. Grass had already begun to grow -on the garden paths, and horses and calves were straying in the -English park. Prince Andrew rode up to the hothouse; some of the glass -panes were broken, and of the trees in tubs some were overturned and -others dried up. He called for Taras the gardener, but no one replied. -Having gone round the corner of the hothouse to the ornamental garden, -he saw that the carved garden fence was broken and branches of the -plum trees had been torn off with the fruit. An old peasant whom -Prince Andrew in his childhood had often seen at the gate was -sitting on a green garden seat, plaiting a bast shoe. - -He was deaf and did not hear Prince Andrew ride up. He was sitting -on the seat the old prince used to like to sit on, and beside him -strips of bast were hanging on the broken and withered branch of a -magnolia. - -Prince Andrew rode up to the house. Several limes in the old -garden had been cut down and a piebald mare and her foal were -wandering in front of the house among the rosebushes. The shutters -were all closed, except at one window which was open. A little serf -boy, seeing Prince Andrew, ran into the house. Alpatych, having sent -his family away, was alone at Bald Hills and was sitting indoors -reading the Lives of the Saints. On hearing that Prince Andrew had -come, he went out with his spectacles on his nose, buttoning his coat, -and, hastily stepping up, without a word began weeping and kissing -Prince Andrew's knee. - -Then, vexed at his own weakness, he turned away and began to -report on the position of affairs. Everything precious and valuable -had been removed to Bogucharovo. Seventy quarters of grain had also -been carted away. The hay and the spring corn, of which Alpatych -said there had been a remarkable crop that year, had been commandeered -by the troops and mown down while still green. The peasants were -ruined; some of them too had gone to Bogucharovo, only a few remained. - -Without waiting to hear him out, Prince Andrew asked: - -"When did my father and sister leave?" meaning when did they leave -for Moscow. - -Alpatych, understanding the question to refer to their departure for -Bogucharovo, replied that they had left on the seventh and again -went into details concerning the estate management, asking for -instructions. - -"Am I to let the troops have the oats, and to take a receipt for -them? We have still six hundred quarters left," he inquired. - -"What am I to say to him?" thought Prince Andrew, looking down on -the old man's bald head shining in the sun and seeing by the -expression on his face that the old man himself understood how -untimely such questions were and only asked them to allay his grief. - -"Yes, let them have it," replied Prince Andrew. - -"If you noticed some disorder in the garden," said Alpatych, "it was -impossible to prevent it. Three regiments have been here and spent the -night, dragoons mostly. I took down the name and rank of their -commanding officer, to hand in a complaint about it." - -"Well, and what are you going to do? Will you stay here if the enemy -occupies the place?" asked Prince Andrew. - -Alpatych turned his face to Prince Andrew, looked at him, and -suddenly with a solemn gesture raised his arm. - -"He is my refuge! His will be done!" he exclaimed. - -A group of bareheaded peasants was approaching across the meadow -toward the prince. - -"Well, good-by!" said Prince Andrew, bending over to Alpatych. -"You must go away too, take away what you can and tell the serfs to go -to the Ryazan estate or to the one near Moscow." - -Alpatych clung to Prince Andrew's leg and burst into sobs. Gently -disengaging himself, the prince spurred his horse and rode down the -avenue at a gallop. - -The old man was still sitting in the ornamental garden, like a fly -impassive on the face of a loved one who is dead, tapping the last -on which he was making the bast shoe, and two little girls, running -out from the hot house carrying in their skirts plums they had plucked -from the trees there, came upon Prince Andrew. On seeing the young -master, the elder one frightened look clutched her younger companion -by the hand and hid with her behind a birch tree, not stopping to pick -up some green plums they had dropped. - -Prince Andrew turned away with startled haste, unwilling to let them -see that they had been observed. He was sorry for the pretty -frightened little girl, was afraid of looking at her, and yet felt -an irresistible desire to do so. A new sensation of comfort and relief -came over him when, seeing these girls, he realized the existence of -other human interests entirely aloof from his own and just as -legitimate as those that occupied him. Evidently these girls -passionately desired one thing--to carry away and eat those green -plums without being caught--and Prince Andrew shared their wish for -the success of their enterprise. He could not resist looking at them -once more. Believing their danger past, they sprang from their -ambush and, chirruping something in their shrill little voices and -holding up their skirts, their bare little sunburned feet scampered -merrily and quickly across the meadow grass. - -Prince Andrew was somewhat refreshed by having ridden off the -dusty highroad along which the troops were moving. But not far from -Bald Hills he again came out on the road and overtook his regiment -at its halting place by the dam of a small pond. It was past one -o'clock. The sun, a red ball through the dust, burned and scorched his -back intolerably through his black coat. The dust always hung -motionless above the buzz of talk that came from the resting troops. -There was no wind. As he crossed the dam Prince Andrew smelled the -ooze and freshness of the pond. He longed to get into that water, -however dirty it might be, and he glanced round at the pool from -whence came sounds of shrieks and laughter. The small, muddy, green -pond had risen visibly more than a foot, flooding the dam, because -it was full of the naked white bodies of soldiers with brick-red -hands, necks, and faces, who were splashing about in it. All this -naked white human flesh, laughing and shrieking, floundered about in -that dirty pool like carp stuffed into a watering can, and the -suggestion of merriment in that floundering mass rendered it specially -pathetic. - -One fair-haired young soldier of the third company, whom Prince -Andrew knew and who had a strap round the calf of one leg, crossed -himself, stepped back to get a good run, and plunged into the water; -another, a dark noncommissioned officer who was always shaggy, stood -up to his waist in the water joyfully wriggling his muscular figure -and snorted with satisfaction as he poured the water over his head -with hands blackened to the wrists. There were sounds of men -slapping one another, yelling, and puffing. - -Everywhere on the bank, on the dam, and in the pond, there was -healthy, white, muscular flesh. The officer, Timokhin, with his red -little nose, standing on the dam wiping himself with a towel, felt -confused at seeing the prince, but made up his mind to address him -nevertheless. - -"It's very nice, your excellency! Wouldn't you like to?" said he. - -"It's dirty," replied Prince Andrew, making a grimace. - -"We'll clear it out for you in a minute," said Timokhin, and, -still undressed, ran off to clear the men out of the pond. - -"The prince wants to bathe." - -"What prince? Ours?" said many voices, and the men were in such -haste to clear out that the prince could hardly stop them. He -decided that he would rather wash himself with water in the barn. - -"Flesh, bodies, cannon fodder!" he thought, and he looked at his own -naked body and shuddered, not from cold but from a sense of disgust -and horror he did not himself understand, aroused by the sight of that -immense number of bodies splashing about in the dirty pond. - - -On the seventh of August Prince Bagration wrote as follows from -his quarters at Mikhaylovna on the Smolensk road: - - -Dear Count Alexis Andreevich--(He was writing to Arakcheev but -knew that his letter would be read by the Emperor, and therefore -weighed every word in it to the best of his ability.) - -I expect the Minister [Barclay de Tolly] has already reported the -abandonment of Smolensk to the enemy. It is pitiable and sad, and -the whole army is in despair that this most important place has been -wantonly abandoned. I, for my part, begged him personally most -urgently and finally wrote him, but nothing would induce him to -consent. I swear to you on my honor that Napoleon was in such a fix as -never before and might have lost half his army but could not have -taken Smolensk. Our troops fought, and are fighting, as never -before. With fifteen thousand men I held the enemy at bay for -thirty-five hours and beat him; but he would not hold out even for -fourteen hours. It is disgraceful, a stain on our army, and as for -him, he ought, it seems to me, not to live. If he reports that our -losses were great, it is not true; perhaps about four thousand, not -more, and not even that; but even were they ten thousand, that's -war! But the enemy has lost masses... - -What would it have cost him to hold out for another two days? They -would have had to retire of their own accord, for they had no water -for men or horses. He gave me his word he would not retreat, but -suddenly sent instructions that he was retiring that night. We -cannot fight in this way, or we may soon bring the enemy to Moscow... - -There is a rumor that you are thinking of peace. God forbid that you -should make peace after all our sacrifices and such insane retreats! -You would set all Russia against you and every one of us would feel -ashamed to wear the uniform. If it has come to this--we must fight -as long as Russia can and as long as there are men able to stand... - -One man ought to be in command, and not two. Your Minister may -perhaps be good as a Minister, but as a general he is not merely bad -but execrable, yet to him is entrusted the fate of our whole -country.... I am really frantic with vexation; forgive my writing -boldly. It is clear that the man who advocates the conclusion of a -peace, and that the Minister should command the army, does not love -our sovereign and desires the ruin of us all. So I write you -frankly: call out the militia. For the Minister is leading these -visitors after him to Moscow in a most masterly way. The whole army -feels great suspicion of the Imperial aide-de-camp Wolzogen. He is -said to be more Napoleon's man than ours, and he is always advising -the Minister. I am not merely civil to him but obey him like a -corporal, though I am his senior. This is painful, but, loving my -benefactor and sovereign, I submit. Only I am sorry for the Emperor -that he entrusts our fine army to such as he. Consider that on our -retreat we have lost by fatigue and left in the hospital more than -fifteen thousand men, and had we attacked this would not have -happened. Tell me, for God's sake, what will Russia, our mother -Russia, say to our being so frightened, and why are we abandoning -our good and gallant Fatherland to such rabble and implanting feelings -of hatred and shame in all our subjects? What are we scared at and -of whom are we afraid? I am not to blame that the Minister is -vacillating, a coward, dense, dilatory, and has all bad qualities. The -whole army bewails it and calls down curses upon him... - - - - - -CHAPTER VI - - -Among the innumerable categories applicable to the phenomena of -human life one may discriminate between those in which substance -prevails and those in which form prevails. To the latter--as -distinguished from village, country, provincial, or even Moscow -life--we may allot Petersburg life, and especially the life of its -salons. That life of the salons is unchanging. Since the year 1805 -we had made peace and had again quarreled with Bonaparte and had -made constitutions and unmade them again, but the salons of Anna -Pavlovna Helene remained just as they had been--the one seven and -the other five years before. At Anna Pavlovna's they talked with -perplexity of Bonaparte's successes just as before and saw in them and -in the subservience shown to him by the European sovereigns a -malicious conspiracy, the sole object of which was to cause -unpleasantness and anxiety to the court circle of which Anna -Pavlovna was the representative. And in Helene's salon, which -Rumyantsev himself honored with his visits, regarding Helene as a -remarkably intelligent woman, they talked with the same ecstasy in -1812 as in 1808 of the "great nation" and the "great man," and -regretted our rupture with France, a rupture which, according to them, -ought to be promptly terminated by peace. - -Of late, since the Emperor's return from the army, there had been -some excitement in these conflicting salon circles and some -demonstrations of hostility to one another, but each camp retained its -own tendency. In Anna Pavlovna's circle only those Frenchmen were -admitted who were deep-rooted legitimists, and patriotic views were -expressed to the effect that one ought not to go to the French theater -and that to maintain the French troupe was costing the government as -much as a whole army corps. The progress of the war was eagerly -followed, and only the reports most flattering to our army were -circulated. In the French circle of Helene and Rumyantsev the -reports of the cruelty of the enemy and of the war were contradicted -and all Napoleon's attempts at conciliation were discussed. In that -circle they discountenanced those who advised hurried preparations for -a removal to Kazan of the court and the girls' educational -establishments under the patronage of the Dowager Empress. In Helene's -circle the war in general was regarded as a series of formal -demonstrations which would very soon end in peace, and the view -prevailed expressed by Bilibin--who now in Petersburg was quite at -home in Helene's house, which every clever man was obliged to visit- -that not by gunpowder but by those who invented it would matters be -settled. In that circle the Moscow enthusiasm--news of which had -reached Petersburg simultaneously with the Emperor's return--was -ridiculed sarcastically and very cleverly, though with much caution. - -Anna Pavlovna's circle on the contrary was enraptured by this -enthusiasm and spoke of it as Plutarch speaks of the deeds of the -ancients. Prince Vasili, who still occupied his former important -posts, formed a connecting link between these two circles. He -visited his "good friend Anna Pavlovna" as well as his daughter's -"diplomatic salon," and often in his constant comings and goings -between the two camps became confused and said at Helene's what he -should have said at Anna Pavlovna's and vice versa. - -Soon after the Emperor's return Prince Vasili in a conversation -about the war at Anna Pavlovna's severely condemned Barclay de -Tolly, but was undecided as to who ought to be appointed commander -in chief. One of the visitors, usually spoken of as "a man of great -merit," having described how he had that day seen Kutuzov, the newly -chosen chief of the Petersburg militia, presiding over the -enrollment of recruits at the Treasury, cautiously ventured to suggest -that Kutuzov would be the man to satisfy all requirements. - -Anna Pavlovna remarked with a melancholy smile that Kutuzov had done -nothing but cause the Emperor annoyance. - -"I have talked and talked at the Assembly of the Nobility," Prince -Vasili interrupted, "but they did not listen to me. I told them his -election as chief of the militia would not please the Emperor. They -did not listen to me. - -"It's all this mania for opposition," he went on. "And who for? It -is all because we want to ape the foolish enthusiasm of those -Muscovites," Prince Vasili continued, forgetting for a moment that -though at Helene's one had to ridicule the Moscow enthusiasm, at -Anna Pavlovna's one had to be ecstatic about it. But he retrieved -his mistake at once. "Now, is it suitable that Count Kutuzov, the -oldest general in Russia, should preside at that tribunal? He will get -nothing for his pains! How could they make a man commander in chief -who cannot mount a horse, who drops asleep at a council, and has the -very worst morals! A good reputation he made for himself at Bucharest! -I don't speak of his capacity as a general, but at a time like this -how they appoint a decrepit, blind old man, positively -blind? A fine idea to have a blind general! He can't see anything. -To play blindman's bluff? He can't see at all!" - -No one replied to his remarks. - -This was quite correct on the twenty-fourth of July. But on the -twenty-ninth of July Kutuzov received the title of Prince. This -might indicate a wish to get rid of him, and therefore Prince Vasili's -opinion continued to be correct though he was not now in any hurry -to express it. But on the eighth of August a committee, consisting -of Field Marshal Saltykov, Arakcheev, Vyazmitinov, Lopukhin, and -Kochubey met to consider the progress of the war. This committee -came to the conclusion that our failures were due to a want of unity -in the command and though the members of the committee were aware of -the Emperor's dislike of Kutuzov, after a short deliberation they -agreed to advise his appointment as commander in chief. That same -day Kutuzov was appointed commander in chief with full powers over the -armies and over the whole region occupied by them. - -On the ninth of August Prince Vasili at Anna Pavlovna's again met -the "man of great merit." The latter was very attentive to Anna -Pavlovna because he wanted to be appointed director of one of the -educational establishments for young ladies. Prince Vasili entered the -room with the air of a happy conqueror who has attained the object -of his desires. - -"Well, have you heard the great news? Prince Kutuzov is field -marshal! All dissensions are at an end! I am so glad, so delighted! At -last we have a man!" said he, glancing sternly and significantly round -at everyone in the drawing room. - -The "man of great merit," despite his desire to obtain the post of -director, could not refrain from reminding Prince Vasili of his former -opinion. Though this was impolite to Prince Vasili in Anna -Pavlovna's drawing room, and also to Anna Pavlovna herself who had -received the news with delight, he could not resist the temptation. - -"But, Prince, they say he is blind!" said he, reminding Prince -Vasili of his own words. - -"Eh? Nonsense! He sees well enough," said Prince Vasili rapidly, -in a deep voice and with a slight cough--the voice and cough with -which he was wont to dispose of all difficulties. - -"He sees well enough," he added. "And what I am so pleased about," -he went on, "is that our sovereign has given him full powers over -all the armies and the whole region--powers no commander in chief ever -had before. He is a second autocrat," he concluded with a victorious -smile. - -"God grant it! God grant it!" said Anna Pavlovna. - -The "man of great merit," who was still a novice in court circles, -wishing to flatter Anna Pavlovna by defending her former position on -this question, observed: - -"It is said that the Emperor was reluctant to give Kutuzov those -powers. They say he blushed like a girl to whom Joconde is read, -when he said to Kutuzov: 'Your Emperor and the Fatherland award you -this honor.'" - -"Perhaps the heart took no part in that speech," said Anna Pavlovna. - -"Oh, no, no!" warmly rejoined Prince Vasili, who would not now yield -Kutuzov to anyone; in his opinion Kutuzov was not only admirable -himself, but was adored by everybody. "No, that's impossible," said -he, "for our sovereign appreciated him so highly before." - -"God grant only that Prince Kutuzov assumes real power and does -not allow anyone to put a spoke in his wheel," observed Anna Pavlovna. - -Understanding at once to whom she alluded, Prince Vasili said in a -whisper: - -"I know for a fact that Kutuzov made it an absolute condition that -the Tsarevich should not be with the army. Do you know what he said to -the Emperor?" - -And Prince Vasili repeated the words supposed to have been spoken by -Kutuzov to the Emperor. "I can neither punish him if he does wrong nor -reward him if he does right." - -"Oh, a very wise man is Prince Kutuzov! I have known him a long -time!" - -"They even say," remarked the "man of great merit" who did not yet -possess courtly tact, "that his excellency made it an express -condition that the sovereign himself should not be with the army." - -As soon as he said this both Prince Vasili and Anna Pavlovna -turned away from him and glanced sadly at one another with a sigh at -his naivete. - - - - - -CHAPTER VII - - -While this was taking place in Petersburg the French had already -passed Smolensk and were drawing nearer and nearer to Moscow. -Napoleon's historian Thiers, like other of his historians, trying to -justify his hero says that he was drawn to the walls of Moscow against -his will. He is as right as other historians who look for the -explanation of historic events in the will of one man; he is as -right as the Russian historians who maintain that Napoleon was drawn -to Moscow by the skill of the Russian commanders. Here besides the law -of retrospection, which regards all the past as a preparation for -events that subsequently occur, the law of reciprocity comes in, -confusing the whole matter. A good chessplayer having lost a game is -sincerely convinced that his loss resulted from a mistake he made -and looks for that mistake in the opening, but forgets that at each -stage of the game there were similar mistakes and that none of his -moves were perfect. He only notices the mistake to which he pays -attention, because his opponent took advantage of it. How much more -complex than this is the game of war, which occurs under certain -limits of time, and where it is not one will that manipulates lifeless -objects, but everything results from innumerable conflicts of -various wills! - -After Smolensk Napoleon sought a battle beyond Dorogobuzh at Vyazma, -and then at Tsarevo-Zaymishche, but it happened that owing to a -conjunction of innumerable circumstances the Russians could not give -battle till they reached Borodino, seventy miles from Moscow. From -Vyazma Napoleon ordered a direct advance on Moscow. - -Moscou, la capitale asiatique de ce grand empire, la ville sacree -des peuples d'Alexandre, Moscou avec ses innombrables eglises en forme -de pagodes chinoises,* this Moscow gave Napoleon's imagination no -rest. On the march from Vyazma to Tsarevo-Zaymishche he rode his light -bay bobtailed ambler accompanied by his Guards, his bodyguard, his -pages, and aides-de-camp. Berthier, his chief of staff, dropped behind -to question a Russian prisoner captured by the cavalry. Followed by -Lelorgne d'Ideville, an interpreter, he overtook Napoleon at a -gallop and reined in his horse with an amused expression. - - -*"Moscow, the Asiatic capital of this great empire, the sacred -city of Alexander's people, Moscow with its innumerable churches -shaped like Chinese pagodas." - - -"Well?" asked Napoleon. - -"One of Platov's Cossacks says that Platov's corps is joining up -with the main army and that Kutuzov has been appointed commander in -chief. He is a very shrewd and garrulous fellow." - -Napoleon smiled and told them to give the Cossack a horse and -bring the man to him. He wished to talk to him himself. Several -adjutants galloped off, and an hour later, Lavrushka, the serf Denisov -had handed over to Rostov, rode up to Napoleon in an orderly's -jacket and on a French cavalry saddle, with a merry, and tipsy face. -Napoleon told him to ride by his side and began questioning him. - -"You are a Cossack?" - -"Yes, a Cossack, your Honor." - -"The Cossack, not knowing in what company he was, for Napoleon's -plain appearance had nothing about it that would reveal to an Oriental -mind the presence of a monarch, talked with extreme familiarity of the -incidents of the war," says Thiers, narrating this episode. In reality -Lavrushka, having got drunk the day before and left his master -dinnerless, had been whipped and sent to the village in quest of -chickens, where he engaged in looting till the French took him -prisoner. Lavrushka was one of those coarse, bare-faced lackeys who -have seen all sorts of things, consider it necessary to do -everything in a mean and cunning way, are ready to render any sort -of service to their master, and are keen at guessing their master's -baser impulses, especially those prompted by vanity and pettiness. - -Finding himself in the company of Napoleon, whose identity he had -easily and surely recognized, Lavrushka was not in the least abashed -but merely did his utmost to gain his new master's favor. - -He knew very well that this was Napoleon, but Napoleon's presence -could no more intimidate him than Rostov's, or a sergeant major's with -the rods, would have done, for he had nothing that either the sergeant -major or Napoleon could deprive him of. - -So he rattled on, telling all the gossip he had heard among the -orderlies. Much of it true. But when Napoleon asked him whether the -Russians thought they would beat Bonaparte or not, Lavrushka screwed -up his eyes and considered. - -In this question he saw subtle cunning, as men of his type see -cunning in everything, so he frowned and did not answer immediately. - -"It's like this," he said thoughtfully, "if there's a battle soon, -yours will win. That's right. But if three days pass, then after that, -well, then that same battle will not soon be over." - -Lelorgne d'Ideville smilingly interpreted this speech to Napoleon -thus: "If a battle takes place within the next three days the French -will win, but if later, God knows what will happen." Napoleon did -not smile, though he was evidently in high good humor, and he -ordered these words to be repeated. - -Lavrushka noticed this and to entertain him further, pretending -not to know who Napoleon was, added: - -"We know that you have Bonaparte and that he has beaten everybody in -the world, but we are a different matter..."--without knowing why or -how this bit of boastful patriotism slipped out at the end. - -The interpreter translated these words without the last phrase, -and Bonaparte smiled. "The young Cossack made his mighty -interlocutor smile," says Thiers. After riding a few paces in silence, -Napoleon turned to Berthier and said he wished to see how the news -that he was talking to the Emperor himself, to that very Emperor who -had written his immortally victorious name on the Pyramids, would -affect this enfant du Don.* - - -*"Child of the Don." - - -The fact was accordingly conveyed to Lavrushka. - -Lavrushka, understanding that this was done to perplex him and -that Napoleon expected him to be frightened, to gratify his new -masters promptly pretended to be astonished and awe-struck, opened his -eyes wide, and assumed the expression he usually put on when taken -to be whipped. "As soon as Napoleon's interpreter had spoken," says -Thiers, "the Cossack, seized by amazement, did not utter another word, -but rode on, his eyes fixed on the conqueror whose fame had reached -him across the steppes of the East. All his loquacity was suddenly -arrested and replaced by a naive and silent feeling of admiration. -Napoleon, after making the Cossack a present, had him set free like -a bird restored to its native fields." - -Napoleon rode on, dreaming of the Moscow that so appealed to his -imagination, and "the bird restored to its native fields" galloped -to our outposts, inventing on the way all that had not taken place but -that he meant to relate to his comrades. What had really taken place -he did not wish to relate because it seemed to him not worth -telling. He found the Cossacks, inquired for the regiment operating -with Platov's detachment and by evening found his master, Nicholas -Rostov, quartered at Yankovo. Rostov was just mounting to go for a -ride round the neighboring villages with Ilyin; he let Lavrushka -have another horse and took him along with him. - - - - - -CHAPTER VIII - - -Princess Mary was not in Moscow and out of danger as Prince Andrew -supposed. - -After the return of Alpatych from Smolensk the old prince suddenly -seemed to awake as from a dream. He ordered the militiamen to be -called up from the villages and armed, and wrote a letter to the -commander in chief informing him that he had resolved to remain at -Bald Hills to the last extremity and to defend it, leaving to the -commander in chief's discretion to take measures or not for the -defense of Bald Hills, where one of Russia's oldest generals would -be captured or killed, and he announced to his household that he would -remain at Bald Hills. - -But while himself remaining, he gave instructions for the -departure of the princess and Dessalles with the little prince to -Bogucharovo and thence to Moscow. Princess Mary, alarmed by her -father's feverish and sleepless activity after his previous apathy, -could not bring herself to leave him alone and for the first time in -her life ventured to disobey him. She refused to go away and her -father's fury broke over her in a terrible storm. He repeated every -injustice he had ever inflicted on her. Trying to convict her, he told -her she had worn him out, had caused his quarrel with his son, had -harbored nasty suspicions of him, making it the object of her life -to poison his existence, and he drove her from his study telling her -that if she did not go away it was all the same to him. He declared -that he did not wish to remember her existence and warned her not to -dare to let him see her. The fact that he did not, as she had -feared, order her to be carried away by force but only told her not to -let him see her cheered Princess Mary. She knew it was a proof that in -the depth of his soul he was glad she was remaining at home and had -not gone away. - -The morning after little Nicholas had left, the old prince donned -his full uniform and prepared to visit the commander in chief. His -caleche was already at the door. Princess Mary saw him walk out of the -house in his uniform wearing all his orders and go down the garden -to review his armed peasants and domestic serfs. She sat by the window -listening to his voice which reached her from the garden. Suddenly -several men came running up the avenue with frightened faces. - -Princess Mary ran out to the porch, down the flower-bordered path, -and into the avenue. A large crowd of militiamen and domestics were -moving toward her, and in their midst several men were supporting by -the armpits and dragging along a little old man in a uniform and -decorations. She ran up to him and, in the play of the sunlight that -fell in small round spots through the shade of the lime-tree avenue, -could not be sure what change there was in his face. All she could see -was that his former stern and determined expression had altered to one -of timidity and submission. On seeing his daughter he moved his -helpless lips and made a hoarse sound. It was impossible to make out -what he wanted. He was lifted up, carried to his study, and laid on -the very couch he had so feared of late. - -The doctor, who was fetched that same night, bled him and said -that the prince had had a seizure paralyzing his right side. - -It was becoming more and more dangerous to remain at Bald Hills, and -next day they moved the prince to Bogucharovo, the doctor accompanying -him. - -By the time they reached Bogucharovo, Dessalles and the little -prince had already left for Moscow. - -For three weeks the old prince lay stricken by paralysis in the -new house Prince Andrew had built at Bogucharovo, ever in the same -state, getting neither better nor worse. He was unconscious and lay -like a distorted corpse. He muttered unceasingly, his eyebrows and -lips twitching, and it was impossible to tell whether he understood -what was going on around him or not. One thing was certain--that he -was suffering and wished to say something. But what it was, no one -could tell: it might be some caprice of a sick and half-crazy man, -or it might relate to public affairs, or possibly to family concerns. - -The doctor said this restlessness did not mean anything and was -due to physical causes; but Princess Mary thought he wished to tell -her something, and the fact that her presence always increased his -restlessness confirmed her opinion. - -He was evidently suffering both physically and mentally. There was -no hope of recovery. It was impossible for him to travel, it would not -do to let him die on the road. "Would it not be better if the end -did come, the very end?" Princess Mary sometimes thought. Night and -day, hardly sleeping at all, she watched him and, terrible to say, -often watched him not with hope of finding signs of improvement but -wishing to find symptoms of the approach of the end. - -Strange as it was to her to acknowledge this feeling in herself, yet -there it was. And what seemed still more terrible to her was that -since her father's illness began (perhaps even sooner, when she stayed -with him expecting something to happen), all the personal desires -and hopes that had been forgotten or sleeping within her had awakened. -Thoughts that had not entered her mind for years--thoughts of a life -free from the fear of her father, and even the possibility of love and -of family happiness--floated continually in her imagination like -temptations of the devil. Thrust them aside as she would, questions -continually recurred to her as to how she would order her life now, -after that. These were temptations of the devil and Princess Mary knew -it. She knew that the sole weapon against him was prayer, and she -tried to pray. She assumed an attitude of prayer, looked at the icons, -repeated the words of a prayer, but she could not pray. She felt -that a different world had now taken possession of her--the life of -a world of strenuous and free activity, quite opposed to the spiritual -world in which till now she had been confined and in which her -greatest comfort had been prayer. She could not pray, could not -weep, and worldly cares took possession of her. - -It was becoming dangerous to remain in Bogucharovo. News of the -approach of the French came from all sides, and in one village, ten -miles from Bogucharovo, a homestead had been looted by French -marauders. - -The doctor insisted on the necessity of moving the prince; the -provincial Marshal of the Nobility sent an official to Princess Mary -to persuade her to get away as quickly as possible, and the head of -the rural police having come to Bogucharovo urged the same thing, -saying that the French were only some twenty-five miles away, that -French proclamations were circulating in the villages, and that if the -princess did not take her father away before the fifteenth, he could -not answer for the consequences. - -The princess decided to leave on the fifteenth. The cares of -preparation and giving orders, for which everyone came to her, -occupied her all day. She spent the night of the fourteenth as -usual, without undressing, in the room next to the one where the -prince lay. Several times, waking up, she heard his groans and -muttering, the creak of his bed, and the steps of Tikhon and the -doctor when they turned him over. Several times she listened at the -door, and it seemed to her that his mutterings were louder than -usual and that they turned him over oftener. She could not sleep and -several times went to the door and listened, wishing to enter but -not deciding to do so. Though he did not speak, Princess Mary saw -and knew how unpleasant every sign of anxiety on his account was to -him. She had noticed with what dissatisfaction he turned from the look -she sometimes involuntarily fixed on him. She knew that her going in -during the night at an unusual hour would irritate him. - -But never had she felt so grieved for him or so much afraid of -losing him. She recalled all her life with him and in every word and -act of his found an expression of his love of her. Occasionally amid -these memories temptations of the devil would surge into her -imagination: thoughts of how things would be after his death, and -how her new, liberated life would be ordered. But she drove these -thoughts away with disgust. Toward morning he became quiet and she -fell asleep. - -She woke late. That sincerity which often comes with waking showed -her clearly what chiefly concerned her about her father's illness. -On waking she listened to what was going on behind the door and, -hearing him groan, said to herself with a sigh that things were -still the same. - -"But what could have happened? What did I want? I want his death!" -she cried with a feeling of loathing for herself. - -She washed, dressed, said her prayers, and went out to the porch. In -front of it stood carriages without horses and things were being -packed into the vehicles. - -It was a warm, gray morning. Princess Mary stopped at the porch, -still horrified by her spiritual baseness and trying to arrange her -thoughts before going to her father. The doctor came downstairs and -went out to her. - -"He is a little better today," said he. "I was looking for you. -One can make out something of what he is saying. His head is -clearer. Come in, he is asking for you..." - -Princess Mary's heart beat so violently at this news that she grew -pale and leaned against the wall to keep from falling. To see him, -talk to him, feel his eyes on her now that her whole soul was -overflowing with those dreadful, wicked temptations, was a torment -of joy and terror. - -"Come," said the doctor. - -Princess Mary entered her father's room and went up to his bed. He -was lying on his back propped up high, and his small bony hands with -their knotted purple veins were lying on the quilt; his left eye gazed -straight before him, his right eye was awry, and his brows and lips -motionless. He seemed altogether so thin, small, and pathetic. His -face seemed to have shriveled or melted; his features had grown -smaller. Princess Mary went up and kissed his hand. His left hand -pressed hers so that she understood that he had long been waiting -for her to come. He twitched her hand, and his brows and lips quivered -angrily. - -She looked at him in dismay trying to guess what he wanted of her. -When she changed her position so that his left eye could see her -face he calmed down, not taking his eyes off her for some seconds. -Then his lips and tongue moved, sounds came, and he began to speak, -gazing timidly and imploringly at her, evidently afraid that she might -not understand. - -Straining all her faculties Princess Mary looked at him. The comic -efforts with which he moved his tongue made her drop her eyes and with -difficulty repress the sobs that rose to her throat. He said -something, repeating the same words several times. She could not -understand them, but tried to guess what he was saying and inquiringly -repeated the words he uttered. - -"Mmm...ar...ate...ate..." he repeated several times. - -It was quite impossible to understand these sounds. The doctor -thought he had guessed them, and inquiringly repeated: "Mary, are -you afraid?" The prince shook his head, again repeated the same -sounds. - -"My mind, my mind aches?" questioned Princess Mary. - -He made a mumbling sound in confirmation of this, took her hand, and -began pressing it to different parts of his breast as if trying to -find the right place for it. - -"Always thoughts... about you... thoughts..." he then uttered much -more clearly than he had done before, now that he was sure of being -understood. - -Princess Mary pressed her head against his hand, trying to hide -her sobs and tears. - -He moved his hand over her hair. - -"I have been calling you all night..." he brought out. - -"If only I had known..." she said through her tears. "I was afraid -to come in." - -He pressed her hand. - -"Weren't you asleep?" - -"No, I did not sleep," said Princess Mary, shaking her head. - -Unconsciously imitating her father, she now tried to express herself -as he did, as much as possible by signs, and her tongue too seemed -to move with difficulty. - -"Dear one... Dearest..." Princess Mary could not quite make out what -he had said, but from his look it was clear that he had uttered a -tender caressing word such as he had never used to her before. "Why -didn't you come in?" - -"And I was wishing for his death!" thought Princess Mary. - -He was silent awhile. - -"Thank you... daughter dear!... for all, for all... forgive!... -thank you!... forgive!... thank you!..." and tears began to flow -from his eyes. "Call Andrew!" he said suddenly, and a childish, -timid expression of doubt showed itself on his face as he spoke. - -He himself seemed aware that his demand was meaningless. So at least -it seemed to Princess Mary. - -"I have a letter from him," she replied. - -He glanced at her with timid surprise. - -"Where is he?" - -"He's with the army, Father, at Smolensk." - -He closed his eyes and remained silent a long time. Then as if in -answer to his doubts and to confirm the fact that now he understood -and remembered everything, he nodded his head and reopened his eyes. - -"Yes," he said, softly and distinctly. "Russia has perished. They've -destroyed her." - -And he began to sob, and again tears flowed from his eyes. -Princess Mary could no longer restrain herself and wept while she -gazed at his face. - -Again he closed his eyes. His sobs ceased, he pointed to his eyes, -and Tikhon, understanding him, wiped away the tears. - -Then he again opened his eyes and said something none of them -could understand for a long time, till at last Tikhon understood and -repeated it. Princess Mary had sought the meaning of his words in -the mood in which he had just been speaking. She thought he was -speaking of Russia, or Prince Andrew, of herself, of his grandson, -or of his own death, and so she could not guess his words. - -"Put on your white dress. I like it," was what he said. - -Having understood this Princess Mary sobbed still louder, and the -doctor taking her arm led her out to the veranda, soothing her and -trying to persuade her to prepare for her journey. When she had left -the room the prince again began speaking about his son, about the war, -and about the Emperor, angrily twitching his brows and raising his -hoarse voice, and then he had a second and final stroke. - -Princess Mary stayed on the veranda. The day had cleared, it was hot -and sunny. She could understand nothing, think of nothing and feel -nothing, except passionate love for her father, love such as she -thought she had never felt till that moment. She ran out sobbing -into the garden and as far as the pond, along the avenues of young -lime trees Prince Andrew had planted. - -"Yes... I... I... I wished for his death! Yes, I wanted it to end -quicker.... I wished to be at peace.... And what will become of me? -What use will peace be when he is no longer here?" Princess Mary -murmured, pacing the garden with hurried steps and pressing her -hands to her bosom which heaved with convulsive sobs. - -When she had completed the tour of the garden, which brought her -again to the house, she saw Mademoiselle Bourienne--who had remained -at Bogucharovo and did not wish to leave it--coming toward her with -a stranger. This was the Marshal of the Nobility of the district, -who had come personally to point out to the princess the necessity for -her prompt departure. Princess Mary listened without understanding -him; she led him to the house, offered him lunch, and sat down with -him. Then, excusing herself, she went to the door of the old -prince's room. The doctor came out with an agitated face and said -she could not enter. - -"Go away, Princess! Go away... go away!" - -She returned to the garden and sat down on the grass at the foot -of the slope by the pond, where no one could see her. She did not know -how long she had been there when she was aroused by the sound of a -woman's footsteps running along the path. She rose and saw Dunyasha -her maid, who was evidently looking for her, and who stopped -suddenly as if in alarm on seeing her mistress. - -"Please come, Princess... The Prince," said Dunyasha in a breaking -voice. - -"Immediately, I'm coming, I'm coming!" replied the princess -hurriedly, not giving Dunyasha time to finish what she was saying, and -trying to avoid seeing the girl she ran toward the house. - -"Princess, it's God's will! You must be prepared for everything," -said the Marshal, meeting her at the house door. - -"Let me alone; it's not true!" she cried angrily to him. - -The doctor tried to stop her. She pushed him aside and ran to her -father's door. "Why are these people with frightened faces stopping -me? I don't want any of them! And what are they doing here?" she -thought. She opened the door and the bright daylight in that -previously darkened room startled her. In the room were her nurse -and other women. They all drew back from the bed, making way for -her. He was still lying on the bed as before, but the stern expression -of his quiet face made Princess Mary stop short on the threshold. - -"No, he's not dead--it's impossible!" she told herself and -approached him, and repressing the terror that seized her, she pressed -her lips to his cheek. But she stepped back immediately. All the force -of the tenderness she had been feeling for him vanished instantly -and was replaced by a feeling of horror at what lay there before -her. "No, he is no more! He is not, but here where he was is something -unfamiliar and hostile, some dreadful, terrifying, and repellent -mystery!" And hiding her face in her hands, Princess Mary sank into -the arms of the doctor, who held her up. - - -In the presence of Tikhon and the doctor the women washed what had -been the prince, tied his head up with a handkerchief that the mouth -should not stiffen while open, and with another handkerchief tied -together the legs that were already spreading apart. Then they dressed -him in uniform with his decorations and placed his shriveled little -body on a table. Heaven only knows who arranged all this and when, but -it all got done as if of its own accord. Toward night candles were -burning round his coffin, a pall was spread over it, the floor was -strewn with sprays of juniper, a printed band was tucked in under -his shriveled head, and in a corner of the room sat a chanter -reading the psalms. - -Just as horses shy and snort and gather about a dead horse, so the -inmates of the house and strangers crowded into the drawing room round -the coffin--the Marshal, the village Elder, peasant women--and all -with fixed and frightened eyes, crossing themselves, bowed and -kissed the old prince's cold and stiffened hand. - - - - - -CHAPTER IX - - -Until Prince Andrew settled in Bogucharovo its owners had always -been absentees, and its peasants were of quite a different character -from those of Bald Hills. They differed from them in speech, dress, -and disposition. They were called steppe peasants. The old prince used -to approve of them for their endurance at work when they came to -Bald Hills to help with the harvest or to dig ponds, and ditches, -but he disliked them for their boorishness. - -Prince Andrew's last stay at Bogucharovo, when he introduced -hospitals and schools and reduced the quitrent the peasants had to -pay, had not softened their disposition but had on the contrary -strengthened in them the traits of character the old prince called -boorishness. Various obscure rumors were always current among them: at -one time a rumor that they would all be enrolled as Cossacks; at -another of a new religion to which they were all to be converted; then -of some proclamation of the Tsar's and of an oath to the Tsar Paul -in 1797 (in connection with which it was rumored that freedom had been -granted them but the landowners had stopped it), then of Peter -Fedorovich's return to the throne in seven years' time, when -everything would be made free and so "simple" that there would be no -restrictions. Rumors of the war with Bonaparte and his invasion were -connected in their minds with the same sort of vague notions of -Antichrist, the end of the world, and "pure freedom." - -In the vicinity of Bogucharovo were large villages belonging to -the crown or to owners whose serfs paid quitrent and could work -where they pleased. There were very few resident landlords in the -neighborhood and also very few domestic or literate serfs, and in -the lives of the peasantry of those parts the mysterious undercurrents -in the life of the Russian people, the causes and meaning of which are -so baffling to contemporaries, were more clearly and strongly -noticeable than among others. One instance, which had occurred some -twenty years before, was a movement among the peasants to emigrate -to some unknown "warm rivers." Hundreds of peasants, among them the -Bogucharovo folk, suddenly began selling their cattle and moving in -whole families toward the southeast. As birds migrate to somewhere -beyond the sea, so these men with their wives and children streamed to -the southeast, to parts where none of them had ever been. They set off -in caravans, bought their freedom one by one or ran away, and drove or -walked toward the "warm rivers." Many of them were punished, some sent -to Siberia, many died of cold and hunger on the road, many returned of -their own accord, and the movement died down of itself just as it -had sprung up, without apparent reason. But such undercurrents still -existed among the people and gathered new forces ready to manifest -themselves just as strangely, unexpectedly, and at the same time -simply, naturally, and forcibly. Now in 1812, to anyone living in -close touch with these people it was apparent that these undercurrents -were acting strongly and nearing an eruption. - -Alpatych, who had reached Bogucharovo shortly before the old -prince's death, noticed an agitation among the peasants, and that -contrary to what was happening in the Bald Hills district, where -over a radius of forty miles all the peasants were moving away and -leaving their villages to be devastated by the Cossacks, the -peasants in the steppe region round Bogucharovo were, it was -rumored, in touch with the French, received leaflets from them that -passed from hand to hand, and did not migrate. He learned from -domestic serfs loyal to him that the peasant Karp, who possessed great -influence in the village commune and had recently been away driving -a government transport, had returned with news that the Cossacks -were destroying deserted villages, but that the French did not harm -them. Alpatych also knew that on the previous day another peasant -had even brought from the village of Visloukhovo, which was occupied -by the French, a proclamation by a French general that no harm would -be done to the inhabitants, and if they remained they would be paid -for anything taken from them. As proof of this the peasant had brought -from Visloukhovo a hundred rubles in notes (he did not know that -they were false) paid to him in advance for hay. - -More important still, Alpatych learned that on the morning of the -very day he gave the village Elder orders to collect carts to move the -princess' luggage from Bogucharovo, there had been a village meeting -at which it had been decided not to move but to wait. Yet there was no -time to waste. On the fifteenth, the day of the old prince's death, -the Marshal had insisted on Princess Mary's leaving at once, as it was -becoming dangerous. He had told her that after the sixteenth he -could not be responsible for what might happen. On the evening of -the day the old prince died the Marshal went away, promising to return -next day for the funeral. But this he was unable to do, for he -received tidings that the French had unexpectedly advanced, and had -barely time to remove his own family and valuables from his estate. - -For some thirty years Bogucharovo had been managed by the village -Elder, Dron, whom the old prince called by the diminutive "Dronushka." - -Dron was one of those physically and mentally vigorous peasants -who grow big beards as soon as they are of age and go on unchanged -till they are sixty or seventy, without a gray hair or the loss of a -tooth, as straight and strong at sixty as at thirty. - -Soon after the migration to the "warm rivers," in which he had taken -part like the rest, Dron was made village Elder and overseer of -Bogucharovo, and had since filled that post irreproachably for -twenty-three years. The peasants feared him more than they did their -master. The masters, both the old prince and the young, and the -steward respected him and jestingly called him "the Minister." -During the whole time of his service Dron had never been drunk or ill, -never after sleepless nights or the hardest tasks had he shown the -least fatigue, and though he could not read he had never forgotten a -single money account or the number of quarters of flour in any of -the endless cartloads he sold for the prince, nor a single shock of -the whole corn crop on any single acre of the Bogucharovo fields. - -Alpatych, arriving from the devastated Bald Hills estate, sent for -his Dron on the day of the prince's funeral and told him to have -twelve horses got ready for the princess' carriages and eighteen carts -for the things to be removed from Bogucharovo. Though the peasants -paid quitrent, Alpatych thought no difficulty would be made about -complying with this order, for there were two hundred and thirty -households at work in Bogucharovo and the peasants were well to do. -But on hearing the order Dron lowered his eyes and remained silent. -Alpatych named certain peasants he knew, from whom he told him to take -the carts. - -Dron replied that the horses of these peasants were away carting. -Alpatych named others, but they too, according to Dron, had no -horses available: some horses were carting for the government, -others were too weak, and others had died for want of fodder. It -seemed that no horses could be had even for the carriages, much less -for the carting. - -Alpatych looked intently at Dron and frowned. Just as Dron was a -model village Elder, so Alpatych had not managed the prince's -estates for twenty years in vain. He a model steward, possessing in -the highest degree the faculty of divining the needs and instincts -of those he dealt with. Having glanced at Dron he at once understood -that his answers did not express his personal views but the general -mood of the Bogucharovo commune, by which the Elder had already been -carried away. But he also knew that Dron, who had acquired property -and was hated by the commune, must be hesitating between the two -camps: the masters' and the serfs'. He noticed this hesitation in -Dron's look and therefore frowned and moved closer up to him. - -"Now just listen, Dronushka," said he. "Don't talk nonsense to me. -His excellency Prince Andrew himself gave me orders to move all the -people away and not leave them with the enemy, and there is an order -from the Tsar about it too. Anyone who stays is a traitor to the Tsar. -Do you hear?" - -"I hear," Dron answered without lifting his eyes. - -Alpatych was not satisfied with this reply. - -"Eh, Dron, it will turn out badly!" he said, shaking his head. - -"The power is in your hands," Dron rejoined sadly. - -"Eh, Dron, drop it!" Alpatych repeated, withdrawing his hand from -his bosom and solemnly pointing to the floor at Dron's feet. "I can -see through you and three yards into the ground under you," he -continued, gazing at the floor in front of Dron. - -Dron was disconcerted, glanced furtively at Alpatych and again -lowered his eyes. - -"You drop this nonsense and tell the people to get ready to leave -their homes and go to Moscow and to get carts ready for tomorrow -morning for the princess' things. And don't go to any meeting -yourself, do you hear?" - -Dron suddenly fell on his knees. - -"Yakov Alpatych, discharge me! Take the keys from me and discharge -me, for Christ's sake!" - -"Stop that!" cried Alpatych sternly. "I see through you and three -yards under you," he repeated, knowing that his skill in beekeeping, -his knowledge of the right time to sow the oats, and the fact that -he had been able to retain the old prince's favor for twenty years had -long since gained him the reputation of being a wizard, and that the -power of seeing three yards under a man is considered an attribute -of wizards. - -Dron got up and was about to say something, but Alpatych interrupted -him. - -"What is it you have got into your heads, eh?... What are you -thinking of, eh?" - -"What am I to do with the people?" said Dron. "They're quite -beside themselves; I have already told them..." - -"'Told them,' I dare say!" said Alpatych. "Are they drinking?" he -asked abruptly. - -"Quite beside themselves, Yakov Alpatych; they've fetched another -barrel." - -"Well, then, listen! I'll go to the police officer, and you tell -them so, and that they must stop this and the carts must be got -ready." - -"I understand." - -Alpatych did not insist further. He had managed people for a long -time and knew that the chief way to make them obey is to show no -suspicion that they can possibly disobey. Having wrung a submissive "I -understand" from Dron, Alpatych contented himself with that, though he -not only doubted but felt almost certain that without the help of -troops the carts would not be forthcoming. - -And so it was, for when evening came no carts had been provided. -In the village, outside the drink shop, another meeting was being -held, which decided that the horses should be driven out into the -woods and the carts should not be provided. Without saying anything of -this to the princess, Alpatych had his own belongings taken out of the -carts which had arrived from Bald Hills and had those horses got ready -for the princess' carriages. Meanwhile he went himself to the police -authorities. - - - - - -CHAPTER X - - -After her father's funeral Princess Mary shut herself up in her room -and did not admit anyone. A maid came to the door to say that Alpatych -was asking for orders about their departure. (This was before his talk -with Dron.) Princess Mary raised herself on the sofa on which she -had been lying and replied through the closed door that she did not -mean to go away and begged to be left in peace. - -The windows of the room in which she was lying looked westward. -She lay on the sofa with her face to the wall, fingering the buttons -of the leather cushion and seeing nothing but that cushion, and her -confused thoughts were centered on one subject--the irrevocability -of death and her own spiritual baseness, which she had not -suspected, but which had shown itself during her father's illness. She -wished to pray but did not dare to, dared not in her present state -of mind address herself to God. She lay for a long time in that -position. - -The sun had reached the other side of the house, and its slanting -rays shone into the open window, lighting up the room and part of -the morocco cushion at which Princess Mary was looking. The flow of -her thoughts suddenly stopped. Unconsciously she sat up, smoothed -her hair, got up, and went to the window, involuntarily inhaling the -freshness of the clear but windy evening. - -"Yes, you can well enjoy the evening now! He is gone and no one will -hinder you," she said to herself, and sinking into a chair she let her -head fall on the window sill. - -Someone spoke her name in a soft and tender voice from the garden -and kissed her head. She looked up. It was Mademoiselle Bourienne in a -black dress and weepers. She softly approached Princess Mary, -sighed, kissed her, and immediately began to cry. The princess -looked up at her. All their former disharmony and her own jealousy -recurred to her mind. But she remembered too how he had changed of -late toward Mademoiselle Bourienne and could not bear to see her, -thereby showing how unjust were the reproaches Princess Mary had -mentally addressed to her. "Besides, is it for me, for me who -desired his death, to condemn anyone?" she thought. - -Princess Mary vividly pictured to herself the position of -Mademoiselle Bourienne, whom she had of late kept at a distance, but -who yet was dependent on her and living in her house. She felt sorry -for her and held out her hand with a glance of gentle inquiry. -Mademoiselle Bourienne at once began crying again and kissed that -hand, speaking of the princess' sorrow and making herself a partner in -it. She said her only consolation was the fact that the princess -allowed her to share her sorrow, that all the old misunderstandings -should sink into nothing but this great grief; that she felt herself -blameless in regard to everyone, and that he, from above, saw her -affection and gratitude. The princess heard her, not heeding her words -but occasionally looking up at her and listening to the sound of her -voice. - -"Your position is doubly terrible, dear princess," said Mademoiselle -Bourienne after a pause. "I understand that you could not, and cannot, -think of yourself, but with my love for you I must do so.... Has -Alpatych been to you? Has he spoken to you of going away?" she asked. - -Princess Mary did not answer. She did not understand who was to go -or where to. "Is it possible to plan or think of anything now? Is it -not all the same?" she thought, and did not reply. - -"You know, chere Marie," said Mademoiselle Bourienne, "that we are -in danger--are surrounded by the French. It would be dangerous to move -now. If we go we are almost sure to be taken prisoners, and God -knows..." - -Princess Mary looked at her companion without understanding what she -was talking about. - -"Oh, if anyone knew how little anything matters to me now," she -said. "Of course I would on no account wish to go away from him.... -Alpatych did say something about going.... Speak to him; I can do -nothing, nothing, and don't want to...." - -"I've spoken to him. He hopes we should be in time to get away -tomorrow, but I think it would now be better to stay here," said -Mademoiselle Bourienne. "Because, you will agree, chere Marie, to fall -into the hands of the soldiers or of riotous peasants would be -terrible." - -Mademoiselle Bourienne took from her reticule a proclamation (not -printed on ordinary Russian paper) of General Rameau's, telling people -not to leave their homes and that the French authorities would -afford them proper protection. She handed this to the princess. - -"I think it would be best to appeal to that general," she continued, -"and and am sure that all due respect would be shown you." - -Princess Mary read the paper, and her face began to quiver with -stifled sobs. - -"From whom did you get this?" she asked. - -"They probably recognized that I am French, by my name," replied -Mademoiselle Bourienne blushing. - -Princess Mary, with the paper in her hand, rose from the window -and with a pale face went out of the room and into what had been -Prince Andrew's study. - -"Dunyasha, send Alpatych, or Dronushka, or somebody to me!" she -said, "and tell Mademoiselle Bourienne not to come to me," she -added, hearing Mademoiselle Bourienne's voice. "We must go at once, at -once!" she said, appalled at the thought of being left in the hands of -the French. - -"If Prince Andrew heard that I was in the power of the French! -That I, the daughter of Prince Nicholas Bolkonski, asked General -Rameau for protection and accepted his favor!" This idea horrified -her, made her shudder, blush, and feel such a rush of anger and -pride as she had never experienced before. All that was distressing, -and especially all that was humiliating, in her position rose -vividly to her mind. "They, the French, would settle in this house: M. -le General Rameau would occupy Prince Andrew's study and amuse himself -by looking through and reading his letters and papers. Mademoiselle -Bourienne would do the honors of Bogucharovo for him. I should be -given a small room as a favor, the soldiers would violate my -father's newly dug grave to steal his crosses and stars, they would -tell me of their victories over the Russians, and would pretend to -sympathize with my sorrow..." thought Princess Mary, not thinking -her own thoughts but feeling bound to think like her father and her -brother. For herself she did not care where she remained or what -happened to her, but she felt herself the representative of her dead -father and of Prince Andrew. Involuntarily she thought their -thoughts and felt their feelings. What they would have said and what -they would have done she felt bound to say and do. She went into -Prince Andrew's study, trying to enter completely into his ideas, -and considered her position. - -The demands of life, which had seemed to her annihilated by her -father's death, all at once rose before her with a new, previously -unknown force and took possession of her. - -Agitated and flushed she paced the room, sending now for Michael -Ivanovich and now for Tikhon or Dron. Dunyasha, the nurse, and the -other maids could not say in how far Mademoiselle Bourienne's -statement was correct. Alpatych was not at home, he had gone to the -police. Neither could the architect Michael Ivanovich, who on being -sent for came in with sleepy eyes, tell Princess Mary anything. With -just the same smile of agreement with which for fifteen years he had -been accustomed to answer the old prince without expressing views of -his own, he now replied to Princess Mary, so that nothing definite -could be got from his answers. The old valet Tikhon, with sunken, -emaciated face that bore the stamp of inconsolable grief, replied: -"Yes, Princess" to all Princess Mary's questions and hardly -refrained from sobbing as he looked at her. - -At length Dron, the village Elder, entered the room and with a -deep bow to Princess Mary came to a halt by the doorpost. - -Princess Mary walked up and down the room and stopped in front of -him. - -"Dronushka," she said, regarding as a sure friend this Dronushka who -always used to bring a special kind of gingerbread from his visit to -the fair at Vyazma every year and smilingly offer it to her, -"Dronushka, now since our misfortune..." she began, but could not go -on. - -"We are all in God's hands," said he, with a sigh. - -They were silent for a while. - -"Dronushka, Alpatych has gone off somewhere and I have no one to -turn to. Is true, as they tell me, that I can't even go away?" - -"Why shouldn't you go away, your excellency? You can go," said Dron. - -"I was told it would be dangerous because of the enemy. Dear friend, -I can do nothing. I understand nothing. I have nobody! I want to go -away tonight or early tomorrow morning." - -Dron paused. He looked askance at Princess Mary and said: "There are -no horses; I told Yakov Alpatych so." - -"Why are there none?" asked the princess. - -"It's all God's scourge," said Dron. "What horses we had have been -taken for the army or have died--this is such a year! It's not a -case of feeding horses--we may die of hunger ourselves! As it is, some -go three days without eating. We've nothing, we've been ruined." - -Princess Mary listened attentively to what he told her. - -"The peasants are ruined? They have no bread?" she asked. - -"They're dying of hunger," said Dron. "It's not a case of carting." - -"But why didn't you tell me, Dronushka? Isn't it possible to help -them? I'll do all I can...." - -To Princess Mary it was strange that now, at a moment when such -sorrow was filling her soul, there could be rich people and poor, -and the rich could refrain from helping the poor. She had heard -vaguely that there was such a thing as "landlord's corn" which was -sometimes given to the peasants. She also knew that neither her father -nor her brother would refuse to help the peasants in need, she only -feared to make some mistake in speaking about the distribution of -the grain she wished to give. She was glad such cares presented -themselves, enabling her without scruple to forget her own grief. -She began asking Dron about the peasants' needs and what there was -in Bogucharovo that belonged to the landlord. - -"But we have grain belonging to my brother?" she said. - -"The landlord's grain is all safe," replied Dron proudly. "Our -prince did not order it to be sold." - -"Give it to the peasants, let them have all they need; I give you -leave in my brother's name," said she. - -Dron made no answer but sighed deeply. - -"Give them that corn if there is enough of it. Distribute it all. -I give this order in my brother's name; and tell them that what is -ours is theirs. We do not grudge them anything. Tell them so." - -Dron looked intently at the princess while she was speaking. - -"Discharge me, little mother, for God's sake! Order the keys to be -taken from me," said he. "I have served twenty-three years and have -done no wrong. Discharge me, for God's sake!" - -Princess Mary did not understand what he wanted of her or why he was -asking to be discharged. She replied that she had never doubted his -devotion and that she was ready to do anything for him and for the -peasants. - - - - - -CHAPTER XI - - -An hour later Dunyasha came to tell the princess that Dron had come, -and all the peasants had assembled at the barn by the princess' -order and wished to have word with their mistress. - -"But I never told them to come," said Princess Mary. "I only told -Dron to let them have the grain." - -"Only, for God's sake, Princess dear, have them sent away and -don't go out to them. It's all a trick," said Dunyasha, "and when -Yakov Alpatych returns let us get away... and please don't..." - -"What is a trick?" asked Princess Mary in surprise. - -"I know it is, only listen to me for God's sake! Ask nurse too. They -say they don't agree to leave Bogucharovo as you ordered." - -"You're making some mistake. I never ordered them to go away," -said Princess Mary. "Call Dronushka." - -Dron came and confirmed Dunyasha's words; the peasants had come by -the princess' order. - -"But I never sent for them," declared the princess. "You must have -given my message wrong. I only said that you were to give them the -grain." - -Dron only sighed in reply. - -"If you order it they will go away," said he. - -"No, no. I'll go out to them," said Princess Mary, and in spite of -the nurse's and Dunyasha's protests she went out into the porch; Dron, -Dunyasha, the nurse, and Michael Ivanovich following her. - -"They probably think I am offering them the grain to bribe them to -remain here, while I myself go away leaving them to the mercy of the -French," thought Princess Mary. "I will offer them monthly rations and -housing at our Moscow estate. I am sure Andrew would do even more in -my place," she thought as she went out in the twilight toward the -crowd standing on the pasture by the barn. - -The men crowded closer together, stirred, and rapidly took off their -hats. Princess Mary lowered her eyes and, tripping over her skirt, -came close up to them. So many different eyes, old and young, were -fixed on her, and there were so many different faces, that she could -not distinguish any of them and, feeling that she must speak to them -all at once, did not know how to do it. But again the sense that she -represented her father and her brother gave her courage, and she -boldly began her speech. - -"I am very glad you have come," she said without raising her eyes, -and feeling her heart beating quickly and violently. "Dronushka -tells me that the war has ruined you. That is our common misfortune, -and I shall grudge nothing to help you. I am myself going away because -it is dangerous here... the enemy is near... because... I am giving -you everything, my friends, and I beg you to take everything, all -our grain, so that you may not suffer want! And if you have been -told that I am giving you the grain to keep you here--that is not -true. On the contrary, I ask you to go with all your belongings to our -estate near Moscow, and I promise you I will see to it that there -you shall want for nothing. You shall be given food and lodging." - -The princess stopped. Sighs were the only sound heard in the crowd. - -"I am not doing this on my own account," she continued, "I do it -in the name of my dead father, who was a good master to you, and of my -brother and his son." - -Again she paused. No one broke the silence. - -"Ours is a common misfortune and we will share it together. All that -is mine is yours," she concluded, scanning the faces before her. - -All eyes were gazing at her with one and the same expression. She -could not fathom whether it was curiosity, devotion, gratitude, or -apprehension and distrust--but the expression on all the faces was -identical. - -"We are all very thankful for your bounty, but it won't do for us to -take the landlord's grain," said a voice at the back of the crowd. - -"But why not?" asked the princess. - -No one replied and Princess Mary, looking round at the crowd, -found that every eye she met now was immediately dropped. - -"But why don't you want to take it?" she asked again. - -No one answered. - -The silence began to oppress the princess and she tried to catch -someone's eye. - -"Why don't you speak?" she inquired of a very old man who stood just -in front of her leaning on his stick. "If you think something more -is wanted, tell me! I will do anything," said she, catching his eye. - -But as if this angered him, he bent his head quite low and muttered: - -"Why should we agree? We don't want the grain." - -"Why should we give up everything? We don't agree. Don't agree.... -We are sorry for you, but we're not willing. Go away yourself, -alone..." came from various sides of the crowd. - -And again all the faces in that crowd bore an identical -expression, though now it was certainly not an expression of curiosity -or gratitude, but of angry resolve. - -"But you can't have understood me," said Princess Mary with a sad -smile. "Why don't you want to go? I promise to house and feed you, -while here the enemy would ruin you..." - -But her voice was drowned by the voices of the crowd. - -"We're not willing. Let them ruin us! We won't take your grain. We -don't agree." - -Again Princess Mary tried to catch someone's eye, but not a single -eye in the crowd was turned to her; evidently they were all trying -to avoid her look. She felt strange and awkward. - -"Oh yes, an artful tale! Follow her into slavery! Pull down your -houses and go into bondage! I dare say! 'I'll give you grain, indeed!' -she says," voices in the crowd were heard saying. - -With drooping head Princess Mary left the crowd and went back to the -house. Having repeated her order to Dron to have horses ready for -her departure next morning, she went to her room and remained alone -with her own thoughts. - - - - - -CHAPTER XII - - -For a long time that night Princess Mary sat by the open window of -her room hearing the sound of the peasants' voices that reached her -from the village, but it was not of them she was thinking. She felt -that she could not understand them however much she might think -about them. She thought only of one thing, her sorrow, which, after -the break caused by cares for the present, seemed already to belong to -the past. Now she could remember it and weep or pray. - -After sunset the wind had dropped. The night was calm and fresh. -Toward midnight the voices began to subside, a cock crowed, the full -moon began to show from behind the lime trees, a fresh white dewy mist -began to rise, and stillness reigned over the village and the house. - -Pictures of the near past--her father's illness and last moments- -rose one after another to her memory. With mournful pleasure she now -lingered over these images, repelling with horror only the last one, -the picture of his death, which she felt she could not contemplate -even in imagination at this still and mystic hour of night. And -these pictures presented themselves to her so clearly and in such -detail that they seemed now present, now past, and now future. - -She vividly recalled the moment when he had his first stroke and was -being dragged along by his armpits through the garden at Bald Hills, -muttering something with his helpless tongue, twitching his gray -eyebrows and looking uneasily and timidly at her. - -"Even then he wanted to tell me what he told me the day he died," -she thought. "He had always thought what he said then." And she -recalled in all its detail the night at Bald Hills before he had the -last stroke, when with a foreboding of disaster she had remained at -home against his will. She had not slept and had stolen downstairs -on tiptoe, and going to the door of the conservatory where he slept -that night had listened at the door. In a suffering and weary voice he -was saying something to Tikhon, speaking of the Crimea and its warm -nights and of the Empress. Evidently he had wanted to talk. "And why -didn't he call me? Why didn't he let me be there instead of Tikhon?" -Princess Mary had thought and thought again now. "Now he will never -tell anyone what he had in his soul. Never will that moment return for -him or for me when he might have said all he longed to say, and not -Tikhon but I might have heard and understood him. Why didn't I enter -the room?" she thought. "Perhaps he would then have said to me what he -said the day he died. While talking to Tikhon he asked about me twice. -He wanted to see me, and I was standing close by, outside the door. It -was sad and painful for him to talk to Tikhon who did not understand -him. I remember how he began speaking to him about Lise as if she were -alive--he had forgotten she was dead--and Tikhon reminded him that she -was no more, and he shouted, 'Fool!' He was greatly depressed. From -behind the door I heard how he lay down on his bed groaning and loudly -exclaimed, 'My God!' Why didn't I go in then? What could he have -done to me? What could I have lost? And perhaps he would then have -been comforted and would have said that word to me." And Princess Mary -uttered aloud the caressing word he had said to her on the day of -his death. "Dear-est!" she repeated, and began sobbing, with tears -that relieved her soul. She now saw his face before her. And not the -face she had known ever since she could remember and had always seen -at a distance, but the timid, feeble face she had seen for the first -time quite closely, with all its wrinkles and details, when she -stooped near to his mouth to catch what he said. - -"Dear-est!" she repeated again. - -"What was he thinking when he uttered that word? What is he thinking -now?" This question suddenly presented itself to her, and in answer -she saw him before her with the expression that was on his face as -he lay in his coffin with his chin bound up with a white handkerchief. -And the horror that had seized her when she touched him and -convinced herself that that was not he, but something mysterious and -horrible, seized her again. She tried to think of something else and -to pray, but could do neither. With wide-open eyes she gazed at the -moonlight and the shadows, expecting every moment to see his dead -face, and she felt that the silence brooding over the house and within -it held her fast. - -"Dunyasha," she whispered. "Dunyasha!" she screamed wildly, and -tearing herself out of this silence she ran to the servants' -quarters to meet her old nurse and the maidservants who came running -toward her. - - - - - -CHAPTER XIII - - -On the seventeenth of August Rostov and Ilyin, accompanied by -Lavrushka who had just returned from captivity and by an hussar -orderly, left their quarters at Yankovo, ten miles from Bogucharovo, -and went for a ride--to try a new horse Ilyin had bought and to find -out whether there was any hay to be had in the villages. - -For the last three days Bogucharovo had lain between the two hostile -armies, so that it was as easy for the Russian rearguard to get to -it as for the French vanguard; Rostov, as a careful squadron -commander, wished to take such provisions as remained at Bogucharovo -before the French could get them. - -Rostov and Ilyin were in the merriest of moods. On the way to -Bogucharovo, a princely estate with a dwelling house and farm where -they hoped to find many domestic serfs and pretty girls, they -questioned Lavrushka about Napoleon and laughed at his stories, and -raced one another to try Ilyin's horse. - -Rostov had no idea that the village he was entering was the property -of that very Bolkonski who had been engaged to his sister. - -Rostov and Ilyin gave rein to their horses for a last race along the -incline before reaching Bogucharovo, and Rostov, outstripping Ilyin, -was the first to gallop into the village street. - -"You're first!" cried Ilyin, flushed. - -"Yes, always first both on the grassland and here," answered Rostov, -stroking his heated Donets horse. - -"And I'd have won on my Frenchy, your excellency," said Lavrushka -from behind, alluding to his shabby cart horse, "only I didn't wish to -mortify you." - -They rode at a footpace to the barn, where a large crowd of peasants -was standing. - -Some of the men bared their heads, others stared at the new arrivals -without doffing their caps. Two tall old peasants with wrinkled -faces and scanty beards emerged from the tavern, smiling, -staggering, and singing some incoherent song, and approached the -officers. - -"Fine fellows!" said Rostov laughing. "Is there any hay here?" - -"And how like one another," said Ilyin. - -"A mo-o-st me-r-r-y co-o-m-pa...!" sang one of the peasants with a -blissful smile. - -One of the men came out of the crowd and went up to Rostov. - -"Who do you belong to?" he asked. - -"The French," replied Ilyin jestingly, "and here is Napoleon -himself"--and he pointed to Lavrushka. - -"Then you are Russians?" the peasant asked again. - -"And is there a large force of you here?" said another, a short man, -coming up. - -"Very large," answered Rostov. "But why have you collected here?" he -added. "Is it a holiday?" - -"The old men have met to talk over the business of the commune," -replied the peasant, moving away. - -At that moment, on the road leading from the big house, two women -and a man in a white hat were seen coming toward the officers. - -"The one in pink is mine, so keep off!" said Ilyin on seeing -Dunyasha running resolutely toward him. - -"She'll be ours!" said Lavrushka to Ilyin, winking. - -"What do you want, my pretty?" said Ilyin with a smile. - -"The princess ordered me to ask your regiment and your name." - -"This is Count Rostov, squadron commander, and I am your humble -servant." - -"Co-o-om-pa-ny!" roared the tipsy peasant with a beatific smile as -he looked at Ilyin talking to the girl. Following Dunyasha, Alpatych -advanced to Rostov, having bared his head while still at a distance. - -"May I make bold to trouble your honor?" said he respectfully, but -with a shade of contempt for the youthfulness of this officer and with -a hand thrust into his bosom. "My mistress, daughter of General in -Chief Prince Nicholas Bolkonski who died on the fifteenth of this -month, finding herself in difficulties owing to the boorishness of -these people"--he pointed to the peasants--"asks you to come up to the -house.... Won't you, please, ride on a little farther," said -Alpatych with a melancholy smile, "as it is not convenient in the -presence of...?" He pointed to the two peasants who kept as close to -him as horseflies to a horse. - -"Ah!... Alpatych... Ah, Yakov Alpatych... Grand! Forgive us for -Christ's sake, eh?" said the peasants, smiling joyfully at him. - -Rostov looked at the tipsy peasants and smiled. - -"Or perhaps they amuse your honor?" remarked Alpatych with a staid -air, as he pointed at the old men with his free hand. - -"No, there's not much to be amused at here," said Rostov, and rode -on a little way. "What's the matter?" he asked. - -"I make bold to inform your honor that the rude peasants here -don't wish to let the mistress leave the estate, and threaten to -unharness her horses, so that though everything has been packed up -since morning, her excellency cannot get away." - -"Impossible!" exclaimed Rostov. - -"I have the honor to report to you the actual truth," said Alpatych. - -Rostov dismounted, gave his horse to the orderly, and followed -Alpatych to the house, questioning him as to the state of affairs. -It appeared that the princess' offer of corn to the peasants the -previous day, and her talk with Dron and at the meeting, had -actually had so bad an effect that Dron had finally given up the -keys and joined the peasants and had not appeared when Alpatych sent -for him; and that in the morning when the princess gave orders to -harness for her journey, the peasants had come in a large crowd to the -barn and sent word that they would not let her leave the village: that -there was an order not to move, and that they would unharness the -horses. Alpatych had gone out to admonish them, but was told (it was -chiefly Karp who did the talking, Dron not showing himself in the -crowd) that they could not let the princess go, that there was an -order to the contrary, but that if she stayed they would serve her -as before and obey her in everything. - -At the moment when Rostov and Ilyin were galloping along the road, -Princess Mary, despite the dissuasions of Alpatych, her nurse, and the -maids, had given orders to harness and intended to start, but when the -cavalrymen were espied they were taken for Frenchmen, the coachman ran -away, and the women in the house began to wail. - -"Father! Benefactor! God has sent you!" exclaimed deeply moved -voices as Rostov passed through the anteroom. - -Princess Mary was sitting helpless and bewildered in the large -sitting room, when Rostov was shown in. She could not grasp who he was -and why he had come, or what was happening to her. When she saw his -Russian face, and by his walk and the first words he uttered -recognized him as a man of her own class, she glanced at him with -her deep radiant look and began speaking in a voice that faltered -and trembled with emotion. This meeting immediately struck Rostov as a -romantic event. "A helpless girl overwhelmed with grief, left to the -mercy of coarse, rioting peasants! And what a strange fate sent me -here! What gentleness and nobility there are in her features and -expression!" thought he as he looked at her and listened to her -timid story. - -When she began to tell him that all this had happened the day -after her father's funeral, her voiced trembled. She turned away, -and then, as if fearing he might take her words as meant to move him -to pity, looked at him with an apprehensive glance of inquiry. There -were tears in Rostov's eyes. Princess Mary noticed this and glanced -gratefully at him with that radiant look which caused the plainness of -her face to be forgotten. - -"I cannot express, Princess, how glad I am that I happened to ride -here and am able to show my readiness to serve you," said Rostov, -rising. "Go when you please, and I give you my word of honor that no -one shall dare to cause you annoyance if only you will allow me to act -as your escort." And bowing respectfully, as if to a lady of royal -blood, he moved toward the door. - -Rostov's deferential tone seemed to indicate that though he would -consider himself happy to be acquainted with her, he did not wish to -take advantage of her misfortunes to intrude upon her. - -Princess Mary understood this and appreciated his delicacy. - -"I am very, very grateful to you," she said in French, "but I hope -it was all a misunderstanding and that no one is to blame for it." She -suddenly began to cry. - -"Excuse me!" she said. - -Rostov, knitting his brows, left the room with another low bow. - - - - - -CHAPTER XIV - - -"Well, is she pretty? Ah, friend--my pink one is delicious; her -name is Dunyasha...." - -But on glancing at Rostov's face Ilyin stopped short. He saw that -his hero and commander was following quite a different train of -thought. - -Rostov glanced angrily at Ilyin and without replying strode off with -rapid steps to the village. - -"I'll show them; I'll give it to them, the brigands!" said he to -himself. - -Alpatych at a gliding trot, only just managing not to run, kept up -with him with difficulty. - -"What decision have you been pleased to come to?" said he. - -Rostov stopped and, clenching his fists, suddenly and sternly turned -on Alpatych. - -"Decision? What decision? Old dotard!..." cried he. "What have you -been about? Eh? The peasants are rioting, and you can't manage them? -You're a traitor yourself! I know you. I'll flay you all alive!..." -And as if afraid of wasting his store of anger, he left Alpatych and -went rapidly forward. Alpatych, mastering his offended feelings, -kept pace with Rostov at a gliding gait and continued to impart his -views. He said the peasants were obdurate and that at the present -moment it would be imprudent to "overresist" them without an armed -force, and would it not be better first to send for the military? - -"I'll give them armed force... I'll 'overresist' them!" uttered -Rostov meaninglessly, breathless with irrational animal fury and the -need to vent it. - -Without considering what he would do he moved unconciously with -quick, resolute steps toward the crowd. And the nearer he drew to it -the more Alpatych felt that this unreasonable action might produce -good results. The peasants in the crowd were similarly impressed -when they saw Rostov's rapid, firm steps and resolute, frowning face. - -After the hussars had come to the village and Rostov had gone to see -the princess, a certain confusion and dissension had arisen among -the crowd. Some of the peasants said that these new arrivals were -Russians and might take it amiss that the mistress was being detained. -Dron was of this opinion, but as soon as he expressed it Karp and -others attacked their ex-Elder. - -"How many years have you been fattening on the commune?" Karp -shouted at him. "It's all one to you! You'll dig up your pot of -money and take it away with you.... What does it matter to you whether -our homes are ruined or not?" - -"We've been told to keep order, and that no one is to leave their -homes or take away a single grain, and that's all about it!" cried -another. - -"It was your son's turn to be conscripted, but no fear! You -begrudged your lump of a son," a little old man suddenly began -attacking Dron--"and so they took my Vanka to be shaved for a soldier! -But we all have to die." - -"To be sure, we all have to die. I'm not against the commune," -said Dron. - -"That's it--not against it! You've filled your belly...." - -The two tall peasants had their say. As soon as Rostov, followed -by Ilyin, Lavrushka, and Alpatych, came up to the crowd, Karp, -thrusting his fingers into his belt and smiling a little, walked to -the front. Dron on the contrary retired to the rear and the crowd drew -closer together. - -"Who is your Elder here? Hey?" shouted Rostov, coming up to the -crowd with quick steps. - -"The Elder? What do you want with him?..." asked Karp. - -But before the words were well out of his mouth, his cap flew off -and a fierce blow jerked his head to one side. - -"Caps off, traitors!" shouted Rostov in a wrathful voice. "Where's -the Elder?" he cried furiously. - -"The Elder.... He wants the Elder!... Dron Zakharych, you!" meek and -flustered voices here and there were heard calling and caps began to -come off their heads. - -"We don't riot, we're following the orders," declared Karp, and at -that moment several voices began speaking together. - -"It's as the old men have decided--there's too many of you giving -orders." - -"Arguing? Mutiny!... Brigands! Traitors!" cried Rostov unmeaningly -in a voice not his own, gripping Karp by the collar. "Bind him, bind -him!" he shouted, though there was no one to bind him but Lavrushka -and Alpatych. - -Lavrushka, however, ran up to Karp and seized him by the arms from -behind. - -"Shall I call up our men from beyond the hill?" he called out. - -Alpatych turned to the peasants and ordered two of them by name to -come and bind Karp. The men obediently came out of the crowd and began -taking off their belts. - -"Where's the Elder?" demanded Rostov in a loud voice. - -With a pale and frowning face Dron stepped out of the crowd. - -"Are you the Elder? Bind him, Lavrushka!" shouted Rostov, as if that -order, too, could not possibly meet with any opposition. - -And in fact two more peasants began binding Dron, who took off his -own belt and handed it to them, as if to aid them. - -"And you all listen to me!" said Rostov to the peasants. "Be off -to your houses at once, and don't let one of your voices be heard!" - -"Why, we've not done any harm! We did it just out of foolishness. -It's all nonsense... I said then that it was not in order," voices -were heard bickering with one another. - -"There! What did I say?" said Alpatych, coming into his own again. -"It's wrong, lads!" - - "All our stupidity, Yakov Alpatych," came the answers, and the -crowd began at once to disperse through the village. - -The two bound men were led off to the master's house. The two -drunken peasants followed them. - -"Aye, when I look at you!..." said one of them to Karp. - -"How can one talk to the masters like that? What were you thinking -of, you fool?" added the other--"A real fool!" - -Two hours later the carts were standing in the courtyard of the -Bogucharovo house. The peasants were briskly carrying out the -proprietor's goods and packing them on the carts, and Dron, -liberated at Princess Mary's wish from the cupboard where he had -been confined, was standing in the yard directing the men. - -"Don't put it in so carelessly," said one of the peasants, a man -with a round smiling face, taking a casket from a housemaid. "You know -it has cost money! How can you chuck it in like that or shove it under -the cord where it'll get rubbed? I don't like that way of doing -things. Let it all be done properly, according to rule. Look here, put -it under the bast matting and cover it with hay--that's the way!" - -"Eh, books, books!" said another peasant, bringing out Prince -Andrew's library cupboards. "Don't catch up against it! It's heavy, -lads--solid books." - -"Yes, they worked all day and didn't play!" remarked the tall, -round-faced peasant gravely, pointing with a significant wink at the -dictionaries that were on the top. - - -Unwilling to obtrude himself on the princess, Rostov did not go back -to the house but remained in the village awaiting her departure. -When her carriage drove out of the house, he mounted and accompanied -her eight miles from Bogucharovo to where the road was occupied by our -troops. At the inn at Yankovo he respectfully took leave of her, for -the first time permitting himself to kiss her hand. - -"How can you speak so!" he blushingly replied to Princess Mary's -expressions of gratitude for her deliverance, as she termed what had -occurred. "Any police officer would have done as much! If we had had -only peasants to fight, we should not have let the enemy come so far," -said he with a sense of shame and wishing to change the subject. "I am -only happy to have had the opportunity of making your acquaintance. -Good-by, Princess. I wish you happiness and consolation and hope to -meet you again in happier circumstances. If you don't want to make -me blush, please don't thank me!" - -But the princess, if she did not again thank him in words, thanked -him with the whole expression of her face, radiant with gratitude -and tenderness. She could not believe that there was nothing to -thank him for. On the contrary, it seemed to her certain that had he -not been there she would have perished at the hands of the mutineers -and of the French, and that he had exposed himself to terrible and -obvious danger to save her, and even more certain was it that he was a -man of lofty and noble soul, able to understand her position and her -sorrow. His kind, honest eyes, with the tears rising in them when -she herself had begun to cry as she spoke of her loss, did leave her -memory. - -When she had taken leave of him and remained alone she suddenly felt -her eyes filling with tears, and then not for the first time the -strange question presented itself to her: did she love him? - -On the rest of the way to Moscow, though the princess' position -was not a cheerful one, Dunyasha, who went with her in the carriage, -more than once noticed that her mistress leaned out of the window -and smiled at something with an expression of mingled joy and sorrow. - -"Well, supposing I do love him?" thought Princess Mary. - -Ashamed as she was of acknowledging to herself that she had fallen -in love with a man who would perhaps never love her, she comforted -herself with the thought that no one would ever know it and that she -would not be to blame if, without ever speaking of it to anyone, she -continued to the end of her life to love the man with whom she had -fallen in love for the first and last time in her life. - -Sometimes when she recalled his looks, his sympathy, and his -words, happiness did not appear impossible to her. It was at those -moments that Dunyasha noticed her smiling as she looked out of the -carriage window. - -"Was it not fate that brought him to Bogucharovo, and at that very -moment?" thought Princess Mary. "And that caused his sister to -refuse my brother?" And in all this Princess Mary saw the hand of -Providence. - -The impression the princess made on Rostov was a very agreeable one. -To remember her gave him pleasure, and when his comrades, hearing of -his adventure at Bogucharovo, rallied him on having gone to look for -hay and having picked up one of the wealthiest heiresses in Russia, he -grew angry. It made him angry just because the idea of marrying the -gentle Princess Mary, who was attractive to him and had an enormous -fortune, had against his will more than once entered his head. For -himself personally Nicholas could not wish for a better wife: by -marrying her he would make the countess his mother happy, would be -able to put his father's affairs in order, and would even--he felt it- -ensure Princess Mary's happiness. - -But Sonya? And his plighted word? That was why Rostov grew angry -when he was rallied about Princess Bolkonskaya. - - - - - -CHAPTER XV - - -On receiving command of the armies Kutuzov remembered Prince -Andrew and sent an order for him to report at headquarters. - -Prince Andrew arrived at Tsarevo-Zaymishche on the very day and at -the very hour that Kutuzov was reviewing the troops for the first -time. He stopped in the village at the priest's house in front of -which stood the commander in chief's carriage, and he sat down on -the bench at the gate awaiting his Serene Highness, as everyone now -called Kutuzov. From the field beyond the village came now sounds of -regimental music and now the roar of many voices shouting "Hurrah!" to -the new commander in chief. Two orderlies, a courier and a major-domo, -stood near by, some ten paces from Prince Andrew, availing -themselves of Kutuzov's absence and of the fine weather. A short, -swarthy lieutenant colonel of hussars with thick mustaches and -whiskers rode up to the gate and, glancing at Prince Andrew, -inquired whether his Serene Highness was putting up there and -whether he would soon be back. - -Prince Andrew replied that he was not on his Serene Highness' -staff but was himself a new arrival. The lieutenant colonel turned -to a smart orderly, who, with the peculiar contempt with which a -commander in chief's orderly speaks to officers, replied: - -"What? His Serene Highness? I expect he'll be here soon. What do you -want?" - -The lieutenant colonel of hussars smiled beneath his mustache at the -orderly's tone, dismounted, gave his horse to a dispatch runner, and -approached Bolkonski with a slight bow. Bolkonski made room for him on -the bench and the lieutenant colonel sat down beside him. - -"You're also waiting for the commander in chief?" said he. "They say -he weceives evewyone, thank God!... It's awful with those sausage -eaters! Ermolov had weason to ask to be pwomoted to be a German! Now -p'waps Wussians will get a look in. As it was, devil only knows what -was happening. We kept wetweating and wetweating. Did you take part in -the campaign?" he asked. - -"I had the pleasure," replied Prince Andrew, "not only of taking -part in the retreat but of losing in that retreat all I held dear--not -to mention the estate and home of my birth--my father, who died of -grief. I belong to the province of Smolensk." - -"Ah? You're Pwince Bolkonski? Vewy glad to make your acquaintance! -I'm Lieutenant Colonel Denisov, better known as 'Vaska,'" said -Denisov, pressing Prince Andrew's hand and looking into his face -with a particularly kindly attention. "Yes, I heard," said he -sympathetically, and after a short pause added: "Yes, it's Scythian -warfare. It's all vewy well--only not for those who get it in the -neck. So you are Pwince Andwew Bolkonski?" He swayed his head. "Vewy -pleased, Pwince, to make your acquaintance!" he repeated again, -smiling sadly, and he again pressed Prince Andrew's hand. - -Prince Andrew knew Denisov from what Natasha had told him of her -first suitor. This memory carried him sadly and sweetly back to -those painful feelings of which he had not thought lately, but which -still found place in his soul. Of late he had received so many new and -very serious impressions--such as the retreat from Smolensk, his visit -to Bald Hills, and the recent news of his father's death--and had -experienced so many emotions, that for a long time past those memories -had not entered his mind, and now that they did, they did not act on -him with nearly their former strength. For Denisov, too, the -memories awakened by the name of Bolkonski belonged to a distant, -romantic past, when after supper and after Natasha's singing he had -proposed to a little girl of fifteen without realizing what he was -doing. He smiled at the recollection of that time and of his love -for Natasha, and passed at once to what now interested him -passionately and exclusively. This was a plan of campaign he had -devised while serving at the outposts during the retreat. He had -proposed that plan to Barclay de Tolly and now wished to propose it to -Kutuzov. The plan was based on the fact that the French line of -operation was too extended, and it proposed that instead of, or -concurrently with, action on the front to bar the advance of the -French, we should attack their line of communication. He began -explaining his plan to Prince Andrew. - -"They can't hold all that line. It's impossible. I will undertake to -bweak thwough. Give me five hundwed men and I will bweak the line, -that's certain! There's only one way--guewilla warfare!" - -Denisov rose and began gesticulating as he explained his plan to -Bolkonski. In the midst of his explanation shouts were heard from -the army, growing more incoherent and more diffused, mingling with -music and songs and coming from the field where the review was held. -Sounds of hoofs and shouts were nearing the village. - -"He's coming! He's coming!" shouted a Cossack standing at the gate. - -Bolkonski and Denisov moved to the gate, at which a knot of soldiers -(a guard of honor) was standing, and they saw Kutuzov coming down -the street mounted on a rather small sorrel horse. A huge suite of -generals rode behind him. Barclay was riding almost beside him, and -a crowd of officers ran after and around them shouting, "Hurrah!" - -His adjutants galloped into the yard before him. Kutuzov was -impatiently urging on his horse, which ambled smoothly under his -weight, and he raised his hand to his white Horse Guard's cap with a -red band and no peak, nodding his head continually. When he came up to -the guard of honor, a fine set of Grenadiers mostly wearing -decorations, who were giving him the salute, he looked at them -silently and attentively for nearly a minute with the steady gaze of a -commander and then turned to the crowd of generals and officers -surrounding him. Suddenly his face assumed a subtle expression, he -shrugged his shoulders with an air of perplexity. - -"And with such fine fellows to retreat and retreat! Well, good-by, -General," he added, and rode into the yard past Prince Andrew and -Denisov. - -"Hurrah! hurrah! hurrah!" shouted those behind him. - -Since Prince Andrew had last seen him Kutuzov had grown still more -corpulent, flaccid, and fat. But the bleached eyeball, the scar, and -the familiar weariness of his expression were still the same. He was -wearing the white Horse Guard's cap and a military overcoat with a -whip hanging over his shoulder by a thin strap. He sat heavily and -swayed limply on his brisk little horse. - -"Whew... whew... whew!" he whistled just audibly as he rode into the -yard. His face expressed the relief of relaxed strain felt by a man -who means to rest after a ceremony. He drew his left foot out of the -stirrup and, lurching with his whole body and puckering his face -with the effort, raised it with difficulty onto the saddle, leaned -on his knee, groaned, and slipped down into the arms of the Cossacks -and adjutants who stood ready to assist him. - -He pulled himself together, looked round, screwing up his eyes, -glanced at Prince Andrew, and, evidently not recognizing him, moved -with his waddling gait to the porch. "Whew... whew... whew!" he -whistled, and again glanced at Prince Andrew. As often occurs with old -men, it was only after some seconds that the impression produced by -Prince Andrew's face linked itself up with Kutuzov's remembrance of -his personality. - -"Ah, how do you do, my dear prince? How do you do, my dear boy? Come -along..." said he, glancing wearily round, and he stepped onto the -porch which creaked under his weight. - -He unbuttoned his coat and sat down on a bench in the porch. - -"And how's your father?" - -"I received news of his death, yesterday," replied Prince Andrew -abruptly. - -Kutuzov looked at him with eyes wide open with dismay and then -took off his cap and crossed himself: - -"May the kingdom of Heaven be his! God's will be done to us all!" He -sighed deeply, his whole chest heaving, and was silent for a while. "I -loved him and respected him, and sympathize with you with all my -heart." - -He embraced Prince Andrew, pressing him to his fat breast, and for -some time did not let him go. When he released him Prince Andrew saw -that Kutuzov's flabby lips were trembling and that tears were in his -eyes. He sighed and pressed on the bench with both hands to raise -himself. - -"Come! Come with me, we'll have a talk," said he. - -But at that moment Denisov, no more intimidated by his superiors -than by the enemy, came with jingling spurs up the steps of the porch, -despite the angry whispers of the adjutants who tried to stop him. -Kutuzov, his hands still pressed on the seat, glanced at him glumly. -Denisov, having given his name, announced that he had to communicate -to his Serene Highness a matter of great importance for their -country's welfare. Kutuzov looked wearily at him and, lifting his -hands with a gesture of annoyance, folded them across his stomach, -repeating the words: "For our country's welfare? Well, what is it? -Speak!" Denisov blushed like a girl (it was strange to see the color -rise in that shaggy, bibulous, time-worn face) and boldly began to -expound his plan of cutting the enemy's lines of communication between -Smolensk and Vyazma. Denisov came from those parts and knew the -country well. His plan seemed decidedly a good one, especially from -the strength of conviction with which he spoke. Kutuzov looked down at -his own legs, occasionally glancing at the door of the adjoining hut -as if expecting something unpleasant to emerge from it. And from -that hut, while Denisov was speaking, a general with a portfolio under -his arm really did appear. - -"What?" said Kutuzov, in the midst of Denisov's explanations, "are -you ready so soon?" - -"Ready, your Serene Highness," replied the general. - -Kutuzov swayed his head, as much as to say: "How is one man to -deal with it all?" and again listened to Denisov. - -"I give my word of honor as a Wussian officer," said Denisov, -"that I can bweak Napoleon's line of communication!" - -"What relation are you to Intendant General Kiril Andreevich -Denisov?" asked Kutuzov, interrupting him. - -"He is my uncle, your Sewene Highness." - -"Ah, we were friends," said Kutuzov cheerfully. "All right, all -right, friend, stay here at the staff and tomorrow we'll have a talk." - -With a nod to Denisov he turned away and put out his hand for the -papers Konovnitsyn had brought him. - -"Would not your Serene Highness like to come inside?" said the -general on duty in a discontented voice, "the plans must be examined -and several papers have to be signed." - -An adjutant came out and announced that everything was in -readiness within. But Kutuzov evidently did not wish to enter that -room till he was disengaged. He made a grimace... - -"No, tell them to bring a small table out here, my dear boy. I'll -look at them here," said he. "Don't go away," he added, turning to -Prince Andrew, who remained in the porch and listened to the general's -report. - -While this was being given, Prince Andrew heard the whisper of a -woman's voice and the rustle of a silk dress behind the door. -Several times on glancing that way he noticed behind that door a -plump, rosy, handsome woman in a pink dress with a lilac silk kerchief -on her head, holding a dish and evidently awaiting the entrance of the -commander in chief. Kutuzov's adjutant whispered to Prince Andrew -that this was the wife of the priest whose home it was, and that she -intended to offer his Serene Highness bread and salt. "Her husband has -welcomed his Serene Highness with the cross at the church, and she -intends to welcome him in the house.... She's very pretty," added -the adjutant with a smile. At those words Kutuzov looked round. He was -listening to the general's report--which consisted chiefly of a -criticism of the position at Tsarevo-Zaymishche--as he had listened to -Denisov, and seven years previously had listened to the discussion -at the Austerlitz council of war. He evidently listened only because -he had ears which, though there was a piece of tow in one of them, -could not help hearing; but it was evident that nothing the general -could say would surprise or even interest him, that he knew all that -would be said beforehand, and heard it all only because he had to, -as one has to listen to the chanting of a service of prayer. All -that Denisov had said was clever and to the point. What the general -was saying was even more clever and to the point, but it was evident -that Kutuzov despised knowledge and cleverness, and knew of -something else that would decide the matter--something independent -of cleverness and knowledge. Prince Andrew watched the commander -in chief's face attentively, and the only expression he could see -there was one of boredom, curiosity as to the meaning of the -feminine whispering behind the door, and a desire to observe -propriety. It was evident that Kutuzov despised cleverness and -learning and even the patriotic feeling shown by Denisov, but despised -them not because of his own intellect, feelings, or knowledge--he -did not try to display any of these--but because of something else. He -despised them because of his old age and experience of life. The -only instruction Kutuzov gave of his own accord during that report -referred to looting by the Russian troops. At the end of the report -the general put before him for signature a paper relating to the -recovery of payment from army commanders for green oats mown down by -the soldiers, when landowners lodged petitions for compensation. - -After hearing the matter, Kutuzov smacked his lips together and -shook his head. - -"Into the stove... into the fire with it! I tell you once for all, -my dear fellow," said he, "into the fire with all such things! Let -them cut the crops and burn wood to their hearts' content. I don't -order it or allow it, but I don't exact compensation either. One can't -get on without it. 'When wood is chopped the chips will fly.'" He -looked at the paper again. "Oh, this German precision!" he muttered, -shaking his head. - - - - - -CHAPTER XVI - - -"Well, that's all!" said Kutuzov as he signed the last of the -documents, and rising heavily and smoothing out the folds in his fat -white neck he moved toward the door with a more cheerful expression. - -The priest's wife, flushing rosy red, caught up the dish she had -after all not managed to present at the right moment, though she had -so long been preparing for it, and with a low bow offered it to -Kutuzov. - -He screwed up his eyes, smiled, lifted her chin with his hand, and -said: - -"Ah, what a beauty! Thank you, sweetheart!" - -He took some gold pieces from his trouser pocket and put them on the -dish for her. "Well, my dear, and how are we getting on?" he asked, -moving to the door of the room assigned to him. The priest's wife -smiled, and with dimples in her rosy cheeks followed him into the -room. The adjutant came out to the porch and asked Prince Andrew to -lunch with him. Half an hour later Prince Andrew was again called to -Kutuzov. He found him reclining in an armchair, still in the same -unbuttoned overcoat. He had in his hand a French book which he -closed as Prince Andrew entered, marking the place with a knife. -Prince Andrew saw by the cover that it was Les Chevaliers du Cygne -by Madame de Genlis. - -"Well, sit down, sit down here. Let's have a talk," said Kutuzov. -"It's sad, very sad. But remember, my dear fellow, that I am a -father to you, a second father...." - -Prince Andrew told Kutuzov all he knew of his father's death, and -what he had seen at Bald Hills when he passed through it. - -"What... what they have brought us to!" Kutuzov suddenly cried in an -agitated voice, evidently picturing vividly to himself from Prince -Andrew's story the condition Russia was in. "But give me time, give me -time!" he said with a grim look, evidently not wishing to continue -this agitating conversation, and added: "I sent for you to keep you -with me." - -"I thank your Serene Highness, but I fear I am no longer fit for the -staff," replied Prince Andrew with a smile which Kutuzov noticed. - -Kutuzov glanced inquiringly at him. - -"But above all," added Prince Andrew, "I have grown used to my -regiment, am fond of the officers, and I fancy the men also like me. I -should be sorry to leave the regiment. If I decline the honor of being -with you, believe me..." - -A shrewd, kindly, yet subtly derisive expression lit up Kutuzov's -podgy face. He cut Bolkonski short. - -"I am sorry, for I need you. But you're right, you're right! It's -not here that men are needed. Advisers are always plentiful, but men -are not. The regiments would not be what they are if the would-be -advisers served there as you do. I remember you at Austerlitz.... I -remember, yes, I remember you with the standard!" said Kutuzov, and -a flush of pleasure suffused Prince Andrew's face at this -recollection. - -Taking his hand and drawing him downwards, Kutuzov offered his cheek -to be kissed, and again Prince Andrew noticed tears in the old man's -eyes. Though Prince Andrew knew that Kutuzov's tears came easily, -and that he was particularly tender to and considerate of him from a -wish to show sympathy with his loss, yet this reminder of Austerlitz -was both pleasant and flattering to him. - -"Go your way and God be with you. I know your path is the path of -honor!" He paused. "I missed you at Bucharest, but I needed someone to -send." And changing the subject, Kutuzov began to speak of the Turkish -war and the peace that had been concluded. "Yes, I have been much -blamed," he said, "both for that war and the peace... but everything -came at the right time. Tout vient a point a celui qui sait attendre.* -And there were as many advisers there as here..." he went on, -returning to the subject of "advisers" which evidently occupied him. -"Ah, those advisers!" said he. "If we had listened to them all we -should not have made peace with Turkey and should not have been -through with that war. Everything in haste, but more haste, less -speed. Kamenski would have been lost if he had not died. He stormed -fortresses with thirty thousand men. It is not difficult to capture -a fortress but it is difficult to win a campaign. For that, storming -and attacking but patience and time are wanted. Kamenski sent soldiers -to Rustchuk, but I only employed these two things and took more -fortresses than Kamenski and made them but eat horseflesh!" He swayed -his head. "And the French shall too, believe me," he went on, -growing warmer and beating his chest, "I'll make them eat horseflesh!" -And tears again dimmed his eyes. - - -*"Everything comes in time to him who knows how to wait." - - -"But shan't we have to accept battle?" remarked Prince Andrew. - -"We shall if everybody wants it; it can't be helped.... But -believe me, my dear boy, there is nothing stronger than those two: -patience and time, they will do it all. But the advisers n'entendent -pas de cette oreille, voila le mal.* Some want a thing--others -don't. What's one to do?" he asked, evidently expecting an answer. -"Well, what do you want us to do?" he repeated and his eye shone -with a deep, shrewd look. "I'll tell you what to do," he continued, as -Prince Andrew still did not reply: "I will tell you what to do, and -what I do. Dans le doute, mon cher," he paused, "abstiens-toi"*[2]--he -articulated the French proverb deliberately. - - -*"Don't see it that way, that's the trouble." - -*[2] "When in doubt, my dear fellow, do nothing." - - -"Well, good-by, my dear fellow; remember that with all my heart I -share your sorrow, and that for you I am not a Serene Highness, nor -a prince, nor a commander in chief, but a father! If you want anything -come straight to me. Good-by, my dear boy." - -Again he embraced and kissed Prince Andrew, but before the latter -had left the room Kutuzov gave a sigh of relief and went on with his -unfinished novel, Les Chevaliers du Cygne by Madame de Genlis. - -Prince Andrew could not have explained how or why it was, but -after that interview with Kutuzov he went back to his regiment -reassured as to the general course of affairs and as to the man to -whom it had been entrusted. The more he realized the absence of all -personal motive in that old man--in whom there seemed to remain only -the habit of passions, and in place of an intellect (grouping events -and drawing conclusions) only the capacity calmly to contemplate the -course of events--the more reassured he was that everything would be -as it should. "He will not bring in any plan of his own. He will not -devise or undertake anything," thought Prince Andrew, "but he will -hear everything, remember everything, and put everything in its place. -He will not hinder anything useful nor allow anything harmful. He -understands that there is something stronger and more important than -his own will--the inevitable course of events, and he can see them and -grasp their significance, and seeing that significance can refrain -from meddling and renounce his personal wish directed to something -else. And above all," thought Prince Andrew, "one believes in him -because he's Russian, despite the novel by Genlis and the French -proverbs, and because his voice shook when he said: 'What they have -brought us to!' and had a sob in it when he said he would 'make them -eat horseflesh!'" - -On such feelings, more or less dimly shared by all, the unanimity -and general approval were founded with which, despite court -influences, the popular choice of Kutuzov as commander in chief was -received. - - - - - -CHAPTER XVII - - -After the Emperor had left Moscow, life flowed on there in its usual -course, and its course was so very usual that it was difficult to -remember the recent days of patriotic elation and ardor, hard to -believe that Russia was really in danger and that the members of the -English Club were also sons of the Fatherland ready to sacrifice -everything for it. The one thing that recalled the patriotic fervor -everyone had displayed during the Emperor's stay was the call for -contributions of men and money, a necessity that as soon as the -promises had been made assumed a legal, official form and became -unavoidable. - -With the enemy's approach to Moscow, the Moscovites' view of their -situation did not grow more serious but on the contrary became even -more frivolous, as always happens with people who see a great danger -approaching. At the approach of danger there are always two voices -that speak with equal power in the human soul: one very reasonably -tells a man to consider the nature of the danger and the means of -escaping it; the other, still more reasonably, says that it is too -depressing and painful to think of the danger, since it is not in -man's power to foresee everything and avert the general course of -events, and it is therefore better to disregard what is painful till -it comes, and to think about what is pleasant. In solitude a man -generally listens to the first voice, but in society to the second. So -it was now with the inhabitants of Moscow. It was long since people -had been as gay in Moscow as that year. - -Rostopchin's broadsheets, headed by woodcuts of a drink shop, a -potman, and a Moscow burgher called Karpushka Chigirin, "who--having -been a militiaman and having had rather too much at the pub--heard -that Napoleon wished to come to Moscow, grew angry, abused the -French in very bad language, came out of the drink shop, and, under -the sign of the eagle, began to address the assembled people," were -read and discussed, together with the latest of Vasili Lvovich -Pushkin's bouts rimes. - -In the corner room at the Club, members gathered to read these -broadsheets, and some liked the way Karpushka jeered at the French, -saying: "They will swell up with Russian cabbage, burst with our -buckwheat porridge, and choke themselves with cabbage soup. They are -all dwarfs and one peasant woman will toss three of them with a -hayfork." Others did not like that tone and said it was stupid and -vulgar. It was said that Rostopchin had expelled all Frenchmen and -even all foreigners from Moscow, and that there had been some spies -and agents of Napoleon among them; but this was told chiefly to -introduce Rostopchin's witty remark on that occasion. The foreigners -were deported to Nizhni by boat, and Rostopchin had said to them in -French: "Rentrez en vousmemes; entrez dans la barque, et n'en faites -pas une barque de Charon."* There was talk of all the government -offices having been already removed from Moscow, and to this -Shinshin's witticism was added--that for that alone Moscow ought to be -grateful to Napoleon. It was said that Mamonov's regiment would cost -him eight hundred thousand rubles, and that Bezukhov had spent even -more on his, but that the best thing about Bezukhov's action was -that he himself was going to don a uniform and ride at the head of his -regiment without charging anything for the show. - - -*"Think it over; get into the barque, and take care not to make it a -barque of Charon." - - -"You don't spare anyone," said Julie Drubetskaya as she collected -and pressed together a bunch of raveled lint with her thin, beringed -fingers. - -Julie was preparing to leave Moscow next day and was giving a -farewell soiree. - -"Bezukhov est ridicule, but he is so kind and good-natured. What -pleasure is there to be so caustique?" - -"A forfeit!" cried a young man in militia uniform whom Julie -called "mon chevalier," and who was going with her to Nizhni. - -In Julie's set, as in many other circles in Moscow, it had been -agreed that they would speak nothing but Russian and that those who -made a slip and spoke French should pay fines to the Committee of -Voluntary Contributions. - -"Another forfeit for a Gallicism," said a Russian writer who was -present. "'What pleasure is there to be' is not Russian!" - -"You spare no one," continued Julie to the young man without heeding -the author's remark. - -"For caustique--I am guilty and will pay, and I am prepared to pay -again for the pleasure of telling you the truth. For Gallicisms I -won't be responsible," she remarked, turning to the author: "I have -neither the money nor the time, like Prince Galitsyn, to engage a -master to teach me Russian!" - -"Ah, here he is!" she added. "Quand on... No, no," she said to the -militia officer, "you won't catch me. Speak of the sun and you see its -rays!" and she smiled amiably at Pierre. "We were just talking of -you," she said with the facility in lying natural to a society -woman. "We were saying that your regiment would be sure to be better -than Mamonov's." - -"Oh, don't talk to me of my regiment," replied Pierre, kissing his -hostess' hand and taking a seat beside her. "I am so sick of it." - -"You will, of course, command it yourself?" said Julie, directing -a sly, sarcastic glance toward the militia officer. - -The latter in Pierre's presence had ceased to be caustic, and his -face expressed perplexity as to what Julie's smile might mean. In -spite of his absent-mindedness and good nature, Pierre's personality -immediately checked any attempt to ridicule him to his face. - -"No," said Pierre, with a laughing glance at his big, stout body. "I -should make too good a target for the French, besides I am afraid I -should hardly be able to climb onto a horse." - -Among those whom Julie's guests happened to choose to gossip about -were the Rostovs. - -"I hear that their affairs are in a very bad way," said Julie. -"And he is so unreasonable, the count himself I mean. The -Razumovskis wanted to buy his house and his estate near Moscow, but it -drags on and on. He asks too much." - -"No, I think the sale will come off in a few days," said someone. -"Though it is madness to buy anything in Moscow now." - -"Why?" asked Julie. "You don't think Moscow is in danger?" - -"Then why are you leaving?" - -"I? What a question! I am going because... well, because everyone is -going: and besides--I am not Joan of Arc or an Amazon." - -"Well, of course, of course! Let me have some more strips of linen." - -"If he manages the business properly he will be able to pay off -all his debts," said the militia officer, speaking of Rostov. - -"A kindly old man but not up to much. And why do they stay on so -long in Moscow? They meant to leave for the country long ago. -Natalie is quite well again now, isn't she?" Julie asked Pierre with a -knowing smile. - -"They are waiting for their younger son," Pierre replied. "He joined -Obolenski's Cossacks and went to Belaya Tserkov where the regiment -is being formed. But now they have had him transferred to my -regiment and are expecting him every day. The count wanted to leave -long ago, but the countess won't on any account leave Moscow till -her son returns." - -"I met them the day before yesterday at the Arkharovs'. Natalie -has recovered her looks and is brighter. She sang a song. How easily -some people get over everything!" - -"Get over what?" inquired Pierre, looking displeased. - -Julie smiled. - -"You know, Count, such knights as you are only found in Madame de -Souza's novels." - -"What knights? What do you mean?" demanded Pierre, blushing. - -"Oh, come, my dear count! C'est la fable de tout Moscou. Je vous -admire, ma parole d'honneur!"* - - -*"It is the talk of all Moscow. My word, I admire you!" - - -"Forfeit, forfeit!" cried the militia officer. - -"All right, one can't talk--how tiresome!" - -"What is 'the talk of all Moscow'?" Pierre asked angrily, rising -to his feet. - -"Come now, Count, you know!" - -"I don't know anything about it," said Pierre. - -"I know you were friendly with Natalie, and so... but I was always -more friendly with Vera--that dear Vera." - -"No, madame!" Pierre continued in a tone of displeasure, "I have not -taken on myself the role of Natalie Rostova's knight at all, and -have not been their house for nearly a month. But I cannot -understand the cruelty..." - -"Qui s'excuse s'accuse,"* said Julie, smiling and waving the lint -triumphantly, and to have the last word she promptly changed the -subject. "Do you know what I heard today? Poor Mary Bolkonskaya -arrived in Moscow yesterday. Do you know that she has lost her -father?" - - -*"Who excuses himself, accuses himself." - - -"Really? Where is she? I should like very much to see her," said -Pierre. - -"I spent the evening with her yesterday. She is going to their -estate near Moscow either today or tomorrow morning, with her nephew." - -"Well, and how is she?" asked Pierre. - -"She is well, but sad. But do you know who rescued her? It is -quite a romance. Nicholas Rostov! She was surrounded, and they -wanted to kill her and had wounded some of her people. He rushed in -and saved her...." - -"Another romance," said the militia officer. "Really, this general -flight has been arranged to get all the old maids married off. Catiche -is one and Princess Bolkonskaya another." - -"Do you know, I really believe she is un petit peu amoureuse du -jeune homme."* - - -*"A little bit in love with the young man." - - -"Forfeit, forfeit, forfeit!" - -"But how could one say that in Russian?" - - - - - -CHAPTER XVIII - - -When Pierre returned home he was handed two of Rostopchin's -broadsheets that had been brought that day. - -The first declared that the report that Count Rostopchin had -forbidden people to leave Moscow was false; on the contrary he was -glad that ladies and tradesmen's wives were leaving the city. "There -will be less panic and less gossip," ran the broadsheet "but I will -stake my life on it that that will not enter Moscow." These words -showed Pierre clearly for the first time that the French would enter -Moscow. The second broadsheet stated that our headquarters were at -Vyazma, that Count Wittgenstein had defeated the French, but that as -many of the inhabitants of Moscow wished to be armed, weapons were -ready for them at the arsenal: sabers, pistols, and muskets which -could be had at a low price. The tone of the proclamation was not as -jocose as in the former Chigirin talks. Pierre pondered over these -broadsheets. Evidently the terrible stormcloud he had desired with the -whole strength of his soul but which yet aroused involuntary horror in -him was drawing near. - -"Shall I join the army and enter the service, or wait?" he asked -himself for the hundredth time. He took a pack of cards that lay on -the table and began to lay them out for a game of patience. - -"If this patience comes out," he said to himself after shuffling the -cards, holding them in his hand, and lifting his head, "if it comes -out, it means... what does it mean?" - -He had not decided what it should mean when he heard the voice of -the eldest princess at the door asking whether she might come in. - -"Then it will mean that I must go to the army," said Pierre to -himself. "Come in, come in!" he added to the princess. - -Only the eldest princess, the one with the stony face and long -waist, was still living in Pierre's house. The two younger ones had -both married. - -"Excuse my coming to you, cousin," she said in a reproachful and -agitated voice. "You know some decision must be come to. What is going -to happen? Everyone has left Moscow and the people are rioting. How is -it that we are staying on?" - -"On the contrary, things seem satisfactory, ma cousine," said Pierre -in the bantering tone he habitually adopted toward her, always feeling -uncomfortable in the role of her benefactor. - -"Satisfactory, indeed! Very satisfactory! Barbara Ivanovna told me -today how our troops are distinguishing themselves. It certainly -does them credit! And the people too are quite mutinous--they no -longer obey, even my maid has taken to being rude. At this rate they -will soon begin beating us. One can't walk in the streets. But, -above all, the French will be here any day now, so what are we waiting -for? I ask just one thing of you, cousin," she went on, "arrange for -me to be taken to Petersburg. Whatever I may be, I can't live under -Bonaparte's rule." - -"Oh, come, ma cousine! Where do you get your information from? On -the contrary..." - -"I won't submit to your Napoleon! Others may if they please.... If -you don't want to do this..." - -"But I will, I'll give the order at once." - -The princess was apparently vexed at not having anyone to be angry -with. Muttering to herself, she sat down on a chair. - -"But you have been misinformed," said Pierre. "Everything is quiet -in the city and there is not the slightest danger. See! I've just been -reading..." He showed her the broadsheet. "Count Rostopchin writes -that he will stake his life on it that the enemy will not enter -Moscow." - -"Oh, that count of yours!" said the princess malevolently. "He is -a hypocrite, a rascal who has himself roused the people to riot. -Didn't he write in those idiotic broadsheets that anyone, 'whoever -it might be, should be dragged to the lockup by his hair'? (How -silly!) 'And honor and glory to whoever captures him,' he says. This -is what his cajolery has brought us to! Barbara Ivanovna told me the -mob near killed her because she said something in French." - -"Oh, but it's so... You take everything so to heart," said Pierre, -and began laying out his cards for patience. - -Although that patience did come out, Pierre did not join the army, -but remained in deserted Moscow ever in the same state of agitation, -irresolution, and alarm, yet at the same time joyfully expecting -something terrible. - -Next day toward evening the princess set off, and Pierre's head -steward came to inform him that the money needed for the equipment -of his regiment could not be found without selling one of the estates. -In general the head steward made out to Pierre that his project of -raising a regiment would ruin him. Pierre listened to him, scarcely -able to repress a smile. - -"Well then, sell it," said he. "What's to be done? I can't draw back -now!" - -The worse everything became, especially his own affairs, the -better was Pierre pleased and the more evident was it that the -catastrophe he expected was approaching. Hardly anyone he knew was -left in town. Julie had gone, and so had Princess Mary. Of his -intimate friends only the Rostovs remained, but he did not go to see -them. - -To distract his thoughts he drove that day to the village of -Vorontsovo to see the great balloon Leppich was constructing to -destroy the foe, and a trial balloon that was to go up next day. The -balloon was not yet ready, but Pierre learned that it was being -constructed by the Emperor's desire. The Emperor had written to -Count Rostopchin as follows: - - -As soon as Leppich is ready, get together a crew of reliable and -intelligent men for his car and send a courier to General Kutuzov to -let him know. I have informed him of the matter. - -Please impress upon Leppich to be very careful where he descends for -the first time, that he may not make a mistake and fall into the -enemy's hands. It is essential for him to combine his movements with -those of the commander in chief. - - -On his way home from Vorontsovo, as he was passing the Bolotnoe -Place Pierre, seeing a large crowd round the Lobnoe Place, stopped and -got out of his trap. A French cook accused of being a spy was being -flogged. The flogging was only just over, and the executioner was -releasing from the flogging bench a stout man with red whiskers, in -blue stockings and a green jacket, who was moaning piteously. -Another criminal, thin and pale, stood near. Judging by their faces -they were both Frenchmen. With a frightened and suffering look -resembling that on the thin Frenchman's face, Pierre pushed his way in -through the crowd. - -"What is it? Who is it? What is it for?" he kept asking. - -But the attention of the crowd--officials, burghers, shopkeepers, -peasants, and women in cloaks and in pelisses--was so eagerly centered -on what was passing in Lobnoe Place that no one answered him. The -stout man rose, frowned, shrugged his shoulders, and evidently -trying to appear firm began to pull on his jacket without looking -about him, but suddenly his lips trembled and he began to cry, in -the way full-blooded grown-up men cry, though angry with himself for -doing so. In the crowd people began talking loudly, to stifle their -feelings of pity as it seemed to Pierre. - -"He's cook to some prince." - -"Eh, mounseer, Russian sauce seems to be sour to a Frenchman... sets -his teeth on edge!" said a wrinkled clerk who was standing behind -Pierre, when the Frenchman began to cry. - -The clerk glanced round, evidently hoping that his joke would be -appreciated. Some people began to laugh, others continued to watch -in dismay the executioner who was undressing the other man. - -Pierre choked, his face puckered, and he turned hastily away, went -back to his trap muttering something to himself as he went, and took -his seat. As they drove along he shuddered and exclaimed several times -so audibly that the coachman asked him: - -"What is your pleasure?" - -"Where are you going?" shouted Pierre to the man, who was driving to -Lubyanka Street. - -"To the Governor's, as you ordered," answered the coachman. - -"Fool! Idiot!" shouted Pierre, abusing his coachman--a thing he -rarely did. "Home, I told you! And drive faster, blockhead!" "I must -get away this very day," he murmured to himself. - -At the sight of the tortured Frenchman and the crowd surrounding the -Lobnoe Place, Pierre had so definitely made up his mind that he -could no longer remain in Moscow and would leave for the army that -very day that it seemed to him that either he had told the coachman -this or that the man ought to have known it for himself. - -On reaching home Pierre gave orders to Evstafey--his head coachman -who knew everything, could do anything, and was known to all Moscow- -that he would leave that night for the army at Mozhaysk, and that -his saddle horses should be sent there. This could not all be arranged -that day, so on Evstafey's representation Pierre had to put off his -departure till next day to allow time for the relay horses to be -sent on in advance. - -On the twenty-fourth the weather cleared up after a spell of rain, -and after dinner Pierre left Moscow. When changing horses that night -in Perkhushkovo, he learned that there had been a great battle that -evening. (This was the battle of Shevardino.) He was told that there -in Perkhushkovo the earth trembled from the firing, but nobody could -answer his questions as to who had won. At dawn next day Pierre was -approaching Mozhaysk. - -Every house in Mozhaysk had soldiers quartered in it, and at the -hostel where Pierre was met by his groom and coachman there was no -room to be had. It was full of officers. - -Everywhere in Mozhaysk and beyond it, troops were stationed or on -the march. Cossacks, foot and horse soldiers, wagons, caissons, and -cannon were everywhere. Pierre pushed forward as fast as he could, and -the farther he left Moscow behind and the deeper he plunged into -that sea of troops the more was he overcome by restless agitation -and a new and joyful feeling he had not experienced before. It was a -feeling akin to what he had felt at the Sloboda Palace during the -Emperor's visit--a sense of the necessity of undertaking something and -sacrificing something. He now experienced a glad consciousness that -everything that constitutes men's happiness--the comforts of life, -wealth, even life itself--is rubbish it is pleasant to throw away, -compared with something... With what? Pierre could not say, and he did -not try to determine for whom and for what he felt such particular -delight in sacrificing everything. He was not occupied with the -question of what to sacrifice for; the fact of sacrificing in itself -afforded him a new and joyous sensation. - - - - - -CHAPTER XIX - - -On the twenty-fourth of August the battle of the Shevardino -Redoubt was fought, on the twenty-fifth not a shot was fired by either -side, and on the twenty-sixth the battle of Borodino itself took -place. - -Why and how were the battles of Shevardino and Borodino given and -accepted? Why was the battle of Borodino fought? There was not the -least sense in it for either the French or the Russians. Its immediate -result for the Russians was, and was bound to be, that we were brought -nearer to the destruction of Moscow--which we feared more than -anything in the world; and for the French its immediate result was -that they were brought nearer to the destruction of their whole -army--which they feared more than anything in the world. What the -result must be was quite obvious, and yet Napoleon offered and Kutuzov -accepted that battle. - -If the commanders had been guided by reason, it would seem that it -must have been obvious to Napoleon that by advancing thirteen -hundred miles and giving battle with a probability of losing a quarter -of his army, he was advancing to certain destruction, and it must have -been equally clear to Kutuzov that by accepting battle and risking the -loss of a quarter of his army he would certainly lose Moscow. For -Kutuzov this was mathematically clear, as it is that if when playing -draughts I have one man less and go on exchanging, I shall certainly -lose, and therefore should not exchange. When my opponent has -sixteen men and I have fourteen, I am only one eighth weaker than -he, but when I have exchanged thirteen more men he will be three times -as strong as I am. - -Before the battle of Borodino our strength in proportion to the -French was about as five to six, but after that battle it was little -more than one to two: previously we had a hundred thousand against a -hundred and twenty thousand; afterwards little more than fifty -thousand against a hundred thousand. Yet the shrewd and experienced -Kutuzov accepted the battle, while Napoleon, who was said to be a -commander of genius, gave it, losing a quarter of his army and -lengthening his lines of communication still more. If it is said -that he expected to end the campaign by occupying Moscow as he had -ended a previous campaign by occupying Vienna, there is much -evidence to the contrary. Napoleon's historians themselves tell us -that from Smolensk onwards he wished to stop, knew the danger of his -extended position, and knew that the occupation of Moscow would not be -the end of the campaign, for he had seen at Smolensk the state in -which Russian towns were left to him, and had not received a single -reply to his repeated announcements of his wish to negotiate. - -In giving and accepting battle at Borodino, Kutuzov acted -involuntarily and irrationally. But later on, to fit what had -occurred, the historians provided cunningly devised evidence of the -foresight and genius the generals who, of all the blind tools of -history were the most enslaved and involuntary. - -The ancients have left us model heroic poems in which the heroes -furnish the whole interest of the story, and we are still unable to -accustom ourselves to the fact that for our epoch histories of that -kind are meaningless. - -On the other question, how the battle of Borodino and the -preceding battle of Shevardino were fought, there also exists a -definite and well-known, but quite false, conception. All the -historians describe the affair as follows: - -The Russian army, they say, in its retreat from Smolensk sought -out for itself the best position for a general engagement and found -such a position at Borodino. - -The Russians, they say, fortified this position in advance on the -left of the highroad (from Moscow to Smolensk) and almost at a right -angle to it, from Borodino to Utitsa, at the very place where the -battle was fought. - -In front of this position, they say, a fortified outpost was set -up on the Shevardino mound to observe the enemy. On the twenty-fourth, -we are told, Napoleon attacked this advanced post and took it, and, on -the twenty-sixth, attacked the whole Russian army, which was in -position on the field of Borodino. - -So the histories say, and it is all quite wrong, as anyone who cares -to look into the matter can easily convince himself. - -The Russians did not seek out the best position but, on the -contrary, during the retreat passed many positions better than -Borodino. They did not stop at any one of these positions because -Kutuzov did not wish to occupy a position he had not himself chosen, -because the popular demand for a battle had not yet expressed itself -strongly enough, and because Miloradovich had not yet arrived with the -militia, and for many other reasons. The fact is that other -positions they had passed were stronger, and that the position at -Borodino (the one where the battle was fought), far from being strong, -was no more a position than any other spot one might find in the -Russian Empire by sticking a pin into the map at hazard. - -Not only did the Russians not fortify the position on the field of -Borodino to the left of, and at a right angle to, the highroad (that -is, the position on which the battle took place), but never till the -twenty-fifth of August, 1812, did they think that a battle might be -fought there. This was shown first by the fact that there were no -entrenchments there by the twenty fifth and that those begun on the -twenty-fifth and twenty-sixth were not completed, and secondly, by the -position of the Shevardino Redoubt. That redoubt was quite senseless -in front of the position where the battle was accepted. Why was it -more strongly fortified than any other post? And why were all -efforts exhausted and six thousand men sacrificed to defend it till -late at night on the twenty-fourth? A Cossack patrol would have -sufficed to observe the enemy. Thirdly, as proof that the position -on which the battle was fought had not been foreseen and that the -Shevardino Redoubt was not an advanced post of that position, we -have the fact that up to the twenty-fifth, Barclay de Tolly and -Bagration were convinced that the Shevardino Redoubt was the left -flank of the position, and that Kutuzov himself in his report, written -in hot haste after the battle, speaks of the Shevardino Redoubt as the -left flank of the position. It was much later, when reports on the -battle of Borodino were written at leisure, that the incorrect and -extraordinary statement was invented (probably to justify the mistakes -of a commander in chief who had to be represented as infallible) -that the Shevardino Redoubt was an advanced post--whereas in reality -it was simply a fortified point on the left flank--and that the battle -of Borodino was fought by us on an entrenched position previously -selected, where as it was fought on a quite unexpected spot which -was almost unentrenched. - -The case was evidently this: a position was selected along the river -Kolocha--which crosses the highroad not at a right angle but at an -acute angle--so that the left flank was at Shevardino, the right flank -near the village of Novoe, and the center at Borodino at the -confluence of the rivers Kolocha and Voyna. - -To anyone who looks at the field of Borodino without thinking of how -the battle was actually fought, this position, protected by the -river Kolocha, presents itself as obvious for an army whose object was -to prevent an enemy from advancing along the Smolensk road to Moscow. - -Napoleon, riding to Valuevo on the twenty-fourth, did not see (as -the history books say he did) the position of the Russians from Utitsa -to Borodino (he could not have seen that position because it did not -exist), nor did he see an advanced post of the Russian army, but while -pursuing the Russian rearguard he came upon the left flank of the -Russian position--at the Shevardino Redoubt--and unexpectedly for -the Russians moved his army across the Kolocha. And the Russians, -not having time to begin a general engagement, withdrew their left -wing from the position they had intended to occupy and took up a new -position which had not been foreseen and was not fortified. By -crossing to the other side of the Kolocha to the left of the highroad, -Napoleon shifted the whole forthcoming battle from right to left -(looking from the Russian side) and transferred it to the plain -between Utitsa, Semenovsk, and Borodino--a plain no more -advantageous as a position than any other plain in Russia--and there -the whole battle of the twenty-sixth of August took place. - -Had Napoleon not ridden out on the evening of the twenty-fourth to -the Kolocha, and had he not then ordered an immediate attack on the -redoubt but had begun the attack next morning, no one would have -doubted that the Shevardino Redoubt was the left flank of our and -the battle would have taken place where we expected it. In that case -we should probably have defended the Shevardino Redoubt--our left -flank--still more obstinately. We should have attacked Napoleon in the -center or on the right, and the engagement would have taken place on -the twenty-fifth, in the position we intended and had fortified. But -as the attack on our left flank took place in the evening after the -retreat of our rear guard (that is, immediately after the fight at -Gridneva), and as the Russian commanders did not wish, or were not -in time, to begin a general engagement then on the evening of the -twenty-fourth, the first and chief action of the battle of Borodino -was already lost on the twenty-fourth, and obviously led to the loss -of the one fought on the twenty-sixth. - -After the loss of the Shevardino Redoubt, we found ourselves on -the morning of the twenty-fifth without a position for our left flank, -and were forced to bend it back and hastily entrench it where it -chanced to be. - -Not only was the Russian army on the twenty-sixth defended by -weak, unfinished entrenchments, but the disadvantage of that -position was increased by the fact that the Russian commanders--not -having fully realized what had happened, namely the loss of our -position on the left flank and the shifting of the whole field of -the forthcoming battle from right to left--maintained their extended -position from the village of Novoe to Utitsa, and consequently had -to move their forces from right to left during the battle. So it -happened that throughout the whole battle the Russians opposed the -entire French army launched against our left flank with but half as -many men. (Poniatowski's action against Utitsa, and Uvarov's on the -right flank against the French, were actions distinct from the main -course of the battle.) So the battle of Borodino did not take place at -all as (in an effort to conceal our commanders' mistakes even at the -cost of diminishing the glory due to the Russian army and people) it -has been described. The battle of Borodino was not fought on a -chosen and entrenched position with forces only slightly weaker than -those of the enemy, but, as a result of the loss of the Shevardino -Redoubt, the Russians fought the battle of Borodino on an open and -almost unentrenched position, with forces only half as numerous as the -French; that is to say, under conditions in which it was not merely -unthinkable to fight for ten hours and secure an indecisive result, -but unthinkable to keep an army even from complete disintegration -and flight. - - - - - -CHAPTER XX - - -On the morning of the twenty-fifth Pierre was leaving Mozhaysk. At -the descent of the high steep hill, down which a winding road led -out of the town past the cathedral on the right, where a service was -being held and the bells were ringing, Pierre got out of his vehicle -and proceeded on foot. Behind him a cavalry regiment was coming down -the hill preceded by its singers. Coming up toward him was a train -of carts carrying men who had been wounded in the engagement the day -before. The peasant drivers, shouting and lashing their horses, kept -crossing from side to side. The carts, in each of which three or -four wounded soldiers were lying or sitting, jolted over the stones -that had been thrown on the steep incline to make it something like -a road. The wounded, bandaged with rags, with pale cheeks, -compressed lips, and knitted brows, held on to the sides of the -carts as they were jolted against one another. Almost all of them -stared with naive, childlike curiosity at Pierre's white hat and green -swallow-tail coat. - -Pierre's coachman shouted angrily at the convoy of wounded to keep -to one side of the road. The cavalry regiment, as it descended the -hill with its singers, surrounded Pierre's carriage and blocked the -road. Pierre stopped, being pressed against the side of the cutting in -which the road ran. The sunshine from behind the hill did not -penetrate into the cutting and there it was cold and damp, but above -Pierre's head was the bright August sunshine and the bells sounded -merrily. One of the carts with wounded stopped by the side of the road -close to Pierre. The driver in his bast shoes ran panting up to it, -placed a stone under one of its tireless hind wheels, and began -arranging the breech-band on his little horse. - -One of the wounded, an old soldier with a bandaged arm who was -following the cart on foot, caught hold of it with his sound hand -and turned to look at Pierre. - -"I say, fellow countryman! Will they set us down here or take us -on to Moscow?" he asked. - -Pierre was so deep in thought that he did not hear the question. -He was looking now at the cavalry regiment that had met the convoy -of wounded, now at the cart by which he was standing, in which two -wounded men were sitting and one was lying. One of those sitting up in -the cart had probably been wounded in the cheek. His whole head was -wrapped in rags and one cheek was swollen to the size of a baby's -head. His nose and mouth were twisted to one side. This soldier was -looking at the cathedral and crossing himself. Another, a young lad, a -fair-haired recruit as white as though there was no blood in his -thin face, looked at Pierre kindly, with a fixed smile. The third -lay prone so that his face was not visible. The cavalry singers were -passing close by: - - Ah lost, quite lost... is my head so keen, - Living in a foreign land. - -they sang their soldiers' dance song. - -As if responding to them but with a different sort of merriment, the -metallic sound of the bells reverberated high above and the hot rays -of the sun bathed the top of the opposite slope with yet another -sort of merriment. But beneath the slope, by the cart with the wounded -near the panting little nag where Pierre stood, it was damp, somber, -and sad. - -The soldier with the swollen cheek looked angrily at the cavalry -singers. - -"Oh, the coxcombs!" he muttered reproachfully. - -"It's not the soldiers only, but I've seen peasants today, too.... -The peasants--even they have to go," said the soldier behind the cart, -addressing Pierre with a sad smile. "No distinctions made nowadays.... -They want the whole nation to fall on them--in a word, it's Moscow! -They want to make an end of it." - -In spite of the obscurity of the soldier's words Pierre understood -what he wanted to say and nodded approval. - -The road was clear again; Pierre descended the hill and drove on. - -He kept looking to either side of the road for familiar faces, but -only saw everywhere the unfamiliar faces of various military men of -different branches of the service, who all looked with astonishment at -his white hat and green tail coat. - -Having gone nearly three miles he at last met an acquaintance and -eagerly addressed him. This was one of the head army doctors. He was -driving toward Pierre in a covered gig, sitting beside a young -surgeon, and on recognizing Pierre he told the Cossack who occupied -the driver's seat to pull up. - -"Count! Your excellency, how come you to be here?" asked the doctor. - -"Well, you know, I wanted to see..." - -"Yes, yes, there will be something to see...." - -Pierre got out and talked to the doctor, explaining his intention of -taking part in a battle. - -The doctor advised him to apply direct to Kutuzov. - -"Why should you be God knows where out of sight, during the battle?" -he said, exchanging glances with his young companion. "Anyhow his -Serene Highness knows you and will receive you graciously. That's what -you must do." - -The doctor seemed tired and in a hurry. - -"You think so?... Ah, I also wanted to ask you where our position is -exactly?" said Pierre. - -"The position?" repeated the doctor. "Well, that's not my line. -Drive past Tatarinova, a lot of digging is going on there. Go up the -hillock and you'll see." - -"Can one see from there?... If you would..." - -But the doctor interrupted him and moved toward his gig. - -"I would go with you but on my honor I'm up to here"--and he pointed -to his throat. "I'm galloping to the commander of the corps. How do -matters stand?... You know, Count, there'll be a battle tomorrow. -Out of an army of a hundred thousand we must expect at least twenty -thousand wounded, and we haven't stretchers, or bunks, or dressers, or -doctors enough for six thousand. We have ten thousand carts, but we -need other things as well--we must manage as best we can!" - -The strange thought that of the thousands of men, young and old, who -had stared with merry surprise at his hat (perhaps the very men he had -noticed), twenty thousand were inevitably doomed to wounds and death -amazed Pierre. - -"They may die tomorrow; why are they thinking of anything but -death?" And by some latent sequence of thought the descent of the -Mozhaysk hill, the carts with the wounded, the ringing bells, the -slanting rays of the sun, and the songs of the cavalrymen vividly -recurred to his mind. - -"The cavalry ride to battle and meet the wounded and do not for a -moment think of what awaits them, but pass by, winking at the wounded. -Yet from among these men twenty thousand are doomed to die, and they -wonder at my hat! Strange!" thought Pierre, continuing his way to -Tatarinova. - -In front of a landowner's house to the left of the road stood -carriages, wagons, and crowds of orderlies and sentinels. The -commander in chief was putting up there, but just when Pierre -arrived he was not in and hardly any of the staff were there--they had -gone to the church service. Pierre drove on toward Gorki. - -When he had ascended the hill and reached the little village street, -he saw for the first time peasant militiamen in their white shirts and -with crosses on their caps, who, talking and laughing loudly, animated -and perspiring, were at work on a huge knoll overgrown with grass to -the right of the road. - -Some of them were digging, others were wheeling barrowloads of earth -along planks, while others stood about doing nothing. - -Two officers were standing on the knoll, directing the men. On -seeing these peasants, who were evidently still amused by the -novelty of their position as soldiers, Pierre once more thought of the -wounded men at Mozhaysk and understood what the soldier had meant when -he said: "They want the whole nation to fall on them." The sight of -these bearded peasants at work on the battlefield, with their queer, -clumsy boots and perspiring necks, and their shirts opening from the -left toward the middle, unfastened, exposing their sunburned -collarbones, impressed Pierre more strongly with the solemnity and -importance of the moment than anything he had yet seen or heard. - - - - - -CHAPTER XXI - - -Pierre stepped out of his carriage and, passing the toiling -militiamen, ascended the knoll from which, according to the doctor, -the battlefield could be seen. - -It was about eleven o'clock. The sun shone somewhat to the left -and behind him and brightly lit up the enormous panorama which, rising -like an amphitheater, extended before him in the clear rarefied -atmosphere. - -From above on the left, bisecting that amphitheater, wound the -Smolensk highroad, passing through a village with a white church -some five hundred paces in front of the knoll and below it. This was -Borodino. Below the village the road crossed the river by a bridge -and, winding down and up, rose higher and higher to the village of -Valuevo visible about four miles away, where Napoleon was then -stationed. Beyond Valuevo the road disappeared into a yellowing forest -on the horizon. Far in the distance in that birch and fir forest to -the right of the road, the cross and belfry of the Kolocha Monastery -gleamed in the sun. Here and there over the whole of that blue -expanse, to right and left of the forest and the road, smoking -campfires could be seen and indefinite masses of troops--ours and -the enemy's. The ground to the right--along the course of the -Kolocha and Moskva rivers--was broken and hilly. Between the hollows -the villages of Bezubova and Zakharino showed in the distance. On -the left the ground was more level; there were fields of grain, and -the smoking ruins of Semenovsk, which had been burned down, could be -seen. - -All that Pierre saw was so indefinite that neither the left nor -the right side of the field fully satisfied his expectations. -Nowhere could he see the battlefield he had expected to find, but only -fields, meadows, troops, woods, the smoke of campfires, villages, -mounds, and streams; and try as he would he could descry no military -"position" in this place which teemed with life, nor could he even -distinguish our troops from the enemy's. - -"I must ask someone who knows," he thought, and addressed an officer -who was looking with curiosity at his huge unmilitary figure. - -"May I ask you," said Pierre, "what village that is in front?" - -"Burdino, isn't it?" said the officer, turning to his companion. - -"Borodino," the other corrected him. - -The officer, evidently glad of an opportunity for a talk, moved up -to Pierre. - -"Are those our men there?" Pierre inquired. - -"Yes, and there, further on, are the French," said the officer. -"There they are, there... you can see them." - -"Where? Where?" asked Pierre. - -"One can see them with the naked eye... Why, there!" - -The officer pointed with his hand to the smoke visible on the left -beyond the river, and the same stern and serious expression that -Pierre had noticed on many of the faces he had met came into his face. - -"Ah, those are the French! And over there?..." Pierre pointed to a -knoll on the left, near which some troops could be seen. - -"Those are ours." - -"Ah, ours! And there?..." Pierre pointed to another knoll in the -distance with a big tree on it, near a village that lay in a hollow -where also some campfires were smoking and something black was -visible. - -"That's his again," said the officer. (It was the Shevardino -Redoubt.) "It was ours yesterday, but now it is his." - -"Then how about our position?" - -"Our position?" replied the officer with a smile of satisfaction. "I -can tell you quite clearly, because I constructed nearly all our -entrenchments. There, you see? There's our center, at Borodino, just -there," and he pointed to the village in front of them with the -white church. "That's where one crosses the Kolocha. You see down -there where the rows of hay are lying in the hollow, there's the -bridge. That's our center. Our right flank is over there"--he -pointed sharply to the right, far away in the broken ground--"That's -where the Moskva River is, and we have thrown up three redoubts there, -very strong ones. The left flank..." here the officer paused. "Well, -you see, that's difficult to explain.... Yesterday our left flank -was there at Shevardino, you see, where the oak is, but now we have -withdrawn our left wing--now it is over there, do you see that village -and the smoke? That's Semenovsk, yes, there," he pointed to -Raevski's knoll. "But the battle will hardly be there. His having -moved his troops there is only a ruse; he will probably pass round -to the right of the Moskva. But wherever it may be, many a man will be -missing tomorrow!" he remarked. - -An elderly sergeant who had approached the officer while he was -giving these explanations had waited in silence for him to finish -speaking, but at this point, evidently not liking the officer's -remark, interrupted him. - -"Gabions must be sent for," said he sternly. - -The officer appeared abashed, as though he understood that one might -think of how many men would be missing tomorrow but ought not to speak -to speak of it. - -"Well, send number three company again," the officer replied -hurriedly. - -"And you, are you one of the doctors?" - -"No, I've come on my own," answered Pierre, and he went down the -hill again, passing the militiamen. - -"Oh, those damned fellows!" muttered the officer who followed him, -holding his nose as he ran past the men at work. - -"There they are... bringing her, coming... There they are... They'll -be here in a minute..." voices were suddenly heard saying; and -officers, soldiers, and militiamen began running forward along the -road. - -A church procession was coming up the hill from Borodino. First -along the dusty road came the infantry in ranks, bareheaded and with -arms reversed. From behind them came the sound of church singing. - -Soldiers and militiamen ran bareheaded past Pierre toward the -procession. - -"They are bringing her, our Protectress!... The Iberian Mother of -God!" someone cried. - -"The Smolensk Mother of God," another corrected him. - -The militiamen, both those who had been in the village and those who -had been at work on the battery, threw down their spades and ran to -meet the church procession. Following the battalion that marched along -the dusty road came priests in their vestments--one little old man -in a hood with attendants and singers. Behind them soldiers and -officers bore a large, dark-faced icon with an embossed metal cover. -This was the icon that had been brought from and had since accompanied -the army. Behind, before, and on both sides, crowds of militiamen with -bared heads walked, ran, and bowed to the ground. - -At the summit of the hill they stopped with the icon; the men who -had been holding it up by the linen bands attached to it were relieved -by others, the chanters relit their censers, and service began. The -hot rays of the sun beat down vertically and a fresh soft wind -played with the hair of the bared heads and with the ribbons -decorating the icon. The singing did not sound loud under the open -sky. An immense crowd of bareheaded officers, soldiers, and militiamen -surrounded the icon. Behind the priest and a chanter stood the -notabilities on a spot reserved for them. A bald general with -general with a St. George's Cross on his neck stood just behind the -priest's back, and without crossing himself (he was evidently a -German) patiently awaited the end of the service, which he -considered it necessary to hear to the end, probably to arouse the -patriotism of the Russian people. Another general stood in a martial -pose, crossing himself by shaking his hand in front of his chest while -looking about him. Standing among the crowd of peasants, Pierre -recognized several acquaintances among these notables, but did not -look at them--his whole attention was absorbed in watching the serious -expression on the faces of the crowd of soldiers and militiamen who -were all gazing eagerly at the icon. As soon as the tired chanters, -who were singing the service for the twentieth time that day, began -lazily and mechanically to sing: "Save from calamity Thy servants, O -Mother of God," and the priest and deacon chimed in: "For to Thee -under God we all flee as to an inviolable bulwark and protection," -there again kindled in all those faces the same expression of -consciousness of the solemnity of the impending moment that Pierre had -seen on the faces at the foot of the hill at Mozhaysk and -momentarily on many and many faces he had met that morning; and -heads were bowed more frequently and hair tossed back, and sighs and -the sound men made as they crossed themselves were heard. - -The crowd round the icon suddenly parted and pressed against Pierre. -Someone, a very important personage judging by the haste with which -way was made for him, was approaching the icon. - -It was Kutuzov, who had been riding round the position and on his -way back to Tatarinova had stopped where the service was being held. -Pierre recognized him at once by his peculiar figure, which -distinguished him from everybody else. - -With a long overcoat on his his exceedingly stout, -round-shouldered body, with uncovered white head and puffy face -showing the white ball of the eye he had lost, Kutuzov walked with -plunging, swaying gait into the crowd and stopped behind the priest. -He crossed himself with an accustomed movement, bent till he touched -the ground with his hand, and bowed his white head with a deep sigh. -Behind Kutuzov was Bennigsen and the suite. Despite the presence of -the commander in chief, who attracted the attention of all the -superior officers, the militiamen and soldiers continued their prayers -without looking at him. - -When the service was over, Kutuzov stepped up to the icon, sank -heavily to his knees, bowed to the ground, and for a long time tried -vainly to rise, but could not do so on account of his weakness and -weight. His white head twitched with the effort. At last he rose, -kissed the icon as a child does with naively pouting lips, and again -bowed till he touched the ground with his hand. The other generals -followed his example, then the officers, and after them with excited -faces, pressing on one another, crowding, panting, and pushing, -scrambled the soldiers and militiamen. - - - - - -CHAPTER XXII - - -Staggering amid the crush, Pierre looked about him. - -"Count Peter Kirilovich! How did you get here?" said a voice. - -Pierre looked round. Boris Drubetskoy, brushing his knees with his -hand (he had probably soiled them when he, too, had knelt before the -icon), came up to him smiling. Boris was elegantly dressed, with a -slightly martial touch appropriate to a campaign. He wore a long -coat and like Kutuzov had a whip slung across his shoulder. - -Meanwhile Kutuzov had reached the village and seated himself in -the shade of the nearest house, on a bench which one Cossack had run -to fetch and another had hastily covered with a rug. An immense and -brilliant suite surrounded him. - -The icon was carried further, accompanied by the throng. Pierre -stopped some thirty paces from Kutuzov, talking to Boris. - -He explained his wish to be present at the battle and to see the -position. - -"This is what you must do," said Boris. "I will do the honors of the -camp to you. You will see everything best from where Count Bennigsen -will be. I am in attendance on him, you know; I'll mention it to -him. But if you want to ride round the position, come along with us. -We are just going to the left flank. Then when we get back, do spend -the night with me and we'll arrange a game of cards. Of course you -know Dmitri Sergeevich? Those are his quarters," and he pointed to the -third house in the village of Gorki. - -"But I should like to see the right flank. They say it's very -strong," said Pierre. "I should like to start from the Moskva River -and ride round the whole position." - -"Well, you can do that later, but the chief thing is the left -flank." - -"Yes, yes. But where is Prince Bolkonski's regiment? Can you point -it out to me?" - -"Prince Andrew's? We shall pass it and I'll take you to him." - -"What about the left flank?" asked Pierre - -"To tell you the truth, between ourselves, God only knows what state -our left flank is in," said Boris confidentially lowering his voice. -"It is not at all what Count Bennigsen intended. He meant to fortify -that knoll quite differently, but..." Boris shrugged his shoulders, -"his Serene Highness would not have it, or someone persuaded him. -You see..." but Boris did not finish, for at that moment Kaysarov, -Kutuzov's adjutant, came up to Pierre. "Ah, Kaysarov!" said Boris, -addressing him with an unembarrassed smile, "I was just trying to -explain our position to the count. It is amazing how his Serene -Highness could so the intentions of the French!" - -"You mean the left flank?" asked Kaysarov. - - -"Yes, exactly; the left flank is now extremely strong." - -Though Kutuzov had dismissed all unnecessary men from the staff, -Boris had contrived to remain at headquarters after the changes. He -had established himself with Count Bennigsen, who, like all on whom -Boris had been in attendance, considered young Prince Drubetskoy an -invaluable man. - -In the higher command there were two sharply defined parties: -Kutuzov's party and that of Bennigsen, the chief of staff. Boris -belonged to the latter and no one else, while showing servile -respect to Kutuzov, could so create an impression that the old -fellow was not much good and that Bennigsen managed everything. Now -the decisive moment of battle had come when Kutuzov would be destroyed -and the power pass to Bennigsen, or even if Kutuzov won the battle -it would be felt that everything was done by Bennigsen. In any case -many great rewards would have to be given for tomorrow's action, and -new men would come to the front. So Boris was full of nervous vivacity -all day. - -After Kaysarov, others whom Pierre knew came up to him, and he had -not time to reply to all the questions about Moscow that were showered -upon him, or to listen to all that was told him. The faces all -expressed animation and apprehension, but it seemed to Pierre that the -cause of the excitement shown in some of these faces lay chiefly in -questions of personal success; his mind, however, was occupied by -the different expression he saw on other faces--an expression that -spoke not of personal matters but of the universal questions of life -and death. Kutuzov noticed Pierre's figure and the group gathered -round him. - -"Call him to me," said Kutuzov. - -An adjutant told Pierre of his Serene Highness' wish, and Pierre -went toward Kutuzov's bench. But a militiaman got there before him. It -was Dolokhov. - -"How did that fellow get here?" asked Pierre. - -"He's a creature that wriggles in anywhere!" was the answer. "He has -been degraded, you know. Now he wants to bob up again. He's been -proposing some scheme or other and has crawled into the enemy's picket -line at night.... He's a brave fellow." - -Pierre took off his hat and bowed respectfully to Kutuzov. - -"I concluded that if I reported to your Serene Highness you might -send me away or say that you knew what I was reporting, but then I -shouldn't lose anything..." Dolokhov was saying. - -"Yes, yes." - -"But if I were right, I should be rendering a service to my -Fatherland for which I am ready to die." - -"Yes, yes." - -"And should your Serene Highness require a man who will not spare -his skin, please think of me.... Perhaps I may prove useful to your -Serene Highness." - -"Yes... Yes..." Kutuzov repeated, his laughing eye narrowing more -and more as he looked at Pierre. - -Just then Boris, with his courtierlike adroitness, stepped up to -Pierre's side near Kutuzov and in a most natural manner, without -raising his voice, said to Pierre, as though continuing an interrupted -conversation: - -"The militia have put on clean white shirts to be ready to die. What -heroism, Count!" - -Boris evidently said this to Pierre in order to be overheard by -his Serene Highness. He knew Kutuzov's attention would be caught by -those words, and so it was. - -"What are you saying about the militia?" he asked Boris. - -"Preparing for tomorrow, your Serene Highness--for death--they -have put on clean shirts." - -"Ah... a wonderful, a matchless people!" said Kutuzov; and he closed -his eyes and swayed his head. "A matchless people!" he repeated with a -sigh. - -"So you want to smell gunpowder?" he said to Pierre. "Yes, it's a -pleasant smell. I have the honor to be one of your wife's adorers. -Is she well? My quarters are at your service." - -And as often happens with old people, Kutuzov began looking about -absent-mindedly as if forgetting all he wanted to say or do. - -Then, evidently remembering what he wanted, he beckoned to Andrew -Kaysarov, his adjutant's brother. - -"Those verses... those verses of Marin's... how do they go, eh? -Those he wrote about Gerakov: 'Lectures for the corps inditing'... -Recite them, recite them!" said he, evidently preparing to laugh. - -Kaysarov recited.... Kutuzov smilingly nodded his head to the rhythm -of the verses. - -When Pierre had left Kutuzov, Dolokhov came up to him and took his -hand. - -"I am very glad to meet you here, Count," he said aloud, -regardless of the presence of strangers and in a particularly resolute -and solemn tone. "On the eve of a day when God alone knows who of us -is fated to survive, I am glad of this opportunity to tell you that -I regret the misunderstandings that occurred between us and should -wish you not to have any ill feeling for me. I beg you to forgive me." - -Pierre looked at Dolokhov with a smile, not knowing what to say to -him. With tears in his eyes Dolokhov embraced Pierre and kissed him. - -Boris said a few words to his general, and Count Bennigsen turned to -Pierre and proposed that he should ride with him along the line. - -"It will interest you," said he. - -"Yes, very much," replied Pierre. - -Half an hour later Kutuzov left for Tatarinova, and Bennigsen and -his suite, with Pierre among them, set out on their ride along the -line. - - - - - -CHAPTER XXIII - - -From Gorki, Bennigsen descended the highroad to the bridge which, -when they had looked it from the hill, the officer had pointed out -as being the center of our position and where rows of fragrant -new-mown hay lay by the riverside. They rode across that bridge into -the village of Borodino and thence turned to the left, passing an -enormous number of troops and guns, and came to a high knoll where -militiamen were digging. This was the redoubt, as yet unnamed, which -afterwards became known as the Raevski Redoubt, or the Knoll -Battery, but Pierre paid no special attention to it. He did not know -that it would become more memorable to him than any other spot on -the plain of Borodino. - -They then crossed the hollow to Semenovsk, where the soldiers were -dragging away the last logs from the huts and barns. Then they rode -downhill and uphill, across a ryefield trodden and beaten down as if -by hail, following a track freshly made by the artillery over the -furrows of the plowed land, and reached some fleches* which were still -being dug. - - -*A kind of entrenchment. - - -At the fleches Bennigsen stopped and began looking at the Shevardino -Redoubt opposite, which had been ours the day before and where several -horsemen could be descried. The officers said that either Napoleon -or Murat was there, and they all gazed eagerly at this little group of -horsemen. Pierre also looked at them, trying to guess which of the -scarcely discernible figures was Napoleon. At last those mounted men -rode away from the mound and disappeared. - -Bennigsen spoke to a general who approached him, and began -explaining the whole position of our troops. Pierre listened to him, -straining each faculty to understand the essential points of the -impending battle, but was mortified to feel that his mental capacity -was inadequate for the task. He could make nothing of it. Bennigsen -stopped speaking and, noticing that Pierre was listening, suddenly -said to him: - -"I don't think this interests you?" - -"On the contrary it's very interesting!" replied Pierre not quite -truthfully. - -From the fleches they rode still farther to the left, along a road -winding through a thick, low-growing birch wood. In the middle of -the wood a brown hare with white feet sprang out and, scared by the -tramp of the many horses, grew so confused that it leaped along the -road in front of them for some time, arousing general attention and -laughter, and only when several voices shouted at it did it dart to -one side and disappear in the thicket. After going through the wood -for about a mile and a half they came out on a glade where troops of -Tuchkov's corps were stationed to defend the left flank. - -Here, at the extreme left flank, Bennigsen talked a great deal and -with much heat, and, as it seemed to Pierre, gave orders of great -military importance. In front of Tuchkov's troops was some high ground -not occupied by troops. Bennigsen loudly criticized this mistake, -saying that it was madness to leave a height which commanded the -country around unoccupied and to place troops below it. Some of the -generals expressed the same opinion. One in particular declared with -martial heat that they were put there to be slaughtered. Bennigsen -on his own authority ordered the troops to occupy the high ground. -This disposition on the left flank increased Pierre's doubt of his own -capacity to understand military matters. Listening to Bennigsen and -the generals criticizing the position of the troops behind the hill, -he quite understood them and shared their opinion, but for that very -reason he could not understand how the man who put them there behind -the hill could have made so gross and palpable a blunder. - -Pierre did not know that these troops were not, as Bennigsen -supposed, put there to defend the position, but were in a concealed -position as an ambush, that they should not be seen and might be -able to strike an approaching enemy unexpectedly. Bennigsen did not -know this and moved the troops forward according to his own ideas -without mentioning the matter to the commander in chief. - - - - - -CHAPTER XXIV - - -On that bright evening of August 25, Prince Andrew lay leaning on -his elbow in a broken-down shed in the village of Knyazkovo at the -further end of his regiment's encampment. Through a gap in the -broken wall he could see, beside the wooden fence, a row of thirty -year-old birches with their lower branches lopped off, a field on -which shocks of oats were standing, and some bushes near which rose -the smoke of campfires--the soldiers' kitchens. - -Narrow and burdensome and useless to anyone as his life now seemed -to him, Prince Andrew on the eve of battle felt agitated and irritable -as he had done seven years before at Austerlitz. - -He had received and given the orders for next day's battle and had -nothing more to do. But his thoughts--the simplest, clearest, and -therefore most terrible thoughts--would give him no peace. He knew -that tomorrow's battle would be the most terrible of all he had -taken part in, and for the first time in his life the possibility of -death presented itself to him--not in relation to any worldly matter -or with reference to its effect on others, but simply in relation to -himself, to his own soul--vividly, plainly, terribly, and almost as -a certainty. And from the height of this perception all that had -previously tormented and preoccupied him suddenly became illumined -by a cold white light without shadows, without perspective, without -distinction of outline. All life appeared to him like magic-lantern -pictures at which he had long been gazing by artificial light -through a glass. Now he suddenly saw those badly daubed pictures in -clear daylight and without a glass. "Yes, yes! There they are, those -false images that agitated, enraptured, and tormented me," said he -to himself, passing in review the principal pictures of the magic -lantern of life and regarding them now in the cold white daylight of -his clear perception of death. "There they are, those rudely painted -figures that once seemed splendid and mysterious. Glory, the good of -society, love of a woman, the Fatherland itself--how important these -pictures appeared to me, with what profound meaning they seemed to -be filled! And it is all so simple, pale, and crude in the cold -white light of this morning which I feel is dawning for me." The three -great sorrows of his life held his attention in particular: his love -for a woman, his father's death, and the French invasion which had -overrun half Russia. "Love... that little girl who seemed to me -brimming over with mystic forces! Yes, indeed, I loved her. I made -romantic plans of love and happiness with her! Oh, what a boy I -was!" he said aloud bitterly. "Ah me! I believed in some ideal love -which was to keep her faithful to me for the whole year of my absence! -Like the gentle dove in the fable she was to pine apart from me.... -But it was much simpler really.... It was all very simple and -horrible." - -"When my father built Bald Hills he thought the place was his: his -land, his air, his peasants. But Napoleon came and swept him aside, -unconscious of his existence, as he might brush a chip from his -path, and his Bald Hills and his whole life fell to pieces. Princess -Mary says it is a trial sent from above. What is the trial for, when -he is not here and will never return? He is not here! For whom then is -the trial intended? The Fatherland, the destruction of Moscow! And -tomorrow I shall be killed, perhaps not even by a Frenchman but by one -of our own men, by a soldier discharging a musket close to my ear as -one of them did yesterday, and the French will come and take me by -head and heels and fling me into a hole that I may not stink under -their noses, and new conditions of life will arise, which will seem -quite ordinary to others and about which I shall know nothing. I shall -not exist..." - -He looked at the row of birches shining in the sunshine, with -their motionless green and yellow foliage and white bark. "To die... -to be killed tomorrow... That I should not exist... That all this -should still be, but no me...." - -And the birches with their light and shade, the curly clouds, the -smoke of the campfires, and all that was around him changed and seemed -terrible and menacing. A cold shiver ran down his spine. He rose -quickly, went out of the shed, and began to walk about. - -After he had returned, voices were heard outside the shed. "Who's -that?" he cried. - -The red-nosed Captain Timokhin, formerly Dolokhov's squadron -commander, but now from lack of officers a battalion commander, - -shyly entered the shed followed by an adjutant and the regimental -paymaster. - -Prince Andrew rose hastily, listened to the business they had come -about, gave them some further instructions, and was about to dismiss -them when he heard a familiar, lisping, voice behind the shed. - -"Devil take it!" said the voice of a man stumbling over something. - -Prince Andrew looked out of the shed and saw Pierre, who had tripped -over a pole on the ground and had nearly fallen, coming his way. It -was unpleasant to Prince Andrew to meet people of his own set in -general, and Pierre especially, for he reminded him of all the painful -moments of his last visit to Moscow. - -"You? What a surprise!" said he. "What brings you here? This is -unexpected!" - -As he said this his eyes and face expressed more than coldness--they -expressed hostility, which Pierre noticed at once. He had approached -the shed full of animation, but on seeing Prince Andrew's face he felt -constrained and ill at ease. - -"I have come... simply... you know... come... it interests me," said -Pierre, who had so often that day senselessly repeated that word -"interesting." "I wish to see the battle." - -"Oh yes, and what do the Masonic brothers say about war? How would -they stop it?" said Prince Andrew sarcastically. "Well, and how's -Moscow? And my people? Have they reached Moscow at last?" he asked -seriously. - -"Yes, they have. Julie Drubetskaya told me so. I went to see them, -but missed them. They have gone to your estate near Moscow." - - - - - -CHAPTER XXV - - -The officers were about to take leave, but Prince Andrew, apparently -reluctant to be left alone with his friend, asked them to stay and -have tea. Seats were brought in and so was the tea. The officers gazed -with surprise at Pierre's huge stout figure and listened to his talk -of Moscow and the position of our army, round which he had ridden. -Prince Andrew remained silent, and his expression was so forbidding -that Pierre addressed his remarks chiefly to the good-natured -battalion commander. - -"So you understand the whole position of our troops?" Prince -Andrew interrupted him. - -"Yes--that is, how do you mean?" said Pierre. "Not being a -military man I can't say I have understood it fully, but I -understand the general position." - -"Well, then, you know more than anyone else, be it who it may," said -Prince Andrew. - -"Oh!" said Pierre, looking over his spectacles in perplexity at -Prince Andrew. "Well, and what do think of Kutuzov's appointment?" -he asked. - -"I was very glad of his appointment, that's all I know," replied -Prince Andrew. - -"And tell me your opinion of Barclay de Tolly. In Moscow they are -saying heaven knows what about him.... What do you think of him?" - -"Ask them," replied Prince Andrew, indicating the officers. - -Pierre looked at Timokhin with the condescendingly interrogative -smile with which everybody involuntarily addressed that officer. - -"We see light again, since his Serenity has been appointed, your -excellency," said Timokhin timidly, and continually turning to -glance at his colonel. - -"Why so?" asked Pierre. - -"Well, to mention only firewood and fodder, let me inform you. -Why, when we were retreating from Sventsyani we dare not touch a stick -or a wisp of hay or anything. You see, we were going away, so he would -get it all; wasn't it so, your excellency?" and again Timokhin -turned to the prince. "But we daren't. In our regiment two officers -were court-martialed for that kind of thing. But when his Serenity -took command everything became straight forward. Now we see light..." - -"Then why was it forbidden?" - -Timokhin looked about in confusion, not knowing what or how to -answer such a question. Pierre put the same question to Prince Andrew. - -"Why, so as not to lay waste the country we were abandoning to the -enemy," said Prince Andrew with venomous irony. "It is very sound: one -can't permit the land to be pillaged and accustom the troops to -marauding. At Smolensk too he judged correctly that the French might -outflank us, as they had larger forces. But he could not understand -this," cried Prince Andrew in a shrill voice that seemed to escape him -involuntarily: "he could not understand that there, for the first -time, we were fighting for Russian soil, and that there was a spirit -in the men such as I had never seen before, that we had held the -French for two days, and that that success had increased our -strength tenfold. He ordered us to retreat, and all our efforts and -losses went for nothing. He had no thought of betraying us, he tried -to do the best he could, he thought out everything, and that is why he -is unsuitable. He is unsuitable now, just because he plans out -everything very thoroughly and accurately as every German has to. -How can I explain?... Well, say your father has a German valet, and he -is a splendid valet and satisfies your father's requirements better -than you could, then it's all right to let him serve. But if your -father is mortally sick you'll send the valet away and attend to -your father with your own unpracticed, awkward hands, and will -soothe him better than a skilled man who is a stranger could. So it -has been with Barclay. While Russia was well, a foreigner could -serve her and be a splendid minister; but as soon as she is in -danger she needs one of her own kin. But in your Club they have been -making him out a traitor! They slander him as a traitor, and the -only result will be that afterwards, ashamed of their false -accusations, they will make him out a hero or a genius instead of a -traitor, and that will be still more unjust. He is an honest and -very punctilious German." - -"And they say he's a skillful commander," rejoined Pierre. - -"I don't understand what is meant by 'a skillful commander,'" -replied Prince Andrew ironically. - -"A skillful commander?" replied Pierre. "Why, one who foresees all -contingencies... and foresees the adversary's intentions." - -"But that's impossible," said Prince Andrew as if it were a matter -settled long ago. - -Pierre looked at him in surprise. - -"And yet they say that war is like a game of chess?" he remarked. - -"Yes," replied Prince Andrew, "but with this little difference, that -in chess you may think over each move as long as you please and are -not limited for time, and with this difference too, that a knight is -always stronger than a pawn, and two pawns are always stronger than -one, while in war a battalion is sometimes stronger than a division -and sometimes weaker than a company. The relative strength of bodies -of troops can never be known to anyone. Believe me," he went on, "if -things depended on arrangements made by the staff, I should be there -making arrangements, but instead of that I have the honor to serve -here in the regiment with these gentlemen, and I consider that on us -tomorrow's battle will depend and not on those others.... Success -never depends, and never will depend, on position, or equipment, or -even on numbers, and least of all on position." - -"But on what then?" - -"On the feeling that is in me and in him," he pointed to Timokhin, -"and in each soldier." - -Prince Andrew glanced at Timokhin, who looked at his commander in -alarm and bewilderment. In contrast to his former reticent taciturnity -Prince Andrew now seemed excited. He could apparently not refrain from -expressing the thoughts that had suddenly occurred to him. - -"A battle is won by those who firmly resolve to win it! Why did we -lose the battle at Austerlitz? The French losses were almost equal -to ours, but very early we said to ourselves that we were losing the -battle, and we did lose it. And we said so because we had nothing to -fight for there, we wanted to get away from the battlefield as soon as -we could. 'We've lost, so let us run,' and we ran. If we had not -said that till the evening, heaven knows what might not have happened. -But tomorrow we shan't say it! You talk about our position, the left -flank weak and the right flank too extended," he went on. "That's -all nonsense, there's nothing of the kind. But what awaits us -tomorrow? A hundred million most diverse chances which will be decided -on the instant by the fact that our men or theirs run or do not run, -and that this man or that man is killed, but all that is being done at -present is only play. The fact is that those men with whom you have -ridden round the position not only do not help matters, but hinder. -They are only concerned with their own petty interests." - -"At such a moment?" said Pierre reproachfully. - -"At such a moment!" Prince Andrew repeated. "To them it is only a -moment affording opportunities to undermine a rival and obtain an -extra cross or ribbon. For me tomorrow means this: a Russian army of a -hundred thousand and a French army of a hundred thousand have met to -fight, and the thing is that these two hundred thousand men will fight -and the side that fights more fiercely and spares itself least will -win. And if you like I will tell you that whatever happens and -whatever muddles those at the top may make, we shall win tomorrow's -battle. Tomorrow, happen what may, we shall win!" - -"There now, your excellency! That's the truth, the real truth," said -Timokhin. "Who would spare himself now? The soldiers in my -battalion, believe me, wouldn't drink their vodka! 'It's not the day -for that!' they say." - -All were silent. The officers rose. Prince Andrew went out of the -shed with them, giving final orders to the adjutant. After they had -gone Pierre approached Prince Andrew and was about to start a -conversation when they heard the clatter of three horses' hoofs on the -road not far from the shed, and looking in that direction Prince -Andrew recognized Wolzogen and Clausewitz accompanied by a Cossack. -They rode close by continuing to converse, and Prince Andrew -involuntarily heard these words: - -"Der Krieg muss in Raum verlegt werden. Der Ansicht kann ich nicht -genug Preis geben,"* said one of them. - - -*"The war must be extended widely. I cannot sufficiently commend -that view." - - -"Oh, ja," said the other, "der Zweck ist nur den Feind zu schwachen, -so kann man gewiss nicht den Verlust der Privat-Personen in Achtung -nehmen."* - - -*"Oh, yes, the only aim is to weaken the enemy, so of course one -cannot take into account the loss of private individuals." - - -"Oh, no," agreed the other. - -"Extend widely!" said Prince Andrew with an angry snort, when they -had ridden past. "In that 'extend' were my father, son, and sister, at -Bald Hills. That's all the same to him! That's what I was saying to -you--those German gentlemen won't win the battle tomorrow but will -only make all the mess they can, because they have nothing in their -German heads but theories not worth an empty eggshell and haven't in -their hearts the one thing needed tomorrow--that which Timokhin has. -They have yielded up all Europe to him, and have now come to teach us. -Fine teachers!" and again his voice grew shrill. - -"So you think we shall win tomorrow's battle?" asked Pierre. - -"Yes, yes," answered Prince Andrew absently. "One thing I would do - -if I had the power," he began again, "I would not take prisoners. -Why take prisoners? It's chivalry! The French have destroyed my home -and are on their way to destroy Moscow, they have outraged and are -outraging me every moment. They are my enemies. In my opinion they are -all criminals. And so thinks Timokhin and the whole army. They -should be executed! Since they are my foes they cannot be my -friends, whatever may have been said at Tilsit." - -"Yes, yes," muttered Pierre, looking with shining eyes at Prince -Andrew. "I quite agree with you!" - -The question that had perturbed Pierre on the Mozhaysk hill and -all that day now seemed to him quite clear and completely solved. He -now understood the whole meaning and importance of this war and of the -impending battle. All he had seen that day, all the significant and -stern expressions on the faces he had seen in passing, were lit up for -him by a new light. He understood that latent heat (as they say in -physics) of patriotism which was present in all these men he had seen, -and this explained to him why they all prepared for death calmly, -and as it were lightheartedly. - -"Not take prisoners," Prince Andrew continued: "That by itself would -quite change the whole war and make it less cruel. As it is we have -played at war--that's what's vile! We play at magnanimity and all that -stuff. Such magnanimity and sensibility are like the magnanimity and -sensibility of a lady who faints when she sees a calf being killed: -she is so kind-hearted that she can't look at blood, but enjoys eating -the calf served up with sauce. They talk to us of the rules of war, of -chivalry, of flags of truce, of mercy to the unfortunate and so on. -It's all rubbish! I saw chivalry and flags of truce in 1805; they -humbugged us and we humbugged them. They plunder other people's -houses, issue false paper money, and worst of all they kill my -children and my father, and then talk of rules of war and -magnanimity to foes! Take no prisoners, but kill and be killed! He who -has come to this as I have through the same sufferings..." - -Prince Andrew, who had thought it was all the same to him whether or -not Moscow was taken as Smolensk had been, was suddenly checked in his -speech by an unexpected cramp in his throat. He paced up and down a -few times in silence, but his eyes glittered feverishly and his lips -quivered as he began speaking. - -"If there was none of this magnanimity in war, we should go to war -only when it was worth while going to certain death, as now. Then -there would not be war because Paul Ivanovich had offended Michael -Ivanovich. And when there was a war, like this one, it would be war! -And then the determination of the troops would be quite different. -Then all these Westphalians and Hessians whom Napoleon is leading -would not follow him into Russia, and we should not go to fight in -Austria and Prussia without knowing why. War is not courtesy but the -most horrible thing in life; and we ought to understand that and not -play at war. We ought to accept this terrible necessity sternly and -seriously. It all lies in that: get rid of falsehood and let war be -war and not a game. As it is now, war is the favorite pastime of the -idle and frivolous. The military calling is the most highly honored. - -"But what is war? What is needed for success in warfare? What are -the habits of the military? The aim of war is murder; the methods of -war are spying, treachery, and their encouragement, the ruin of a -country's inhabitants, robbing them or stealing to provision the army, -and fraud and falsehood termed military craft. The habits of the -military class are the absence of freedom, that is, discipline, -idleness, ignorance, cruelty, debauchery, and drunkenness. And in -spite of all this it is the highest class, respected by everyone. -All the kings, except the Chinese, wear military uniforms, and he -who kills most people receives the highest rewards. - -"They meet, as we shall meet tomorrow, to murder one another; they -kill and maim tens of thousands, and then have thanksgiving services -for having killed so many people (they even exaggerate the number), -and they announce a victory, supposing that the more people they -have killed the greater their achievement. How does God above look -at them and hear them?" exclaimed Prince Andrew in a shrill, -piercing voice. "Ah, my friend, it has of late become hard for me to -live. I see that I have begun to understand too much. And it doesn't -do for man to taste of the tree of knowledge of good and evil.... -Ah, well, it's not for long!" he added. - -"However, you're sleepy, and it's time for me to sleep. Go back to -Gorki!" said Prince Andrew suddenly. - -"Oh no!" Pierre replied, looking at Prince Andrew with frightened, -compassionate eyes. - -"Go, go! Before a battle one must have one's sleep out," repeated -Prince Andrew. - -He came quickly up to Pierre and embraced and kissed him. -"Good-by, be off!" he shouted. "Whether we meet again or not..." -and turning away hurriedly he entered the shed. - -It was already dark, and Pierre could not make out whether the -expression of Prince Andrew's face was angry or tender. - -For some time he stood in silence considering whether he should -follow him or go away. "No, he does not want it!" Pierre concluded. -"And I know that this is our last meeting!" He sighed deeply and -rode back to Gorki. - -On re-entering the shed Prince Andrew lay down on a rug, but he -could not sleep. - -He closed his eyes. One picture succeeded another in his -imagination. On one of them he dwelt long and joyfully. He vividly -recalled an evening in Petersburg. Natasha with animated and excited -face was telling him how she had gone to look for mushrooms the -previous summer and had lost her way in the big forest. She -incoherently described the depths of the forest, her feelings, and a -talk with a beekeeper she met, and constantly interrupted her story to -say: "No, I can't! I'm not telling it right; no, you don't -understand," though he encouraged her by saying that he did -understand, and he really had understood all she wanted to say. But -Natasha was not satisfied with her own words: she felt that they did -not convey the passionately poetic feeling she had experienced that -day and wished to convey. "He was such a delightful old man, and it -was so dark in the forest... and he had such kind... No, I can't -describe it," she had said, flushed and excited. Prince Andrew -smiled now the same happy smile as then when he had looked into her -eyes. "I understood her," he thought. "I not only understood her, -but it was just that inner, spiritual force, that sincerity, that -frankness of soul--that very soul of hers which seemed to be -fettered by her body--it was that soul I loved in her... loved so -strongly and happily..." and suddenly he remembered how his love had -ended. "He did not need anything of that kind. He neither saw nor -understood anything of the sort. He only saw in her a pretty and fresh -young girl, with whom he did not deign to unite his fate. And I?... -and he is still alive and gay!" - -Prince Andrew jumped up as if someone had burned him, and again -began pacing up and down in front of the shed. - - - - - -CHAPTER XXVI - - -On August 25, the eve of the battle of Borodino, M. de Beausset, -prefect of the French Emperor's palace, arrived at Napoleon's quarters -at Valuevo with Colonel Fabvier, the former from Paris and the -latter from Madrid. - -Donning his court uniform, M. de Beausset ordered a box he had -brought for the Emperor to be carried before him and entered the first -compartment of Napoleon's tent, where he began opening the box while -conversing with Napoleon's aides-de-camp who surrounded him. - -Fabvier, not entering the tent, remained at the entrance talking -to some generals of his acquaintance. - -The Emperor Napoleon had not yet left his bedroom and was -finishing his toilet. Slightly snorting and grunting, he presented now -his back and now his plump hairy chest to the brush with which his -valet was rubbing him down. Another valet, with his finger over the -mouth of a bottle, was sprinkling Eau de Cologne on the Emperor's -pampered body with an expression which seemed to say that he alone -knew where and how much Eau de Cologne should be sprinkled. Napoleon's -short hair was wet and matted on the forehead, but his face, though -puffy and yellow, expressed physical satisfaction. "Go on, harder, -go on!" he muttered to the valet who was rubbing him, slightly -twitching and grunting. An aide-de-camp, who had entered the bedroom -to report to the Emperor the number of prisoners taken in -yesterday's action, was standing by the door after delivering his -message, awaiting permission to withdraw. Napoleon, frowning, looked -at him from under his brows. - -"No prisoners!" said he, repeating the aide-de-camp's words. "They -are forcing us to exterminate them. So much the worse for the -Russian army.... Go on... harder, harder!" he muttered, hunching his -back and presenting his fat shoulders. - -"All right. Let Monsieur de Beausset enter, and Fabvier too," he -said, nodding to the aide-de-camp. - -"Yes, sire," and the aide-de-camp disappeared through the door of -the tent. - -Two valets rapidly dressed His Majesty, and wearing the blue uniform -of the Guards he went with firm quick steps to the reception room. - -De Beausset's hands meanwhile were busily engaged arranging the -present he had brought from the Empress, on two chairs directly in -front of the entrance. But Napoleon had dressed and come out with such -unexpected rapidity that he had not time to finish arranging the -surprise. - -Napoleon noticed at once what they were about and guessed that -they were not ready. He did not wish to deprive them of the pleasure -of giving him a surprise, so he pretended not to see de Beausset and -called Fabvier to him, listening silently and with a stern frown to -what Fabvier told him of the heroism and devotion of his troops -fighting at Salamanca, at the other end of Europe, with but one -thought--to be worthy of their Emperor--and but one fear--to fail to -please him. The result of that battle had been deplorable. Napoleon -made ironic remarks during Fabvier's account, as if he had not -expected that matters could go otherwise in his absence. - -"I must make up for that in Moscow," said Napoleon. "I'll see you -later," he added, and summoned de Beausset, who by that time had -prepared the surprise, having placed something on the chairs and -covered it with a cloth. - -De Beausset bowed low, with that courtly French bow which only the -old retainers of the Bourbons knew how to make, and approached him, -presenting an envelope. - -Napoleon turned to him gaily and pulled his ear. - -"You have hurried here. I am very glad. Well, what is Paris saying?" -he asked, suddenly changing his former stern expression for a most -cordial tone. - -"Sire, all Paris regrets your absence," replied de Beausset as was -proper. - -But though Napoleon knew that de Beausset had to say something of -this kind, and though in his lucid moments he knew it was untrue, he -was pleased to hear it from him. Again he honored him by touching -his ear. - -"I am very sorry to have made you travel so far," said he. - -"Sire, I expected nothing less than to find you at the gates of -Moscow," replied de Beausset. - -Napoleon smiled and, lifting his head absentmindedly, glanced to the -right. An aide-de-camp approached with gliding steps and offered him a -gold snuffbox, which he took. - -"Yes, it has happened luckily for you," he said, raising the open -snuffbox to his nose. "You are fond of travel, and in three days you -will see Moscow. You surely did not expect to see that Asiatic -capital. You will have a pleasant journey." - -De Beausset bowed gratefully at this regard for his taste for travel -(of which he had not till then been aware). - -"Ha, what's this?" asked Napoleon, noticing that all the courtiers -were looking at something concealed under a cloth. - -With courtly adroitness de Beausset half turned and without -turning his back to the Emperor retired two steps, twitching off the -cloth at the same time, and said: - -"A present to Your Majesty from the Empress." - -It was a portrait, painted in bright colors by Gerard, of the son -borne to Napoleon by the daughter of the Emperor of Austria, the boy -whom for some reason everyone called "The King of Rome." - -A very pretty curly-headed boy with a look of the Christ in the -Sistine Madonna was depicted playing at stick and ball. The ball -represented the terrestrial globe and the stick in his other hand a -scepter. - -Though it was not clear what the artist meant to express by -depicting the so-called King of Rome spiking the earth with a stick, -the allegory apparently seemed to Napoleon, as it had done to all -who had seen it in Paris, quite clear and very pleasing. - -"The King of Rome!" he said, pointing to the portrait with a -graceful gesture. "Admirable!" - -With the natural capacity of an Italian for changing the -expression of his face at will, he drew nearer to the portrait and -assumed a look of pensive tenderness. He felt that what he now said -and did would be historical, and it seemed to him that it would now be -best for him--whose grandeur enabled his son to play stick and ball -with the terrestrial globe--to show, in contrast to that grandeur, the -simplest paternal tenderness. His eyes grew dim, he moved forward, -glanced round at a chair (which seemed to place itself under him), and -sat down on it before the portrait. At a single gesture from him -everyone went out on tiptoe, leaving the great man to himself and -his emotion. - -Having sat still for a while he touched--himself not knowing why- -the thick spot of paint representing the highest light in the -portrait, rose, and recalled de Beausset and the officer on duty. He -ordered the portrait to be carried outside his tent, that the Old -Guard, stationed round it, might not be deprived of the pleasure of -seeing the King of Rome, the son and heir of their adored monarch. - -And while he was doing M. de Beausset the honor of breakfasting with -him, they heard, as Napoleon had anticipated, the rapturous cries of -the officers and men of the Old Guard who had run up to see the -portrait. - -"Vive l'Empereur! Vive le roi de Rome! Vive l'Empereur!" came -those ecstatic cries. - -After breakfast Napoleon in de Beausset's presence dictated his -order of the day to the army. - -"Short and energetic!" he remarked when he had read over the -proclamation which he had dictated straight off without corrections. -It ran: - - -Soldiers! This is the battle you have so longed for. Victory depends -on you. It is essential for us; it will give us all we need: -comfortable quarters and a speedy return to our country. Behave as you -did at Austerlitz, Friedland, Vitebsk, and Smolensk. Let our -remotest posterity recall your achievements this day with pride. Let -it be said of each of you: "He was in the great battle before Moscow!" - - -"Before Moscow!" repeated Napoleon, and inviting M. de Beausset, who -was so fond of travel, to accompany him on his ride, he went out of -the tent to where the horses stood saddled. - -"Your Majesty is too kind!" replied de Beausset to the invitation to -accompany the Emperor; he wanted to sleep, did not know how to ride -and was afraid of doing so. - -But Napoleon nodded to the traveler, and de Beausset had to mount. -When Napoleon came out of the tent the shouting of the Guards before -his son's portrait grew still louder. Napoleon frowned. - -"Take him away!" he said, pointing with a gracefully majestic -gesture to the portrait. "It is too soon for him to see a field of -battle." - -De Beausset closed his eyes, bowed his head, and sighed deeply, to -indicate how profoundly he valued and comprehended the Emperor's -words. - - - - - -CHAPTER XXVII - - -On the twenty-fifth of August, so his historians tell us, Napoleon -spent the whole day on horseback inspecting the locality, -considering plans submitted to him by his marshals, and personally -giving commands to his generals. - -The original line of the Russian forces along the river Kolocha -had been dislocated by the capture of the Shevardino Redoubt on the -twenty-fourth, and part of the line--the left flank--had been drawn -back. That part of the line was not entrenched and in front of it -the ground was more open and level than elsewhere. It was evident to -anyone, military or not, that it was here the French should attack. It -would seem that not much consideration was needed to reach this -conclusion, nor any particular care or trouble on the part of the -Emperor and his marshals, nor was there any need of that special and -supreme quality called genius that people are so apt to ascribe to -Napoleon; yet the historians who described the event later and the men -who then surrounded Napoleon, and he himself, thought otherwise. - -Napoleon rode over the plain and surveyed the locality with a -profound air and in silence, nodded with approval or shook his head -dubiously, and without communicating to the generals around him the -profound course of ideas which guided his decisions merely gave them -his final conclusions in the form of commands. Having listened to a -suggestion from Davout, who was now called Prince d'Eckmuhl, to turn -the Russian left wing, Napoleon said it should not be done, without -explaining why not. To a proposal made by General Campan (who was to -attack the fleches) to lead his division through the woods, Napoleon -agreed, though the so-called Duke of Elchingen (Ney) ventured to -remark that a movement through the woods was dangerous and might -disorder the division. - -Having inspected the country opposite the Shevardino Redoubt, -Napoleon pondered a little in silence and then indicated the spots -where two batteries should be set up by the morrow to act against -the Russian entrenchments, and the places where, in line with them, -the field artillery should be placed. - -After giving these and other commands he returned to his tent, and -the dispositions for the battle were written down from his dictation. - -These dispositions, of which the French historians write with -enthusiasm and other historians with profound respect, were as -follows: - - -At dawn the two new batteries established during the night on the -plain occupied by the Prince d'Eckmuhl will open fire on the -opposing batteries of the enemy. - -At the same time the commander of the artillery of the 1st Corps, -General Pernetti, with thirty cannon of Campan's division and all -the howitzers of Dessaix's and Friant's divisions, will move -forward, open fire, and overwhelm with shellfire the enemy's -battery, against which will operate: - - 24 guns of the artillery of the Guards - 30 guns of Campan's division - -and 8 guns of Friant's and Dessaix's divisions - -- - -in all 62 guns. - - -The commander of the artillery of the 3rd Corps, General Fouche, -will place the howitzers of the 3rd and 8th Corps, sixteen in all, -on the flanks of the battery that is to bombard the entrenchment on -the left, which will have forty guns in all directed against it. - -General Sorbier must be ready at the first order to advance with all -the howitzers of the Guard's artillery against either one or other -of the entrenchments. - -During the cannonade Prince Poniatowski is to advance through the -wood on the village and turn the enemy's position. - -General Campan will move through the wood to seize the first -fortification. - -After the advance has begun in this manner, orders will be given -in accordance with the enemy's movements. - -The cannonade on the left flank will begin as soon as the guns of -the right wing are heard. The sharpshooters of Morand's division and -of the vice-King's division will open a heavy fire on seeing the -attack commence on the right wing. - -The vice-King will occupy the village and cross by its three -bridges, advancing to the same heights as Morand's and Gibrard's -divisions, which under his leadership will be directed against the -redoubt and come into line with the rest of the forces. - -All this must be done in good order (le tout se fera avec ordre et -methode) as far as possible retaining troops in reserve. - The Imperial Camp near Mozhaysk, - September, 6, 1812. - - -These dispositions, which are very obscure and confused if one -allows oneself to regard the arrangements without religious awe of his -genius, related to Napoleon's orders to deal with four points--four -different orders. Not one of these was, or could be, carried out. - -In the disposition it is said first that the batteries placed on the -spot chosen by Napoleon, with the guns of Pernetti and Fouche; which -were to come in line with them, 102 guns in all, were to open fire and -shower shells on the Russian fleches and redoubts. This could not be -done, as from the spots selected by Napoleon the projectiles did not -carry to the Russian works, and those 102 guns shot into the air until -the nearest commander, contrary to Napoleon's instructions, moved them -forward. - -The second order was that Poniatowski, moving to the village through -the wood, should turn the Russian left flank. This could not be done -and was not done, because Poniatowski, advancing on the village -through the wood, met Tuchkov there barring his way, and could not and -did not turn the Russian position. - -The third order was: General Campan will move through the wood to -seize the first fortification. General Campan's division did not seize -the first fortification but was driven back, for on emerging from -the wood it had to reform under grapeshot, of which Napoleon was -unaware. - -The fourth order was: The vice-King will occupy the village -(Borodino) and cross by its three bridges, advancing to the same -heights as Morand's and Gdrard's divisions (for whose movements no -directions are given), which under his leadership will be directed -against the redoubt and come into line with the rest of the forces. - -As far as one can make out, not so much from this unintelligible -sentence as from the attempts the vice-King made to execute the orders -given him, he was to advance from the left through Borodino to the -redoubt while the divisions of Morand and Gerard were to advance -simultaneously from the front. - -All this, like the other parts of the disposition, was not and could -not be executed. After passing through Borodino the vice-King was -driven back to the Kolocha and could get no farther; while the -divisions of Morand and Gerard did not take the redoubt but were -driven back, and the redoubt was only taken at the end of the battle -by the cavalry (a thing probably unforeseen and not heard of by -Napoleon). So not one of the orders in the disposition was, or could -be, executed. But in the disposition it is said that, after the -fight has commenced in this manner, orders will be given in accordance -with the enemy's movements, and so it might be supposed that all -necessary arrangements would be made by Napoleon during the battle. -But this was not and could not be done, for during the whole battle -Napoleon was so far away that, as appeared later, he could not know -the course of the battle and not one of his orders during the fight -could be executed. - - - - - -CHAPTER XXVIII - - -Many historians say that the French did not win the battle of -Borodino because Napoleon had a cold, and that if he had not had a -cold the orders he gave before and during the battle would have been -still more full of genius and Russia would have been lost and the face -of the world have been changed. To historians who believe that -Russia was shaped by the will of one man--Peter the Great--and that -France from a republic became an empire and French armies went to -Russia at the will of one man--Napoleon--to say that Russia remained a -power because Napoleon had a bad cold on the twenty-fourth of August -may seem logical and convincing. - -If it had depended on Napoleon's will to fight or not to fight the -battle of Borodino, and if this or that other arrangement depended -on his will, then evidently a cold affecting the manifestation of -his will might have saved Russia, and consequently the valet who -omitted to bring Napoleon his waterproof boots on the twenty-fourth -would have been the savior of Russia. Along that line of thought -such a deduction is indubitable, as indubitable as the deduction -Voltaire made in jest (without knowing what he was jesting at) when he -saw that the Massacre of St. Bartholomew was due to Charles IX's -stomach being deranged. But to men who do not admit that Russia was -formed by the will of one man, Peter I, or that the French Empire -was formed and the war with Russia begun by the will of one man, -Napoleon, that argument seems not merely untrue and irrational, but -contrary to all human reality. To the question of what causes historic -events another answer presents itself, namely, that the course of -human events is predetermined from on high--depends on the coincidence -of the wills of all who take part in the events, and that a Napoleon's -influence on the course of these events is purely external and -fictitious. - -Strange as at first glance it may seem to suppose that the -Massacre of St. Bartholomew was not due to Charles IX's will, though -he gave the order for it and thought it was done as a result of that -order; and strange as it may seem to suppose that the slaughter of -eighty thousand men at Borodino was not due to Napoleon's will, though -he ordered the commencement and conduct of the battle and thought it -was done because he ordered it; strange as these suppositions -appear, yet human dignity--which tells me that each of us is, if not -more at least not less a man than the great Napoleon--demands the -acceptance of that solution of the question, and historic -investigation abundantly confirms it. - -At the battle of Borodino Napoleon shot at no one and killed no one. -That was all done by the soldiers. Therefore it was not he who -killed people. - -The French soldiers went to kill and be killed at the battle of -Borodino not because of Napoleon's orders but by their own volition. -The whole army--French, Italian, German, Polish, and Dutch--hungry, -ragged, and weary of the campaign, felt at the sight of an army -blocking their road to Moscow that the wine was drawn and must be -drunk. Had Napoleon then forbidden them to fight the Russians, they -would have killed him and have proceeded to fight the Russians because -it was inevitable. - -When they heard Napoleon's proclamation offering them, as -compensation for mutilation and death, the words of posterity about -their having been in the battle before Moscow, they cried "Vive -l'Empereur!" just as they had cried "Vive l'Empereur!" at the sight of -the portrait of the boy piercing the terrestrial globe with a toy -stick, and just as they would have cried "Vive l'Empereur!" at any -nonsense that might be told them. There was nothing left for them to -do but cry "Vive l'Empereur!" and go to fight, in order to get food -and rest as conquerors in Moscow. So it was not because of -Napoleon's commands that they killed their fellow men. - -And it was not Napoleon who directed the course of the battle, for -none of his orders were executed and during the battle he did not know -what was going on before him. So the way in which these people -killed one another was not decided by Napoleon's will but occurred -independently of him, in accord with the will of hundreds of thousands -of people who took part in the common action. It only seemed to -Napoleon that it all took place by his will. And so the question -whether he had or had not a cold has no more historic interest than -the cold of the least of the transport soldiers. - -Moreover, the assertion made by various writers that his cold was -the cause of his dispositions not being as well planned as on former -occasions, and of his orders during the battle not being as good as -previously, is quite baseless, which again shows that Napoleon's -cold on the twenty-sixth of August was unimportant. - -The dispositions cited above are not at all worse, but are even -better, than previous dispositions by which he had won victories. -His pseudo-orders during the battle were also no worse than -formerly, but much the same as usual. These dispositions and orders -only seem worse than previous ones because the battle of Borodino -was the first Napoleon did not win. The profoundest and most excellent -dispositions and orders seem very bad, and every learned militarist -criticizes them with looks of importance, when they relate to a -battle that has been lost, and the very worst dispositions and -orders seem very good, and serious people fill whole volumes to -demonstrate their merits, when they relate to a battle that has been -won. - -The dispositions drawn up by Weyrother for the battle of -Austerlitz were a model of perfection for that kind of composition, -but still they were criticized--criticized for their very -perfection, for their excessive minuteness. - -Napoleon at the battle of Borodino fulfilled his office as -representative of authority as well as, and even better than, at other -battles. He did nothing harmful to the progress of the battle; he -inclined to the most reasonable opinions, he made no confusion, did -not contradict himself, did not get frightened or run away from the -field of battle, but with his great tact and military experience -carried out his role of appearing to command, calmly and with dignity. - - - - - -CHAPTER XXIX - - -On returning from a second inspection of the lines, Napoleon -remarked: - -"The chessmen are set up, the game will begin tomorrow!" - -Having ordered punch and summoned de Beausset, he began to talk to -him about Paris and about some changes he meant to make the Empress' -household, surprising the prefect by his memory of minute details -relating to the court. - -He showed an interest in trifles, joked about de Beausset's love -of travel, and chatted carelessly, as a famous, self-confident surgeon -who knows his job does when turning up his sleeves and putting on -his apron while a patient is being strapped to the operating table. -"The matter is in my hands and is clear and definite in my head. -When the times comes to set to work I shall do it as no one else -could, but now I can jest, and the more I jest and the calmer I am the -more tranquil and confident you ought to be, and the more amazed at my -genius." - -Having finished his second glass of punch, Napoleon went to rest -before the serious business which, he considered, awaited him next -day. He was so much interested in that task that he was unable to -sleep, and in spite of his cold which had grown worse from the -dampness of the evening, he went into the large division of the tent -at three o'clock in the morning, loudly blowing his nose. He asked -whether the Russians had not withdrawn, and was told that the -enemy's fires were still in the same places. He nodded approval. - -The adjutant in attendance came into the tent. - -"Well, Rapp, do you think we shall do good business today?" Napoleon -asked him. - -"Without doubt, sire," replied Rapp. - -Napoleon looked at him. - -"Do you remember, sire, what you did me the honor to say at -Smolensk?" continued Rapp. "The wine is drawn and must be drunk." - -Napoleon frowned and sat silent for a long time leaning his head -on his hand. - -"This poor army!" he suddenly remarked. "It has diminished greatly -since Smolensk. Fortune is frankly a courtesan, Rapp. I have always -said so and I am beginning to experience it. But the Guards, Rapp, the -Guards are intact?" he remarked interrogatively. - -"Yes, sire," replied Rapp. - -Napoleon took a lozenge, put it in his mouth, and glanced at his -watch. He was not sleepy and it was still not nearly morning. It was -impossible to give further orders for the sake of killing time, for -the orders had all been given and were now being executed. - -"Have the biscuits and rice been served out to the regiments of -the Guards?" asked Napoleon sternly. - -"Yes, sire." - -"The rice too?" - -Rapp replied that he had given the Emperor's order about the rice, -but Napoleon shook his head in dissatisfaction as if not believing -that his order had been executed. An attendant came in with punch. -Napoleon ordered another glass to be brought for Rapp, and silently -sipped his own. - -"I have neither taste nor smell," he remarked, sniffing at his -glass. "This cold is tiresome. They talk about medicine--what is the -good of medicine when it can't cure a cold! Corvisart gave me these -lozenges but they don't help at all. What can doctors cure? One -can't cure anything. Our body is a machine for living. It is organized -for that, it is its nature. Let life go on in it unhindered and let it -defend itself, it will do more than if you paralyze it by -encumbering it with remedies. Our body is like a perfect watch that -should go for a certain time; watchmaker cannot open it, he can only -adjust it by fumbling, and that blindfold.... Yes, our body is just -a machine for living, that is all." - -And having entered on the path of definition, of which he was -fond, Napoleon suddenly and unexpectedly gave a new one. - -"Do you know, Rapp, what military art is?" asked he. "It is the -art of being stronger than the enemy at a given moment. That's all." - -Rapp made no reply. - -"Tomorrow we shall have to deal with Kutuzov!" said Napoleon. "We -shall see! Do you remember at Braunau he commanded an army for three -weeks and did not once mount a horse to inspect his -entrenchments.... We shall see!" - -He looked at his watch. It was still only four o'clock. He did not -feel sleepy. The punch was finished and there was still nothing to do. -He rose, walked to and fro, put on a warm overcoat and a hat, and went -out of the tent. The night was dark and damp, a scarcely perceptible -moisture was descending from above. Near by, the campfires were -dimly burning among the French Guards, and in the distance those of -the Russian line shone through the smoke. The weather was calm, and -the rustle and tramp of the French troops already beginning to move to -take up their positions were clearly audible. - -Napoleon walked about in front of his tent, looked at the fires -and listened to these sounds, and as he was passing a tall guardsman -in a shaggy cap, who was standing sentinel before his tent and had -drawn himself up like a black pillar at sight of the Emperor, Napoleon -stopped in front of him. - -"What year did you enter the service?" he asked with that -affectation of military bluntness and geniality with which he always -addressed the soldiers. - -The man answered the question. - -"Ah! One of the old ones! Has your regiment had its rice?" - -"It has, Your Majesty." - -Napoleon nodded and walked away. - - -At half-past five Napoleon rode to the village of Shevardino. - -It was growing light, the sky was clearing, only a single cloud -lay in the east. The abandoned campfires were burning themselves out -in the faint morning light. - -On the right a single deep report of a cannon resounded and died -away in the prevailing silence. Some minutes passed. A second and a -third report shook the air, then a fourth and a fifth boomed -solemnly near by on the right. - -The first shots had not yet ceased to reverberate before others rang -out and yet more were heard mingling with and overtaking one another. - -Napoleon with his suite rode up to the Shevardino Redoubt where he -dismounted. The game had begun. - - - - - -CHAPTER XXX - - -On returning to Gorki after having seen Prince Andrew, Pierre -ordered his groom to get the horses ready and to call him early in the -morning, and then immediately fell asleep behind a partition in a -corner Boris had given up to him. - -Before he was thoroughly awake next morning everybody had already -left the hut. The panes were rattling in the little windows and his -groom was shaking him. - -"Your excellency! Your excellency! Your excellency!" he kept -repeating pertinaciously while he shook Pierre by the shoulder without -looking at him, having apparently lost hope of getting him to wake up. - -"What? Has it begun? Is it time?" Pierre asked, waking up. - -"Hear the firing," said the groom, a discharged soldier. "All the -gentlemen have gone out, and his Serene Highness himself rode past -long ago." - -Pierre dressed hastily and ran out to the porch. Outside all was -bright, fresh, dewy, and cheerful. The sun, just bursting forth from -behind a cloud that had concealed it, was shining, with rays still -half broken by the clouds, over the roofs of the street opposite, on -the dew-besprinkled dust of the road, on the walls of the houses, on -the windows, the fence, and on Pierre's horses standing before the -hut. The roar of guns sounded more distinct outside. An adjutant -accompanied by a Cossack passed by at a sharp trot. - -"It's time, Count; it's time!" cried the adjutant. - -Telling the groom to follow him with the horses, Pierre went down -the street to the knoll from which he had looked at the field of -battle the day before. A crowd of military men was assembled there, -members of the staff could be heard conversing in French, and -Kutuzov's gray head in a white cap with a red band was visible, his -gray nape sunk between his shoulders. He was looking through a field -glass down the highroad before him. - -Mounting the steps to the knoll Pierre looked at the scene before -him, spellbound by beauty. It was the same panorama he had admired -from that spot the day before, but now the whole place was full of -troops and covered by smoke clouds from the guns, and the slanting -rays of the bright sun, rising slightly to the left behind Pierre, -cast upon it through the clear morning air penetrating streaks of -rosy, golden tinted light and long dark shadows. The forest at the -farthest extremity of the panorama seemed carved in some precious -stone of a yellowish-green color; its undulating outline was -silhouetted against the horizon and was pierced beyond Valuevo by -the Smolensk highroad crowded with troops. Nearer at hand glittered -golden cornfields interspersed with copses. There were troops to be -seen everywhere, in front and to the right and left. All this was -vivid, majestic, and unexpected; but what impressed Pierre most of all -was the view of the battlefield itself, of Borodino and the hollows on -both sides of the Kolocha. - -Above the Kolocha, in Borodino and on both sides of it, especially -to the left where the Voyna flowing between its marshy banks falls -into the Kolocha, a mist had spread which seemed to melt, to dissolve, -and to become translucent when the brilliant sun appeared and -magically colored and outlined everything. The smoke of the guns -mingled with this mist, and over the whole expanse and through that -mist the rays of the morning sun were reflected, flashing back like -lightning from the water, from the dew, and from the bayonets of the -troops crowded together by the riverbanks and in Borodino. A white -church could be seen through the mist, and here and there the roofs of -huts in Borodino as well as dense masses of soldiers, or green -ammunition chests and ordnance. And all this moved, or seemed to move, -as the smoke and mist spread out over the whole space. Just as in -the mist-enveloped hollow near Borodino, so along the entire line -outside and above it and especially in the woods and fields to the -left, in the valleys and on the summits of the high ground, clouds -of powder smoke seemed continually to spring up out of nothing, now -singly, now several at a time, some translucent, others dense, -which, swelling, growing, rolling, and blending, extended over the -whole expanse. - -These puffs of smoke and (strange to say) the sound of -the firing produced the chief beauty of the spectacle. - -"Puff!"--suddenly a round compact cloud of smoke was seen merging -from violet into gray and milky white, and "boom!" came the report a -second later. - -"Puff! puff!"--and two clouds arose pushing one another and blending -together; and "boom, boom!" came the sounds confirming what the eye -had seen. - -Pierre glanced round at the first cloud, which he had seen as a -round compact ball, and in its place already were balloons of smoke -floating to one side, and--"puff" (with a pause)--"puff, puff!" -three and then four more appeared and then from each, with the same -interval--"boom--boom, boom!" came the fine, firm, precise sounds in -reply. It seemed as if those smoke clouds sometimes ran and -sometimes stood still while woods, fields, and glittering bayonets ran -past them. From the left, over fields and bushes, those large balls of -smoke were continually appearing followed by their solemn reports, -while nearer still, in the hollows and woods, there burst from the -muskets small cloudlets that had no time to become balls, but had -their little echoes in just the same way. "Trakh-ta-ta-takh!" came the -frequent crackle of musketry, but it was irregular and feeble in -comparison with the reports of the cannon. - -Pierre wished to be there with that smoke, those shining bayonets, -that movement, and those sounds. He turned to look at Kutuzov and -his suite, to compare his impressions with those of others. They -were all looking at the field of battle as he was, and, as it seemed -to him, with the same feelings. All their faces were now shining -with that latent warmth of feeling Pierre had noticed the day before -and had fully understood after his talk with Prince Andrew. - -"Go, my dear fellow, go... and Christ be with you!" Kutuzov was -saying to a general who stood beside him, not taking his eye from -the battlefield. - -Having received this order the general passed by Pierre on his way -down the knoll. - -"To the crossing!" said the general coldly and sternly in reply to -one of the staff who asked where he was going. - -"I'll go there too, I too!" thought Pierre, and followed the -general. - -The general mounted a horse a Cossack had brought him. Pierre went -to his groom who was holding his horses and, asking which was the -quietest, clambered onto it, seized it by the mane, and turning out -his toes pressed his heels against its sides and, feeling that his -spectacles were slipping off but unable to let go of the mane and -reins, he galloped after the general, causing the staff officers to -smile as they watched him from the knoll. - - - - - -CHAPTER XXXI - - -Having descended the hill the general after whom Pierre was -galloping turned sharply to the left, and Pierre, losing sight of him, -galloped in among some ranks of infantry marching ahead of him. He -tried to pass either in front of them or to the right or left, but -there were soldiers everywhere, all with expression and busy with some -unseen but evidently important task. They all gazed with the same -dissatisfied and inquiring expression at this stout man in a white -hat, who for some unknown reason threatened to trample them under -his horse's hoofs. - -"Why ride into the middle of the battalion?" one of them shouted -at him. - -Another prodded his horse with the butt end of a musket, and Pierre, -bending over his saddlebow and hardly able to control his shying -horse, galloped ahead of the soldiers where there was a free space. - -There was a bridge ahead of him, where other soldiers stood -firing. Pierre rode up to them. Without being aware of it he had -come to the bridge across the Kolocha between Gorki and Borodino, -which the French (having occupied Borodino) were attacking in the -first phase of the battle. Pierre saw that there was a bridge in front -of him and that soldiers were doing something on both sides of it -and in the meadow, among the rows of new-mown hay which he had taken -no notice of amid the smoke of the campfires the day before; but -despite the incessant firing going on there he had no idea that this -was the field of battle. He did not notice the sound of the bullets -whistling from every side, or the projectiles that flew over him, -did not see the enemy on the other side of the river, and for a long -time did not notice the killed and wounded, though many fell near him. -He looked about him with a smile which did not leave his face. - -"Why's that fellow in front of the line?" shouted somebody at him -again. - -"To the left!... Keep to the right!" the men shouted to him. - -Pierre went to the right, and unexpectedly encountered one of -Raevski's adjutants whom he knew. The adjutant looked angrily at -him, evidently also intending to shout at him, but on recognizing -him he nodded. - -"How have you got here?" he said, and galloped on. - -Pierre, feeling out of place there, having nothing to do, and afraid -of getting in someone's way again, galloped after the adjutant. - -"What's happening here? May I come with you?" he asked. - -"One moment, one moment!" replied the adjutant, and riding up to a -stout colonel who was standing in the meadow, he gave him some message -and then addressed Pierre. - -"Why have you come here, Count?" he asked with a smile. "Still -inquisitive?" - -"Yes, yes," assented Pierre. - -But the adjutant turned his horse about and rode on. - -"Here it's tolerable," said he, "but with Bagration on the left -flank they're getting it frightfully hot." - -"Really?" said Pierre. "Where is that?" - -"Come along with me to our knoll. We can get a view from there and -in our battery it is still bearable," said the adjutant. "Will you -come?" - -"Yes, I'll come with you," replied Pierre, looking round for his -groom. - -It was only now that he noticed wounded men staggering along or -being carried on stretchers. On that very meadow he had ridden over -the day before, a soldier was lying athwart the rows of scented hay, -with his head thrown awkwardly back and his shako off. - -"Why haven't they carried him away?" Pierre was about to ask, but -seeing the stern expression of the adjutant who was also looking -that way, he checked himself. - -Pierre did not find his groom and rode along the hollow with the -adjutant to Raevski's Redoubt. His horse lagged behind the -adjutant's and jolted him at every step. - -"You don't seem to be used to riding, Count?" remarked the adjutant. - -"No it's not that, but her action seems so jerky," said Pierre in -a puzzled tone. - -"Why... she's wounded!" said the adjutant. "In the off foreleg above -the knee. A bullet, no doubt. I congratulate you, Count, on your -baptism of fire!" - -Having ridden in the smoke past the Sixth Corps, behind the -artillery which had been moved forward and was in action, deafening -them with the noise of firing, they came to a small wood. There it was -cool and quiet, with a scent of autumn. Pierre and the adjutant -dismounted and walked up the hill on foot. - -"Is the general here?" asked the adjutant on reaching the knoll. - -"He was here a minute ago but has just gone that way," someone -told him, pointing to the right. - -The adjutant looked at Pierre as if puzzled what to do with him now. - -"Don't trouble about me," said Pierre. "I'll go up onto the knoll if -I may?" - -"Yes, do. You'll see everything from there and it's less -dangerous, and I'll come for you." - -Pierre went to the battery and the adjutant rode on. They did not -meet again, and only much later did Pierre learn that he lost an arm -that day. - -The knoll to which Pierre ascended was that famous one afterwards -known to the Russians as the Knoll Battery or Raevski's Redoubt, and -to the French as la grande redoute, la fatale redoute, la redoute du -centre, around which tens of thousands fell, and which the French -regarded as the key to the whole position. - -This redoubt consisted of a knoll, on three sides of which -trenches had been dug. Within the entrenchment stood ten guns that -were being fired through openings in the earthwork. - -In line with the knoll on both sides stood other guns which also -fired incessantly. A little behind the guns stood infantry. When -ascending that knoll Pierre had no notion that this spot, on which -small trenches had been dug and from which a few guns were firing, was -the most important point of the battle. - -On the contrary, just because he happened to be there he thought -it one of the least significant parts of the field. - -Having reached the knoll, Pierre sat down at one end of a trench -surrounding the battery and gazed at what was going on around him with -an unconsciously happy smile. Occasionally he rose and walked about -the battery still with that same smile, trying not to obstruct the -soldiers who were loading, hauling the guns, and continually running -past him with bags and charges. The guns of that battery were being -fired continually one after another with a deafening roar, -enveloping the whole neighborhood in powder smoke. - -In contrast with the dread felt by the infantrymen placed in -support, here in the battery where a small number of men busy at their -work were separated from the rest by a trench, everyone experienced -a common and as it were family feeling of animation. - -The intrusion of Pierre's nonmilitary figure in a white hat made -an unpleasant impression at first. The soldiers looked askance at -him with surprise and even alarm as they went past him. The senior -artillery officer, a tall, long-legged, pockmarked man, moved over -to Pierre as if to see the action of the farthest gun and looked at -him with curiosity. - -A young round-faced officer, quite a boy still and evidently only -just out of the Cadet College, who was zealously commanding the two -guns entrusted to him, addressed Pierre sternly. - -"Sir," he said, "permit me to ask you to stand aside. You must not -be here." - -The soldiers shook their heads disapprovingly as they looked at -Pierre. But when they had convinced themselves that this man in the -white hat was doing no harm, but either sat quietly on the slope of -the trench with a shy smile or, politely making way for the -soldiers, paced up and down the battery under fire as calmly as if -he were on a boulevard, their feeling of hostile distrust gradually -began to change into a kindly and bantering sympathy, such as soldiers -feel for their dogs, cocks, goats, and in general for the animals that -live with the regiment. The men soon accepted Pierre into their -family, adopted him, gave him a nickname ("our gentleman"), and made -kindly fun of him among themselves. - -A shell tore up the earth two paces from Pierre and he looked around -with a smile as he brushed from his clothes some earth it had thrown -up. - -"And how's it you're not afraid, sir, really now?" a red-faced, -broad-shouldered soldier asked Pierre, with a grin that disclosed a -set of sound, white teeth. - -"Are you afraid, then?" said Pierre. - -"What else do you expect?" answered the soldier. "She has no -mercy, you know! When she comes spluttering down, out go your innards. -One can't help being afraid," he said laughing. - -Several of the men, with bright kindly faces, stopped beside Pierre. -They seemed not to have expected him to talk like anybody else, and -the discovery that he did so delighted them. - -"It's the business of us soldiers. But in a gentleman it's -wonderful! There's a gentleman for you!" - -"To your places!" cried the young officer to the men gathered -round Pierre. - -The young officer was evidently exercising his duties for the -first or second time and therefore treated both his superiors and -the men with great precision and formality. - -The booming cannonade and the fusillade of musketry were growing -more intense over the whole field, especially to the left where -Bagration's fleches were, but where Pierre was the smoke of the firing -made it almost impossible to distinguish anything. Moreover, his whole -attention was engrossed by watching the family circle--separated -from all else--formed by the men in the battery. His first unconscious -feeling of joyful animation produced by the sights and sounds of the -battlefield was now replaced by another, especially since he had -seen that soldier lying alone in the hayfield. Now, seated on the -slope of the trench, he observed the faces of those around him. - -By ten o'clock some twenty men had already been carried away from -the battery; two guns were smashed and cannon balls fell more and more -frequently on the battery and spent bullets buzzed and whistled -around. But the men in the battery seemed not to notice this, and -merry voices and jokes were heard on all sides. - -"A live one!" shouted a man as a whistling shell approached. - -"Not this way! To the infantry!" added another with loud laughter, -seeing the shell fly past and fall into the ranks of the supports. - -"Are you bowing to a friend, eh?" remarked another, chaffing a -peasant who ducked low as a cannon ball flew over. - -Several soldiers gathered by the wall of the trench, looking out -to see what was happening in front. - -"They've withdrawn the front line, it has retired," said they, -pointing over the earthwork. - -"Mind your own business," an old sergeant shouted at them. "If -they've retired it's because there's work for them to do farther -back." - -And the sergeant, taking one of the men by the shoulders, gave him a -shove with his knee. This was followed by a burst of laughter. - -"To the fifth gun, wheel it up!" came shouts from one side. - -"Now then, all together, like bargees!" rose the merry voices of -those who were moving the gun. - -"Oh, she nearly knocked our gentleman's hat off!" cried the -red-faced humorist, showing his teeth chaffing Pierre. "Awkward -baggage!" he added reproachfully to a cannon ball that struck a cannon -wheel and a man's leg. - -"Now then, you foxes!" said another, laughing at some militiamen -who, stooping low, entered the battery to carry away the wounded man. - -"So this gruel isn't to your taste? Oh, you crows! You're scared!" -they shouted at the militiamen who stood hesitating before the man -whose leg had been torn off. - -"There, lads... oh, oh!" they mimicked the peasants, "they don't -like it at all!" - -Pierre noticed that after every ball that hit the redoubt, and after -every loss, the liveliness increased more and more. - -As the flames of the fire hidden within come more and more vividly -and rapidly from an approaching thundercloud, so, as if in -opposition to what was taking place, the lightning of hidden fire -growing more and more intense glowed in the faces of these men. - -Pierre did not look out at the battlefield and was not concerned -to know what was happening there; he was entirely absorbed in watching -this fire which burned ever more brightly and which he felt was -flaming up in the same way in his own soul. - -At ten o'clock the infantry that had been among the bushes in -front of the battery and along the Kamenka streamlet retreated. From -the battery they could be seen running back past it carrying their -wounded on their muskets. A general with his suite came to the -battery, and after speaking to the colonel gave Pierre an angry look -and went away again having ordered the infantry supports behind the -battery to lie down, so as to be less exposed to fire. After this from -amid the ranks of infantry to the right of the battery came the -sound of a drum and shouts of command, and from the battery one saw -how those ranks of infantry moved forward. - -Pierre looked over the wall of the trench and was particularly -struck by a pale young officer who, letting his sword hang down, was -walking backwards and kept glancing uneasily around. - -The ranks of the infantry disappeared amid the smoke but their -long-drawn shout and rapid musketry firing could still be heard. A few -minutes later crowds of wounded men and stretcher-bearers came back -from that direction. Projectiles began to fall still more frequently -in the battery. Several men were lying about who had not been removed. -Around the cannon the men moved still more briskly and busily. No -one any longer took notice of Pierre. Once or twice he was shouted -at for being in the way. The senior officer moved with big, rapid -strides from one gun to another with a frowning face. The young -officer, with his face still more flushed, commanded the men more -scrupulously than ever. The soldiers handed up the charges, turned, -loaded, and did their business with strained smartness. They gave -little jumps as they walked, as though they were on springs. - -The stormcloud had come upon them, and in every face the fire -which Pierre had watched kindle burned up brightly. Pierre standing -beside the commanding officer. The young officer, his hand to his -shako, ran up to his superior. - -"I have the honor to report, sir, that only eight rounds are left. -Are we to continue firing?" he asked. - -"Grapeshot!" the senior shouted, without answering the question, -looking over the wall of the trench. - -Suddenly something happened: the young officer gave a gasp and -bending double sat down on the ground like a bird shot on the wing. -Everything became strange, confused, and misty in Pierre's eyes. - -One cannon ball after another whistled by and struck the -earthwork, a soldier, or a gun. Pierre, who had not noticed these -sounds before, now heard nothing else. On the right of the battery -soldiers shouting "Hurrah!" were running not forwards but backwards, -it seemed to Pierre. - -A cannon ball struck the very end of the earth work by which he -was standing, crumbling down the earth; a black ball flashed before -his eyes and at the same instant plumped into something. Some -militiamen who were entering the battery ran back. - -"All with grapeshot!" shouted the officer. - -The sergeant ran up to the officer and in a frightened whisper -informed him (as a butler at dinner informs his master that there is -no more of some wine asked for) that there were no more charges. - -"The scoundrels! What are they doing?" shouted the officer, -turning to Pierre. - -The officer's face was red and perspiring and his eyes glittered -under his frowning brow. - -"Run to the reserves and bring up the ammunition boxes!" he -yelled, angrily avoiding Pierre with his eyes and speaking to his men. - -"I'll go," said Pierre. - -The officer, without answering him, strode across to the opposite -side. - -"Don't fire.... Wait!" he shouted. - -The man who had been ordered to go for ammunition stumbled against -Pierre. - -"Eh, sir, this is no place for you," said he, and ran down the -slope. - -Pierre ran after him, avoiding the spot where the young officer -was sitting. - -One cannon ball, another, and a third flew over him, falling in -front, beside, and behind him. Pierre ran down the slope. "Where am -I going?" he suddenly asked himself when he was already near the green -ammunition wagons. He halted irresolutely, not knowing whether to -return or go on. Suddenly a terrible concussion threw him backwards to -the ground. At the same instant he was dazzled by a great flash of -flame, and immediately a deafening roar, crackling, and whistling made -his ears tingle. - -When he came to himself he was sitting on the ground leaning on -his hands; the ammunition wagons he had been approaching no longer -existed, only charred green boards and rags littered the scorched -grass, and a horse, dangling fragments of its shaft behind it, -galloped past, while another horse lay, like Pierre, on the ground, -uttering prolonged and piercing cries. - - - - - -CHAPTER XXXII - - -Beside himself with terror Pierre jumped up and ran back to the -battery, as to the only refuge from the horrors that surrounded him. - -On entering the earthwork he noticed that there were men doing -something there but that no shots were being fired from the battery. -He had no time to realize who these men were. He saw the senior -officer lying on the earth wall with his back turned as if he were -examining something down below and that one of the soldiers he had -noticed before was struggling forward shouting "Brothers!" and -trying to free himself from some men who were holding him by the -arm. He also saw something else that was strange. - -But he had not time to realize that the colonel had been killed, -that the soldier shouting "Brothers!" was a prisoner, and that another -man had been bayoneted in the back before his eyes, for hardly had -he run into the redoubt before a thin, sallow-faced, perspiring man in -a blue uniform rushed on him sword in hand, shouting something. -Instinctively guarding against the shock--for they had been running -together at full speed before they saw one another--Pierre put out his -hands and seized the man (a French officer) by the shoulder with one -hand and by the throat with the other. The officer, dropping his -sword, seized Pierre by his collar. - -For some seconds they gazed with frightened eyes at one another's -unfamiliar faces and both were perplexed at what they had done and -what they were to do next. "Am I taken prisoner or have I taken him -prisoner?" each was thinking. But the French officer was evidently -more inclined to think he had been taken prisoner because Pierre's -strong hand, impelled by instinctive fear, squeezed his throat ever -tighter and tighter. The Frenchman was about to say something, when -just above their heads, terrible and low, a cannon ball whistled, -and it seemed to Pierre that the French officer's head had been torn -off, so swiftly had he ducked it. - -Pierre too bent his head and let his hands fall. Without further -thought as to who had taken whom prisoner, the Frenchman ran back to -the battery and Pierre ran down the slope stumbling over the dead -and wounded who, it seemed to him, caught at his feet. But before he -reached the foot of the knoll he was met by a dense crowd of Russian -soldiers who, stumbling, tripping up, and shouting, ran merrily and -wildly toward the battery. (This was the attack for which Ermolov -claimed the credit, declaring that only his courage and good luck made -such a feat possible: it was the attack in which he was said to have -thrown some St. George's Crosses he had in his pocket into the battery -for the first soldiers to take who got there.) - -The French who had occupied the battery fled, and our troops -shouting "Hurrah!" pursued them so far beyond the battery that it -was difficult to call them back. - -The prisoners were brought down from the battery and among them -was a wounded French general, whom the officers surrounded. Crowds -of wounded--some known to Pierre and some unknown--Russians and -French, with faces distorted by suffering, walked, crawled, and were -carried on stretchers from the battery. Pierre again went up onto -the knoll where he had spent over an hour, and of that family circle -which had received him as a member he did not find a single one. There -were many dead whom he did not know, but some he recognized. The young -officer still sat in the same way, bent double, in a pool of blood -at the edge of the earth wall. The red-faced man was still -twitching, but they did not carry him away. - -Pierre ran down the slope once more. - -"Now they will stop it, now they will be horrified at what they have -done!" he thought, aimlessly going toward a crowd of stretcher bearers -moving from the battlefield. - -But behind the veil of smoke the sun was still high, and in front -and especially to the left, near Semenovsk, something seemed to be -seething in the smoke, and the roar of cannon and musketry did not -diminish, but even increased to desperation like a man who, -straining himself, shrieks with all his remaining strength. - - - - - -CHAPTER XXXIII - - -The chief action of the battle of Borodino was fought within the -seven thousand feet between Borodino and Bagration's fleches. Beyond -that space there was, on the one side, a demonstration made by the -Russians with Uvarov's cavalry at midday, and on the other side, -beyond Utitsa, Poniatowski's collision with Tuchkov; but these two -were detached and feeble actions in comparison with what took place in -the center of the battlefield. On the field between Borodino and the -fleches, beside the wood, the chief action of the day took place on an -open space visible from both sides and was fought in the simplest -and most artless way. - -The battle began on both sides with a cannonade from several hundred -guns. - -Then when the whole field was covered with smoke, two divisions, -Campan's and Dessaix's, advanced from the French right, while -Murat's troops advanced on Borodino from their left. - -From the Shevardino Redoubt where Napoleon was standing the -fleches were two thirds of a mile away, and it was more than a mile as -the crow flies to Borodino, so that Napoleon could not see what was -happening there, especially as the smoke mingling with the mist hid -the whole locality. The soldiers of Dessaix's division advancing -against the fleches could only be seen till they had entered the -hollow that lay between them and the fleches. As soon as they had -descended into that hollow, the smoke of the guns and musketry on -the fleches grew so dense that it covered the whole approach on that -side of it. Through the smoke glimpses could be caught of something -black--probably men--and at times the glint of bayonets. But whether -they were moving or stationary, whether they were French or Russian, -could not be discovered from the Shevardino Redoubt. - -The sun had risen brightly and its slanting rays struck straight -into Napoleon's face as, shading his eyes with his hand, he looked -at the fleches. The smoke spread out before them, and at times it -looked as if the smoke were moving, at times as if the troops moved. -Sometimes shouts were heard through the firing, but it was -impossible to tell what was being done there. - -Napoleon, standing on the knoll, looked through a field glass, and -in its small circlet saw smoke and men, sometimes his own and -sometimes Russians, but when he looked again with the naked eye, he -could not tell where what he had seen was. - -He descended the knoll and began walking up and down before it. - -Occasionally he stopped, listened to the firing, and gazed -intently at the battlefield. - -But not only was it impossible to make out what was happening from -where he was standing down below, or from the knoll above on which -some of his generals had taken their stand, but even from the -fleches themselves--in which by this time there were now Russian and -now French soldiers, alternately or together, dead, wounded, alive, -frightened, or maddened--even at those fleches themselves it was -impossible to make out what was taking place. There for several -hours amid incessant cannon and musketry fire, now Russians were -seen alone, now Frenchmen alone, now infantry, and now cavalry: they -appeared, fired, fell, collided, not knowing what to do with one -another, screamed, and ran back again. - -From the battlefield adjutants he had sent out, and orderlies from -his marshals, kept galloping up to Napoleon with reports of the -progress of the action, but all these reports were false, both because -it was impossible in the heat of battle to say what was happening at -any given moment and because many of the adjutants did not go to the -actual place of conflict but reported what they had heard from others; -and also because while an adjutant was riding more than a mile to -Napoleon circumstances changed and the news he brought was already -becoming false. Thus an adjutant galloped up from Murat with tidings -that Borodino had been occupied and the bridge over the Kolocha was in -the hands of the French. The adjutant asked whether Napoleon wished -the troops to cross it? Napoleon gave orders that the troops should -form up on the farther side and wait. But before that order was given- -almost as soon in fact as the adjutant had left Borodino--the bridge -had been retaken by the Russians and burned, in the very skirmish at -which Pierre had been present at the beginning of the battle. - -An adjutant galloped up from the fleches with a pale and -frightened face and reported to Napoleon that their attack had been -repulsed, Campan wounded, and Davout killed; yet at the very time -the adjutant had been told that the French had been repulsed, the -fleches had in fact been recaptured by other French troops, and Davout -was alive and only slightly bruised. On the basis of these necessarily -untrustworthy reports Napoleon gave his orders, which had either -been executed before he gave them or could not be and were not -executed. - -The marshals and generals, who were nearer to the field of battle -but, like Napoleon, did not take part in the actual fighting and -only occasionally went within musket range, made their own -arrangements without asking Napoleon and issued orders where and in -what direction to fire and where cavalry should gallop and infantry -should run. But even their orders, like Napoleon's, were seldom -carried out, and then but partially. For the most part things happened -contrary to their orders. Soldiers ordered to advance ran back on -meeting grapeshot; soldiers ordered to remain where they were, -suddenly, seeing Russians unexpectedly before them, sometimes rushed -back and sometimes forward, and the cavalry dashed without orders in -pursuit of the flying Russians. In this way two cavalry regiments -galloped through the Semenovsk hollow and as soon as they reached -the top of the incline turned round and galloped full speed back -again. The infantry moved in the same way, sometimes running to -quite other places than those they were ordered to go to. All orders -as to where and when to move the guns, when to send infantry to -shoot or horsemen to ride down the Russian infantry--all such orders -were given by the officers on the spot nearest to the units concerned, -without asking either Ney, Davout, or Murat, much less Napoleon. -They did not fear getting into trouble for not fulfilling orders or -for acting on their own initiative, for in battle what is at stake -is what is dearest to man--his own life--and it sometimes seems that -safety lies in running back, sometimes in running forward; and these -men who were right in the heat of the battle acted according to the -mood of the moment. In reality, however, all these movements forward -and backward did not improve or alter the position of the troops. -All their rushing and galloping at one another did little harm, the -harm of disablement and death was caused by the balls and bullets that -flew over the fields on which these men were floundering about. As -soon as they left the place where the balls and bullets were flying -about, their superiors, located in the background, re-formed them -and brought them under discipline and under the influence of that -discipline led them back to the zone of fire, where under the -influence of fear of death they lost their discipline and rushed about -according to the chance promptings of the throng. - - - - - -CHAPTER XXXIV - - -Napoleon's generals--Davout, Ney, and Murat, who were near that -region of fire and sometimes even entered it--repeatedly led into it -huge masses of well-ordered troops. But contrary to what had always -happened in their former battles, instead of the news they expected of -the enemy's flight, these orderly masses returned thence as -disorganized and terrified mobs. The generals re-formed them, but -their numbers constantly decreased. In the middle of the day Murat -sent his adjutant to Napoleon to demand reinforcements. - -Napoleon sat at the foot of the knoll, drinking punch, when -Murat's adjutant galloped up with an assurance that the Russians would -be routed if His Majesty would let him have another division. - -"Reinforcements?" said Napoleon in a tone of stern surprise, looking -at the adjutant--a handsome lad with long black curls arranged like -Murat's own--as though he did not understand his words. - -"Reinforcements!" thought Napoleon to himself. "How can they need -reinforcements when they already have half the army directed against a -weak, unentrenched Russian wing?" - -"Tell the King of Naples," said he sternly, "that it is not noon -yet, and I don't yet see my chessboard clearly. Go!..." - -The handsome boy adjutant with the long hair sighed deeply without -removing his hand from his hat and galloped back to where men were -being slaughtered. - -Napoleon rose and having summoned Caulaincourt and Berthier began -talking to them about matters unconnected with the battle. - -In the midst of this conversation, which was beginning to interest -Napoleon, Berthier's eyes turned to look at a general with a suite, -who was galloping toward the knoll on a lathering horse. It was -Belliard. Having dismounted he went up to the Emperor with rapid -strides and in a loud voice began boldly demonstrating the necessity -of sending reinforcements. He swore on his honor that the Russians -were lost if the Emperor would give another division. - -Napoleon shrugged his shoulders and continued to pace up and down -without replying. Belliard began talking loudly and eagerly to the -generals of the suite around him. - -"You are very fiery, Belliard," said Napoleon, when he again came up -to the general. "In the heat of a battle it is easy to make a mistake. -Go and have another look and then come back to me." - -Before Belliard was out of sight, a messenger from another part of -the battlefield galloped up. - -"Now then, what do you want?" asked Napoleon in the tone of a man -irritated at being continually disturbed. - -"Sire, the prince..." began the adjutant. - -"Asks for reinforcements?" said Napoleon with an angry gesture. - -The adjutant bent his head affirmatively and began to report, but -the Emperor turned from him, took a couple of steps, stopped, came -back, and called Berthier. - -"We must give reserves," he said, moving his arms slightly apart. -"Who do you think should be sent there?" he asked of Berthier (whom he -subsequently termed "that gosling I have made an eagle"). - -"Send Claparede's division, sire," replied Berthier, who knew all -the divisions regiments, and battalions by heart. - -Napoleon nodded assent. - -The adjutant galloped to Claparede's division and a few minutes -later the Young Guards stationed behind the knoll moved forward. -Napoleon gazed silently in that direction. - -"No!" he suddenly said to Berthier. "I can't send Claparede. Send -Friant's division." - -Though there was no advantage in sending Friant's division instead -of Claparede's, and even in obvious inconvenience and delay in -stopping Claparede and sending Friant now, the order was carried out -exactly. Napoleon did not notice that in regard to his army he was -playing the part of a doctor who hinders by his medicines--a role he -so justly understood and condemned. - -Friant's division disappeared as the others had done into the -smoke of the battlefield. From all sides adjutants continued to arrive -at a gallop and as if by agreement all said the same thing. They all -asked for reinforcements and all said that the Russians were holding -their positions and maintaining a hellish fire under which the -French army was melting away. - -Napoleon sat on a campstool, wrapped in thought. - -M. de Beausset, the man so fond of travel, having fasted since -morning, came up to the Emperor and ventured respectfully to suggest -lunch to His Majesty. - -"I hope I may now congratulate Your Majesty on a victory?" said he. - -Napoleon silently shook his head in negation. Assuming the -negation to refer only to the victory and not to the lunch, M. de -Beausset ventured with respectful jocularity to remark that there is -no reason for not having lunch when one can get it. - -"Go away..." exclaimed Napoleon suddenly and morosely, and turned -aside. - -A beatific smile of regret, repentance, and ecstasy beamed on M. -de Beausset's face and he glided away to the other generals. - -Napoleon was experiencing a feeling of depression like that of an -ever-lucky gambler who, after recklessly flinging money about and -always winning, suddenly just when he has calculated all the chances -of the game, finds that the more he considers his play the more surely -he loses. - -His troops were the same, his generals the same, the same -preparations had been made, the same dispositions, and the same -proclamation courte et energique, he himself was still the same: he -knew that and knew that he was now even more experienced and -skillful than before. Even the enemy was the same as at Austerlitz and -Friedland--yet the terrible stroke of his arm had supernaturally -become impotent. - -All the old methods that had been unfailingly crowned with -success: the concentration of batteries on one point, an attack by -reserves to break the enemy's line, and a cavalry attack by "the men -of iron," all these methods had already been employed, yet not only -was there no victory, but from all sides came the same news of -generals killed and wounded, of reinforcements needed, of the -impossibility of driving back the Russians, and of disorganization -among his own troops. - -Formerly, after he had given two or three orders and uttered a few -phrases, marshals and adjutants had come galloping up with -congratulations and happy faces, announcing the trophies taken, the -corps of prisoners, bundles of enemy eagles and standards, cannon -and stores, and Murat had only begged leave to loose the cavalry to -gather in the baggage wagons. So it had been at Lodi, Marengo, Arcola, -Jena, Austerlitz, Wagram, and so on. But now something strange was -happening to his troops. - -Despite news of the capture of the fleches, Napoleon saw that this -was not the same, not at all the same, as what had happened in his -former battles. He saw that what he was feeling was felt by all the -men about him experienced in the art of war. All their faces looked -dejected, and they all shunned one another's eyes--only a de -Beausset could fail to grasp the meaning of what was happening. - -But Napoleon with his long experience of war well knew the meaning -of a battle not gained by the attacking side in eight hours, after all -efforts had been expended. He knew that it was a lost battle and -that the least accident might now--with the fight balanced on such a -strained center--destroy him and his army. - -When he ran his mind over the whole of this strange Russian campaign -in which not one battle had been won, and in which not a flag, or -cannon, or army corps had been captured in two months, when he -looked at the concealed depression on the faces around him and heard -reports of the Russians still holding their ground--a terrible feeling -like a nightmare took possession of him, and all the unlucky accidents -that might destroy him occurred to his mind. The Russians might fall -on his left wing, might break through his center, he himself might -be killed by a stray cannon ball. All this was possible. In former -battles he had only considered the possibilities of success, but now -innumerable unlucky chances presented themselves, and he expected them -all. Yes, it was like a dream in which a man fancies that a ruffian is -coming to attack him, and raises his arm to strike that ruffian a -terrible blow which he knows should annihilate him, but then feels -that his arm drops powerless and limp like a rag, and the horror of -unavoidable destruction seizes him in his helplessness. - -The news that the Russians were attacking the left flank of the -French army aroused that horror in Napoleon. He sat silently on a -campstool below the knoll, with head bowed and elbows on his knees. -Berthier approached and suggested that they should ride along the line -to ascertain the position of affairs. - -"What? What do you say?" asked Napoleon. "Yes, tell them to bring me -my horse." - -He mounted and rode toward Semenovsk. - -Amid the powder smoke, slowly dispersing over the whole space -through which Napoleon rode, horses and men were lying in pools of -blood, singly or in heaps. Neither Napoleon nor any of his generals -had ever before seen such horrors or so many slain in such a small -area. The roar of guns, that had not ceased for ten hours, wearied the -ear and gave a peculiar significance to the spectacle, as music does -to tableaux vivants. Napoleon rode up the high ground at Semenovsk, -and through the smoke saw ranks of men in uniforms of a color -unfamiliar to him. They were Russians. - -The Russians stood in serried ranks behind Semenovsk village and its -knoll, and their guns boomed incessantly along their line and sent -forth clouds of smoke. It was no longer a battle: it was a -continuous slaughter which could be of no avail either to the French -or the Russians. Napoleon stopped his horse and again fell into the -reverie from which Berthier had aroused him. He could not stop what -was going on before him and around him and was supposed to be directed -by him and to depend on him, and from its lack of success this affair, -for the first time, seemed to him unnecessary and horrible. - -One of the generals rode up to Napoleon and ventured to offer to -lead the Old Guard into action. Ney and Berthier, standing near -Napoleon, exchanged looks and smiled contemptuously at this -general's senseless offer. - -Napoleon bowed his head and remained silent a long time. - -"At eight hundred leagues from France, I will not have my Guard -destroyed!" he said, and turning his horse rode back to Shevardino. - - - - - -CHAPTER XXXV - - -On the rug-covered bench where Pierre had seen him in the morning -sat Kutuzov, his gray head hanging, his heavy body relaxed. He gave no -orders, but only assented to or dissented from what others suggested. - -"Yes, yes, do that," he replied to various proposals. "Yes, yes: go, -dear boy, and have a look," he would say to one or another of those -about him; or, "No, don't, we'd better wait!" He listened to the -reports that were brought him and gave directions when his -subordinates demanded that of him; but when listening to the reports -it seemed as if he were not interested in the import of the words -spoken, but rather in something else--in the expression of face and -tone of voice of those who were reporting. By long years of military -experience he knew, and with the wisdom of age understood, that it -is impossible for one man to direct hundreds of thousands of others -struggling with death, and he knew that the result of a battle is -decided not by the orders of a commander in chief, nor the place where -the troops are stationed, nor by the number of cannon or of -slaughtered men, but by that intangible force called the spirit of the -army, and he watched this force and guided it in as far as that was in -his power. - -Kutuzov's general expression was one of concentrated quiet -attention, and his face wore a strained look as if he found it -difficult to master the fatigue of his old and feeble body. - -At eleven o'clock they brought him news that the fleches captured by -the French had been retaken, but that Prince Bagration was wounded. -Kutuzov groaned and swayed his head. - -"Ride over to Prince Peter Ivanovich and find out about it exactly," -he said to one of his adjutants, and then turned to the Duke of -Wurttemberg who was standing behind him. - -"Will Your Highness please take command of the first army?" - -Soon after the duke's departure--before he could possibly have -reached Semenovsk--his adjutant came back from him and told Kutuzov -that the duke asked for more troops. - -Kutuzov made a grimace and sent an order to Dokhturov to take over -the command of the first army, and a request to the duke--whom he said -he could not spare at such an important moment--to return to him. When -they brought him news that Murat had been taken prisoner, and the -staff officers congratulated him, Kutuzov smiled. - -"Wait a little, gentlemen," said he. "The battle is won, and there -is nothing extraordinary in the capture of Murat. Still, it is -better to wait before we rejoice." - -But he sent an adjutant to take the news round the army. - -When Scherbinin came galloping from the left flank with news that -the French had captured the fleches and the village of Semenovsk, -Kutuzov, guessing by the sounds of the battle and by Scherbinin's -looks that the news was bad, rose as if to stretch his legs and, -taking Scherbinin's arm, led him aside. - -"Go, my dear fellow," he said to Ermolov, "and see whether something -can't be done." - -Kutuzov was in Gorki, near the center of the Russian position. The -attack directed by Napoleon against our left flank had been several -times repulsed. In the center the French had not got beyond -Borodino, and on their left flank Uvarov's cavalry had put the -French to flight. - -Toward three o'clock the French attacks ceased. On the faces of -all who came from the field of battle, and of those who stood around -him, Kutuzov noticed an expression of extreme tension. He was -satisfied with the day's success--a success exceeding his -expectations, but the old man's strength was failing him. Several -times his head dropped low as if it were falling and he dozed off. -Dinner was brought him. - -Adjutant General Wolzogen, the man who when riding past Prince -Andrew had said, "the war should be extended widely," and whom -Bagration so detested, rode up while Kutuzov was at dinner. Wolzogen -had come from Barclay de Tolly to report on the progress of affairs on -the left flank. The sagacious Barclay de Tolly, seeing crowds of -wounded men running back and the disordered rear of the army, -weighed all the circumstances, concluded that the battle was lost, and -sent his favorite officer to the commander in chief with that news. - -Kutuzov was chewing a piece of roast chicken with difficulty and -glanced at Wolzogen with eyes that brightened under their puckering -lids. - -Wolzogen, nonchalantly stretching his legs, approached Kutuzov -with a half-contemptuous smile on his lips, scarcely touching the peak -of his cap. - -He treated his Serene Highness with a somewhat affected -nonchalance intended to show that, as a highly trained military man, -he left it to Russians to make an idol of this useless old man, but -that he knew whom he was dealing with. "Der alte Herr" (as in their -own set the Germans called Kutuzov) "is making himself very -comfortable," thought Wolzogen, and looking severely at the dishes -in front of Kutuzov he began to report to "the old gentleman" the -position of affairs on the left flank as Barclay had ordered him to -and as he himself had seen and understood it. - -"All the points of our position are in the enemy's hands and we -cannot dislodge them for lack of troops, the men are running away -and it is impossible to stop them," he reported. - -Kutuzov ceased chewing and fixed an astonished gaze on Wolzogen, -as if not understand what was said to him. Wolzogen, noticing "the old -gentleman's" agitation, said with a smile: - -"I have not considered it right to conceal from your Serene Highness -what I have seen. The troops are in complete disorder..." - -"You have seen? You have seen?..." Kutuzov shouted frowning, and -rising quickly he went up to Wolzogen. - -"How... how dare you!..." he shouted, choking and making a -threatening gesture with his trembling arms: "How dare you, sir, say -that to me? You know nothing about it. Tell General Barclay from me -that his information is incorrect and that the real course of the -battle is better known to me, the commander in chief, than to him." - -Wolzogen was about to make a rejoinder, but Kutuzov interrupted him. - -"The enemy has been repulsed on the left and defeated on the right -flank. If you have seen amiss, sir, do not allow yourself to say -what you don't know! Be so good as to ride to General Barclay and -inform him of my firm intention to attack the enemy tomorrow," said -Kutuzov sternly. - -All were silent, and the only sound audible was the heavy -breathing of the panting old general. - -"They are repulsed everywhere, for which I thank God and our brave -army! The enemy is beaten, and tomorrow we shall drive him from the -sacred soil of Russia," said Kutuzov crossing himself, and he suddenly -sobbed as his eyes filled with tears. - -Wolzogen, shrugging his shoulders and curling his lips, stepped -silently aside, marveling at "the old gentleman's" conceited -stupidity. - -"Ah, here he is, my hero!" said Kutuzov to a portly, handsome, -dark-haired general who was just ascending the knoll. - -This was Raevski, who had spent the whole day at the most -important part of the field of Borodino. - -Raevski reported that the troops were firmly holding their ground -and that the French no longer ventured to attack. - -After hearing him, Kutuzov said in French: - -"Then you do not think, like some others, that we must retreat?" - -"On the contrary, your Highness, in indecisive actions it is -always the most stubborn who remain victors," replied Raevski, "and in -my opinion..." - -"Kaysarov!" Kutuzov called to his adjutant. "Sit down and write -out the order of the day for tomorrow. And you," he continued, -addressing another, "ride along the line and that tomorrow we attack." - -While Kutuzov was talking to Raevski and dictating the order of -the day, Wolzogen returned from Barclay and said that General -Barclay wished to have written confirmation of the order the field -marshal had given. - -Kutuzov, without looking at Wolzogen, gave directions for the -order to be written out which the former commander in chief, to -avoid personal responsibility, very judiciously wished to receive. - -And by means of that mysterious indefinable bond which maintains -throughout an army one and the same temper, known as "the spirit of -the army," and which constitutes the sinew of war, Kutuzov's words, -his order for a battle next day, immediately became known from one end -of the army to the other. - -It was far from being the same words or the same order that -reached the farthest links of that chain. The tales passing from mouth -to mouth at different ends of the army did not even resemble what -Kutuzov had said, but the sense of his words spread everywhere because -what he said was not the outcome of cunning calculations, but of a -feeling that lay in the commander in chief's soul as in that of -every Russian. - -And on learning that tomorrow they were to attack the enemy, and -hearing from the highest quarters a confirmation of what they wanted -to believe, the exhausted, wavering men felt comforted and inspirited. - - - - - -CHAPTER XXXVI - - -Prince Andrew's regiment was among the reserves which till after one -o'clock were stationed inactive behind Semenovsk, under heavy -artillery fire. Toward two o'clock the regiment, having already lost -more than two hundred men, was moved forward into a trampled -oatfield in the gap between Semenovsk and the Knoll Battery, where -thousands of men perished that day and on which an intense, -concentrated fire from several hundred enemy guns was directed between -one and two o'clock. - -Without moving from that spot or firing a single shot the regiment -here lost another third of its men. From in front and especially -from the right, in the unlifting smoke the guns boomed, and out of the -mysterious domain of smoke that overlay the whole space in front, -quick hissing cannon balls and slow whistling shells flew unceasingly. -At times, as if to allow them a respite, a quarter of an hour passed -during which the cannon balls and shells all flew overhead, but -sometimes several men were torn from the regiment in a minute and -the slain were continually being dragged away and the wounded -carried off. - -With each fresh blow less and less chance of life remained for those -not yet killed. The regiment stood in columns of battalion, three -hundred paces apart, but nevertheless the men were always in one and -the same mood. All alike were taciturn and morose. Talk was rarely -heard in the ranks, and it ceased altogether every time the thud of -a successful shot and the cry of "stretchers!" was heard. Most of -the time, by their officers' order, the men sat on the ground. One, -having taken off his shako, carefully loosened the gathers of its -lining and drew them tight again; another, rubbing some dry clay -between his palms, polished his bayonet; another fingered the strap -and pulled the buckle of his bandolier, while another smoothed and -refolded his leg bands and put his boots on again. Some built little -houses of the tufts in the plowed ground, or plaited baskets from -the straw in the cornfield. All seemed fully absorbed in these -pursuits. When men were killed or wounded, when rows of stretchers -went past, when some troops retreated, and when great masses of the -enemy came into view through the smoke, no one paid any attention to -these things. But when our artillery or cavalry advanced or some of -our infantry were seen to move forward, words of approval were heard -on all sides. But the liveliest attention was attracted by occurrences -quite apart from, and unconnected with, the battle. It was as if the -minds of these morally exhausted men found relief in everyday, -commonplace occurrences. A battery of artillery was passing in front -of the regiment. The horse of an ammunition cart put its leg over a -trace. "Hey, look at the trace horse!... Get her leg out! She'll -fall.... Ah, they don't see it!" came identical shouts from the -ranks all along the regiment. Another time, general attention was -attracted by a small brown dog, coming heaven knows whence, which -trotted in a preoccupied manner in front of the ranks with tail -stiffly erect till suddenly a shell fell close by, when it yelped, -tucked its tail between its legs, and darted aside. Yells and -shrieks of laughter rose from the whole regiment. But such -distractions lasted only a moment, and for eight hours the men had -been inactive, without food, in constant fear of death, and their pale -and gloomy faces grew ever paler and gloomier. - -Prince Andrew, pale and gloomy like everyone in the regiment, -paced up and down from the border of one patch to another, at the edge -of the meadow beside an oatfield, with head bowed and arms behind -his back. There was nothing for him to do and no orders to be given. -Everything went on of itself. The killed were dragged from the -front, the wounded carried away, and the ranks closed up. If any -soldiers ran to the rear they returned immediately and hastily. At -first Prince Andrew, considering it his duty to rouse the courage of -the men and to set them an example, walked about among the ranks, -but he soon became convinced that this was unnecessary and that -there was nothing he could teach them. All the powers of his soul, -as of every soldier there, were unconsciously bent on avoiding the -contemplation of the horrors of their situation. He walked along the -meadow, dragging his feet, rustling the grass, and gazing at the -dust that covered his boots; now he took big strides trying to keep to -the footprints left on the meadow by the mowers, then he counted his -steps, calculating how often he must walk from one strip to another to -walk a mile, then he stripped the flowers from the wormwood that -grew along a boundary rut, rubbed them in his palms, and smelled their -pungent, sweetly bitter scent. Nothing remained of the previous -day's thoughts. He thought of nothing. He listened with weary ears -to the ever-recurring sounds, distinguishing the whistle of flying -projectiles from the booming of the reports, glanced at the tiresomely -familiar faces of the men of the first battalion, and waited. "Here it -comes... this one is coming our way again!" he thought, listening to -an approaching whistle in the hidden region of smoke. "One, another! -Again! It has hit...." He stopped and looked at the ranks. "No, it has -gone over. But this one has hit!" And again he started trying to reach -the boundary strip in sixteen paces. A whizz and a thud! Five paces -from him, a cannon ball tore up the dry earth and disappeared. A chill -ran down his back. Again he glanced at the ranks. Probably many had -been hit--a large crowd had gathered near the second battalion. - -"Adjutant!" he shouted. "Order them not to crowd together." - -The adjutant, having obeyed this instruction, approached Prince -Andrew. From the other side a battalion commander rode up. - -"Look out!" came a frightened cry from a soldier and, like a bird -whirring in rapid flight and alighting on the ground, a shell -dropped with little noise within two steps of Prince Andrew and -close to the battalion commander's horse. The horse first, -regardless of whether it was right or wrong to show fear, snorted, -reared almost throwing the major, and galloped aside. The horse's -terror infected the men. - -"Lie down!" cried the adjutant, throwing himself flat on the ground. - -Prince Andrew hesitated. The smoking shell spun like a top between -him and the prostrate adjutant, near a wormwood plant between the -field and the meadow. - -"Can this be death?" thought Prince Andrew, looking with a quite -new, envious glance at the grass, the wormwood, and the streamlet of -smoke that curled up from the rotating black ball. "I cannot, I do not -wish to die. I love life--I love this grass, this earth, this air...." -He thought this, and at the same time remembered that people were -looking at him. - -"It's shameful, sir!" he said to the adjutant. "What..." - -He did not finish speaking. At one and the same moment came the -sound of an explosion, a whistle of splinters as from a breaking -window frame, a suffocating smell of powder, and Prince Andrew started -to one side, raising his arm, and fell on his chest. Several -officers ran up to him. From the right side of his abdomen, blood -was welling out making a large stain on the grass. - -The militiamen with stretchers who were called up stood behind the -officers. Prince Andrew lay on his chest with his face in the grass, -breathing heavily and noisily. - -"What are you waiting for? Come along!" - -The peasants went up and took him by his shoulders and legs, but -he moaned piteously and, exchanging looks, they set him down again. - -"Pick him up, lift him, it's all the same!" cried someone. - -They again took him by the shoulders and laid him on the stretcher. - -"Ah, God! My God! What is it? The stomach? That means death! My -God!"--voices among the officers were heard saying. - -"It flew a hair's breadth past my ear," said the adjutant. - -The peasants, adjusting the stretcher to their shoulders, started -hurriedly along the path they had trodden down, to the dressing -station. - -"Keep in step! Ah... those peasants!" shouted an officer, seizing by -their shoulders and checking the peasants, who were walking unevenly -and jolting the stretcher. - -"Get into step, Fedor... I say, Fedor!" said the foremost peasant. - -"Now that's right!" said the one behind joyfully, when he had got -into step. - -"Your excellency! Eh, Prince!" said the trembling voice of Timokhin, -who had run up and was looking down on the stretcher. - -Prince Andrew opened his eyes and looked up at the speaker from -the stretcher into which his head had sunk deep and again his -eyelids drooped. - - -The militiamen carried Prince Andrew to dressing station by the -wood, where wagons were stationed. The dressing station consisted of -three tents with flaps turned back, pitched at the edge of a birch -wood. In the wood, wagons and horses were standing. The horses were -eating oats from their movable troughs and sparrows flew down and -pecked the grains that fell. Some crows, scenting blood, flew among -the birch trees cawing impatiently. Around the tents, over more than -five acres, bloodstained men in various garbs stood, sat, or lay. -Around the wounded stood crowds of soldier stretcher-bearers with -dismal and attentive faces, whom the officers keeping order tried in -vain to drive from the spot. Disregarding the officers' orders, the -soldiers stood leaning against their stretchers and gazing intently, -as if trying to comprehend the difficult problem of what was taking -place before them. From the tents came now loud angry cries and now -plaintive groans. Occasionally dressers ran out to fetch water, or -to point out those who were to be brought in next. The wounded men -awaiting their turn outside the tents groaned, sighed, wept, screamed, -swore, or asked for vodka. Some were delirious. Prince Andrew's -bearers, stepping over the wounded who had not yet been bandaged, took -him, as a regimental commander, close up to one of the tents and there -stopped, awaiting instructions. Prince Andrew opened his eyes and -for a long time could not make out what was going on around him. He -remembered the meadow, the wormwood, the field, the whirling black -ball, and his sudden rush of passionate love of life. Two steps from -him, leaning against a branch and talking loudly and attracting -general attention, stood a tall, handsome, black-haired -noncommissioned officer with a bandaged head. He had been wounded in -the head and leg by bullets. Around him, eagerly listening to his -talk, a crowd of wounded and stretcher-bearers was gathered. - -"We kicked him out from there so that he chucked everything, we -grabbed the King himself!" cried he, looking around him with eyes that -glittered with fever. "If only reserves had come up just then, lads, -there wouldn't have been nothing left of him! I tell you surely..." - -Like all the others near the speaker, Prince Andrew looked at him -with shining eyes and experienced a sense of comfort. "But isn't it -all the same now?" thought he. "And what will be there, and what has -there been here? Why was I so reluctant to part with life? There was -something in this life I did not and do not understand." - - - - - -CHAPTER XXXVII - - -One of the doctors came out of the tent in a bloodstained apron, -holding a cigar between the thumb and little finger of one of his -small bloodstained hands, so as not to smear it. He raised his head -and looked about him, but above the level of the wounded men. He -evidently wanted a little respite. After turning his head from right -to left for some time, he sighed and looked down. - -"All right, immediately," he replied to a dresser who pointed Prince -Andrew out to him, and he told them to carry him into the tent. - -Murmurs arose among the wounded who were waiting. - -"It seems that even in the next world only the gentry are to have -a chance!" remarked one. - -Prince Andrew was carried in and laid on a table that had only -just been cleared and which a dresser was washing down. Prince -Andrew could not make out distinctly what was in that tent. The -pitiful groans from all sides and the torturing pain in his thigh, -stomach, and back distracted him. All he saw about him merged into a -general impression of naked, bleeding human bodies that seemed to fill -the whole of the low tent, as a few weeks previously, on that hot -August day, such bodies had filled the dirty pond beside the -Smolensk road. Yes, it was the same flesh, the same chair a canon, the -sight of which had even then filled him with horror, as by a -presentiment. - -There were three operating tables in the tent. Two were occupied, -and on the third they placed Prince Andrew. For a little while he -was left alone and involuntarily witnessed what was taking place on -the other two tables. On the nearest one sat a Tartar, probably a -Cossack, judging by the uniform thrown down beside him. Four -soldiers were holding him, and a spectacled doctor was cutting into -his muscular brown back. - -"Ooh, ooh, ooh!" grunted the Tartar, and suddenly lifting up his -swarthy snub-nosed face with its high cheekbones, and baring his white -teeth, he began to wriggle and twitch his body and utter piercing, -ringing, and prolonged yells. On the other table, round which many -people were crowding, a tall well-fed man lay on his back with his -head thrown back. His curly hair, its color, and the shape of his head -seemed strangely familiar to Prince Andrew. Several dressers were -pressing on his chest to hold him down. One large, white, plump leg -twitched rapidly all the time with a feverish tremor. The man was -sobbing and choking convulsively. Two doctors--one of whom was pale -and trembling--were silently doing something to this man's other, gory -leg. When he had finished with the Tartar, whom they covered with an -overcoat, the spectacled doctor came up to Prince Andrew, wiping his -hands. - -He glanced at Prince Andrew's face and quickly turned away. - -"Undress him! What are you waiting for?" he cried angrily to the -dressers. - -His very first, remotest recollections of childhood came back to -Prince Andrew's mind when the dresser with sleeves rolled up began -hastily to undo the buttons of his clothes and undressed him. The -doctor bent down over the wound, felt it, and sighed deeply. Then he -made a sign to someone, and the torturing pain in his abdomen caused -Prince Andrew to lose consciousness. When he came to himself the -splintered portions of his thighbone had been extracted, the torn -flesh cut away, and the wound bandaged. Water was being sprinkled on -his face. As soon as Prince Andrew opened his eyes, the doctor bent -over, kissed him silently on the lips, and hurried away. - -After the sufferings he had been enduring, Prince Andrew enjoyed a -blissful feeling such as he had not experienced for a long time. All -the best and happiest moments of his life--especially his earliest -childhood, when he used to be undressed and put to bed, and when -leaning over him his nurse sang him to sleep and he, burying his -head in the pillow, felt happy in the mere consciousness of life- -returned to his memory, not merely as something past but as -something present. - -The doctors were busily engaged with the wounded man the shape of -whose head seemed familiar to Prince Andrew: they were lifting him -up and trying to quiet him. - -"Show it to me.... Oh, ooh... Oh! Oh, ooh!" his frightened moans -could be heard, subdued by suffering and broken by sobs. - -Hearing those moans Prince Andrew wanted to weep. -Whether because he was dying without glory, or because he was sorry to -part with life, or because of those memories of a childhood that could -not return, or because he was suffering and others were suffering -and that man near him was groaning so piteously--he felt like -weeping childlike, kindly, and almost happy tears. - -The wounded man was shown his amputated leg stained with clotted -blood and with the boot still on. - -"Oh! Oh, ooh!" he sobbed, like a woman. - -The doctor who had been standing beside him, preventing Prince -Andrew from seeing his face, moved away. - -"My God! What is this? Why is he here?" said Prince Andrew to -himself. - -In the miserable, sobbing, enfeebled man whose leg had just been -amputated, he recognized Anatole Kuragin. Men were supporting him in -their arms and offering him a glass of water, but his trembling, -swollen lips could not grasp its rim. Anatole was sobbing painfully. -"Yes, it is he! Yes, that man is somehow closely and painfully -connected with me," thought Prince Andrew, not yet clearly grasping -what he saw before him. "What is the connection of that man with my -childhood and life?" he asked himself without finding an answer. And -suddenly a new unexpected memory from that realm of pure and loving -childhood presented itself to him. He remembered Natasha as he had -seen her for the first time at the ball in 1810, with her slender neck -and arms and with a frightened happy face ready for rapture, and -love and tenderness for her, stronger and more vivid than ever, -awoke in his soul. He now remembered the connection that existed -between himself and this man who was dimly gazing at him through tears -that filled his swollen eyes. He remembered everything, and ecstatic -pity and love for that man overflowed his happy heart. - -Prince Andrew could no longer restrain himself and wept tender -loving tears for his fellow men, for himself, and for his own and -their errors. - -"Compassion, love of our brothers, for those who love us and for -those who hate us, love of our enemies; yes, that love which God -preached on earth and which Princess Mary taught me and I did not -understand--that is what made me sorry to part with life, that is what -remained for me had I lived. But now it is too late. I know it!" - - - - - -CHAPTER XXXVIII - - -The terrible spectacle of the battlefield covered with dead and -wounded, together with the heaviness of his head and the news that -some twenty generals he knew personally had been killed or wounded, -and the consciousness of the impotence of his once mighty arm, -produced an unexpected impression on Napoleon who usually liked to -look at the killed and wounded, thereby, he considered, testing his -strength of mind. This day the horrible appearance of the -battlefield overcame that strength of mind which he thought -constituted his merit and his greatness. He rode hurriedly from the -battlefield and returned to the Shevardino knoll, where he sat on -his campstool, his sallow face swollen and heavy, his eyes dim, his -nose red, and his voice hoarse, involuntarily listening, with downcast -eyes, to the sounds of firing. With painful dejection he awaited the -end of this action, in which he regarded himself as a participant -and which he was unable to arrest. A personal, human feeling for a -brief moment got the better of the artificial phantasm of life he -had served so long. He felt in his own person the sufferings and death -he had witnessed on the battlefield. The heaviness of his head and -chest reminded him of the possibility of suffering and death for -himself. At that moment he did not desire Moscow, or victory, or glory -(what need had he for any more glory?). The one thing he wished for -was rest, tranquillity, and freedom. But when he had been on the -Semenovsk heights the artillery commander had proposed to him to bring -several batteries of artillery up to those heights to strengthen the -fire on the Russian troops crowded in front of Knyazkovo. Napoleon had -assented and had given orders that news should be brought to him of -the effect those batteries produced. - -An adjutant came now to inform him that the fire of two hundred guns -had been concentrated on the Russians, as he had ordered, but that -they still held their ground. - -"Our fire is mowing them down by rows, but still they hold on," said -the adjutant. - -"They want more!..." said Napoleon in a hoarse voice. - -"Sire?" asked the adjutant who had not heard the remark. - -"They want more!" croaked Napoleon frowning. "Let them have it!" - -Even before he gave that order the thing he did not desire, and -for which he gave the order only because he thought it was expected of -him, was being done. And he fell back into that artificial realm of -imaginary greatness, and again--as a horse walking a treadmill -thinks it is doing something for itself--he submissively fulfilled the -cruel, sad, gloomy, and inhuman role predestined for him. - -And not for that day and hour alone were the mind and conscience -darkened of this man on whom the responsibility for what was happening -lay more than on all the others who took part in it. Never to the -end of his life could he understand goodness, beauty, or truth, or the -significance of his actions which were too contrary to goodness and -truth, too remote from everything human, for him ever to be able to -grasp their meaning. He could not disavow his actions, belauded as -they were by half the world, and so he had to repudiate truth, -goodness, and all humanity. - -Not only on that day, as he rode over the battlefield strewn with -men killed and maimed (by his will as he believed), did he reckon as -he looked at them how many Russians there were for each Frenchman and, -deceiving himself, find reason for rejoicing in the calculation that -there were five Russians for every Frenchman. Not on that day alone -did he write in a letter to Paris that "the battle field was -superb," because fifty thousand corpses lay there, but even on the -island of St. Helena in the peaceful solitude where he said he -intended to devote his leisure to an account of the great deeds he had -done, he wrote: - - -The Russian war should have been the most popular war of modern -times: it was a war of good sense, for real interests, for the -tranquillity and security of all; it was purely pacific and -conservative. - -It was a war for a great cause, the end of uncertainties and the -beginning of security. A new horizon and new labors were opening -out, full of well-being and prosperity for all. The European system -was already founded; all that remained was to organize it. - -Satisfied on these great points and with tranquility everywhere, I -too should have had my Congress and my Holy Alliance. Those ideas were -stolen from me. In that reunion of great sovereigns we should have -discussed our interests like one family, and have rendered account -to the peoples as clerk to master. - -Europe would in this way soon have been, in fact, but one people, -and anyone who traveled anywhere would have found himself always in -the common fatherland. I should have demanded the freedom of all -navigable rivers for everybody, that the seas should be common to all, -and that the great standing armies should be reduced henceforth to -mere guards for the sovereigns. - -On returning to France, to the bosom of the great, strong, -magnificent, peaceful, and glorious fatherland, I should have -proclaimed her frontiers immutable; all future wars purely -defensive, all aggrandizement antinational. I should have associated -my son in the Empire; my dictatorship would have been finished, and -his constitutional reign would have begun. - -Paris would have been the capital of the world, and the French the -envy of the nations! - -My leisure then, and my old age, would have been devoted, in company -with the Empress and during the royal apprenticeship of my son, to -leisurely visiting, with our own horses and like a true country -couple, every corner of the Empire, receiving complaints, redressing -wrongs, and scattering public buildings and benefactions on all -sides and everywhere. - - -Napoleon, predestined by Providence for the gloomy role of -executioner of the peoples, assured himself that the aim of his -actions had been the peoples' welfare and that he could control the -fate of millions and by the employment of power confer benefactions. - - -"Of four hundred thousand who crossed the Vistula," he wrote further -of the Russian war, "half were Austrians, Prussians, Saxons, Poles, -Bavarians, Wurttembergers, Mecklenburgers, Spaniards, Italians, and -Neapolitans. The Imperial army, strictly speaking, was one third -composed of Dutch, Belgians, men from the borders of the Rhine, -Piedmontese, Swiss, Genevese, Tuscans, Romans, inhabitants of the -Thirty-second Military Division, of Bremen, of Hamburg, and so on: -it included scarcely a hundred and forty thousand who spoke French. -The Russian expedition actually cost France less than fifty thousand -men; the Russian army in its retreat from Vilna to Moscow lost in -the various battles four times more men than the French army; the -burning of Moscow cost the lives of a hundred thousand Russians who -died of cold and want in the woods; finally, in its march from -Moscow to the Oder the Russian army also suffered from the severity of -the season; so that by the the time it reached Vilna it numbered -only fifty thousand, and at Kalisch less than eighteen thousand." - - -He imagined that the war with Russia came about by his will, and the -horrors that occurred did not stagger his soul. He boldly took the -whole responsibility for what happened, and his darkened mind found -justification in the belief that among the hundreds of thousands who -perished there were fewer Frenchmen than Hessians and Bavarians. - - - - - -CHAPTER XXXIX - - -Several tens of thousands of the slain lay in diverse postures and -various uniforms on the fields and meadows belonging to the Davydov -family and to the crown serfs--those fields and meadows where for -hundreds of years the peasants of Borodino, Gorki, Shevardino, and -Semenovsk had reaped their harvests and pastured their cattle. At -the dressing stations the grass and earth were soaked with blood for a -space of some three acres around. Crowds of men of various arms, -wounded and unwounded, with frightened faces, dragged themselves -back to Mozhaysk from the one army and back to Valuevo from the other. -Other crowds, exhausted and hungry, went forward led by their -officers. Others held their ground and continued to fire. - -Over the whole field, previously so gaily beautiful with the glitter -of bayonets and cloudlets of smoke in the morning sun, there now -spread a mist of damp and smoke and a strange acid smell of -saltpeter and blood. Clouds gathered and drops of rain began to fall -on the dead and wounded, on the frightened, exhausted, and -hesitating men, as if to say: "Enough, men! Enough! Cease... bethink -yourselves! What are you doing?" - -To the men of both sides alike, worn out by want of food and rest, -it began equally to appear doubtful whether they should continue to -slaughter one another; all the faces expressed hesitation, and the -question arose in every soul: "For what, for whom, must I kill and -be killed?... You may go and kill whom you please, but I don't want to -do so anymore!" By evening this thought had ripened in every soul. -At any moment these men might have been seized with horror at what -they were doing and might have thrown up everything and run away -anywhere. - -But though toward the end of the battle the men felt all the -horror of what they were doing, though they would have been glad to -leave off, some incomprehensible, mysterious power continued to -control them, and they still brought up the charges, loaded, aimed, -and applied the match, though only one artilleryman survived out of -every three, and though they stumbled and panted with fatigue, -perspiring and stained with blood and powder. The cannon balls flew -just as swiftly and cruelly from both sides, crushing human bodies, -and that terrible work which was not done by the will of a man but -at the will of Him who governs men and worlds continued. - -Anyone looking at the disorganized rear of the Russian army would -have said that, if only the French made one more slight effort, it -would disappear; and anyone looking at the rear of the French army -would have said that the Russians need only make one more slight -effort and the French would be destroyed. But neither the French nor -the Russians made that effort, and the flame of battle burned slowly -out. - -The Russians did not make that effort because they were not -attacking the French. At the beginning of the battle they stood -blocking the way to Moscow and they still did so at the end of the -battle as at the beginning. But even had the aim of the Russians -been to drive the French from their positions, they could not have -made this last effort, for all the Russian troops had been broken -up, there was no part of the Russian army that had not suffered in the -battle, and though still holding their positions they had lost ONE -HALF of their army. - -The French, with the memory of all their former victories during -fifteen years, with the assurance of Napoleon's invincibility, with -the consciousness that they had captured part of the battlefield and -had lost only a quarter of their men and still had their Guards -intact, twenty thousand strong, might easily have made that effort. -The French had attacked the Russian army in order to drive it from its -position ought to have made that effort, for as long as the Russians -continued to block the road to Moscow as before, the aim of the French -had not been attained and all their efforts and losses were in vain. -But the French did not make that effort. Some historians say that -Napoleon need only have used his Old Guards, who were intact, and -the battle would have been won. To speak of what would have happened -had Napoleon sent his Guards is like talking of what would happen if -autumn became spring. It could not be. Napoleon did not give his -Guards, not because he did not want to, but because it could not be -done. All the generals, officers, and soldiers of the French army knew -it could not be done, because the flagging spirit of the troops -would not permit it. - -It was not Napoleon alone who had experienced that nightmare feeling -of the mighty arm being stricken powerless, but all the generals and -soldiers of his army whether they had taken part in the battle or not, -after all their experience of previous battles--when after one tenth -of such efforts the enemy had fled--experienced a similar feeling of -terror before an enemy who, after losing HALF his men, stood as -threateningly at the end as at the beginning of the battle. The -moral force of the attacking French army was exhausted. Not that -sort of victory which is defined by the capture of pieces of -material fastened to sticks, called standards, and of the ground on -which the troops had stood and were standing, but a moral victory that -convinces the enemy of the moral superiority of his opponent and of -his own impotence was gained by the Russians at Borodino. The French -invaders, like an infuriated animal that has in its onslaught received -a mortal wound, felt that they were perishing, but could not stop, any -more than the Russian army, weaker by one half, could help swerving. -By impetus gained, the French army was still able to roll forward to -Moscow, but there, without further effort on the part of the Russians, -it had to perish, bleeding from the mortal wound it had received at -Borodino. The direct consequence of the battle of Borodino was -Napoleon's senseless flight from Moscow, his retreat along the old -Smolensk road, the destruction of the invading army of five hundred -thousand men, and the downfall of Napoleonic France, on which at -Borodino for the first time the hand of an opponent of stronger spirit -had been laid. - - - - - -BOOK ELEVEN: 1812 - - - - - -CHAPTER I - - -Absolute continuity of motion is not comprehensible to the human -mind. Laws of motion of any kind become comprehensible to man only -when he examines arbitrarily selected elements of that motion; but -at the same time, a large proportion of human error comes from the -arbitrary division of continuous motion into discontinuous elements. -There is a well known, so-called sophism of the ancients consisting in -this, that Achilles could never catch up with a tortoise he was -following, in spite of the fact that he traveled ten times as fast -as the tortoise. By the time Achilles has covered the distance that -separated him from the tortoise, the tortoise has covered one tenth of -that distance ahead of him: when Achilles has covered that tenth, -the tortoise has covered another one hundredth, and so on forever. -This problem seemed to the ancients insoluble. The absurd answer (that -Achilles could never overtake the tortoise) resulted from this: that -motion was arbitrarily divided into discontinuous elements, whereas -the motion both of Achilles and of the tortoise was continuous. - -By adopting smaller and smaller elements of motion we only -approach a solution of the problem, but never reach it. Only when we -have admitted the conception of the infinitely small, and the -resulting geometrical progression with a common ratio of one tenth, -and have found the sum of this progression to infinity, do we reach -a solution of the problem. - -A modern branch of mathematics having achieved the art of dealing -with the infinitely small can now yield solutions in other more -complex problems of motion which used to appear insoluble. - -This modern branch of mathematics, unknown to the ancients, when -dealing with problems of motion admits the conception of the -infinitely small, and so conforms to the chief condition of motion -(absolute continuity) and thereby corrects the inevitable error -which the human mind cannot avoid when it deals with separate elements -of motion instead of examining continuous motion. - -In seeking the laws of historical movement just the same thing -happens. The movement of humanity, arising as it does from innumerable -arbitrary human wills, is continuous. - -To understand the laws of this continuous movement is the aim of -history. But to arrive at these laws, resulting from the sum of all -those human wills, man's mind postulates arbitrary and disconnected -units. The first method of history is to take an arbitrarily -selected series of continuous events and examine it apart from others, -though there is and can be no beginning to any event, for one event -always flows uninterruptedly from another. - -The second method is to consider the actions of some one man--a king -or a commander--as equivalent to the sum of many individual wills; -whereas the sum of individual wills is never expressed by the activity -of a single historic personage. - -Historical science in its endeavor to draw nearer to truth -continually takes smaller and smaller units for examination. But -however small the units it takes, we feel that to take any unit -disconnected from others, or to assume a beginning of any -phenomenon, or to say that the will of many men is expressed by the -actions of any one historic personage, is in itself false. - -It needs no critical exertion to reduce utterly to dust any -deductions drawn from history. It is merely necessary to select some -larger or smaller unit as the subject of observation--as criticism has -every right to do, seeing that whatever unit history observes must -always be arbitrarily selected. - -Only by taking infinitesimally small units for observation (the -differential of history, that is, the individual tendencies of men) -and attaining to the art of integrating them (that is, finding the sum -of these infinitesimals) can we hope to arrive at the laws of history. - -The first fifteen years of the nineteenth century in Europe -present an extraordinary movement of millions of people. Men leave -their customary pursuits, hasten from one side of Europe to the other, -plunder and slaughter one another, triumph and are plunged in despair, -and for some years the whole course of life is altered and presents an -intensive movement which first increases and then slackens. What was -the cause of this movement, by what laws was it governed? asks the -mind of man. - -The historians, replying to this question, lay before us the sayings -and doings of a few dozen men in a building in the city of Paris, -calling these sayings and doings "the Revolution"; then they give a -detailed biography of Napoleon and of certain people favorable or -hostile to him; tell of the influence some of these people had on -others, and say: that is why this movement took place and those are -its laws. - -But the mind of man not only refuses to believe this explanation, -but plainly says that this method of explanation is fallacious, -because in it a weaker phenomenon is taken as the cause of a stronger. -The sum of human wills produced the Revolution and Napoleon, and -only the sum of those wills first tolerated and then destroyed them. - -"But every time there have been conquests there have been -conquerors; every time there has been a revolution in any state -there have been great men," says history. And, indeed, human reason -replies: every time conquerors appear there have been wars, but this -does not prove that the conquerors caused the wars and that it is -possible to find the laws of a war in the personal activity of a -single man. Whenever I look at my watch and its hands point to ten, -I hear the bells of the neighboring church; but because the bells -begin to ring when the hands of the clock reach ten, I have no right -to assume that the movement of the bells is caused by the position -of the hands of the watch. - -Whenever I see the movement of a locomotive I hear the whistle and -see the valves opening and wheels turning; but I have no right to -conclude that the whistling and the turning of wheels are the cause of -the movement of the engine. - -The peasants say that a cold wind blows in late spring because the -oaks are budding, and really every spring cold winds do blow when -the oak is budding. But though I do not know what causes the cold -winds to blow when the oak buds unfold, I cannot agree with the -peasants that the unfolding of the oak buds is the cause of the cold -wind, for the force of the wind is beyond the influence of the buds. I -see only a coincidence of occurrences such as happens with all the -phenomena of life, and I see that however much and however carefully I -observe the hands of the watch, and the valves and wheels of the -engine, and the oak, I shall not discover the cause of the bells -ringing, the engine moving, or of the winds of spring. To that I -must entirely change my point of view and study the laws of the -movement of steam, of the bells, and of the wind. History must do -the same. And attempts in this direction have already been made. - -To study the laws of history we must completely change the subject -of our observation, must leave aside kings, ministers, and generals, -and the common, infinitesimally small elements by which the masses are -moved. No one can say in how far it is possible for man to advance -in this way toward an understanding of the laws of history; but it -is evident that only along that path does the possibility of -discovering the laws of history lie, and that as yet not a millionth -part as much mental effort has been applied in this direction by -historians as has been devoted to describing the actions of various -kings, commanders, and ministers and propounding the historians' own -reflections concerning these actions. - - - - - -CHAPTER II - - -The forces of a dozen European nations burst into Russia. The -Russian army and people avoided a collision till Smolensk was reached, -and again from Smolensk to Borodino. The French army pushed on to -Moscow, its goal, its impetus ever increasing as it neared its aim, -just as the velocity of a falling body increases as it approaches -the earth. Behind it were seven hundred miles of hunger-stricken, -hostile country; ahead were a few dozen miles separating it from its -goal. Every soldier in Napoleon's army felt this and the invasion -moved on by its own momentum. - -The more the Russian army retreated the more fiercely a spirit of -hatred of the enemy flared up, and while it retreated the army -increased and consolidated. At Borodino a collision took place. -Neither army was broken up, but the Russian army retreated immediately -after the collision as inevitably as a ball recoils after colliding -with another having a greater momentum, and with equal inevitability -the ball of invasion that had advanced with such momentum rolled on -for some distance, though the collision had deprived it of all its -force. - -The Russians retreated eighty miles--to beyond Moscow--and the -French reached Moscow and there came to a standstill. For five weeks -after that there was not a single battle. The French did not move. -As a bleeding, mortally wounded animal licks its wounds, they remained -inert in Moscow for five weeks, and then suddenly, with no fresh -reason, fled back: they made a dash for the Kaluga road, and (after -a victory--for at Malo-Yaroslavets the field of conflict again -remained theirs) without undertaking a single serious battle, they -fled still more rapidly back to Smolensk, beyond Smolensk, beyond -the Berezina, beyond Vilna, and farther still. - -On the evening of the twenty-sixth of August, Kutuzov and the -whole Russian army were convinced that the battle of Borodino was a -victory. Kutuzov reported so to the Emperor. He gave orders to prepare -for a fresh conflict to finish the enemy and did this not to deceive -anyone, but because he knew that the enemy was beaten, as everyone who -had taken part in the battle knew it. - -But all that evening and next day reports came in one after -another of unheard-of losses, of the loss of half the army, and a -fresh battle proved physically impossible. - -It was impossible to give battle before information had been -collected, the wounded gathered in, the supplies of ammunition -replenished, the slain reckoned up, new officers appointed to -replace those who had been killed, and before the men had had food and -sleep. And meanwhile, the very next morning after the battle, the -French army advanced of itself upon the Russians, carried forward by -the force of its own momentum now seemingly increased in inverse -proportion to the square of the distance from its aim. Kutuzov's -wish was to attack next day, and the whole army desired to do so. -But to make an attack the wish to do so is not sufficient, there -must also be a possibility of doing it, and that possibility did not -exist. It was impossible not to retreat a day's march, and then in the -same way it was impossible not to retreat another and a third day's -march, and at last, on the first of September when the army drew -near Moscow--despite the strength of the feeling that had arisen in -all ranks--the force of circumstances compelled it to retire beyond -Moscow. And the troops retired one more, last, day's march, and -abandoned Moscow to the enemy. - -For people accustomed to think that plans of campaign and battles -are made by generals--as any one of us sitting over a map in his study -may imagine how he would have arranged things in this or that -battle--the questions present themselves: Why did Kutuzov during the -retreat not do this or that? Why did he not take up a position -before reaching Fili? Why did he not retire at once by the Kaluga -road, abandoning Moscow? and so on. People accustomed to think in that -way forget, or do not know, the inevitable conditions which always -limit the activities of any commander in chief. The activity of a -commander in chief does not all resemble the activity we imagine to -ourselves when we sit at case in our studies examining some campaign -on the map, with a certain number of troops on this and that side in a -certain known locality, and begin our plans from some given moment. -A commander in chief is never dealing with the beginning of any event- -the position from which we always contemplate it. The commander in -chief is always in the midst of a series of shifting events and so -he never can at any moment consider the whole import of an event -that is occurring. Moment by moment the event is imperceptibly shaping -itself, and at every moment of this continuous, uninterrupted -shaping of events the commander in chief is in the midst of a most -complex play of intrigues, worries, contingencies, authorities, -projects, counsels, threats, and deceptions and is continually obliged -to reply to innumerable questions addressed to him, which constantly -conflict with one another. - -Learned military authorities quite seriously tell us that Kutuzov -should have moved his army to the Kaluga road long before reaching -Fili, and that somebody actually submitted such a proposal to him. But -a commander in chief, especially at a difficult moment, has always -before him not one proposal but dozens simultaneously. And all these -proposals, based on strategics and tactics, contradict each other. - -A commander in chief's business, it would seem, is simply to -choose one of these projects. But even that he cannot do. Events and -time do not wait. For instance, on the twenty-eighth it is suggested -to him to cross to the Kaluga road, but just then an adjutant -gallops up from Miloradovich asking whether he is to engage the French -or retire. An order must be given him at once, that instant. And the -order to retreat carries us past the turn to the Kaluga road. And -after the adjutant comes the commissary general asking where the -stores are to be taken, and the chief of the hospitals asks where -the wounded are to go, and a courier from Petersburg brings a letter -from the sovereign which does not admit of the possibility of -abandoning Moscow, and the commander in chief's rival, the man who -is undermining him (and there are always not merely one but several -such), presents a new project diametrically opposed to that of turning -to the Kaluga road, and the commander in chief himself needs sleep and -refreshment to maintain his energy and a respectable general who has -been overlooked in the distribution of rewards comes to complain, -and the inhabitants of the district pray to be defended, and an -officer sent to inspect the locality comes in and gives a report quite -contrary to what was said by the officer previously sent; and a spy, a -prisoner, and a general who has been on reconnaissance, all describe -the position of the enemy's army differently. People accustomed to -misunderstand or to forget these inevitable conditions of a -commander in chief's actions describe to us, for instance, the -position of the army at Fili and assume that the commander in chief -could, on the first of September, quite freely decide whether to -abandon Moscow or defend it; whereas, with the Russian army less -than four miles from Moscow, no such question existed. When had that -question been settled? At Drissa and at Smolensk and most palpably -of all on the twenty-fourth of August at Shevardino and on the -twenty-sixth at Borodino, and each day and hour and minute of the -retreat from Borodino to Fili. - - - - - -CHAPTER III - - -When Ermolov, having been sent by Kutuzov to inspect the position, -told the field marshal that it was impossible to fight there before -Moscow and that they must retreat, Kutuzov looked at him in silence. - -"Give me your hand," said he and, turning it over so as to feel -the pulse, added: "You are not well, my dear fellow. Think what you -are saying!" - -Kutuzov could not yet admit the possibility of retreating beyond -Moscow without a battle. - -On the Poklonny Hill, four miles from the Dorogomilov gate of -Moscow, Kutuzov got out of his carriage and sat down on a bench by the -roadside. A great crowd of generals gathered round him, and Count -Rostopchin, who had come out from Moscow, joined them. This -brilliant company separated into several groups who all discussed -the advantages and disadvantages of the position, the state of the -army, the plans suggested, the situation of Moscow, and military -questions generally. Though they had not been summoned for the -purpose, and though it was not so called, they all felt that this -was really a council of war. The conversations all dealt with public -questions. If anyone gave or asked for personal news, it was done in a -whisper and they immediately reverted to general matters. No jokes, or -laughter, or smiles even, were seen among all these men. They -evidently all made an effort to hold themselves at the height the -situation demanded. And all these groups, while talking among -themselves, tried to keep near the commander in chief (whose bench -formed the center of the gathering) and to speak so that he might -overhear them. The commander in chief listened to what was being -said and sometimes asked them to repeat their remarks, but did not -himself take part in the conversations or express any opinion. After -hearing what was being said by one or other of these groups he -generally turned away with an air of disappointment, as though they -were not speaking of anything he wished to hear. Some discussed the -position that had been chosen, criticizing not the position itself -so much as the mental capacity of those who had chosen it. Others -argued that a mistake had been made earlier and that a battle should -have been fought two days before. Others again spoke of the battle -of Salamanca, which was described by Crosart, a newly arrived -Frenchman in a Spanish uniform. (This Frenchman and one of the -German princes serving with the Russian army were discussing the siege -of Saragossa and considering the possibility of defending Moscow in -a similar manner.) Count Rostopchin was telling a fourth group that he -was prepared to die with the city train bands under the walls of the -capital, but that he still could not help regretting having been -left in ignorance of what was happening, and that had he known it -sooner things would have been different.... A fifth group, -displaying the profundity of their strategic perceptions, discussed -the direction the troops would now have to take. A sixth group was -talking absolute nonsense. Kutuzov's expression grew more and more -preoccupied and gloomy. From all this talk he saw only one thing: that -to defend Moscow was a physical impossibility in the full meaning of -those words, that is to say, so utterly impossible that if any -senseless commander were to give orders to fight, confusion would -result but the battle would still not take place. It would not take -place because the commanders not merely all recognized the position to -be impossible, but in their conversations were only discussing what -would happen after its inevitable abandonment. How could the -commanders lead their troops to a field of battle they considered -impossible to hold? The lower-grade officers and even the soldiers -(who too reason) also considered the position impossible and therefore -could not go to fight, fully convinced as they were of defeat. If -Bennigsen insisted on the position being defended and others still -discussed it, the question was no longer important in itself but -only as a pretext for disputes and intrigue. This Kutuzov knew well. - -Bennigsen, who had chosen the position, warmly displayed his Russian -patriotism (Kutuzov could not listen to this without wincing) by -insisting that Moscow must be defended. His aim was as clear as -daylight to Kutuzov: if the defense failed, to throw the blame on -Kutuzov who had brought the army as far as the Sparrow Hills without -giving battle; if it succeeded, to claim the success as his own; or if -battle were not given, to clear himself of the crime of abandoning -Moscow. But this intrigue did not now occupy the old man's mind. One -terrible question absorbed him and to that question he heard no -reply from anyone. The question for him now was: "Have I really -allowed Napoleon to reach Moscow, and when did I do so? When was it -decided? Can it have been yesterday when I ordered Platov to -retreat, or was it the evening before, when I had a nap and told -Bennigsen to issue orders? Or was it earlier still?... When, when -was this terrible affair decided? Moscow must be abandoned. The army -must retreat and the order to do so must be given." To give that -terrible order seemed to him equivalent to resigning the command of -the army. And not only did he love power to which he was accustomed -(the honours awarded to Prince Prozorovski, under whom he had served -in Turkey, galled him), but he was convinced that he was destined to -save Russia and that that was why, against the Emperor's wish and by -the will of the people, he had been chosen commander in chief. He -was convinced that he alone could maintain command of the army in -these difficult circumstances, and that in all the world he alone -could encounter the invincible Napoleon without fear, and he was -horrified at the thought of the order he had to issue. But something -had to be decided, and these conversations around him which were -assuming too free a character must be stopped. - -He called the most important generals to him. - -"My head, be it good or bad, must depend on itself," said he, rising -from the bench, and he rode to Fili where his carriages were waiting. - - - - - -CHAPTER IV - - -The Council of War began to assemble at two in the afternoon in -the better and roomier part of Andrew Savostyanov's hut. The men, -women, and children of the large peasant family crowded into the -back room across the passage. Only Malasha, Andrew's six-year-old -granddaughter whom his Serene Highness had petted and to whom he had -given a lump of sugar while drinking his tea, remained on the top of -the brick oven in the larger room. Malasha looked down from the oven -with shy delight at the faces, uniforms, and decorations of the -generals, who one after another came into the room and sat down on the -broad benches in the corner under the icons. "Granddad" himself, as -Malasha in her own mind called Kutuzov, sat apart in a dark corner -behind the oven. He sat, sunk deep in a folding armchair, and -continually cleared his throat and pulled at the collar of his coat -which, though it was unbuttoned, still seemed to pinch his neck. Those -who entered went up one by one to the field marshal; he pressed the -hands of some and nodded to others. His adjutant Kaysarov was about to -draw back the curtain of the window facing Kutuzov, but the latter -moved his hand angrily and Kaysarov understood that his Serene -Highness did not wish his face to be seen. - -Round the peasant's deal table, on which lay maps, plans, pencils, -and papers, so many people gathered that the orderlies brought in -another bench and put it beside the table. Ermolov, Kaysarov, and -Toll, who had just arrived, sat down on this bench. In the foremost -place, immediately under the icons, sat Barclay de Tolly, his high -forehead merging into his bald crown. He had a St. George's Cross -round his neck and looked pale and ill. He had been feverish for two -days and was now shivering and in pain. Beside him sat Uvarov, who -with rapid gesticulations was giving him some information, speaking in -low tones as they all did. Chubby little Dokhturov was listening -attentively with eyebrows raised and arms folded on his stomach. On -the other side sat Count Ostermann-Tolstoy, seemingly absorbed in -his own thoughts. His broad head with its bold features and glittering -eyes was resting on his hand. Raevski, twitching forward the black -hair on his temples as was his habit, glanced now at Kutuzov and now -at the door with a look of impatience. Konovnitsyn's firm, handsome, -and kindly face was lit up by a tender, sly smile. His glance met -Malasha's, and the expression of his eyes caused the little girl to -smile. - -They were all waiting for Bennigsen, who on the pretext of -inspecting the position was finishing his savory dinner. They waited -for him from four till six o'clock and did not begin their -deliberations all that time talked in low tones of other matters. - -Only when Bennigsen had entered the hut did Kutuzov leave his corner -and draw toward the table, but not near enough for the candles that -had been placed there to light up his face. - -Bennigsen opened the council with the question: "Are we to abandon -Russia's ancient and sacred capital without a struggle, or are we to -defend it?" A prolonged and general silence followed. There was a -frown on every face and only Kutuzov's angry grunts and occasional -cough broke the silence. All eyes were gazing at him. Malasha too -looked at "Granddad." She was nearest to him and saw how his face -puckered; he seemed about to cry, but this did not last long. - -"Russia's ancient and sacred capital!" he suddenly said, repeating -Bennigsen's words in an angry voice and thereby drawing attention to -the false note in them. "Allow me to tell you, your excellency, that -that question has no meaning for a Russian." (He lurched his heavy -body forward.) "Such a question cannot be put; it is senseless! The -question I have asked these gentlemen to meet to discuss is a military -one. The question is that of saving Russia. Is it better to give up -Moscow without a battle, or by accepting battle to risk losing the -army as well as Moscow? That is the question on which I want your -opinion," and he sank back in his chair. - -The discussion began. Bennigsen did not yet consider his game -lost. Admitting the view of Barclay and others that a defensive battle -at Fili was impossible, but imbued with Russian patriotism and the -love of Moscow, he proposed to move troops from the right to the -left flank during the night and attack the French right flank the -following day. Opinions were divided, and arguments were advanced -for and against that project. Ermolov, Dokhturov, and Raevski agreed -with Bennigsen. Whether feeling it necessary to make a sacrifice -before abandoning the capital or guided by other, personal -considerations, these generals seemed not to understand that this -council could not alter the inevitable course of events and that -Moscow was in effect already abandoned. The other generals, however, -understood it and, leaving aside the question of Moscow, of the -direction the army should take in its retreat. Malasha, who kept her -eyes fixed on what was going on before her, understood the meaning -of the council differently. It seemed to her that it was only a -personal struggle between "Granddad" and "Long-coat" as she termed -Bennigsen. She saw that they grew spiteful when they spoke to one -another, and in her heart she sided with "Granddad." In the midst of -the conversation she noticed "Granddad" give Bennigsen a quick, subtle -glance, and then to her joys he saw that "Granddad" said something -to "Long-coat" which settled him. Bennigsen suddenly reddened and -paced angrily up and down the room. What so affected him was Kutuzov's -calm and quiet comment on the advantage or disadvantage of Bennigsen's -proposal to move troops by night from the right to the left flank to -attack the French right wing. - -"Gentlemen," said Kutuzov, "I cannot approve of the count's plan. -Moving troops in close proximity to an enemy is always dangerous, -and military history supports that view. For instance..." Kutuzov -seemed to reflect, searching for an example, then with a clear, -naive look at Bennigsen he added: "Oh yes; take the battle of -Friedland, which I think the count well remembers, and which was... -not fully successful, only because our troops were rearranged too near -the enemy..." - -There followed a momentary pause, which seemed very long to them -all. - -The discussion recommenced, but pauses frequently occurred and -they all felt that there was no more to be said. - -During one of these pauses Kutuzov heaved a deep sigh as if -preparing to speak. They all looked at him. - -"Well, gentlemen, I see that it is I who will have to pay for the -broken crockery," said he, and rising slowly he moved to the table. -"Gentlemen, I have heard your views. Some of you will not agree with -me. But I," he paused, "by the authority entrusted to me by my -Sovereign and country, order a retreat." - -After that the generals began to disperse with the solemnity and -circumspect silence of people who are leaving, after a funeral. - -Some of the generals, in low tones and in a strain very different -from the way they had spoken during the council, communicated -something to their commander in chief. - -Malasha, who had long been expected for supper, climbed carefully -backwards down from the oven, her bare little feet catching at its -projections, and slipping between the legs of the generals she -darted out of the room. - -When he had dismissed the generals Kutuzov sat a long time with -his elbows on the table, thinking always of the same terrible -question: "When, when did the abandonment of Moscow become inevitable? -When was that done which settled the matter? And who was to blame -for it?" - -"I did not expect this," said he to his adjutant Schneider when -the latter came in late that night. "I did not expect this! I did -not think this would happen." - -"You should take some rest, your Serene Highness," replied -Schneider. - -"But no! They shall eat horseflesh yet, like the Turks!" exclaimed -Kutuzov without replying, striking the table with his podgy fist. -"They shall too, if only..." - - - - - -CHAPTER V - - -At that very time, in circumstances even more important than -retreating without a battle, namely the evacuation and burning of -Moscow, Rostopchin, who is usually represented as being the instigator -of that event, acted in an altogether different manner from Kutuzov. - -After the battle of Borodino the abandonment and burning of Moscow -was as inevitable as the retreat of the army beyond Moscow without -fighting. - -Every Russian might have predicted it, not by reasoning but by the -feeling implanted in each of us and in our fathers. - -The same thing that took place in Moscow had happened in all the -towns and villages on Russian soil beginning with Smolensk, without -the participation of Count Rostopchin and his broadsheets. The -people awaited the enemy unconcernedly, did not riot or become excited -or tear anyone to pieces, but faced its fate, feeling within it the -strength to find what it should do at that most difficult moment. -And as soon as the enemy drew near the wealthy classes went away -abandoning their property, while the poorer remained and burned and -destroyed what was left. - -The consciousness that this would be so and would always be so was -and is present in the heart of every Russian. And a consciousness of -this, and a foreboding that Moscow would be taken, was present in -Russian Moscow society in 1812. Those who had quitted Moscow already -in July and at the beginning of August showed that they expected this. -Those who went away, taking what they could and abandoning their -houses and half their belongings, did so from the latent patriotism -which expresses itself not by phrases or by giving one's children to -save the fatherland and similar unnatural exploits, but unobtrusively, -simply, organically, and therefore in the way that always produces the -most powerful results. - -"It is disgraceful to run away from danger; only cowards are running -away from Moscow," they were told. In his broadsheets Rostopchin -impressed on them that to leave Moscow was shameful. They were ashamed -to be called cowards, ashamed to leave, but still they left, knowing -it had to be done. Why did they go? It is impossible to suppose that -Rostopchin had scared them by his accounts of horrors Napoleon had -committed in conquered countries. The first people to go away were the -rich educated people who knew quite well that Vienna and Berlin had -remained intact and that during Napoleon's occupation the -inhabitants had spent their time pleasantly in the company of the -charming Frenchmen whom the Russians, and especially the Russian -ladies, then liked so much. - -They went away because for Russians there could be no question as to -whether things would go well or ill under French rule in Moscow. It -was out of the question to be under French rule, it would be the worst -thing that could happen. They went away even before the battle of -Borodino and still more rapidly after it, despite Rostopchin's calls -to defend Moscow or the announcement of his intention to take the -wonder-working icon of the Iberian Mother of God and go to fight, or -of the balloons that were to destroy the French, and despite all the -nonsense Rostopchin wrote in his broadsheets. They knew that it was -for the army to fight, and that if it could not succeed it would not -do to take young ladies and house serfs to the Three Hills quarter -of Moscow to fight Napoleon, and that they must go away, sorry as they -were to abandon their property to destruction. They went away -without thinking of the tremendous significance of that immense and -wealthy city being given over to destruction, for a great city with -wooden buildings was certain when abandoned by its inhabitants to be -burned. They went away each on his own account, and yet it was only in -consequence of their going away that the momentous event was -accomplished that will always remain the greatest glory of the Russian -people. The lady who, afraid of being stopped by Count Rostopchin's -orders, had already in June moved with her Negroes and her women -jesters from Moscow to her Saratov estate, with a vague -consciousness that she was not Bonaparte's servant, was really, -simply, and truly carrying out the great work which saved Russia. -But Count Rostopchin, who now taunted those who left Moscow and now -had the government offices removed; now distributed quite useless -weapons to the drunken rabble; now had processions displaying the -icons, and now forbade Father Augustin to remove icons or the relics -of saints; now seized all the private carts in Moscow and on one -hundred and thirty-six of them removed the balloon that was being -constructed by Leppich; now hinted that he would burn Moscow and -related how he had set fire to his own house; now wrote a proclamation -to the French solemnly upbraiding them for having destroyed his -Orphanage; now claimed the glory of having hinted that he would burn -Moscow and now repudiated the deed; now ordered the people to catch -all spies and bring them to him, and now reproached them for doing so; -now expelled all the French residents from Moscow, and now allowed -Madame Aubert-Chalme (the center of the whole French colony in Moscow) -to remain, but ordered the venerable old postmaster Klyucharev to be -arrested and exiled for no particular offense; now assembled the -people at the Three Hills to fight the French and now, to get rid of -them, handed over to them a man to be killed and himself drove away by -a back gate; now declared that he would not survive the fall of -Moscow, and now wrote French verses in albums concerning his share -in the affair--this man did not understand the meaning of what was -happening but merely wanted to do something himself that would -astonish people, to perform some patriotically heroic feat; and like a -child he made sport of the momentous, and unavoidable event--the -abandonment and burning of Moscow--and tried with his puny hand now to -speed and now to stay the enormous, popular tide that bore him along -with it. - - - - - -CHAPTER VI - - -Helene, having returned with the court from Vilna to Petersburg, -found herself in a difficult position. - -In Petersburg she had enjoyed the special protection of a grandee -who occupied one of the highest posts in the Empire. In Vilna she -had formed an intimacy with a young foreign prince. When she -returned to Petersburg both the magnate and the prince were there, and -both claimed their rights. Helene was faced by a new problem--how to -preserve her intimacy with both without offending either. - -What would have seemed difficult or even impossible to another woman -did not cause the least embarrassment to Countess Bezukhova, who -evidently deserved her reputation of being a very clever woman. Had -she attempted concealment, or tried to extricate herself from her -awkward position by cunning, she would have spoiled her case by -acknowledging herself guilty. But Helene, like a really great man -who can do whatever he pleases, at once assumed her own position to be -correct, as she sincerely believed it to be, and that everyone else -was to blame. - -The first time the young foreigner allowed himself to reproach -her, she lifted her beautiful head and, half turning to him, said -firmly: "That's just like a man--selfish and cruel! I expected nothing -else. A woman sacrifices herself for you, she suffers, and this is her -reward! What right have you, monseigneur, to demand an account of my -attachments and friendships? He is a man who has been more than a -father to me!" The prince was about to say something, but Helene -interrupted him. - -"Well, yes," said she, "it may be that he has other sentiments for -me than those of a father, but that is not a reason for me to shut -my door on him. I am not a man, that I should repay kindness with -ingratitude! Know, monseigneur, that in all that relates to my -intimate feelings I render account only to God and to my -conscience," she concluded, laying her hand on her beautiful, fully -expanded bosom and looking up to heaven. - -"But for heaven's sake listen to me!" - -"Marry me, and I will be your slave!" - -"But that's impossible." - -"You won't deign to demean yourself by marrying me, you..." said -Helene, beginning to cry. - -The prince tried to comfort her, but Helene, as if quite distraught, -said through her tears that there was nothing to prevent her marrying, -that there were precedents (there were up to that time very few, but -she mentioned Napoleon and some other exalted personages), that she -had never been her husband's wife, and that she had been sacrificed. - -"But the law, religion..." said the prince, already yielding. - -"The law, religion... What have they been invented for if they can't -arrange that?" said Helene. - -The prince was surprised that so simple an idea had not occurred -to him, and he applied for advice to the holy brethren of the -Society of Jesus, with whom he was on intimate terms. - -A few days later at one of those enchanting fetes which Helene -gave at her country house on the Stone Island, the charming Monsieur -de Jobert, a man no longer young, with snow white hair and brilliant -black eyes, a Jesuit a robe courte* was presented to her, and in the -garden by the light of the illuminations and to the sound of music -talked to her for a long time of the love of God, of Christ, of the -Sacred Heart, and of the consolations the one true Catholic religion -affords in this world and the next. Helene was touched, and more -than once tears rose to her eyes and to those of Monsieur de Jobert -and their voices trembled. A dance, for which her partner came to seek -her, put an end to her discourse with her future directeur de -conscience, but the next evening Monsieur de Jobert came to see Helene -when she was alone, and after that often came again. - - -*Lay member of the Society of Jesus. - - -One day he took the countess to a Roman Catholic church, where she -knelt down before the altar to which she was led. The enchanting, -middle-aged Frenchman laid his hands on her head and, as she herself -afterward described it, she felt something like a fresh breeze -wafted into her soul. It was explained to her that this was la grace. - -After that a long-frocked abbe was brought to her. She confessed -to him, and he absolved her from her sins. Next day she received a box -containing the Sacred Host, which was left at her house for her to -partake of. A few days later Helene learned with pleasure that she had -now been admitted to the true Catholic Church and that in a few days -the Pope himself would hear of her and would send her a certain -document. - -All that was done around her and to her at this time, all the -attention devoted to her by so many clever men and expressed in such -pleasant, refined ways, and the state of dove-like purity she was -now in (she wore only white dresses and white ribbons all that time) -gave her pleasure, but her pleasure did not cause her for a moment -to forget her aim. And as it always happens in contests of cunning -that a stupid person gets the better of cleverer ones, Helene- -having realized that the main object of all these words and all this -trouble was, after converting her to Catholicism, to obtain money from -her for Jesuit institutions (as to which she received indications)- -before parting with her money insisted that the various operations -necessary to free her from her husband should be performed. In her -view the aim of every religion was merely to preserve certain -proprieties while affording satisfaction to human desires. And with -this aim, in one of her talks with her Father Confessor, she -insisted on an answer to the question, in how far was she bound by her -marriage? - -They were sitting in the twilight by a window in the drawing room. -The scent of flowers came in at the window. Helene was wearing a white -dress, transparent over her shoulders and bosom. The abbe, a -well-fed man with a plump, clean-shaven chin, a pleasant firm mouth, -and white hands meekly folded on his knees, sat close to Helene and, -with a subtle smile on his lips and a peaceful look of delight at -her beauty, occasionally glanced at her face as he explained his -opinion on the subject. Helene with an uneasy smile looked at his -curly hair and his plump, clean-shaven, blackish cheeks and every -moment expected the conversation to take a fresh turn. But the abbe, -though he evidently enjoyed the beauty of his companion, was -absorbed in his mastery of the matter. - -The course of the Father Confessor's arguments ran as follows: -"Ignorant of the import of what you were undertaking, you made a vow -of conjugal fidelity to a man who on his part, by entering the married -state without faith in the religious significance of marriage, -committed an act of sacrilege. That marriage lacked the dual -significance it should have had. Yet in spite of this your vow was -binding. You swerved from it. What did you commit by so acting? A -venial, or a mortal, sin? A venial sin, for you acted without evil -intention. If now you married again with the object of bearing -children, your sin might be forgiven. But the question is again a -twofold one: firstly..." - -But suddenly Helene, who was getting bored, said with one of her -bewitching smiles: "But I think that having espoused the true religion -I cannot be bound by what a false religion laid upon me." - -The director of her conscience was astounded at having the case -presented to him thus with the simplicity of Columbus' egg. He was -delighted at the unexpected rapidity of his pupil's progress, but -could not abandon the edifice of argument he had laboriously -constructed. - -"Let us understand one another, Countess," said he with a smile, and -began refuting his spiritual daughter's arguments. - - - - - -CHAPTER VII - - -Helene understood that the question was very simple and easy from -the ecclesiastical point of view, and that her directors were making -difficulties only because they were apprehensive as to how the -matter would be regarded by the secular authorities. - -So she decided that it was necessary to prepare the opinion of -society. She provoked the jealousy of the elderly magnate and told him -what she had told her other suitor; that is, she put the matter so -that the only way for him to obtain a right over her was to marry her. -The elderly magnate was at first as much taken aback by this -suggestion of marriage with a woman whose husband was alive, as the -younger man had been, but Helene's imperturbable conviction that it -was as simple and natural as marrying a maiden had its effect on him -too. Had Helene herself shown the least sign of hesitation, shame, -or secrecy, her cause would certainly have been lost; but not only did -she show no signs of secrecy or shame, on the contrary, with -good-natured naivete she told her intimate friends (and these were all -Petersburg) that both the prince and the magnate had proposed to her -and that she loved both and was afraid of grieving either. - -A rumor immediately spread in Petersburg, not that Helene wanted -to be divorced from her husband (had such a report spread many would -have opposed so illegal an intention) but simply that the -unfortunate and interesting Helene was in doubt which of the two men -she should marry. The question was no longer whether this was -possible, but only which was the better match and how the matter would -be regarded at court. There were, it is true, some rigid individuals -unable to rise to the height of such a question, who saw in the -project a desecration of the sacrament of marriage, but there were not -many such and they remained silent, while the majority were interested -in Helene's good fortune and in the question which match would be -the more advantageous. Whether it was right or wrong to remarry -while one had a husband living they did not discuss, for that question -had evidently been settled by people "wiser than you or me," as they -said, and to doubt the correctness of that decision would be to risk -exposing one's stupidity and incapacity to live in society. - -Only Marya Dmitrievna Akhrosimova, had come to Petersburg that -summer to see one of her sons, allowed herself plainly to express an -opinion contrary to the general one. Meeting Helene at a ball she -stopped her in the middle of the room and, amid general silence, -said in her gruff voice: "So wives of living men have started marrying -again! Perhaps you think you have invented a novelty? You have been -forestalled, my dear! It was thought of long ago. It is done in all -the brothels," and with these words Marya Dmitrievna, turning up her -wide sleeves with her usual threatening gesture and glancing sternly -round, moved across the room. - -Though people were afraid of Marya Dmitrievna she was regarded in -Petersburg as a buffoon, and so of what she had said they only -noticed, and repeated in a whisper, the one coarse word she had -used, supposing the whole sting of her remark to lie in that word. - -Prince Vasili, who of late very often forgot what he had said and -repeated one and the same thing a hundred times, remarked to his -daughter whenever he chanced to see her: - -"Helene, I have a word to say to you," and he would lead her -aside, drawing her hand downward. "I have heard of certain projects -concerning... you know. Well my dear child, you know how your father's -heart rejoices to know that you... You have suffered so much.... -But, my dear child, consult only your own heart. That is all I have to -say," and concealing his unvarying emotion he would press his cheek -against his daughter's and move away. - -Bilibin, who had not lost his reputation of an exceedingly clever -man, and who was one of the disinterested friends so -brilliant a woman as Helene always has--men friends who can never -change into lovers--once gave her his view of the matter at a small -and intimate gathering. - -"Listen, Bilibin," said Helene (she always called friends of that -sort by their surnames), and she touched his coat sleeve with her -white, beringed fingers. "Tell me, as you would a sister, what I ought -to do. Which of the two?" - -Bilibin wrinkled up the skin over his eyebrows and pondered, with -a smile on his lips. - -"You are not taking me unawares, you know," said he. "As a true -friend, I have thought and thought again about your affair. You see, -if you marry the prince"--he meant the younger man--and he crooked one -finger, "you forever lose the chance of marrying the other, and you -will displease the court besides. (You know there is some kind of -connection.) But if you marry the old count you will make his last -days happy, and as widow of the Grand... the prince would no longer be -making a mesalliance by marrying you," and Bilibin smoothed out his -forehead. - -"That's a true friend!" said Helene beaming, and again touching -Bilibin's sleeve. "But I love them, you know, and don't want to -distress either of them. I would give my life for the happiness of -them both." - -Bilibin shrugged his shoulders, as much as to say that not even he -could help in that difficulty. - -"Une maitresse-femme!* That's what is called putting things -squarely. She would like to be married to all three at the same time," -thought he. - - -*A masterly woman. - - -"But tell me, how will your husband look at the matter?" Bilibin -asked, his reputation being so well established that he did not fear -to ask so naive a question. "Will he agree?" - -"Oh, he loves me so!" said Helene, who for some reason imagined that -Pierre too loved her. "He will do anything for me." - -Bilibin puckered his skin in preparation for something witty. - -"Even divorce you?" said he. - -Helene laughed. - -Among those who ventured to doubt the justifiability of the proposed -marriage was Helene's mother, Princess Kuragina. She was continually -tormented by jealousy of her daughter, and now that jealousy concerned -a subject near to her own heart, she could not reconcile herself to -the idea. She consulted a Russian priest as to the possibility of -divorce and remarriage during a husband's lifetime, and the priest -told her that it was impossible, and to her delight showed her a -text in the Gospel which (as it seemed to him) plainly remarriage -while the husband is alive. - -Armed with these arguments, which appeared to her unanswerable, -she drove to her daughter's early one morning so as to find her alone. - -Having listened to her mother's objections, Helene smiled blandly -and ironically. - -"But it says plainly: 'Whosoever shall marry her that is -divorced...'" said the old princess. - -"Ah, Maman, ne dites pas de betises. Vous ne comprenez rein. Dans ma -position j'ai des devoirs,"* said Helene changing from Russian, in -which language she always felt that her case did not sound quite -clear, into French which suited it better. - - -*"Oh, Mamma, don't talk nonsense! You don't understand anything. -In my position I have obligations. - - -"But, my dear...." - -"Oh, Mamma, how is it you don't understand that the Holy Father, who -has the right to grant dispensations..." - -Just then the lady companion who lived with Helene came in to -announce that His Highness was in the ballroom and wished to see her. - -"Non, dites-lui que je ne veux pas le voir, que je suis furieuse -contre lui, parce qu'il m' a manque parole."* - - -*"No, tell him I don't wish to see him, I am furious with him for -not keeping his word to me." - - -"Comtesse, a tout peche misericorde,"* said a fair-haired young -man with a long face and nose, as he entered the room. - - -*"Countess, there is mercy for every sin." - - -The old princess rose respectfully and curtsied. The young man who -had entered took no notice of her. The princess nodded to her daughter -and sidled out of the room. - -"Yes, she is right," thought the old princess, all her convictions -dissipated by the appearance of His Highness. "She is right, but how -is it that we in our irrecoverable youth did not know it? Yet it is so -simple," she thought as she got into her carriage. - - -By the beginning of August Helene's affairs were clearly defined and -she wrote a letter to her husband--who, as she imagined, loved her -very much--informing him of her intention to marry N.N. and of her -having embraced the one true faith, and asking him to carry out all -the formalities necessary for a divorce, which would be explained to -him by the bearer of the letter. - - -And so I pray God to have you, my friend, in His holy and powerful -keeping--Your friend Helene. - - -This letter was brought to Pierre's house when he was on the field -of Borodino. - - - - - -CHAPTER VIII - - -Toward the end of the battle of Borodino, Pierre, having run down -from Raevski's battery a second time, made his way through a gully -to Knyazkovo with a crowd of soldiers, reached the dressing station, -and seeing blood and hearing cries and groans hurried on, still -entangled in the crowds of soldiers. - -The one thing he now desired with his whole soul was to get away -quickly from the terrible sensations amid which he had lived that -day and return to ordinary conditions of life and sleep quietly in a -room in his own bed. He felt that only in the ordinary conditions of -life would he be able to understand himself and all he had seen and -felt. But such ordinary conditions of life were nowhere to be found. - -Though shells and bullets did not whistle over the road along -which he was going, still on all sides there was what there had been -on the field of battle. There were still the same suffering, -exhausted, and sometimes strangely indifferent faces, the same -blood, the same soldiers' overcoats, the same sounds of firing -which, though distant now, still aroused terror, and besides this -there were the foul air and the dust. - -Having gone a couple of miles along the Mozhaysk road, Pierre sat -down by the roadside. - -Dusk had fallen, and the roar of guns died away. Pierre lay -leaning on his elbow for a long time, gazing at the shadows that moved -past him in the darkness. He was continually imagining that a cannon -ball was flying toward him with a terrific whizz, and then he -shuddered and sat up. He had no idea how long he had been there. In -the middle of the night three soldiers, having brought some -firewood, settled down near him and began lighting a fire. - -The soldiers, who threw sidelong glances at Pierre, got the fire -to burn and placed an iron pot on it into which they broke some -dried bread and put a little dripping. The pleasant odor of greasy -viands mingled with the smell of smoke. Pierre sat up and sighed. -The three soldiers were eating and talking among themselves, taking no -notice of him. - -"And who may you be?" one of them suddenly asked Pierre, evidently -meaning what Pierre himself had in mind, namely: "If you want to eat -we'll give you some food, only let us know whether you are an honest -man." - -"I, I..." said Pierre, feeling it necessary to minimize his social -position as much as possible so as to be nearer to the soldiers and -better understood by them. "By rights I am a militia officer, but my -men are not here. I came to the battle and have lost them." - -"There now!" said one of the soldiers. - -Another shook his head. - -"Would you like a little mash?" the first soldier asked, and -handed Pierre a wooden spoon after licking it clean. - -Pierre sat down by the fire and began eating the mash, as they -called the food in the cauldron, and he thought it more delicious than -any food he had ever tasted. As he sat bending greedily over it, -helping himself to large spoonfuls and chewing one after another, -his was lit up by the fire and the soldiers looked at him in silence. - -"Where have you to go to? Tell us!" said one of them. - -"To Mozhaysk." - -"You're a gentleman, aren't you?" - -"Yes." - -"And what's your name?" - -"Peter Kirilych." - -"Well then, Peter Kirilych, come along with us, we'll take you -there." - -In the total darkness the soldiers walked with Pierre to Mozhaysk. - -By the time they got near Mozhaysk and began ascending the steep -hill into the town, the cocks were already crowing. Pierre went on -with the soldiers, quite forgetting that his inn was at the bottom -of the hill and that he had already passed it. He would not soon -have remembered this, such was his state of forgetfulness, had he -not halfway up the hill stumbled upon his groom, who had been to -look for him in the town and was returning to the inn. The groom -recognized Pierre in the darkness by his white hat. - -"Your excellency!" he said. "Why, we were beginning to despair! -How is it you are on foot? And where are you going, please?" - -"Oh, yes!" said Pierre. - -The soldiers stopped. - -"So you've found your folk?" said one of them. "Well, good-by, Peter -Kirilych--isn't it?" - -"Good-by, Peter Kirilych!" Pierre heard the other voices repeat. - -"Good-by!" he said and turned with his groom toward the inn. - -"I ought to give them something!" he thought, and felt in his -pocket. "No, better not!" said another, inner voice. - -There was not a room to be had at the inn, they were all occupied. -Pierre went out into the yard and, covering himself up head and all, -lay down in his carriage. - - - - - -CHAPTER IX - - -Scarcely had Pierre laid his head on the pillow before he felt -himself falling asleep, but suddenly, almost with the distinctness -of reality, he heard the boom, boom, boom of firing, the thud of -projectiles, groans and cries, and smelled blood and powder, and a -feeling of horror and dread of death seized him. Filled with fright he -opened his eyes and lifted his head from under his cloak. All was -tranquil in the yard. Only someone's orderly passed through the -gateway, splashing through the mud, and talked to the innkeeper. Above -Pierre's head some pigeons, disturbed by the movement he had made in -sitting up, fluttered under the dark roof of the penthouse. The -whole courtyard was permeated by a strong peaceful smell of stable -yards, delightful to Pierre at that moment. He could see the clear -starry sky between the dark roofs of two penthouses. - -"Thank God, there is no more of that!" he thought, covering up his -head again. "Oh, what a terrible thing is fear, and how shamefully I -yielded to it! But they... they were steady and calm all the time, -to the end..." thought he. - -They, in Pierre's mind, were the soldiers, those who had been at the -battery, those who had given him food, and those who had prayed before -the icon. They, those strange men he had not previously known, stood -out clearly and sharply from everyone else. - -"To be a soldier, just a soldier!" thought Pierre as he fell asleep, -"to enter communal life completely, to be imbued by what makes them -what they are. But how cast off all the superfluous, devilish burden -of my outer man? There was a time when I could have done it. I could -have run away from my father, as I wanted to. Or I might have been -sent to serve as a soldier after the duel with Dolokhov." And the -memory of the dinner at the English Club when he had challenged -Dolokhov flashed through Pierre's mind, and then he remembered his -benefactor at Torzhok. And now a picture of a solemn meeting of the -lodge presented itself to his mind. It was taking place at the English -Club and someone near and dear to him sat at the end of the table. -"Yes, that is he! It is my benefactor. But he died!" thought Pierre. -"Yes, he died, and I did not know he was alive. How sorry I am that he -died, and how glad I am that he is alive again!" On one side of the -table sat Anatole, Dolokhov, Nesvitski, Denisov, and others like -them (in his dream the category to which these men belonged was as -clearly defined in his mind as the category of those he termed -they), and he heard those people, Anatole and Dolokhov, shouting and -singing loudly; yet through their shouting the voice of his benefactor -was heard speaking all the time and the sound of his words was as -weighty and uninterrupted as the booming on the battlefield, but -pleasant and comforting. Pierre did not understand what his benefactor -was saying, but he knew (the categories of thoughts were also quite -distinct in his dream) that he was talking of goodness and the -possibility of being what they were. And they with their simple, kind, -firm faces surrounded his benefactor on all sides. But though they -were kindly they did not look at Pierre and did not know him. -Wishing to speak and to attract their attention, he got up, but at -that moment his legs grew cold and bare. - -He felt ashamed, and with one arm covered his legs from which his -cloak had in fact slipped. For a moment as he was rearranging his -cloak Pierre opened his eyes and saw the same penthouse roofs, -posts, and yard, but now they were all bluish, lit up, and -glittering with frost or dew. - -"It is dawn," thought Pierre. "But that's not what I want. I want to -hear and understand my benefactor's words." Again he covered himself -up with his cloak, but now neither the lodge nor his benefactor was -there. There were only thoughts clearly expressed in words, thoughts -that someone was uttering or that he himself was formulating. - -Afterwards when he recalled those thoughts Pierre was convinced that -someone outside himself had spoken them, though the impressions of -that day had evoked them. He had never, it seemed to him, been able to -think and express his thoughts like that when awake. - -"To endure war is the most difficult subordination of man's -freedom to the law of God," the voice had said. "Simplicity is -submission to the will of God; you cannot escape from Him. And they -are simple. They do not talk, but act. The spoken word is silver but -the unspoken is golden. Man can be master of nothing while he fears -death, but he who does not fear it possesses all. If there were no -suffering, man would not know his limitations, would not know himself. -The hardest thing [Pierre went on thinking, or hearing, in his -dream] is to be able in your soul to unite the meaning of all. To -unite all?" he asked himself. "No, not to unite. Thoughts cannot be -united, but to harness all these thoughts together is what we need! -Yes, one must harness them, must harness them!" he repeated to himself -with inward rapture, feeling that these words and they alone expressed -what he wanted to say and solved the question that tormented him. - -"Yes, one must harness, it is time to harness." - -"Time to harness, time to harness, your excellency! Your -excellency!" some voice was repeating. "We must harness, it is time to -harness...." - -It was the voice of the groom, trying to wake him. The sun shone -straight into Pierre's face. He glanced at the dirty innyard in the -middle of which soldiers were watering their lean horses at the pump -while carts were passing out of the gate. Pierre turned away with -repugnance, and closing his eyes quickly fell back on the carriage -seat. "No, I don't want that, I don't want to see and understand that. -I want to understand what was revealing itself to me in my dream. -One second more and I should have understood it all! But what am I -to do? Harness, but how can I harness everything?" and Pierre felt -with horror that the meaning of all he had seen and thought in the -dream had been destroyed. - -The groom, the coachman, and the innkeeper told Pierre that an -officer had come with news that the French were already near -Mozhaysk and that our men were leaving it. - -Pierre got up and, having told them to harness and overtake him, -went on foot through the town. - -The troops were moving on, leaving about ten thousand wounded behind -them. There were wounded in the yards, at the windows of the houses, -and the streets were crowded with them. In the streets, around carts -that were to take some of the wounded away, shouts, curses, and -blows could be heard. Pierre offered the use of his carriage, which -had overtaken him, to a wounded general he knew, and drove with him -to Moscow. On the way Pierre was told of the death of his -brother-in-law Anatole and of that of Prince Andrew. - - - - - -CHAPTER X - - -On the thirteenth of August Pierre reached Moscow. Close to the -gates of the city he was met by Count Rostopchin's adjutant. - -"We have been looking for you everywhere," said the adjutant. "The -count wants to see you particularly. He asks you to come to him at -once on a very important matter." - -Without going home, Pierre took a cab and drove to see the Moscow -commander in chief. - -Count Rostopchin had only that morning returned to town from his -summer villa at Sokolniki. The anteroom and reception room of his -house were full of officials who had been summoned or had come for -orders. Vasilchikov and Platov had already seen the count and -explained to him that it was impossible to defend Moscow and that it -would have to be surrendered. Though this news was being concealed -from the inhabitants, the officials--the heads of the various -government departments--knew that Moscow would soon be in the -enemy's hands, just as Count Rostopchin himself knew it, and to escape -personal responsibility they had all come to the governor to ask how -they were to deal with their various departments. - -As Pierre was entering the reception room a courier from the army -came out of Rostopchin's private room. - -In answer to questions with which he was greeted, the courier made a -despairing gesture with his hand and passed through the room. - -While waiting in the reception room Pierre with weary eyes watched -the various officials, old and young, military and civilian, who -were there. They all seemed dissatisfied and uneasy. Pierre went up to -a group of men, one of whom he knew. After greeting Pierre they -continued their conversation. - -"If they're sent out and brought back again later on it will do no -harm, but as things are now one can't answer for anything." - -"But you see what he writes..." said another, pointing to a -printed sheet he held in his hand. - -"That's another matter. That's necessary for the people," said the -first. - -"What is it?" asked Pierre. - -"Oh, it's a fresh broadsheet." - -Pierre took it and began reading. - - -His Serene Highness has passed through Mozhaysk in order to join -up with the troops moving toward him and has taken up a strong -position where the enemy will not soon attack him. Forty eight guns -with ammunition have been sent him from here, and his Serene -Highness says he will defend Moscow to the last drop of blood and is -even ready to fight in the streets. Do not be upset, brothers, that -the law courts are closed; things have to be put in order, and we will -deal with villains in our own way! When the time comes I shall want -both town and peasant lads and will raise the cry a day or two -beforehand, but they are not wanted yet so I hold my peace. An ax will -be useful, a hunting spear not bad, but a three-pronged fork will be -best of all: a Frenchman is no heavier than a sheaf of rye. Tomorrow -after dinner I shall take the Iberian icon of the Mother of God to the -wounded in the Catherine Hospital where we will have some water -blessed. That will help them to get well quicker. I, too, am well now: -one of my eyes was sore but now I am on the lookout with both. - - -"But military men have told me that it is impossible to fight in the -town," said Pierre, "and that the position..." - -"Well, of course! That's what we were saying," replied the first -speaker. - -"And what does he mean by 'One of my eyes was sore but now I am on -the lookout with both'?" asked Pierre. - -"The count had a sty," replied the adjutant smiling, "and was very -much upset when I told him people had come to ask what was the -matter with him. By the by, Count," he added suddenly, addressing -Pierre with a smile, "we heard that you have family troubles and -that the countess, your wife..." - -"I have heard nothing," Pierre replied unconcernedly. "But what have -you heard?" - -"Oh, well, you know people often invent things. I only say what I -heard." - -"But what did you hear?" - -"Well, they say," continued the adjutant with the same smile, -"that the countess, your wife, is preparing to go abroad. I expect -it's nonsense...." - -"Possibly," remarked Pierre, looking about him absent-mindedly. "And -who is that?" he asked, indicating a short old man in a clean blue -peasant overcoat, with a big snow-white beard and eyebrows and a ruddy -face. - -"He? That's a tradesman, that is to say, he's the restaurant keeper, -Vereshchagin. Perhaps you have heard of that affair with the -proclamation." - -"Oh, so that is Vereshchagin!" said Pierre, looking at the firm, -calm face of the old man and seeking any indication of his being a -traitor. - -"That's not he himself, that's the father of the fellow who wrote -the proclamation," said the adjutant. "The young man is in prison -and I expect it will go hard with him." - -An old gentleman wearing a star and another official, a German -wearing a cross round his neck, approached the speaker. - -"It's a complicated story, you know," said the adjutant. "That -proclamation appeared about two months ago. The count was informed -of it. He gave orders to investigate the matter. Gabriel Ivanovich -here made the inquiries. The proclamation had passed through exactly -sixty-three hands. He asked one, 'From whom did you get it?' 'From -so-and-so.' He went to the next one. 'From whom did you get it?' and -so on till he reached Vereshchagin, a half educated tradesman, you -know, 'a pet of a trader,'" said the adjutant smiling. "They asked -him, 'Who gave it you?' And the point is that we knew whom he had it -from. He could only have had it from the Postmaster. But evidently -they had come to some understanding. He replied: 'From no one; I -made it up myself.' They threatened and questioned him, but he stuck -to that: 'I made it up myself.' And so it was reported to the count, -who sent for the man. 'From whom did you get the proclamation?' 'I -wrote it myself.' Well, you know the count," said the adjutant -cheerfully, with a smile of pride, "he flared up dreadfully--and -just think of the fellow's audacity, lying, and obstinacy!" - - "And the count wanted him to say it was from Klyucharev? I -understand!" said Pierre. - -"Not at all," rejoined the adjutant in dismay. "Klyucharev had his -own sins to answer for without that and that is why he has been -banished. But the point is that the count was much annoyed. 'How could -you have written it yourself?' said he, and he took up the Hamburg -Gazette that was lying on the table. 'Here it is! You did not write it -yourself but translated it, and translated it abominably, because -you don't even know French, you fool.' And what do you think? 'No,' -said he, 'I have not read any papers, I made it up myself.' 'If that's -so, you're a traitor and I'll have you tried, and you'll be hanged! -Say from whom you had it.' 'I have seen no papers, I made it up -myself.' And that was the end of it. The count had the father fetched, -but the fellow stuck to it. He was sent for trial and condemned to -hard labor, I believe. Now the father has come to intercede for him. -But he's a good-for-nothing lad! You know that sort of tradesman's -son, a dandy and lady-killer. He attended some lectures somewhere -and imagines that the devil is no match for him. That's the sort of -fellow he is. His father keeps a cookshop here by the Stone Bridge, -and you know there was a large icon of God Almighty painted with a -scepter in one hand and an orb in the other. Well, he took that icon -home with him for a few days and what did he do? He found some -scoundrel of a painter..." - - - - - -CHAPTER XI - - -In the middle of this fresh tale Pierre was summoned to the -commander in chief. - -When he entered the private room Count Rostopchin, puckering his -face, was rubbing his forehead and eyes with his hand. A short man was -saying something, but when Pierre entered he stopped speaking and went -out. - -"Ah, how do you do, great warrior?" said Rostopchin as soon as the -short man had left the room. "We have heard of your prowess. But -that's not the point. Between ourselves, mon cher, do you belong to -the Masons?" he went on severely, as though there were something wrong -about it which he nevertheless intended to pardon. Pierre remained -silent. "I am well informed, my friend, but I am aware that there -are Masons and I hope that you are not one of those who -on pretense of saving mankind wish to ruin Russia." - -"Yes, I am a Mason," Pierre replied. - -"There, you see, mon cher! I expect you know that Messrs. -Speranski and Magnitski have been deported to their proper place. -Mr. Klyucharev has been treated in the same way, and so have others -who on the plea of building up the temple of Solomon have tried to -destroy the temple of their fatherland. You can understand that -there are reasons for this and that I could not have exiled the -Postmaster had he not been a harmful person. It has now come to my -knowledge that you lent him your carriage for his removal from town, -and that you have even accepted papers from him for safe custody. I -like you and don't wish you any harm and--as you are only half my age- -I advise you, as a father would, to cease all communication with men -of that stamp and to leave here as soon as possible." - -"But what did Klyucharev do wrong, Count?" asked Pierre. - -"That is for me to know, but not for you to ask," shouted -Rostopchin. - -"If he is accused of circulating Napoleon's proclamation it is not -proved that he did so," said Pierre without looking at Rostopchin, -"and Vereshchagin..." - -"There we are!" Rostopchin shouted at Pierre louder than before, -frowning suddenly. "Vereshchagin is a renegade and a traitor who -will be punished as he deserves," said he with the vindictive heat -with which people speak when recalling an insult. "But I did not -summon you to discuss my actions, but to give you advice--or an -order if you prefer it. I beg you to leave the town and break off -all communication with such men as Klyucharev. And I will knock the -nonsense out of anybody"--but probably realizing that he was -shouting at Bezukhov who so far was not guilty of anything, he -added, taking Pierre's hand in a friendly manner, "We are on the eve -of a public disaster and I haven't time to be polite to everybody -who has business with me. My head is sometimes in a whirl. Well, mon -cher, what are you doing personally?" - -"Why, nothing," answered Pierre without raising his eyes or changing -the thoughtful expression of his face. - -The count frowned. - -"A word of friendly advice, mon cher. Be off as soon as you can, -that's all I have to tell you. Happy he who has ears to hear. Good-by, -my dear fellow. Oh, by the by!" he shouted through the doorway after -Pierre, "is it true that the countess has fallen into the clutches -of the holy fathers of the Society of Jesus?" - -Pierre did not answer and left Rostopchin's room more sullen and -angry than he had ever before shown himself. - -When he reached home it was already getting dark. Some eight -people had come to see him that evening: the secretary of a committee, -the colonel of his battalion, his steward, his major-domo, and various -petitioners. They all had business with Pierre and wanted decisions -from him. Pierre did not understand and was not interested in any of -these questions and only answered them in order to get rid of these -people. When left alone at last he opened and read his wife's letter. - -"They, the soldiers at the battery, Prince Andrew killed... that old -man... Simplicity is submission to God. Suffering is necessary... -the meaning of all... one must harness... my wife is getting -married... One must forget and understand..." And going to his bed -he threw himself on it without undressing and immediately fell asleep. - -When he awoke next morning the major-domo came to inform him that -a special messenger, a police officer, had come from Count -Rostopchin to know whether Count Bezukhov had left or was leaving -the town. - -A dozen persons who had business with Pierre were awaiting him in -the drawing room. Pierre dressed hurriedly and, instead of going to -see them, went to the back porch and out through the gate. - -From that time till the end of the destruction of Moscow no one of -Bezukhov's household, despite all the search they made, saw Pierre -again or knew where he was. - - - - - -CHAPTER XII - - -The Rostovs remained in Moscow till the first of September, that is, -till the eve of the enemy's entry into the city. - -After Petya had joined Obolenski's regiment of Cossacks and left for -Belaya Tserkov where that regiment was forming, the countess was -seized with terror. The thought that both her sons were at the war, -had both gone from under her wing, that today or tomorrow either or -both of them might be killed like the three sons of one of her -acquaintances, struck her that summer for the first time with cruel -clearness. She tried to get Nicholas back and wished to go herself -to join Petya, or to get him an appointment somewhere in Petersburg, -but neither of these proved possible. Petya could not return unless -his regiment did so or unless he was transferred to another regiment -on active service. Nicholas was somewhere with the army and had not -sent a word since his last letter, in which he had given a detailed -account of his meeting with Princess Mary. The countess did not -sleep at night, or when she did fall asleep dreamed that she saw her -sons lying dead. After many consultations and conversations, the count -at last devised means to tranquillize her. He got Petya transferred -from Obolenski's regiment to Bezukhov's, which was in training near -Moscow. Though Petya would remain in the service, this transfer -would give the countess the consolation of seeing at least one of -her sons under her wing, and she hoped to arrange matters for her -Petya so as not to let him go again, but always get him appointed to -places where he could not possibly take part in a battle. As long as -Nicholas alone was in danger the countess imagined that she loved -her first-born more than all her other children and even reproached -herself for it; but when her youngest: the scapegrace who had been bad -at lessons, was always breaking things in the house and making himself -a nuisance to everybody, that snub-nosed Petya with his merry black -eyes and fresh rosy cheeks where soft down was just beginning to show- -when he was thrown amid those big, dreadful, cruel men who were -fighting somewhere about something and apparently finding pleasure -in it--then his mother thought she loved him more, much more, than all -her other children. The nearer the time came for Petya to return, -the more uneasy grew the countess. She began to think she would -never live to see such happiness. The presence of Sonya, of her -beloved Natasha, or even of her husband irritated her. "What do I want -with them? I want no one but Petya," she thought. - -At the end of August the Rostovs received another letter from -Nicholas. He wrote from the province of Voronezh where he had been -sent to procure remounts, but that letter did not set the countess -at ease. Knowing that one son was out of danger she became the more -anxious about Petya. - -Though by the twentieth of August nearly all the Rostovs' -acquaintances had left Moscow, and though everybody tried to -persuade the countess to get away as quickly as possible, she would -not bear of leaving before her treasure, her adored Petya, returned. -On the twenty-eighth of August he arrived. The passionate tenderness -with which his mother received him did not please the sixteen-year-old -officer. Though she concealed from him her intention of keeping him -under her wing, Petya guessed her designs, and instinctively fearing -that he might give way to emotion when with her--might "become -womanish" as he termed it to himself--he treated her coldly, avoided -her, and during his stay in Moscow attached himself exclusively to -Natasha for whom he had always had a particularly brotherly -tenderness, almost lover-like. - -Owing to the count's customary carelessness nothing was ready for -their departure by the twenty-eighth of August and the carts that were -to come from their Ryazan and Moscow estates to remove their household -belongings did not arrive till the thirtieth. - -From the twenty-eighth till the thirty-first all Moscow was in a -bustle and commotion. Every day thousands of men wounded at Borodino -were brought in by the Dorogomilov gate and taken to various parts -of Moscow, and thousands of carts conveyed the inhabitants and their -possessions out by the other gates. In spite of Rostopchin's -broadsheets, or because of them or independently of them, the -strangest and most contradictory rumors were current in the town. Some -said that no one was to be allowed to leave the city, others on the -contrary said that all the icons had been taken out of the churches -and everybody was to be ordered to leave. Some said there had been -another battle after Borodino at which the French had been routed, -while others on the contrary reported that the Russian army bad been -destroyed. Some talked about the Moscow militia which, preceded by the -clergy, would go to the Three Hills; others whispered that Augustin -had been forbidden to leave, that traitors had been seized, that the -peasants were rioting and robbing people on their way from Moscow, and -so on. But all this was only talk; in reality (though the Council of -Fili, at which it was decided to abandon Moscow, had not yet been -held) both those who went away and those who remained behind felt, -though they did not show it, that Moscow would certainly be abandoned, -and that they ought to get away as quickly as possible and save -their belongings. It was felt that everything would suddenly break -up and change, but up to the first of September nothing had done so. -As a criminal who is being led to execution knows that he must die -immediately, but yet looks about him and straightens the cap that is -awry on his head, so Moscow involuntarily continued its wonted life, -though it knew that the time of its destruction was near when the -conditions of life to which its people were accustomed to submit would -be completely upset. - -During the three days preceding the occupation of Moscow the whole -Rostov family was absorbed in various activities. The head of the -family, Count Ilya Rostov, continually drove about the city collecting -the current rumors from all sides and gave superficial and hasty -orders at home about the preparations for their departure. - -The countess watched the things being packed, was dissatisfied -with everything, was constantly in pursuit of Petya who was always -running away from her, and was jealous of Natasha with whom he spent -all his time. Sonya alone directed the practical side of matters by -getting things packed. But of late Sonya had been particularly sad and -silent. Nicholas' letter in which he mentioned Princess Mary had -elicited, in her presence, joyous comments from the countess, who -saw an intervention of Providence in this meeting of the princess -and Nicholas. - -"I was never pleased at Bolkonski's engagement to Natasha," said the -countess, "but I always wanted Nicholas to marry the princess, and had -a presentiment that it would happen. What a good thing it would be!" - -Sonya felt that this was true: that the only possibility of -retrieving the Rostovs' affairs was by Nicholas marrying a rich woman, -and that the princess was a good match. It was very bitter for her. -But despite her grief, or perhaps just because of it, she took on -herself all the difficult work of directing the storing and packing of -their things and was busy for whole days. The count and countess -turned to her when they had any orders to give. Petya and Natasha on -the contrary, far from helping their parents, were generally a -nuisance and a hindrance to everyone. Almost all day long the house -resounded with their running feet, their cries, and their -spontaneous laughter. They laughed and were gay not because there -was any reason to laugh, but because gaiety and mirth were in their -hearts and so everything that happened was a cause for gaiety and -laughter to them. Petya was in high spirits because having left home a -boy he had returned (as everybody told him) a fine young man, -because he was at home, because he had left Belaya Tserkov where there -was no hope of soon taking part in a battle and had come to Moscow -where there was to be fighting in a few days, and chiefly because -Natasha, whose lead he always followed, was in high spirits. Natasha -was gay because she had been sad too long and now nothing reminded her -of the cause of her sadness, and because she was feeling well. She was -also happy because she had someone to adore her: the adoration of -others was a lubricant the wheels of her machine needed to make them -run freely--and Petya adored her. Above all, they were gay because -there was a war near Moscow, there would be fighting at the town -gates, arms were being given out, everybody was escaping--going away -somewhere, and in general something extraordinary was happening, and -that is always exciting, especially to the young. - - - - - -CHAPTER XIII - - -On Saturday, the thirty-first of August, everything in the -Rostovs' house seemed topsy-turvy. All the doors were open, all the -furniture was being carried out or moved about, and the mirrors and -pictures had been taken down. There were trunks in the rooms, and hay, -wrapping paper, and ropes were scattered about. The peasants and house -serfs carrying out the things were treading heavily on the parquet -floors. The yard was crowded with peasant carts, some loaded high -and already corded up, others still empty. - -The voices and footsteps of the many servants and of the peasants -who had come with the carts resounded as they shouted to one another -in the yard and in the house. The count bad been out since morning. -The countess had a headache brought on by all the noise and turmoil -and was lying down in the new sitting room with a vinegar compress -on her head. Petya was not at home, he had gone to visit a friend with -whom he meant to obtain a transfer from the militia to the active -army. Sonya was in the ballroom looking after the packing of the glass -and china. Natasha was sitting on the floor of her dismantled room -with dresses, ribbons, and scarves strewn all about her, gazing -fixedly at the floor and holding in her hands the old ball dress -(already out of fashion) which she had worn at her first Petersburg -ball. - -Natasha was ashamed of doing nothing when everyone else was so busy, -and several times that morning had tried to set to work, but her heart -was not in it, and she could not and did not know how to do anything -except with all her heart and all her might. For a while she had stood -beside Sonya while the china was being packed and tried to help, but -soon gave it up and went to her room to pack her own things. At -first she found it amusing to give away dresses and ribbons to the -maids, but when that was done and what was left had still to be -packed, she found it dull. - -"Dunyasha, you pack! You will, won't you, dear?" And when Dunyasha -willingly promised to do it all for her, Natasha sat down on the -floor, took her old ball dress, and fell into a reverie quite -unrelated to what ought to have occupied her thoughts now. She was -roused from her reverie by the talk of the maids in the next room -(which was theirs) and by the sound of their hurried footsteps going -to the back porch. Natasha got up and looked out of the window. An -enormously long row of carts full of wounded men had stopped in the -street. - -The housekeeper, the old nurse, the cooks, coachmen, maids, footmen, -postilions, and scullions stood at the gate, staring at the wounded. - -Natasha, throwing a clean pocket handkerchief over her hair and -holding an end of it in each hand, went out into the street. - -The former housekeeper, old Mavra Kuzminichna, had stepped out of -the crowd by the gate, gone up to a cart with a hood constructed of -bast mats, and was speaking to a pale young officer who lay inside. -Natasha moved a few steps forward and stopped shyly, still holding her -handkerchief, and listened to what the housekeeper was saying. - -"Then you have nobody in Moscow?" she was saying. "You would be more -comfortable somewhere in a house... in ours, for instance... the -family are leaving." - -"I don't know if it would be allowed," replied the officer in a weak -voice. "Here is our commanding officer... ask him," and he pointed -to a stout major who was walking back along the street past the row of -carts. - -Natasha glanced with frightened eyes at the face of the wounded -officer and at once went to meet the major. - -"May the wounded men stay in our house?" she asked. - -The major raised his hand to his cap with a smile. - -"Which one do you want, Ma'am'selle?" said he, screwing up his -eyes and smiling. - -Natasha quietly repeated her question, and her face and whole manner -were so serious, though she was still holding the ends of her -handkerchief, that the major ceased smiling and after some reflection- -as if considering in how far the thing was possible--replied in the -affirmative. - -"Oh yes, why not? They may," he said. - -With a slight inclination of her head, Natasha stepped back -quickly to Mavra Kuzminichna, who stood talking compassionately to the -officer. - -"They may. He says they may!" whispered Natasha. - -The cart in which the officer lay was turned into the Rostovs' yard, -and dozens of carts with wounded men began at the invitation of the -townsfolk to turn into the yards and to draw up at the entrances of -the houses in Povarskaya Street. Natasha was evidently pleased to be -dealing with new people outside the ordinary routine of her life. -She and Mavra Kuzminichna tried to get as many of the wounded as -possible into their yard. - -"Your Papa must be told, though," said Mavra Kuzminichna. - -"Never mind, never mind, what does it matter? For one day we can -move into the drawing room. They can have all our half of the house." - -"There now, young lady, you do take things into your head! Even if -we put them into the wing, the men's room, or the nurse's room, we -must ask permission." - -"Well, I'll ask." - -Natasha ran into the house and went on tiptoe through the -half-open door into the sitting room, where there was a smell of -vinegar and Hoffman's drops. - -"Are you asleep, Mamma?" - -"Oh, what sleep-?" said the countess, waking up just as she was -dropping into a doze. - -"Mamma darling!" said Natasha, kneeling by her mother and bringing -her face close to her mother's, "I am sorry, forgive me, I'll never do -it again; I woke you up! Mavra Kuzminichna has sent me: they have -brought some wounded here--officers. Will you let them come? They have -nowhere to go. I knew you'd let them come!" she said quickly all in -one breath. - -"What officers? Whom have they brought? I don't understand -anything about it," said the countess. - -Natasha laughed, and the countess too smiled slightly. - -"I knew you'd give permission... so I'll tell them," and, having -kissed her mother, Natasha got up and went to the door. - -In the hall she met her father, who had returned with bad news. - -"We've stayed too long!" said the count with involuntary vexation. -"The Club is closed and the police are leaving." - -"Papa, is it all right--I've invited some of the wounded into the -house?" said Natasha. - -"Of course it is," he answered absently. "That's not the point. I -beg you not to indulge in trifles now, but to help to pack, and -tomorrow we must go, go, go!...." - -And the count gave a similar order to the major-domo and the -servants. - -At dinner Petya having returned home told them the news he had -heard. He said the people had been getting arms in the Kremlin, and -that though Rostopchin's broadsheet had said that he would sound a -call two or three days in advance, the order had certainly already -been given for everyone to go armed to the Three Hills tomorrow, and -that there would be a big battle there. - -The countess looked with timid horror at her son's eager, excited -face as he said this. She realized that if she said a word about his -not going to the battle (she knew he enjoyed the thought of the -impending engagement) he would say something about men, honor, and the -fatherland--something senseless, masculine, and obstinate which -there would be no contradicting, and her plans would be spoiled; and -so, hoping to arrange to leave before then and take Petya with her -as their protector and defender, she did not answer him, but after -dinner called the count aside and implored him with tears to take -her away quickly, that very night if possible. With a woman's -involuntary loving cunning she, who till then had not shown any alarm, -said that she would die of fright if they did not leave that very -night. Without any pretense she was now afraid of everything. - - - - - -CHAPTER XIV - - -Madame Schoss, who had been out to visit her daughter, increased the -countess' fears still more by telling what she had seen at a spirit -dealer's in Myasnitski Street. When returning by that street she had -been unable to pass because of a drunken crowd rioting in front of the -shop. She had taken a cab and driven home by a side street and the -cabman had told her that the people were breaking open the barrels -at the drink store, having received orders to do so. - -After dinner the whole Rostov household set to work with -enthusiastic haste packing their belongings and preparing for their -departure. The old count, suddenly setting to work, kept passing -from the yard to the house and back again, shouting confused -instructions to the hurrying people, and flurrying them still more. -Petya directed things in the yard. Sonya, owing to the count's -contradictory orders, lost her head and did not know what to do. The -servants ran noisily about the house and yard, shouting and disputing. -Natasha, with the ardor characteristic of all she did suddenly set -to work too. At first her intervention in the business of packing -was received skeptically. Everybody expected some prank from her and -did not wish to obey her; but she resolutely and passionately demanded -obedience, grew angry and nearly cried because they did not heed -her, and at last succeeded in making them believe her. Her first -exploit, which cost her immense effort and established her -authority, was the packing of the carpets. The count had valuable -Gobelin tapestries and Persian carpets in the house. When Natasha -set to work two cases were standing open in the ballroom, one almost -full up with crockery, the other with carpets. There was also much -china standing on the tables, and still more was being brought in from -the storeroom. A third case was needed and servants had gone to -fetch it. - -"Sonya, wait a bit--we'll pack everything into these," said Natasha. - -"You can't, Miss, we have tried to," said the butler's assistant. - -"No, wait a minute, please." - -And Natasha began rapidly taking out of the case dishes and plates -wrapped in paper. - -"The dishes must go in here among the carpets," said she. - -"Why, it's a mercy if we can get the carpets alone into three -cases," said the butler's assistant. - -"Oh, wait, please!" And Natasha began rapidly and deftly sorting out -the things. "These aren't needed," said she, putting aside some plates -of Kiev ware. "These--yes, these must go among the carpets," she said, -referring to the Saxony china dishes. - -"Don't, Natasha! Leave it alone! We'll get it all packed," urged -Sonya reproachfully. - -"What a young lady she is!" remarked the major-domo. - -But Natasha would not give in. She turned everything out and began -quickly repacking, deciding that the inferior Russian carpets and -unnecessary crockery should not be taken at all. When everything had -been taken out of the cases, they recommenced packing, and it turned -out that when the cheaper things not worth taking had nearly all -been rejected, the valuable ones really did all go into the two cases. -Only the lid of the case containing the carpets would not shut down. A -few more things might have been taken out, but Natasha insisted on -having her own way. She packed, repacked, pressed, made the butler's -assistant and Petya--whom she had drawn into the business of -packing--press on the lid, and made desperate efforts herself. - -"That's enough, Natasha," said Sonya. "I see you were right, but -just take out the top one." - -"I won't!" cried Natasha, with one hand bolding back the hair that -hung over her perspiring face, while with the other she pressed down -the carpets. "Now press, Petya! Press, Vasilich, press hard!" she -cried. - -The carpets yielded and the lid closed; Natasha, clapping her hands, -screamed with delight and tears fell from her eyes. But this only -lasted a moment. She at once set to work afresh and they now trusted -her completely. The count was not angry even when they told him that -Natasha had countermanded an order of his, and the servants now came -to her to ask whether a cart was sufficiently loaded, and whether it -might be corded up. Thanks to Natasha's directions the work now went -on expeditiously, unnecessary things were left, and the most -valuable packed as compactly as possible. - -But hard as they all worked till quite late that night, they could -not get everything packed. The countess had fallen asleep and the -count, having put off their departure till next morning, went to bed. - -Sonya and Natasha slept in the sitting room without undressing. - -That night another wounded man was driven down the Povarskaya, and -Mavra Kuzminichna, who was standing at the gate, had him brought -into the Rostovs' yard. Mavra Kuzminichna concluded that he was a very -important man. He was being conveyed in a caleche with a raised -hood, and was quite covered by an apron. On the box beside the -driver sat a venerable old attendant. A doctor and two soldiers -followed the carriage in a cart. - -"Please come in here. The masters are going away and the whole house -will be empty," said the old woman to the old attendant. - -"Well, perhaps," said he with a sigh. "We don't expect to get him -home alive! We have a house of our own in Moscow, but it's a long -way from here, and there's nobody living in it." - -"Do us the honor to come in, there's plenty of everything in the -master's house. Come in," said Mavra Kuzminichna. "Is he very ill?" -she asked. - -The attendant made a hopeless gesture. - -"We don't expect to get him home! We must ask the doctor." - -And the old servant got down from the box and went up to the cart. - -"All right!" said the doctor. - -The old servant returned to the caleche, looked into it, shook his -head disconsolately, told the driver to turn into the yard, and -stopped beside Mavra Kuzminichna. - -"O, Lord Jesus Christ!" she murmured. - -She invited them to take the wounded man into the house. - -"The masters won't object..." she said. - -But they had to avoid carrying the man upstairs, and so they took -him into the wing and put him in the room that had been Madame -Schoss'. - -This wounded man was Prince Andrew Bolkonski. - - - - - -CHAPTER XV - - -Moscow's last day had come. It was a clear bright autumn day, a -Sunday. The church bells everywhere were ringing for service, just -as usual on Sundays. Nobody seemed yet to realize what awaited the -city. - -Only two things indicated the social condition of Moscow--the -rabble, that is the poor people, and the price of commodities. An -enormous crowd of factory hands, house serfs, and peasants, with -whom some officials, seminarists, and gentry were mingled, had gone -early that morning to the Three Hills. Having waited there for -Rostopchin who did not turn up, they became convinced that Moscow -would be surrendered, and then dispersed all about the town to the -public houses and cookshops. Prices too that day indicated the state -of affairs. The price of weapons, of gold, of carts and horses, kept -rising, but the value of paper money and city articles kept falling, -so that by midday there were instances of carters removing valuable -goods, such as cloth, and receiving in payment a half of what they -carted, while peasant horses were fetching five hundred rubles each, -and furniture, mirrors, and bronzes were being given away for nothing. - -In the Rostovs' staid old-fashioned house the dissolution of -former conditions of life was but little noticeable. As to the serfs -the only indication was that three out of their huge retinue -disappeared during the night, but nothing was stolen; and as to the -value of their possessions, the thirty peasant carts that had come -in from their estates and which many people envied proved to be -extremely valuable and they were offered enormous sums of money for -them. Not only were huge sums offered for the horses and carts, but on -the previous evening and early in the morning of the first of -September, orderlies and servants sent by wounded officers came to the -Rostovs' and wounded men dragged themselves there from the Rostovs' -and from neighboring houses where they were accommodated, entreating -the servants to try to get them a lift out of Moscow. The major-domo -to whom these entreaties were addressed, though he was sorry for the -wounded, resolutely refused, saying that he dare not even mention -the matter to the count. Pity these wounded men as one might, it was -evident that if they were given one cart there would be no reason to -refuse another, or all the carts and one's own carriages as well. -Thirty carts could not save all the wounded and in the general -catastrophe one could not disregard oneself and one's own family. So -thought the major-domo on his master's behalf. - -On waking up that morning Count Ilya Rostov left his bedroom softly, -so as not to wake the countess who had fallen asleep only toward -morning, and came out to the porch in his lilac silk dressing gown. In -the yard stood the carts ready corded. The carriages were at the front -porch. The major-domo stood at the porch talking to an elderly orderly -and to a pale young officer with a bandaged arm. On seeing the count -the major-domo made a significant and stern gesture to them both to go -away. - -"Well, Vasilich, is everything ready?" asked the count, and stroking -his bald head he looked good-naturedly at the officer and the -orderly and nodded to them. (He liked to see new faces.) - -"We can harness at once, your excellency." - -"Well, that's right. As soon as the countess wakes we'll be off, God -willing! What is it, gentlemen?" he added, turning to the officer. -"Are you staying in my house?" - -The officer came nearer and suddenly his face flushed crimson. - -"Count, be so good as to allow me... for God's sake, to get into -some corner of one of your carts! I have nothing here with me.... I -shall be all right on a loaded cart..." - -Before the officer had finished speaking the orderly made the same -request on behalf of his master. - -"Oh, yes, yes, yes!" said the count hastily. "I shall be very -pleased, very pleased. Vasilich, you'll see to it. Just unload one -or two carts. Well, what of it... do what's necessary..." said the -count, muttering some indefinite order. - -But at the same moment an expression of warm gratitude on the -officer's face had already sealed the order. The count looked around -him. In the yard, at the gates, at the window of the wings, wounded -officers and their orderlies were to be seen. They were all looking at -the count and moving toward the porch. - -"Please step into the gallery, your excellency," said the -major-domo. "What are your orders about the pictures?" - -The count went into the house with him, repeating his order not to -refuse the wounded who asked for a lift. - -"Well, never mind, some of the things can be unloaded," he added -in a soft, confidential voice, as though afraid of being overheard. - -At nine o'clock the countess woke up, and Matrena Timofeevna, who -had been her lady's maid before her marriage and now performed a -sort of chief gendarme's duty for her, came to say that Madame -Schoss was much offended and the young ladies' summer dresses could -not be left behind. On inquiry, the countess learned that Madame -Schoss was offended because her trunk had been taken down from its -cart, and all the loads were being uncorded and the luggage taken -out of the carts to make room for wounded men whom the count in the -simplicity of his heart had ordered that they should take with them. -The countess sent for her husband. - -"What is this, my dear? I hear that the luggage is being unloaded." - -"You know, love, I wanted to tell you... Countess dear... an officer -came to me to ask for a few carts for the wounded. After all, ours are -things that can be bought but think what being left behind means to -them!... Really now, in our own yard--we asked them in ourselves and -there are officers among them.... You know, I think, my dear... let -them be taken... where's the hurry?" - -The count spoke timidly, as he always did when talking of money -matters. The countess was accustomed to this tone as a precursor of -news of something detrimental to the children's interests, such as the -building of a new gallery or conservatory, the inauguration of a -private theater or an orchestra. She was accustomed always to oppose -anything announced in that timid tone and considered it her duty to do -so. - -She assumed her dolefully submissive manner and said to her husband: -"Listen to me, Count, you have managed matters so that we are -getting nothing for the house, and now you wish to throw away all our- -all the children's property! You said yourself that we have a -hundred thousand rubles' worth of things in the house. I don't -consent, my dear, I don't! Do as you please! It's the government's -business to look after the wounded; they know that. Look at the -Lopukhins opposite, they cleared out everything two days ago. That's -what other people do. It's only we who are such fools. If you have -no pity on me, have some for the children." - -Flourishing his arms in despair the count left the room without -replying. - -"Papa, what are you doing that for?" asked Natasha, who had followed -him into her mother's room. - -"Nothing! What business is it of yours?" muttered the count angrily. - -"But I heard," said Natasha. "Why does Mamma object?" - -"What business is it of yours?" cried the count. - -Natasha stepped up to the window and pondered. - -"Papa! Here's Berg coming to see us," said she, looking out of the -window. - - - - - -CHAPTER XVI - - -Berg, the Rostovs' son-in-law, was already a colonel wearing the -orders of Vladimir and Anna, and he still filled the quiet and -agreeable post of assistant to the head of the staff of the -assistant commander of the first division of the Second Army. - -On the first of September he had come to Moscow from the army. - -He had nothing to do in Moscow, but he had noticed that everyone -in the army was asking for leave to visit Moscow and had something -to do there. So he considered it necessary to ask for leave of absence -for family and domestic reasons. - -Berg drove up to his father-in-law's house in his spruce little trap -with a pair of sleek roans, exactly like those of a certain prince. He -looked attentively at the carts in the yard and while going up to -the porch took out a clean pocket handkerchief and tied a knot in it. - -From the anteroom Berg ran with smooth though impatient steps into -the drawing room, where he embraced the count, kissed the hands of -Natasha and Sonya, and hastened to inquire after "Mamma's" health. - -"Health, at a time like this?" said the count. "Come, tell us the -news! Is the army retreating or will there be another battle?" - -"God Almighty alone can decide the fate of our fatherland, Papa," -said Berg. "The army is burning with a spirit of heroism and the -leaders, so to say, have now assembled in council. No one knows what -is coming. But in general I can tell you, Papa, that such a heroic -spirit, the truly antique valor of the Russian army, which they--which -it" (he corrected himself) "has shown or displayed in the battle of -the twenty-sixth--there are no words worthy to do it justice! I tell -you, Papa" (he smote himself on the breast as a general he had heard -speaking had done, but Berg did it a trifle late for he should have -struck his breast at the words "Russian army"), "I tell you frankly -that we, the commanders, far from having to urge the men on or -anything of that kind, could hardly restrain those... those... yes, -those exploits of antique valor," he went on rapidly. "General Barclay -de Tolly risked his life everywhere at the head of the troops, I can -assure you. Our corps was stationed on a hillside. You can imagine!" - -And Berg related all that he remembered of the various tales he -had heard those days. Natasha watched him with an intent gaze that -confused him, as if she were trying to find in his face the answer -to some question. - -"Altogether such heroism as was displayed by the Russian warriors -cannot be imagined or adequately praised!" said Berg, glancing round -at Natasha, and as if anxious to conciliate her, replying to her -intent look with a smile. "'Russia is not in Moscow, she lives in -the hearts of her sons!' Isn't it so, Papa?" said he. - -Just then the countess came in from the sitting room with a weary -and dissatisfied expression. Berg hurriedly jumped up, kissed her -hand, asked about her health, and, swaying his head from side to -side to express sympathy, remained standing beside her. - -"Yes, Mamma, I tell you sincerely that these are hard and sad -times for every Russian. But why are you so anxious? You have still -time to get away...." - -"I can't think what the servants are about," said the countess, -turning to her husband. "I have just been told that nothing is ready -yet. Somebody after all must see to things. One misses Mitenka at such -times. There won't be any end to it." - -The count was about to say something, but evidently restrained -himself. He got up from his chair and went to the door. - -At that moment Berg drew out his handkerchief as if to blow his nose -and, seeing the knot in it, pondered, shaking his head sadly and -significantly. - -"And I have a great favor to ask of you, Papa," said he. - -"Hm..." said the count, and stopped. - -"I was driving past Yusupov's house just now," said Berg with a -laugh, "when the steward, a man I know, ran out and asked me whether I -wouldn't buy something. I went in out of curiosity, you know, and -there is a small chiffonier and a dressing table. You know how dear -Vera wanted a chiffonier like that and how we had a dispute about it." -(At the mention of the chiffonier and dressing table Berg -involuntarily changed his tone to one of pleasure at his admirable -domestic arrangements.) "And it's such a beauty! It pulls out and -has a secret English drawer, you know! And dear Vera has long wanted -one. I wish to give her a surprise, you see. I saw so many of those -peasant carts in your yard. Please let me have one, I will pay the man -well, and..." - -The count frowned and coughed. - -"Ask the countess, I don't give orders." - -"If it's inconvenient, please don't," said Berg. "Only I so wanted -it, for dear Vera's sake." - -"Oh, go to the devil, all of you! To the devil, the devil, the -devil..." cried the old count. "My head's in a whirl!" - -And he left the room. The countess began to cry. - -"Yes, Mamma! Yes, these are very hard times!" said Berg. - -Natasha left the room with her father and, as if finding it -difficult to reach some decision, first followed him and then ran -downstairs. - -Petya was in the porch, engaged in giving out weapons to the -servants who were to leave Moscow. The loaded carts were still -standing in the yard. Two of them had been uncorded and a wounded -officer was climbing into one of them helped by an orderly. - -"Do you know what it's about?" Petya asked Natasha. - -She understood that he meant what were their parents quarreling -about. She did not answer. - -"It's because Papa wanted to give up all the carts to the -wounded," said Petya. "Vasilich told me. I consider..." - -"I consider," Natasha suddenly almost shouted, turning her angry -face to Petya, "I consider it so horrid, so abominable, so... I -don't know what. Are we despicable Germans?" - -Her throat quivered with convulsive sobs and, afraid of weakening -and letting the force of her anger run to waste, she turned and rushed -headlong up the stairs. - -Berg was sitting beside the countess consoling her with the -respectful attention of a relative. The count, pipe in hand, was -pacing up and down the room, when Natasha, her face distorted by -anger, burst in like a tempest and approached her mother with rapid -steps. - -"It's horrid! It's abominable!" she screamed. "You can't possibly -have ordered it!" - -Berg and the countess looked at her, perplexed and frightened. The -count stood still at the window and listened. - -"Mamma, it's impossible: see what is going on in the yard!" she -cried. "They will be left!..." - -"What's the matter with you? Who are 'they'? What do you want?" - -"Why, the wounded! It's impossible, Mamma. It's monstrous!... No, -Mamma darling, it's not the thing. Please forgive me, darling.... -Mamma, what does it matter what we take away? Only look what is -going on in the yard... Mamma!... It's impossible!" - -The count stood by the window and listened without turning round. -Suddenly he sniffed and put his face closer to the window. - -The countess glanced at her daughter, saw her face full of shame for -her mother, saw her agitation, and understood why her husband did -not turn to look at her now, and she glanced round quite disconcerted. - -"Oh, do as you like! Am I hindering anyone?" she said, not -surrendering at once. - -"Mamma, darling, forgive me!" - -But the countess pushed her daughter away and went up to her -husband. - -"My dear, you order what is right.... You know I don't understand -about it," said she, dropping her eyes shamefacedly. - -"The eggs... the eggs are teaching the hen," muttered the count -through tears of joy, and he embraced his wife who was glad to hide -her look of shame on his breast. - -"Papa! Mamma! May I see to it? May I?..." asked Natasha. "We will -still take all the most necessary things." - -The count nodded affirmatively, and Natasha, at the rapid pace at -which she used to run when playing at tag, ran through the ballroom to -the anteroom and downstairs into the yard. - -The servants gathered round Natasha, but could not believe the -strange order she brought them until the count himself, in his -wife's name, confirmed the order to give up all the carts to the -wounded and take the trunks to the storerooms. When they understood -that order the servants set to work at this new task with pleasure and -zeal. It no longer seemed strange to them but on the contrary it -seemed the only thing that could be done, just as a quarter of an hour -before it had not seemed strange to anyone that the wounded should -be left behind and the goods carted away but that had seemed the -only thing to do. - -The whole household, as if to atone for not having done it sooner, -set eagerly to work at the new task of placing the wounded in the -carts. The wounded dragged themselves out of their rooms and stood -with pale but happy faces round the carts. The news that carts were to -be had spread to the neighboring houses, from which wounded men -began to come into the Rostovs' yard. Many of the wounded asked them -not to unload the carts but only to let them sit on the top of the -things. But the work of unloading, once started, could not be -arrested. It seemed not to matter whether all or only half the -things were left behind. Cases full of china, bronzes, pictures, and -mirrors that had been so carefully packed the night before now lay -about the yard, and still they went on searching for and finding -possibilities of unloading this or that and letting the wounded have -another and yet another cart. - -"We can take four more men," said the steward. "They can have my -trap, or else what is to become of them?" - -"Let them have my wardrobe cart," said the countess. "Dunyasha can -go with me in the carriage." - -They unloaded the wardrobe cart and sent it to take wounded men from -a house two doors off. The whole household, servants included, was -bright and animated. Natasha was in a state of rapturous excitement -such as she had not known for a long time. - -"What could we fasten this onto?" asked the servants, trying to -fix a trunk on the narrow footboard behind a carriage. "We must keep -at least one cart." - -"What's in it?" asked Natasha. - -"The count's books." - -"Leave it, Vasilich will put it away. It's not wanted." - -The phaeton was full of people and there was a doubt as to where -Count Peter could sit. - -"On the box. You'll sit on the box, won't you, Petya?" cried -Natasha. - -Sonya too was busy all this time, but the aim of her efforts was -quite different from Natasha's. She was putting away the things that -had to be left behind and making a list of them as the countess -wished, and she tried to get as much taken away with them as possible. - - - - - -CHAPTER XVII - - -Before two o'clock in the afternoon the Rostovs' four carriages, -packed full and with the horses harnessed, stood at the front door. -One by one the carts with the wounded had moved out of the yard. - -The caleche in which Prince Andrew was being taken attracted Sonya's -attention as it passed the front porch. With the help of a maid she -was arranging a seat for the countess in the huge high coach that -stood at the entrance. - -"Whose caleche is that?" she inquired, leaning out of the carriage -window. - -"Why, didn't you know, Miss?" replied the maid. "The wounded prince: -he spent the night in our house and is going with us." - -"But who is it? What's his name?" - -"It's our intended that was--Prince Bolkonski himself! They say he -is dying," replied the maid with a sigh. - -Sonya jumped out of the coach and ran to the countess. The countess, -tired out and already dressed in shawl and bonnet for her journey, was -pacing up and down the drawing room, waiting for the household to -assemble for the usual silent prayer with closed doors before -starting. Natasha was not in the room. - -"Mamma," said Sonya, "Prince Andrew is here, mortally wounded. He is -going with us." - -The countess opened her eyes in dismay and, seizing Sonya's arm, -glanced around. - -"Natasha?" she murmured. - -At that moment this news had only one significance for both of them. -They knew their Natasha, and alarm as to what would happen if she -heard this news stifled all sympathy for the man they both liked. - -"Natasha does not know yet, but he is going with us," said Sonya. - -"You say he is dying?" - -Sonya nodded. - -The countess put her arms around Sonya and began to cry. - -"The ways of God are past finding out!" she thought, feeling that -the Almighty Hand, hitherto unseen, was becoming manifest in all -that was now taking place. - -"Well, Mamma? Everything is ready. What's the matter?" asked -Natasha, as with animated face she ran into the room. - -"Nothing," answered the countess. "If everything is ready let us -start." - -And the countess bent over her reticule to hide her agitated face. -Sonya embraced Natasha and kissed her. - -Natasha looked at her inquiringly. - -"What is it? What has happened?" - -"Nothing... No..." - -"Is it something very bad for me? What is it?" persisted Natasha -with her quick intuition. - -Sonya sighed and made no reply. The count, Petya, Madame Schoss, -Mavra Kuzminichna, and Vasilich came into the drawing room and, having -closed the doors, they all sat down and remained for some moments -silently seated without looking at one another. - -The count was the first to rise, and with a loud sigh crossed -himself before the icon. All the others did the same. Then the count -embraced Mavra Kuzminichna and Vasilich, who were to remain in Moscow, -and while they caught at his hand and kissed his shoulder he patted -their backs lightly with some vaguely affectionate and comforting -words. The countess went into the oratory and there Sonya found her on -her knees before the icons that had been left here and there hanging -on the wall. (The most precious ones, with which some family tradition -was connected, were being taken with them.) - -In the porch and in the yard the men whom Petya had armed with -swords and daggers, with trousers tucked inside their high boots and -with belts and girdles tightened, were taking leave of those remaining -behind. - -As is always the case at a departure, much had been forgotten or put -in the wrong place, and for a long time two menservants stood one on -each side of the open door and the carriage steps waiting to help -the countess in, while maids rushed with cushions and bundles from the -house to the carriages, the caleche, the phaeton, and back again. - -"They always will forget everything!" said the countess. "Don't -you know I can't sit like that?" - -And Dunyasha, with clenched teeth, without replying but with an -aggrieved look on her face, hastily got into the coach to rearrange -the seat. - -"Oh, those servants!" said the count, swaying his head. - -Efim, the old coachman, who was the only one the countess trusted to -drive her, sat perched up high on the box and did not so much as -glance round at what was going on behind him. From thirty years' -experience he knew it would be some time yet before the order, "Be -off, in God's name!" would be given him: and he knew that even when it -was said he would be stopped once or twice more while they sent back -to fetch something that had been forgotten, and even after that he -would again be stopped and the countess herself would lean out of -the window and beg him for the love of heaven to drive carefully -down the hill. He knew all this and therefore waited calmly for what -would happen, with more patience than the horses, especially the -near one, the chestnut Falcon, who was pawing the ground and -champing his bit. At last all were seated, the carriage steps were -folded and pulled up, the door was shut, somebody was sent for a -traveling case, and the countess leaned out and said what she had to -say. Then Efim deliberately doffed his hat and began crossing himself. -The postilion and all the other servants did the same. "Off, in -God's name!" said Efim, putting on his hat. "Start!" The postilion -started the horses, the off pole horse tugged at his collar, the -high springs creaked, and the body of the coach swayed. The footman -sprang onto the box of the moving coach which jolted as it passed -out of the yard onto the uneven roadway; the other vehicles jolted -in their turn, and the procession of carriages moved up the street. In -the carriages, the caleche, and the phaeton, all crossed themselves as -they passed the church opposite the house. Those who were to remain in -Moscow walked on either side of the vehicles seeing the travelers off. - -Rarely had Natasha experienced so joyful a feeling as now, sitting -in the carriage beside the countess and gazing at the slowly -receding walls of forsaken, agitated Moscow. Occasionally she leaned -out of the carriage window and looked back and then forward at the -long train of wounded in front of them. Almost at the head of the line -she could see the raised hood of Prince Andrew's caleche. She did -not know who was in it, but each time she looked at the procession her -eyes sought that caleche. She knew it was right in front. - -In Kudrino, from the Nikitski, Presnya, and Podnovinsk Streets -came several other trains of vehicles similar to the Rostovs', and -as they passed along the Sadovaya Street the carriages and carts -formed two rows abreast. - -As they were going round the Sukharev water tower Natasha, who was -inquisitively and alertly scrutinizing the people driving or walking -past, suddenly cried out in joyful surprise: - -"Dear me! Mamma, Sonya, look, it's he!" - -"Who? Who?" - -"Look! Yes, on my word, it's Bezukhov!" said Natasha, putting her -head out of the carriage and staring at a tall, stout man in a -coachman's long coat, who from his manner of walking and moving was -evidently a gentleman in disguise, and who was passing under the -arch of the Sukharev tower accompanied by a small, sallow-faced, -beardless old man in a frieze coat. - -"Yes, it really is Bezukhov in a coachman's coat, with a -queer-looking old boy. Really," said Natasha, "look, look!" - -"No, it's not he. How can you talk such nonsense?" - -"Mamma," screamed Natasha, "I'll stake my head it's he! I assure -you! Stop, stop!" she cried to the coachman. - -But the coachman could not stop, for from the Meshchanski Street -came more carts and carriages, and the Rostovs were being shouted at -to move on and not block the way. - -In fact, however, though now much farther off than before, the -Rostovs all saw Pierre--or someone extraordinarily like him--in a -coachman's coat, going down the street with head bent and a serious -face beside a small, beardless old man who looked like a footman. That -old man noticed a face thrust out of the carriage window gazing at -them, and respectfully touching Pierre's elbow said something to him -and pointed to the carriage. Pierre, evidently engrossed in thought, -could not at first understand him. At length when he had understood -and looked in the direction the old man indicated, he recognized -Natasha, and following his first impulse stepped instantly and rapidly -toward the coach. But having taken a dozen steps he seemed to remember -something and stopped. - -Natasha's face, leaning out of the window, beamed with quizzical -kindliness. - -"Peter Kirilovich, come here! We have recognized you! This is -wonderful!" she cried, holding out her hand to him. "What are you -doing? Why are you like this?" - -Pierre took her outstretched hand and kissed it awkwardly as he -walked along beside her while the coach still moved on. - -"What is the matter, Count?" asked the countess in a surprised and -commiserating tone. - -"What? What? Why? Don't ask me," said Pierre, and looked round at -Natasha whose radiant, happy expression--of which he was conscious -without looking at her--filled him with enchantment. - -"Are you remaining in Moscow, then?" - -Pierre hesitated. - -"In Moscow?" he said in a questioning tone. "Yes, in Moscow. -Goodby!" - -"Ah, if only I were a man? I'd certainly stay with you. How -splendid!" said Natasha. "Mamma, if you'll let me, I'll stay!" - -Pierre glanced absently at Natasha and was about to say something, -but the countess interrupted him. - -"You were at the battle, we heard." - -"Yes, I was," Pierre answered. "There will be another battle -tomorrow..." he began, but Natasha interrupted him. - -"But what is the matter with you, Count? You are not like -yourself...." - -"Oh, don't ask me, don't ask me! I don't know myself. Tomorrow... -But no! Good-by, good-by!" he muttered. "It's an awful time!" and -dropping behind the carriage he stepped onto the pavement. - -Natasha continued to lean out of the window for a long time, beaming -at him with her kindly, slightly quizzical, happy smile. - - - - - -CHAPTER XVIII - - -For the last two days, ever since leaving home, Pierre had been -living in the empty house of his deceased benefactor, Bazdeev. This is -how it happened. - -When he woke up on the morning after his return to Moscow and his -interview with Count Rostopchin, he could not for some time make out -where he was and what was expected of him. When he was informed that -among others awaiting him in his reception room there was a -Frenchman who had brought a letter from his wife, the Countess Helene, -he felt suddenly overcome by that sense of confusion and -hopelessness to which he was apt to succumb. He felt that everything -was now at an end, all was in confusion and crumbling to pieces, -that nobody was right or wrong, the future held nothing, and there was -no escape from this position. Smiling unnaturally and muttering to -himself, he first sat down on the sofa in an attitude of despair, then -rose, went to the door of the reception room and peeped through the -crack, returned flourishing his arms, and took up a book. His -major-domo came in a second time to say that the Frenchman who had -brought the letter from the countess was very anxious to see him if -only for a minute, and that someone from Bazdeev's widow had called to -ask Pierre to take charge of her husband's books, as she herself was -leaving for the country. - -"Oh, yes, in a minute; wait... or no! No, of course... go and say -I will come directly," Pierre replied to the major-domo. - -But as soon as the man had left the room Pierre took up his hat -which was lying on the table and went out of his study by the other -door. There was no one in the passage. He went along the whole -length of this passage to the stairs and, frowning and rubbing his -forehead with both hands, went down as far as the first landing. The -hall porter was standing at the front door. From the landing where -Pierre stood there was a second staircase leading to the back -entrance. He went down that staircase and out into the yard. No one -had seen him. But there were some carriages waiting, and as soon as -Pierre stepped out of the gate the coachmen and the yard porter -noticed him and raised their caps to him. When he felt he was being -looked at he behaved like an ostrich which hides its head in a bush in -order not to be seen: he hung his head and quickening his pace went -down the street. - -Of all the affairs awaiting Pierre that day the sorting of Joseph -Bazdeev's books and papers appeared to him the most necessary. - - -He hired the first cab he met and told the driver to go to the -Patriarch's Ponds, where the widow Bazdeev's house was. - -Continually turning round to look at the rows of loaded carts that -were making their way from all sides out of Moscow, and balancing -his bulky body so as not to slip out of the ramshackle old vehicle, -Pierre, experiencing the joyful feeling of a boy escaping from school, -began to talk to his driver. - -The man told him that arms were being distributed today at the -Kremlin and that tomorrow everyone would be sent out beyond the -Three Hills gates and a great battle would be fought there. - -Having reached the Patriarch's Ponds Pierre found the Bazdeevs' -house, where he had not been for a long time past. He went up to the -gate. Gerasim, that sallow beardless old man Pierre had seen at -Torzhok five years before with Joseph Bazdeev, came out in answer to -his knock. - -"At home?" asked Pierre. - -"Owing to the present state of things Sophia Danilovna has gone to -the Torzhok estate with the children, your excellency." - -"I will come in all the same, I have to look through the books," -said Pierre. - -"Be so good as to step in. Makar Alexeevich, the brother of my -late master--may the kingdom of heaven be his--has remained here, -but he is in a weak state as you know," said the old servant. - -Pierre knew that Makar Alexeevich was Joseph Bazdeev's half-insane -brother and a hard drinker. - -"Yes, yes, I know. Let us go in..." said Pierre and entered the -house. - -A tall, bald-headed old man with a red nose, wearing a dressing gown -and with galoshes on his bare feet, stood in the anteroom. On seeing -Pierre he muttered something angrily and went away along the passage. - -"He was a very clever man but has now grown quite feeble, as your -honor sees," said Gerasim. "Will you step into the study?" Pierre -nodded. "As it was sealed up so it has remained, but Sophia -Danilovna gave orders that if anyone should come from you they were to -have the books." - -Pierre went into that gloomy study which he had entered with such -trepidation in his benefactor's lifetime. The room, dusty and -untouched since the death of Joseph Bazdeev was now even gloomier. - -Gerasim opened one of the shutters and left the room on tiptoe. -Pierre went round the study, approached the cupboard in which the -manuscripts were kept, and took out what had once been one of the most -important, the holy of holies of the order. This was the authentic -Scotch Acts with Bazdeev's notes and explanations. He sat down at -the dusty writing table, and, having laid the manuscripts before -him, opened them out, closed them, finally pushed them away, and -resting his head on his hand sank into meditation. - -Gerasim looked cautiously into the study several times and saw -Pierre always sitting in the same attitude. - -More than two hours passed and Gerasim took the liberty of making -a slight noise at the door to attract his attention, but Pierre did -not hear him. - -"Is the cabman to be discharged, your honor?" - -"Oh yes!" said Pierre, rousing himself and rising hurriedly. "Look -here," he added, taking Gerasim by a button of his coat and looking -down at the old man with moist, shining, and ecstatic eyes, "I say, do -you know that there is going to be a battle tomorrow?" - -"We heard so," replied the man. - -"I beg you not to tell anyone who I am, and to do what I ask you." - -"Yes, your excellency," replied Gerasim. "Will you have something to -eat?" - -"No, but I want something else. I want peasant clothes and a -pistol," said Pierre, unexpectedly blushing. - -"Yes, your excellency," said Gerasim after thinking for a moment. - -All the rest of that day Pierre spent alone in his benefactor's -study, and Gerasim heard him pacing restlessly from one corner to -another and talking to himself. And he spent the night on a bed made -up for him there. - -Gerasim, being a servant who in his time had seen many strange -things, accepted Pierre's taking up his residence in the house without -surprise, and seemed pleased to have someone to wait on. That same -evening--without even asking himself what they were wanted for--he -procured a coachman's coat and cap for Pierre, and promised to get him -the pistol next day. Makar Alexeevich came twice that evening -shuffling along in his galoshes as far as the door and stopped and -looked ingratiatingly at Pierre. But as soon as Pierre turned toward -him he wrapped his dressing gown around him with a shamefaced and -angry look and hurried away. It was when Pierre (wearing the -coachman's coat which Gerasim had procured for him and had disinfected -by steam) was on his way with the old man to buy the pistol at the -Sukharev market that he met the Rostovs. - - - - - -CHAPTER XIX - - -Kutuzov's order to retreat through Moscow to the Ryazan road was -issued at night on the first of September. - -The first troops started at once, and during the night they -marched slowly and steadily without hurry. At daybreak, however, those -nearing the town at the Dorogomilov bridge saw ahead of them masses of -soldiers crowding and hurrying across the bridge, ascending on the -opposite side and blocking the streets and alleys, while endless -masses of troops were bearing down on them from behind, and an -unreasoning hurry and alarm overcame them. They all rushed forward -to the bridge, onto it, and to the fords and the boats. Kutuzov -himself had driven round by side streets to the other side of Moscow. - -By ten o'clock in the morning of the second of September, only the -rear guard remained in the Dorogomilov suburb, where they had ample -room. The main army was on the other side of Moscow or beyond it. - -At that very time, at ten in the morning of the second of September, -Napoleon was standing among his troops on the Poklonny Hill looking at -the panorama spread out before him. From the twenty-sixth of August to -the second of September, that is from the battle of Borodino to the -entry of the French into Moscow, during the whole of that agitating, -memorable week, there had been the extraordinary autumn weather that -always comes as a surprise, when the sun hangs low and gives more heat -than in spring, when everything shines so brightly in the rare clear -atmosphere that the eyes smart, when the lungs are strengthened and -refreshed by inhaling the aromatic autumn air, when even the nights -are warm, and when in those dark warm nights, golden stars startle and -delight us continually by falling from the sky. - -At ten in the morning of the second of September this weather -still held. - -The brightness of the morning was magical. Moscow seen from the -Poklonny Hill lay spaciously spread out with her river, her gardens, -and her churches, and she seemed to be living her usual life, her -cupolas glittering like stars in the sunlight. - -The view of the strange city with its peculiar architecture, such as -he had never seen before, filled Napoleon with the rather envious -and uneasy curiosity men feel when they see an alien form of life that -has no knowledge of them. This city was evidently living with the full -force of its own life. By the indefinite signs which, even at a -distance, distinguish a living body from a dead one, Napoleon from the -Poklonny Hill perceived the throb of life in the town and felt, as -it were, the breathing of that great and beautiful body. - -Every Russian looking at Moscow feels her to be a mother; every -foreigner who sees her, even if ignorant of her significance as the -mother city, must feel her feminine character, and Napoleon felt it. - -"Cette ville asiatique aux innombrables eglises, Moscou la sainte. -La voila done enfin, cette fameuse ville! Il etait temps,"* said he, -and dismounting he ordered a plan of Moscow to be spread out before -him, and summoned Lelorgne d'Ideville, the interpreter. - - -*"That Asiatic city of the innumerable churches, holy Moscow! Here -it is then at last, that famous city. It was high time." - - -"A town captured by the enemy is like a maid who has lost her -honor," thought he (he had said so to Tuchkov at Smolensk). From -that point of view he gazed at the Oriental beauty he had not seen -before. It seemed strange to him that his long-felt wish, which had -seemed unattainable, had at last been realized. In the clear morning -light he gazed now at the city and now at the plan, considering its -details, and the assurance of possessing it agitated and awed him. - -"But could it be otherwise?" he thought. "Here is this capital at my -feet. Where is Alexander now, and of what is he thinking? A strange, -beautiful, and majestic city; and a strange and majestic moment! In -what light must I appear to them!" thought he, thinking of his troops. -"Here she is, the reward for all those fainthearted men," he -reflected, glancing at those near him and at the troops who were -approaching and forming up. "One word from me, one movement of my -hand, and that ancient capital of the Tsars would perish. But my -clemency is always ready to descend upon the vanquished. I must be -magnanimous and truly great. But no, it can't be true that I am in -Moscow," he suddenly thought. "Yet here she is lying at my feet, -with her golden domes and crosses scintillating and twinkling in the -sunshine. But I shall spare her. On the ancient monuments of barbarism -and despotism I will inscribe great words of justice and mercy.... -It is just this which Alexander will feel most painfully, I know him." -(It seemed to Napoleon that the chief import of what was taking -place lay in the personal struggle between himself and Alexander.) -"From the height of the Kremlin--yes, there is the Kremlin, yes--I -will give them just laws; I will teach them the meaning of true -civilization, I will make generations of boyars remember their -conqueror with love. I will tell the deputation that I did not, and do -not, desire war, that I have waged war only against the false policy -of their court; that I love and respect Alexander and that in Moscow I -will accept terms of peace worthy of myself and of my people. I do not -wish to utilize the fortunes of war to humiliate an honored monarch. -'Boyars,' I will say to them, 'I do not desire war, I desire the peace -and welfare of all my subjects.' However, I know their presence will -inspire me, and I shall speak to them as I always do: clearly, -impressively, and majestically. But can it be true that I am in -Moscow? Yes, there she lies." - -"Qu'on m'amene les boyars,"* said he to his suite. - - -*"Bring the boyars to me." - - -A general with a brilliant suite galloped off at once to fetch the -boyars. - -Two hours passed. Napoleon had lunched and was again standing in the -same place on the Poklonny Hill awaiting the deputation. His speech to -the boyars had already taken definite shape in his imagination. That -speech was full of dignity and greatness as Napoleon understood it. - -He was himself carried away by the tone of magnanimity he intended -to adopt toward Moscow. In his imagination he appointed days for -assemblies at the palace of the Tsars, at which Russian notables and -his own would mingle. He mentally appointed a governor, one who -would win the hearts of the people. Having learned that there were -many charitable institutions in Moscow he mentally decided that he -would shower favors on them all. He thought that, as in Africa he -had to put on a burnoose and sit in a mosque, so in Moscow he must -be beneficent like the Tsars. And in order finally to touch the hearts -of the Russians--and being like all Frenchmen unable to imagine -anything sentimental without a reference to ma chere, ma tendre, ma -pauvre mere* --he decided that he would place an inscription on all -these establishments in large letters: "This establishment is -dedicated to my dear mother." Or no, it should be simply: Maison de ma -Mere,*[2] he concluded. "But am I really in Moscow? Yes, here it -lies before me, but why is the deputation from the city so long in -appearing?" he wondered. - - -*"My dear, my tender, my poor mother." - -*[2] "House of my Mother." - - -Meanwhile an agitated consultation was being carried on in -whispers among his generals and marshals at the rear of his suite. -Those sent to fetch the deputation had returned with the news that -Moscow was empty, that everyone had left it. The faces of those who -were not conferring together were pale and perturbed. They were not -alarmed by the fact that Moscow had been abandoned by its -inhabitants (grave as that fact seemed), but by the question how to -tell the Emperor--without putting him in the terrible position of -appearing ridiculous--that he had been awaiting the boyars so long -in vain: that there were drunken mobs left in Moscow but no one -else. Some said that a deputation of some sort must be scraped -together, others disputed that opinion and maintained that the Emperor -should first be carefully and skillfully prepared, and then told the -truth. - -"He will have to be told, all the same," said some gentlemen of -the suite. "But, gentlemen..." - -The position was the more awkward because the Emperor, meditating -upon his magnanimous plans, was pacing patiently up and down before -the outspread map, occasionally glancing along the road to Moscow from -under his lifted hand with a bright and proud smile. - -"But it's impossible..." declared the gentlemen of the suite, -shrugging their shoulders but not venturing to utter the implied word- -le ridicule... - -At last the Emperor, tired of futile expectation, his actor's -instinct suggesting to him that the sublime moment having been too -long drawn out was beginning to lose its sublimity, gave a sign with -his hand. A single report of a signaling gun followed, and the troops, -who were already spread out on different sides of Moscow, moved into -the city through Tver, Kaluga, and Dorogomilov gates. Faster and -faster, vying with one another, they moved at the double or at a trot, -vanishing amid the clouds of dust they raised and making the air -ring with a deafening roar of mingling shouts. - -Drawn on by the movement of his troops Napoleon rode with them as -far as the Dorogomilov gate, but there again stopped and, -dismounting from his horse, paced for a long time by the -Kammer-Kollezski rampart, awaiting the deputation. - - - - - -CHAPTER XX - -Meanwhile Moscow was empty. There were still people in it, perhaps a -fiftieth part of its former inhabitants had remained, but it was -empty. It was empty in the sense that a dying queenless hive is empty. - -In a queenless hive no life is left though to a superficial glance -it seems as much alive as other hives. - -The bees circle round a queenless hive in the hot beams of the -midday sun as gaily as around the living hives; from a distance it -smells of honey like the others, and bees fly in and out in the same -way. But one has only to observe that hive to realize that there is no -longer any life in it. The bees do not fly in the same way, the -smell and the sound that meet the beekeeper are not the same. To the -beekeeper's tap on the wall of the sick hive, instead of the former -instant unanimous humming of tens of thousands of bees with their -abdomens threateningly compressed, and producing by the rapid -vibration of their wings an aerial living sound, the only reply is a -disconnected buzzing from different parts of the deserted hive. From -the alighting board, instead of the former spirituous fragrant smell -of honey and venom, and the warm whiffs of crowded life, comes an odor -of emptiness and decay mingling with the smell of honey. There are -no longer sentinels sounding the alarm with their abdomens raised, and -ready to die in defense of the hive. There is no longer the measured -quiet sound of throbbing activity, like the sound of boiling water, -but diverse discordant sounds of disorder. In and out of the hive long -black robber bees smeared with honey fly timidly and shiftily. They do -not sting, but crawl away from danger. Formerly only bees laden with -honey flew into the hive, and they flew out empty; now they fly out -laden. The beekeeper opens the lower part of the hive and peers in. -Instead of black, glossy bees--tamed by toil, clinging to one -another's legs and drawing out the wax, with a ceaseless hum of labor- -that used to hang in long clusters down to the floor of the hive, -drowsy shriveled bees crawl about separately in various directions -on the floor and walls of the hive. Instead of a neatly glued floor, -swept by the bees with the fanning of their wings, there is a floor -littered with bits of wax, excrement, dying bees scarcely moving their -legs, and dead ones that have not been cleared away. - -The beekeeper opens the upper part of the hive and examines the -super. Instead of serried rows of bees sealing up every gap in the -combs and keeping the brood warm, he sees the skillful complex -structures of the combs, but no longer in their former state of -purity. All is neglected and foul. Black robber bees are swiftly and -stealthily prowling about the combs, and the short home bees, -shriveled and listless as if they were old, creep slowly about without -trying to hinder the robbers, having lost all motive and all sense -of life. Drones, bumblebees, wasps, and butterflies knock awkwardly -against the walls of the hive in their flight. Here and there among -the cells containing dead brood and honey an angry buzzing can -sometimes be heard. Here and there a couple of bees, by force of habit -and custom cleaning out the brood cells, with efforts beyond their -strength laboriously drag away a dead bee or bumblebee without knowing -why they do it. In another corner two old bees are languidly fighting, -or cleaning themselves, or feeding one another, without themselves -knowing whether they do it with friendly or hostile intent. In a third -place a crowd of bees, crushing one another, attack some victim and -fight and smother it, and the victim, enfeebled or killed, drops -from above slowly and lightly as a feather, among the heap of corpses. -The keeper opens the two center partitions to examine the brood cells. -In place of the former close dark circles formed by thousands of -bees sitting back to back and guarding the high mystery of generation, -he sees hundreds of dull, listless, and sleepy shells of bees. They -have almost all died unawares, sitting in the sanctuary they had -guarded and which is now no more. They reek of decay and death. Only a -few of them still move, rise, and feebly fly to settle on the -enemy's hand, lacking the spirit to die stinging him; the rest are -dead and fall as lightly as fish scales. The beekeeper closes the -hive, chalks a mark on it, and when he has time tears out its contents -and burns it clean. - -So in the same way Moscow was empty when Napoleon, weary, uneasy, -and morose, paced up and down in front of the Kammer-Kollezski -rampart, awaiting what to his mind was a necessary, if but formal, -observance of the proprieties--a deputation. - -In various corners of Moscow there still remained a few people -aimlessly moving about, following their old habits and hardly aware of -what they were doing. - -When with due circumspection Napoleon was informed that Moscow was -empty, he looked angrily at his informant, turned away, and silently -continued to walk to and fro. - -"My carriage!" he said. - -He took his seat beside the aide-de-camp on duty and drove into -the suburb. "Moscow deserted!" he said to himself. "What an incredible -event!" - -He did not drive into the town, but put up at an inn in the -Dorogomilov suburb. - -The coup de theatre had not come off. - - - - - -CHAPTER XXI - - -The Russian troops were passing through Moscow from two o'clock at -night till two in the afternoon and bore away with them the wounded -and the last of the inhabitants who were leaving. - -The greatest crush during the movement of the troops took place at -the Stone, Moskva, and Yauza bridges. - -While the troops, dividing into two parts when passing around the -Kremlin, were thronging the Moskva and the Stone bridges, a great many -soldiers, taking advantage of the stoppage and congestion, turned back -from the bridges and slipped stealthily and silently past the church -of Vasili the Beatified and under the Borovitski gate, back up the -hill to the Red Square where some instinct told them they could easily -take things not belonging to them. Crowds of the kind seen at cheap -sales filled all the passages and alleys of the Bazaar. But there were -no dealers with voices of ingratiating affability inviting customers -to enter; there were no hawkers, nor the usual motley crowd of -female purchasers--but only soldiers, in uniforms and overcoats though -without muskets, entering the Bazaar empty-handed and silently -making their way out through its passages with bundles. Tradesmen -and their assistants (of whom there were but few) moved about among -the soldiers quite bewildered. They unlocked their shops and locked -them up again, and themselves carried goods away with the help their -assistants. On the square in front of the Bazaar were drummers beating -the muster call. But the roll of the drums did not make the looting -soldiers run in the direction of the drum as formerly, but made -them, on the contrary, run farther away. Among the soldiers in the -shops and passages some men were to be seen in gray coats, with -closely shaven heads. Two officers, one with a scarf over his -uniform and mounted on a lean, dark-gray horse, the other in an -overcoat and on foot, stood at the corner of Ilyinka Street, -talking. A third officer galloped up to them. - -"The general orders them all to be driven out at once, without fail. -This is outrageous! Half the men have dispersed." - -"Where are you off to?... Where?..." he shouted to three infantrymen -without muskets who, holding up the skirts of their overcoats, were -slipping past him into the Bazaar passage. "Stop, you rascals!" - -"But how are you going to stop them?" replied another officer. -"There is no getting them together. The army should push on before the -rest bolt, that's all!" - -"How can one push on? They are stuck there, wedged on the bridge, -and don't move. Shouldn't we put a cordon round to prevent the rest -from running away?" - -"Come, go in there and drive them out!" shouted the senior officer. - -The officer in the scarf dismounted, called up a drummer, and went -with him into the arcade. Some soldiers started running away in a -group. A shopkeeper with red pimples on his cheeks near the nose, -and a calm, persistent, calculating expression on his plump face, -hurriedly and ostentatiously approached the officer, swinging his -arms. - -"Your honor!" said he. "Be so good as to protect us! We won't grudge -trifles, you are welcome to anything--we shall be delighted! -Pray!... I'll fetch a piece of cloth at once for such an honorable -gentleman, or even two pieces with pleasure. For we feel how it is; -but what's all this--sheer robbery! If you please, could not guards be -placed if only to let us close the shop...." - -Several shopkeepers crowded round the officer. - -"Eh, what twaddle!" said one of them, a thin, stern-looking man. -"When one's head is gone one doesn't weep for one's hair! Take what -any of you like!" And flourishing his arm energetically he turned -sideways to the officer. - -"It's all very well for you, Ivan Sidorych, to talk," said the first -tradesman angrily. "Please step inside, your honor!" - -"Talk indeed!" cried the thin one. "In my three shops here I have -a hundred thousand rubles' worth of goods. Can they be saved when -the army has gone? Eh, what people! 'Against God's might our hands -can't fight.'" - -"Come inside, your honor!" repeated the tradesman, bowing. - -The officer stood perplexed and his face showed indecision. - -"It's not my business!" he exclaimed, and strode on quickly down one -of the passages. - -From one open shop came the sound of blows and vituperation, and -just as the officer came up to it a man in a gray coat with a shaven -head was flung out violently. - -This man, bent double, rushed past the tradesman and the officer. -The officer pounced on the soldiers who were in the shops, but at that -moment fearful screams reached them from the huge crowd on the -Moskva bridge and the officer ran out into the square. - -"What is it? What is it?" he asked, but his comrade was already -galloping off past Vasili the Beatified in the direction from which -the screams came. - -The officer mounted his horse and rode after him. When he reached -the bridge he saw two unlimbered guns, the infantry crossing the -bridge, several overturned carts, and frightened and laughing faces -among the troops. Beside the cannon a cart was standing to which two -horses were harnessed. Four borzois with collars were pressing close -to the wheels. The cart was loaded high, and at the very top, beside a -child's chair with its legs in the air, sat a peasant woman uttering -piercing and desperate shrieks. He was told by his fellow officers -that the screams of the crowd and the shrieks of the woman were due to -the fact that General Ermolov, coming up to the crowd and learning -that soldiers were dispersing among the shops while crowds of -civilians blocked the bridge, had ordered two guns to be unlimbered -and made a show of firing at the bridge. The crowd, crushing one -another, upsetting carts, and shouting and squeezing desperately, -had cleared off the bridge and the troops were now moving forward. - - - - - -CHAPTER XXII - - -Meanwhile, the city itself was deserted. There was hardly anyone -in the streets. The gates and shops were all closed, only here and -there round the taverns solitary shouts or drunken songs could be -heard. Nobody drove through the streets and footsteps were rarely -heard. The Povarskaya was quite still and deserted. The huge courtyard -of the Rostovs' house was littered with wisps of hay and with dung -from the horses, and not a soul was to be seen there. In the great -drawing room of the house, which had been left with all it -contained, were two people. They were the yard porter Ignat, and the -page boy Mishka, Vasilich's grandson who had stayed in Moscow with his -grandfather. Mishka had opened the clavichord and was strumming on -it with one finger. The yard porter, his arms akimbo, stood smiling -with satisfaction before the large mirror. - -"Isn't it fine, eh, Uncle Ignat?" said the boy, suddenly beginning -to strike the keyboard with both hands. - -"Only fancy!" answered Ignat, surprised at the broadening grin on -his face in the mirror. - -"Impudence! Impudence!" they heard behind them the voice of Mavra -Kuzminichna who had entered silently. "How he's grinning, the fat mug! -Is that what you're here for? Nothing's cleared away down there and -Vasilich is worn out. Just you wait a bit!" - -Ignat left off smiling, adjusted his belt, and went out of the -room with meekly downcast eyes. - -"Aunt, I did it gently," said the boy. - -"I'll give you something gently, you monkey you!" cried Mavra -Kuzminichna, raising her arm threateningly. "Go and get the samovar to -boil for your grandfather." - -Mavra Kuzminichna flicked the dust off the clavichord and closed it, -and with a deep sigh left the drawing room and locked its main door. - -Going out into the yard she paused to consider where she should go -next--to drink tea in the servants' wing with Vasilich, or into the -storeroom to put away what still lay about. - -She heard the sound of quick footsteps in the quiet street. -Someone stopped at the gate, and the latch rattled as someone tried to -open it. Mavra Kuzminichna went to the gate. - -"Who do you want?" - -"The count--Count Ilya Andreevich Rostov." - -"And who are you?" - -"An officer, I have to see him," came the reply in a pleasant, -well-bred Russian voice. - -Mavra Kuzminichna opened the gate and an officer of eighteen, with -the round face of a Rostov, entered the yard. - -"They have gone away, sir. Went away yesterday at vespertime," -said Mavra Kuzminichna cordially. - -The young officer standing in the gateway, as if hesitating -whether to enter or not, clicked his tongue. - -"Ah, how annoying!" he muttered. "I should have come yesterday.... -Ah, what a pity." - -Meanwhile, Mavra Kuzminichna was attentively and sympathetically -examining the familiar Rostov features of the young man's face, his -tattered coat and trodden-down boots. - -"What did you want to see the count for?" she asked. - -"Oh well... it can't be helped!" said he in a tone of vexation and -placed his hand on the gate as if to leave. - -He again paused in indecision. - -"You see," he suddenly said, "I am a kinsman of the count's and he -has been very kind to me. As you see" (he glanced with an amused air -and good-natured smile at his coat and boots) "my things are worn -out and I have no money, so I was going to ask the count..." - -Mavra Kuzminichna did not let him finish. - -"Just wait a minute, sir. One little moment," said she. - -And as soon as the officer let go of the gate handle she turned and, -hurrying away on her old legs, went through the back yard to the -servants' quarters. - -While Mavra Kuzminichna was running to her room the officer walked -about the yard gazing at his worn-out boots with lowered head and a -faint smile on his lips. "What a pity I've missed Uncle! What a nice -old woman! Where has she run off to? And how am I to find the -nearest way to overtake my regiment, which must by now be getting near -the Rogozhski gate?" thought he. Just then Mavra Kuzminichna -appeared from behind the corner of the house with a frightened yet -resolute look, carrying a rolled-up check kerchief in her hand. -While still a few steps from the officer she unfolded the kerchief and -took out of it a white twenty-five-ruble assignat and hastily handed -it to him. - -"If his excellency had been at home, as a kinsman he would of -course... but as it is..." - -Mavra Kuzminichna grew abashed and confused. The officer did not -decline, but took the note quietly and thanked her. - -"If the count had been at home..." Mavra Kuzminichna went on -apologetically. "Christ be with you, sir! May God preserve you!" -said she, bowing as she saw him out. - -Swaying his head and smiling as if amused at himself, the officer -ran almost at a trot through the deserted streets toward the Yauza -bridge to overtake his regiment. - -But Mavra Kuzminichna stood at the closed gate for some time with -moist eyes, pensively swaying her head and feeling an unexpected -flow of motherly tenderness and pity for the unknown young officer. - - - - - -CHAPTER XXIII - - -From an unfinished house on the Varvarka, the ground floor of -which was a dramshop, came drunken shouts and songs. On benches -round the tables in a dirty little room sat some ten factory hands. -Tipsy and perspiring, with dim eyes and wide-open mouths, they were -all laboriously singing some song or other. They were singing -discordantly, arduously, and with great effort, evidently not -because they wished to sing, but because they wanted to show they were -drunk and on a spree. One, a tall, fair-haired lad in a clean blue -coat, was standing over the others. His face with its fine straight -nose would have been handsome had it not been for his thin, -compressed, twitching lips and dull, gloomy, fixed eyes. Evidently -possessed by some idea, he stood over those who were singing, and -solemnly and jerkily flourished above their heads his white arm with -the sleeve turned up to the elbow, trying unnaturally to spread out -his dirty fingers. The sleeve of his coat kept slipping down and he -always carefully rolled it up again with his left hand, as if it -were most important that the sinewy white arm he was flourishing -should be bare. In the midst of the song cries were heard, and -fighting and blows in the passage and porch. The tall lad waved his -arm. - -"Stop it!" he exclaimed peremptorily. "There's a fight, lads!" -And, still rolling up his sleeve, he went out to the porch. - -The factory hands followed him. These men, who under the -leadership of the tall lad were drinking in the dramshop that morning, -had brought the publican some skins from the factory and for this -had had drink served them. The blacksmiths from a neighboring -smithy, hearing the sounds of revelry in the tavern and supposing it -to have been broken into, wished to force their way in too and a fight -in the porch had resulted. - -The publican was fighting one of the smiths at the door, and when -the workmen came out the smith, wrenching himself free from the tavern -keeper, fell face downward on the pavement. - -Another smith tried to enter the doorway, pressing against the -publican with his chest. - -The lad with the turned-up sleeve gave the smith a blow in the -face and cried wildly: "They're fighting us, lads!" - -At that moment the first smith got up and, scratching his bruised -face to make it bleed, shouted in a tearful voice: "Police! Murder!... -They've killed a man, lads!" - -"Oh, gracious me, a man beaten to death--killed!..." screamed a -woman coming out of a gate close by. - -A crowd gathered round the bloodstained smith. - -"Haven't you robbed people enough--taking their last shirts?" said a -voice addressing the publican. "What have you killed a man for, you -thief?" - -The tall lad, standing in the porch, turned his bleared eyes from -the publican to the smith and back again as if considering whom he -ought to fight now. - -"Murderer!" he shouted suddenly to the publican. "Bind him, lads!" - -"I daresay you would like to bind me!" shouted the publican, pushing -away the men advancing on him, and snatching his cap from his head -he flung it on the ground. - -As if this action had some mysterious and menacing significance, the -workmen surrounding the publican paused in indecision. - -"I know the law very well, mates! I'll take the matter to the -captain of police. You think I won't get to him? Robbery is not -permitted to anybody now a days!" shouted the publican, picking up his -cap. - -"Come along then! Come along then!" the publican and the tall -young fellow repeated one after the other, and they moved up the -street together. - -The bloodstained smith went beside them. The factory hands and -others followed behind, talking and shouting. - -At the corner of the Moroseyka, opposite a large house with closed -shutters and bearing a bootmaker's signboard, stood a score of thin, -worn-out, gloomy-faced bootmakers, wearing overalls and long -tattered coats. - -"He should pay folks off properly," a thin workingman, with frowning -brows and a straggly beard, was saying. - -"But he's sucked our blood and now he thinks he's quit of us. He's -been misleading us all the week and now that he's brought us to this -pass he's made off." - -On seeing the crowd and the bloodstained man the workman ceased -speaking, and with eager curiosity all the bootmakers joined the -moving crowd. - -"Where are all the folks going?" - -"Why, to the police, of course!" - -"I say, is it true that we have been beaten?" "And what did you -think? Look what folks are saying." - -Questions and answers were heard. The publican, taking advantage -of the increased crowd, dropped behind and returned to his tavern. - -The tall youth, not noticing the disappearance of his foe, waved his -bare arm and went on talking incessantly, attracting general attention -to himself. It was around him that the people chiefly crowded, -expecting answers from him to the questions that occupied all their -minds. - -"He must keep order, keep the law, that's what the government is -there for. Am I not right, good Christians?" said the tall youth, with -a scarcely perceptible smile. "He thinks there's no government! How -can one do without government? Or else there would be plenty who'd rob -us." - -"Why talk nonsense?" rejoined voices in the crowd. "Will they give -up Moscow like this? They told you that for fun, and you believed -it! Aren't there plenty of troops on the march? Let him in, indeed! -That's what the government is for. You'd better listen to what -people are saying," said some of the mob pointing to the tall youth. - -By the wall of China-Town a smaller group of people were gathered -round a man in a frieze coat who held a paper in his hand. - -"An ukase, they are reading an ukase! Reading an ukase!" cried -voices in the crowd, and the people rushed toward the reader. - -The man in the frieze coat was reading the broadsheet of August 31 -When the crowd collected round him he seemed confused, but at the -demand of the tall lad who had pushed his way up to him, he began in a -rather tremulous voice to read the sheet from the beginning. - -"Early tomorrow I shall go to his Serene Highness," he read -("Sirin Highness," said the tall fellow with a triumphant smile on his -lips and a frown on his brow), "to consult with him to act, and to aid -the army to exterminate these scoundrels. We too will take part..." -the reader went on, and then paused ("Do you see," shouted the youth -victoriously, "he's going to clear up the whole affair for -you...."), "in destroying them, and will send these visitors to the -devil. I will come back to dinner, and we'll set to work. We will -do, completely do, and undo these scoundrels." - -The last words were read out in the midst of complete silence. The -tall lad hung his head gloomily. It was evident that no one had -understood the last part. In particular, the words "I will come back -to dinner," evidently displeased both reader and audience. The -people's minds were tuned to a high pitch and this was too simple -and needlessly comprehensible--it was what any one of them might -have said and therefore was what an ukase emanating from the highest -authority should not say. - -They all stood despondent and silent. The tall youth moved his -lips and swayed from side to side. - -"We should ask him... that's he himself?"... "Yes, ask him -indeed!... Why not? He'll explain"... voices in the rear of the -crowd were suddenly heard saying, and the general attention turned -to the police superintendent's trap which drove into the square -attended by two mounted dragoons. - -The superintendent of police, who had that morning by Count -Rostopchin's orders to burn the barges and had in connection with that -matter acquired a large sum of money which was at that moment in his -pocket, on seeing a crowd bearing down upon him told his coachman to -stop. - -"What people are these?" he shouted to the men, who were moving -singly and timidly in the direction of his trap. - -"What people are these?" he shouted again, receiving no answer. - -"Your honor..." replied the shopman in the frieze coat, "your honor, -in accord with the proclamation of his highest excellency the count, -they desire to serve, not sparing their lives, and it is not any -kind of riot, but as his highest excellence said..." - -"The count has not left, he is here, and an order will be issued -concerning you," said the superintendent of police. "Go on!" he -ordered his coachman. - -The crowd halted, pressing around those who had heard what the -superintendent had said, and looking at the departing trap. - -The superintendent of police turned round at that moment with a -scared look, said something to his coachman, and his horses -increased their speed. - -"It's a fraud, lads! Lead the way to him, himself!" shouted the tall -youth. "Don't let him go, lads! Let him answer us! Keep him!" -shouted different people and the people dashed in pursuit of the trap. - -Following the superintendent of police and talking loudly the -crowd went in the direction of the Lubyanka Street. - -"There now, the gentry and merchants have gone away and left us to -perish. Do they think we're dogs?" voices in the crowd were heard -saying more and more frequently. - - - - - -CHAPTER XXIV - - -On the evening of the first of September, after his interview with -Kutuzov, Count Rostopchin had returned to Moscow mortified and -offended because he had not been invited to attend the council of war, -and because Kutuzov had paid no attention to his offer to take part in -the defense of the city; amazed also at the novel outlook revealed -to him at the camp, which treated the tranquillity of the capital -and its patriotic fervor as not merely secondary but quite -irrelevant and unimportant matters. Distressed, offended, and -surprised by all this, Rostopchin had returned to Moscow. After supper -he lay down on a sofa without undressing, and was awakened soon -after midnight by a courier bringing him a letter from Kutuzov. This -letter requested the count to send police officers to guide the troops -through the town, as the army was retreating to the Ryazan road beyond -Moscow. This was not news to Rostopchin. He had known that Moscow -would be abandoned not merely since his interview the previous day -with Kutuzov on the Poklonny Hill but ever since the battle of -Borodino, for all the generals who came to Moscow after that battle -had said unanimously that it was impossible to fight another battle, -and since then the government property had been removed every night, -and half the inhabitants had left the city with Rostopchin's own -permission. Yet all the same this information astonished and irritated -the count, coming as it did in the form of a simple note with an order -from Kutuzov, and received at night, breaking in on his beauty sleep. - -When later on in his memoirs Count Rostopchin explained his -actions at this time, he repeatedly says that he was then actuated -by two important considerations: to maintain tranquillity in Moscow -and expedite the departure of the inhabitants. If one accepts this -twofold aim all Rostopchin's actions appear irreproachable. "Why -were the holy relics, the arms, ammunition, gunpowder, and stores of -corn not removed? Why were thousands of inhabitants deceived into -believing that Moscow would not be given up--and thereby ruined?" -"To presence the tranquillity of the city," explains Count Rostopchin. -"Why were bundles of useless papers from the government offices, and -Leppich's balloon and other articles removed?" "To leave the town -empty," explains Count Rostopchin. One need only admit that public -tranquillity is in danger and any action finds a justification. - -All the horrors of the reign of terror were based only on solicitude -for public tranquillity. - -On what, then, was Count Rostopchin's fear for the tranquillity of -Moscow based in 1812? What reason was there for assuming any -probability of an uprising in the city? The inhabitants were leaving -it and the retreating troops were filling it. Why should that cause -the masses to riot? - -Neither in Moscow nor anywhere in Russia did anything resembling -an insurrection ever occur when the enemy entered a town. More than -ten thousand people were still in Moscow on the first and second of -September, and except for a mob in the governor's courtyard, assembled -there at his bidding, nothing happened. It is obvious that there would -have been even less reason to expect a disturbance among the people if -after the battle of Borodino, when the surrender of Moscow became -certain or at least probable, Rostopchin instead of exciting the -people by distributing arms and broadsheets had taken steps to -remove all the holy relics, the gunpowder, munitions, and money, and -had told the population plainly that the town would be abandoned. - -Rostopchin, though he had patriotic sentiments, was a sanguine and -impulsive man who had always moved in the highest administrative -circles and had no understanding at all of the people he supposed -himself to be guiding. Ever since the enemy's entry into Smolensk he -had in imagination been playing the role of director of the popular -feeling of "the heart of Russia." Not only did it seem to him (as to -all administrators) that he controlled the external actions of -Moscow's inhabitants, but he also thought he controlled their mental -attitude by means of his broadsheets and posters, written in a -coarse tone which the people despise in their own class and do not -understand from those in authority. Rostopchin was so pleased with the -fine role of leader of popular feeling, and had grown so used to it, -that the necessity of relinquishing that role and abandoning Moscow -without any heroic display took him unawares and he suddenly felt -the ground slip away from under his feet, so that he positively did -not know what to do. Though he knew it was coming, he did not till the -last moment wholeheartedly believe that Moscow would be abandoned, and -did not prepare for it. The inhabitants left against his wishes. If -the government offices were removed, this was only done on the -demand of officials to whom the count yielded reluctantly. He was -absorbed in the role he had created for himself. As is often the -case with those gifted with an ardent imagination, though he had -long known that Moscow would be abandoned he knew it only with his -intellect, he did not believe it in his heart and did not adapt -himself mentally to this new position of affairs. - -All his painstaking and energetic activity (in how far it was useful -and had any effect on the people is another question) had been -simply directed toward arousing in the masses his own feeling of -patriotic hatred of the French. - -But when events assumed their true historical character, when -expressing hatred for the French in words proved insufficient, when it -was not even possible to express that hatred by fighting a battle, -when self-confidence was of no avail in relation to the one question -before Moscow, when the whole population streamed out of Moscow as one -man, abandoning their belongings and proving by that negative action -all the depth of their national feeling, then the role chosen by -Rostopchin suddenly appeared senseless. He unexpectedly felt himself -ridiculous, weak, and alone, with no ground to stand on. - -When, awakened from his sleep, he received that cold, peremptory -note from Kutuzov, he felt the more irritated the more he felt himself -to blame. All that he had been specially put in charge of, the state -property which he should have removed, was still in Moscow and it -was no longer possible to take the whole of it away. - -"Who is to blame for it? Who has let things come to such a pass?" he -ruminated. "Not I, of course. I had everything ready. I had Moscow -firmly in hand. And this is what they have let it come to! Villains! -Traitors!" he thought, without clearly defining who the villains and -traitors were, but feeling it necessary to hate those traitors whoever -they might be who were to blame for the false and ridiculous -position in which he found himself. - -All that night Count Rostopchin issued orders, for which people came -to him from all parts of Moscow. Those about him had never seen the -count so morose and irritable. - -"Your excellency, the Director of the Registrar's Department has -sent for instructions... From the Consistory, from the Senate, from -the University, from the Foundling Hospital, the Suffragan has sent... -asking for information.... What are your orders about the Fire -Brigade? From the governor of the prison... from the superintendent of -the lunatic asylum..." All night long such announcements were -continually being received by the count. - -To all these inquiries he gave brief and angry replies indicating -that orders from him were not now needed, that the whole affair, -carefully prepared by him, had now been ruined by somebody, and that -that somebody would have to bear the whole responsibility for all that -might happen. - -"Oh, tell that blockhead," he said in reply to the question from the -Registrar's Department, "that he should remain to guard his documents. -Now why are you asking silly questions about the Fire Brigade? They -have horses, let them be off to Vladimir, and not leave them to the -French." - -"Your excellency, the superintendent of the lunatic asylum has come: -what are your commands?" - -"My commands? Let them go away, that's all.... And let the -lunatics out into the town. When lunatics command our armies God -evidently means these other madmen to be free." - -In reply to an inquiry about the convicts in the prison, Count -Rostopchin shouted angrily at the governor: - -"Do you expect me to give you two battalions--which we have not got- -for a convoy? Release them, that's all about it!" - -"Your excellency, there are some political prisoners, Meshkov, -Vereshchagin..." - -"Vereshchagin! Hasn't he been hanged yet?" shouted Rostopchin. -"Bring him to me!" - - - - - -CHAPTER XXV - - -Toward nine o'clock in the morning, when the troops were already -moving through Moscow, nobody came to the count any more for -instructions. Those who were able to get away were going of their -own accord, those who remained behind decided for themselves what they -must do. - -The count ordered his carriage that he might drive to Sokolniki, and -sat in his study with folded hands, morose, sallow, and taciturn. - -In quiet and untroubled times it seems to every administrator that -it is only by his efforts that the whole population under his rule -is kept going, and in this consciousness of being indispensable -every administrator finds the chief reward of his labor and efforts. -While the sea of history remains calm the ruler-administrator in his -frail bark, holding on with a boat hook to the ship of the people -and himself moving, naturally imagines that his efforts move the -ship he is holding on to. But as soon as a storm arises and the sea -begins to heave and the ship to move, such a delusion is no longer -possible. The ship moves independently with its own enormous motion, -the boat hook no longer reaches the moving vessel, and suddenly the -administrator, instead of appearing a ruler and a source of power, -becomes an insignificant, useless, feeble man. - -Rostopchin felt this, and it was this which exasperated him. - -The superintendent of police, whom the crowd had stopped, went in to -see him at the same time as an adjutant who informed the count that -the horses were harnessed. They were both pale, and the superintendent -of police, after reporting that he had executed the instructions he -had received, informed the count that an immense crowd had collected -in the courtyard and wished to see him. - -Without saying a word Rostopchin rose and walked hastily to his -light, luxurious drawing room, went to the balcony door, took hold -of the handle, let it go again, and went to the window from which he -had a better view of the whole crowd. The tall lad was standing in -front, flourishing his arm and saying something with a stern look. The -blood stained smith stood beside him with a gloomy face. A drone of -voices was audible through the closed window. - -"Is my carriage ready?" asked Rostopchin, stepping back from the -window. - -"It is, your excellency," replied the adjutant. - -Rostopchin went again to the balcony door. - -"But what do they want?" he asked the superintendent of police. - -"Your excellency, they say they have got ready, according to your -orders, to go against the French, and they shouted something about -treachery. But it is a turbulent crowd, your excellency--I hardly -managed to get away from it. Your excellency, I venture to suggest..." - -"You may go. I don't need you to tell me what to do!" exclaimed -Rostopchin angrily. - -He stood by the balcony door looking at the crowd. - -"This is what they have done with Russia! This is what they have -done with me!" thought he, full of an irrepressible fury that welled -up within him against the someone to whom what was happening might -be attributed. As often happens with passionate people, he was -mastered by anger but was still seeking an object on which to vent it. -"Here is that mob, the dregs of the people," he thought as he gazed at -the crowd: "this rabble they have roused by their folly! They want a -victim," he thought as he looked at the tall lad flourishing his -arm. And this thought occurred to him just because he himself -desired a victim, something on which to vent his rage. - -"Is the carriage ready?" he asked again. - -"Yes, your excellency. What are your orders about Vereshchagin? He -is waiting at the porch," said the adjutant. - -"Ah!" exclaimed Rostopchin, as if struck by an unexpected -recollection. - -And rapidly opening the door he went resolutely out onto the -balcony. The talking instantly ceased, hats and caps were doffed, -and all eyes were raised to the count. - -"Good morning, lads!" said the count briskly and loudly. "Thank -you for coming. I'll come out to you in a moment, but we must first -settle with the villain. We must punish the villain who has caused the -ruin of Moscow. Wait for me!" - -And the count stepped as briskly back into the room and slammed -the door behind him. - -A murmur of approbation and satisfaction ran through the crowd. -"He'll settle with all the villains, you'll see! And you said the -French... He'll show you what law is!" the mob were saying as if -reproving one another for their lack of confidence. - -A few minutes later an officer came hurriedly out of the front door, -gave an order, and the dragoons formed up in line. The crowd moved -eagerly from the balcony toward the porch. Rostopchin, coming out -there with quick angry steps, looked hastily around as if seeking -someone. - -"Where is he?" he inquired. And as he spoke he saw a young man -coming round the corner of the house between two dragoons. He had a -long thin neck, and his head, that had been half shaved, was again -covered by short hair. This young man was dressed in a threadbare blue -cloth coat lined with fox fur, that had once been smart, and dirty -hempen convict trousers, over which were pulled his thin, dirty, -trodden-down boots. On his thin, weak legs were heavy chains which -hampered his irresolute movements. - -"Ah!" said Rostopchin, hurriedly turning away his eyes from the -young man in the fur-lined coat and pointing to the bottom step of the -porch. "Put him there." - -The young man in his clattering chains stepped clumsily to the -spot indicated, holding away with one finger the coat collar which -chafed his neck, turned his long neck twice this way and that, sighed, -and submissively folded before him his thin hands, unused to work. - -For several seconds while the young man was taking his place on -the step the silence continued. Only among the back rows of the -people, who were all pressing toward the one spot, could sighs, -groans, and the shuffling of feet be heard. - -While waiting for the young man to take his place on the step -Rostopchin stood frowning and rubbing his face with his hand. - -"Lads!" said he, with a metallic ring in his voice. "This man, -Vereshchagin, is the scoundrel by whose doing Moscow is perishing." - -The young man in the fur-lined coat, stooping a little, stood in a -submissive attitude, his fingers clasped before him. His emaciated -young face, disfigured by the half-shaven head, hung down -hopelessly. At the count's first words he raised it slowly and -looked up at him as if wishing to say something or at least to meet -his eye. But Rostopchin did not look at him. A vein in the young man's -long thin neck swelled like a cord and went blue behind the ear, and -suddenly his face flushed. - -All eyes were fixed on him. He looked at the crowd, and rendered -more hopeful by the expression he read on the faces there, he smiled -sadly and timidly, and lowering his head shifted his feet on the step. - -"He has betrayed his Tsar and his country, he had gone over to -Bonaparte. He alone of all the Russians has disgraced the Russian -name, he has caused Moscow to perish," said Rostopchin in a sharp, -even voice, but suddenly he glanced down at Vereshchagin who continued -to stand in the same submissive attitude. As if inflamed by the sight, -he raised his arm and addressed the people, almost shouting: - -"Deal with him as you think fit! I hand him over to you." - -The crowd remained silent and only pressed closer and closer to -one another. To keep one another back, to breathe in that stifling -atmosphere, to be unable to stir, and to await something unknown, -uncomprehended, and terrible, was becoming unbearable. Those -standing in front, who had seen and heard what had taken place -before them, all stood with wide open eyes and mouths, straining -with all their strength, and held back the crowd that was pushing -behind them. - -"Beat him!... Let the traitor perish and not disgrace the Russian -name!" shouted Rostopchin. "Cut him down. I command it." - -Hearing not so much the words as the angry tone of Rostopchin's -voice, the crowd moaned and heaved forward, but again paused. - -"Count!" exclaimed the timid yet theatrical voice of Vereshchagin in -the midst of the momentary silence that ensued, "Count! One God is -above us both...." He lifted his head and again the thick vein in -his thin neck filled with blood and the color rapidly came and went in -his face. - -He did not finish what he wished to say. - -"Cut him down! I command it..." shouted Rostopchin, suddenly growing -pale like Vereshchagin. - -"Draw sabers!" cried the dragoon officer, drawing his own. - -Another still stronger wave flowed through the crowd and reaching -the front ranks carried it swaying to the very steps of the porch. The -tall youth, with a stony look on his face, and rigid and uplifted arm, -stood beside Vereshchagin. - -"Saber him!" the dragoon officer almost whispered. - -And one of the soldiers, his face all at once distorted with fury, -struck Vereshchagin on the head with the blunt side of his saber. - -"Ah!" cried Vereshchagin in meek surprise, looking round with a -frightened glance as if not understanding why this was done to him. -A similar moan of surprise and horror ran through the crowd. "O Lord!" -exclaimed a sorrowful voice. - -But after the exclamation of surprise that had escaped from -Vereshchagin he uttered a plaintive cry of pain, and that cry was -fatal. The barrier of human feeling, strained to the utmost, that -had held the crowd in check suddenly broke. The crime had begun and -must now be completed. The plaintive moan of reproach was drowned by -the threatening and angry roar of the crowd. Like the seventh and last -wave that shatters a ship, that last irresistible wave burst from -the rear and reached the front ranks, carrying them off their feet and -engulfing them all. The dragoon was about to repeat his blow. -Vereshchagin with a cry of horror, covering his head with his hands, -rushed toward the crowd. The tall youth, against whom he stumbled, -seized his thin neck with his hands and, yelling wildly, fell with him -under the feet of the pressing, struggling crowd. - -Some beat and tore at Vereshchagin, others at the tall youth. And -the screams of those that were being trampled on and of those who -tried to rescue the tall lad only increased the fury of the crowd. -It was a long time before the dragoons could extricate the bleeding -youth, beaten almost to death. And for a long time, despite the -feverish haste with which the mob tried to end the work that had -been begun, those who were hitting, throttling, and tearing at -Vereshchagin were unable to kill him, for the crowd pressed from all -sides, swaying as one mass with them in the center and rendering it -impossible for them either to kill him or let him go. - -"Hit him with an ax, eh!... Crushed?... Traitor, he sold -Christ.... Still alive... tenacious... serves him right! Torture -serves a thief right. Use the hatchet!... What--still alive?" - -Only when the victim ceased to struggle and his cries changed to a -long-drawn, measured death rattle did the crowd around his -prostrate, bleeding corpse begin rapidly to change places. Each one -came up, glanced at what had been done, and with horror, reproach, and -astonishment pushed back again. - -"O Lord! The people are like wild beasts! How could he be alive?" -voices in the crowd could be heard saying. "Quite a young fellow -too... must have been a merchant's son. What men!... and they say he's -not the right one.... How not the right one?... O Lord! And there's -another has been beaten too--they say he's nearly done for.... Oh, the -people... Aren't they afraid of sinning?..." said the same mob now, -looking with pained distress at the dead body with its long, thin, -half-severed neck and its livid face stained with blood and dust. - -A painstaking police officer, considering the presence of a corpse -in his excellency's courtyard unseemly, told the dragoons to take it -away. Two dragoons took it by its distorted legs and dragged it -along the ground. The gory, dust-stained, half-shaven head with its -long neck trailed twisting along the ground. The crowd shrank back -from it. - -At the moment when Vereshchagin fell and the crowd closed in with -savage yells and swayed about him, Rostopchin suddenly turned pale -and, instead of going to the back entrance where his carriage -awaited him, went with hurried steps and bent head, not knowing -where and why, along the passage leading to the rooms on the ground -floor. The count's face was white and he could not control the -feverish twitching of his lower jaw. - - -"This way, your excellency... Where are you going?... This way, -please..." said a trembling, frightened voice behind him. - -Count Rostopchin was unable to reply and, turning obediently, went -in the direction indicated. At the back entrance stood his caleche. -The distant roar of the yelling crowd was audible even there. He -hastily took his seat and told the coachman to drive him to his -country house in Sokolniki. - -When they reached the Myasnitski Street and could no longer hear the -shouts of the mob, the count began to repent. He remembered with -dissatisfaction the agitation and fear he had betrayed before his -subordinates. "The mob is terrible--disgusting," he said to himself in -French. "They are like wolves whom nothing but flesh can appease." -"Count! One God is above us both!"--Vereshchagin's words suddenly -recurred to him, and a disagreeable shiver ran down his back. But this -was only a momentary feeling and Count Rostopchin smiled -disdainfully at himself. "I had other duties," thought he. "The people -had to be appeased. Many other victims have perished and are perishing -for the public good"--and he began thinking of his social duties to -his family and to the city entrusted to him, and of himself--not -himself as Theodore Vasilyevich Rostopchin (he fancied that Theodore -Vasilyevich Rostopchin was sacrificing himself for the public good) -but himself as governor, the representative of authority and of the -Tsar. "Had I been simply Theodore Vasilyevich my course of action -would have been quite different, but it was my duty to safeguard my -life and dignity as commander in chief." - -Lightly swaying on the flexible springs of his carriage and no -longer hearing the terrible sounds of the crowd, Rostopchin grew -physically calm and, as always happens, as soon as he became -physically tranquil his mind devised reasons why he should be mentally -tranquil too. The thought which tranquillized Rostopchin was not a new -one. Since the world began and men have killed one another no one -has ever committed such a crime against his fellow man without -comforting himself with this same idea. This idea is le bien public, -the hypothetical welfare of other people. - -To a man not swayed by passion that welfare is never certain, but he -who commits such a crime always knows just where that welfare lies. -And Rostopchin now knew it. - -Not only did his reason not reproach him for what he had done, but -he even found cause for self-satisfaction in having so successfully -contrived to avail himself of a convenient opportunity to punish a -criminal and at the same time pacify the mob. - -"Vereshchagin was tried and condemned to death," thought -Rostopchin (though the Senate had only condemned Vereshchagin to -hard labor), "he was a traitor and a spy. I could not let him go -unpunished and so I have killed two birds with one stone: to appease -the mob I gave them a victim and at the same time punished a -miscreant." - -Having reached his country house and begun to give orders about -domestic arrangements, the count grew quite tranquil. - -Half an hour later he was driving with his fast horses across the -Sokolniki field, no longer thinking of what had occurred but -considering what was to come. He was driving to the Yauza bridge where -he had heard that Kutuzov was. Count Rostopchin was mentally preparing -the angry and stinging reproaches he meant to address to Kutuzov for -his deception. He would make that foxy old courtier feel that the -responsibility for all the calamities that would follow the -abandonment of the city and the ruin of Russia (as Rostopchin regarded -it) would fall upon his doting old head. Planning beforehand what he -would say to Kutuzov, Rostopchin turned angrily in his caleche and -gazed sternly from side to side. - -The Sokolniki field was deserted. Only at the end of it, in front of -the almshouse and the lunatic asylum, could be seen some people in -white and others like them walking singly across the field shouting -and gesticulating. - -One of these was running to cross the path of Count Rostopchin's -carriage, and the count himself, his coachman, and his dragoons looked -with vague horror and curiosity at these released lunatics and -especially at the one running toward them. - -Swaying from side to side on his long, thin legs in his fluttering -dressing gown, this lunatic was running impetuously, his gaze fixed on -Rostopchin, shouting something in a hoarse voice and making signs to -him to stop. The lunatic's solemn, gloomy face was thin and yellow, -with its beard growing in uneven tufts. His black, agate pupils with -saffron-yellow whites moved restlessly near the lower eyelids. - -"Stop! Pull up, I tell you!" he cried in a piercing voice, and again -shouted something breathlessly with emphatic intonations and gestures. - -Coming abreast of the caleche he ran beside it. - -"Thrice have they slain me, thrice have I risen from the dead. -They stoned me, crucified me... I shall rise... shall rise... shall -rise. They have torn my body. The kingdom of God will be overthrown... -Thrice will I overthrow it and thrice re-establish it!" he cried, -raising his voice higher and higher. - -Count Rostopchin suddenly grew pale as he had done when the crowd -closed in on Vereshchagin. He turned away. "Go fas... faster!" he -cried in a trembling voice to his coachman. The caleche flew over -the ground as fast as the horses could draw it, but for a long time -Count Rostopchin still heard the insane despairing screams growing -fainter in the distance, while his eyes saw nothing but the -astonished, frightened, bloodstained face of "the traitor" in the -fur-lined coat. - -Recent as that mental picture was, Rostopchin already felt that it -had cut deep into his heart and drawn blood. Even now he felt -clearly that the gory trace of that recollection would not pass with -time, but that the terrible memory would, on the contrary, dwell in -his heart ever more cruelly and painfully to the end of his life. He -seemed still to hear the sound of his own words: "Cut him down! I -command it...." - -"Why did I utter those words? It was by some accident I said -them.... I need not have said them," he thought. "And then nothing -would have happened." He saw the frightened and then infuriated face -of the dragoon who dealt the blow, the look of silent, timid -reproach that boy in the fur-lined coat had turned upon him. "But I -did not do it for my own sake. I was bound to act that way.... The -mob, the traitor... the public welfare," thought he. - -Troops were still crowding at the Yauza bridge. It was hot. Kutuzov, -dejected and frowning, sat on a bench by the bridge toying with his -whip in the sand when a caleche dashed up noisily. A man in a -general's uniform with plumes in his hat went up to Kutuzov and said -something in French. It was Count Rostopchin. He told Kutuzov that -he had come because Moscow, the capital, was no more and only the army -remained. - -"Things would have been different if your Serene Highness had not -told me that you would not abandon Moscow without another battle; -all this would not have happened," he said. - -Kutuzov looked at Rostopchin as if, not grasping what was said to -him, he was trying to read something peculiar written at that moment -on the face of the man addressing him. Rostopchin grew confused and -became silent. Kutuzov slightly shook his head and not taking his -penetrating gaze from Rostopchin's face muttered softly: - -"No! I shall not give up Moscow without a battle!" - -Whether Kutuzov was thinking of something entirely different when he -spoke those words, or uttered them purposely, knowing them to be -meaningless, at any rate Rostopchin made no reply and hastily left -him. And strange to say, the Governor of Moscow, the proud Count -Rostopchin, took up a Cossack whip and went to the bridge where he -began with shouts to drive on the carts that blocked the way. - - - - - -CHAPTER XXVI - - -Toward four o'clock in the afternoon Murat's troops were entering -Moscow. In front rode a detachment of Wurttemberg hussars and behind -them rode the King of Naples himself accompanied by a numerous suite. - -About the middle of the Arbat Street, near the Church of the -Miraculous Icon of St. Nicholas, Murat halted to await news from the -advanced detachment as to the condition in which they had found the -citadel, le Kremlin. - -Around Murat gathered a group of those who had remained in Moscow. -They all stared in timid bewilderment at the strange, long-haired -commander dressed up in feathers and gold. - -"Is that their Tsar himself? He's not bad!" low voices could be -heard saying. - -An interpreter rode up to the group. - -"Take off your cap... your caps!" These words went from one to -another in the crowd. The interpreter addressed an old porter and -asked if it was far to the Kremlin. The porter, listening in -perplexity to the unfamiliar Polish accent and not realizing that -the interpreter was speaking Russian, did not understand what was -being said to him and slipped behind the others. - -Murat approached the interpreter and told him to ask where the -Russian army was. One of the Russians understood what was asked and -several voices at once began answering the interpreter. A French -officer, returning from the advanced detachment, rode up to Murat -and reported that the gates of the citadel had been barricaded and -that there was probably an ambuscade there. - -"Good!" said Murat and, turning to one of the gentlemen in his -suite, ordered four light guns to be moved forward to fire at the -gates. - -The guns emerged at a trot from the column following Murat and -advanced up the Arbat. When they reached the end of the Vozdvizhenka -Street they halted and drew in the Square. Several French officers -superintended the placing of the guns and looked at the Kremlin -through field glasses. - -The bells in the Kremlin were ringing for vespers, and this sound -troubled the French. They imagined it to be a call to arms. A few -infantrymen ran to the Kutafyev Gate. Beams and wooden screens had -been put there, and two musket shots rang out from under the gate as -soon as an officer and men began to run toward it. A general who was -standing by the guns shouted some words of command to the officer, and -the latter ran back again with his men. - -The sound of three more shots came from the gate. - -One shot struck a French soldier's foot, and from behind the screens -came the strange sound of a few voices shouting. Instantly as at a -word of command the expression of cheerful serenity on the faces of -the French general, officers, and men changed to one of determined -concentrated readiness for strife and suffering. To all of them from -the marshal to the least soldier, that place was not the Vozdvizhenka, -Mokhavaya, or Kutafyev Street, nor the Troitsa Gate (places familiar -in Moscow), but a new battlefield which would probably prove -sanguinary. And all made ready for that battle. The cries from the -gates ceased. The guns were advanced, the artillerymen blew the ash -off their linstocks, and an officer gave the word "Fire!" This was -followed by two whistling sounds of canister shot, one after -another. The shot rattled against the stone of the gate and upon the -wooden beams and screens, and two wavering clouds of smoke rose over -the Square. - -A few instants after the echo of the reports resounding over the -stone-built Kremlin had died away the French heard a strange sound -above their head. Thousands of crows rose above the walls and -circled in the air, cawing and noisily flapping their wings. -Together with that sound came a solitary human cry from the gateway -and amid the smoke appeared the figure of a bareheaded man in a -peasant's coat. He grasped a musket and took aim at the French. -"Fire!" repeated the officer once more, and the reports of a musket -and of two cannon shots were heard simultaneously. The gate again -hidden by smoke. - -Nothing more stirred behind the screens and the French infantry -soldiers and officers advanced to the gate. In the gateway lay three -wounded and four dead. Two men in peasant coats ran away at the foot -of the wall, toward the Znamenka. - -"Clear that away!" said the officer, pointing to the beams and the -corpses, and the French soldiers, after dispatching the wounded, threw -the corpses over the parapet. - -Who these men were nobody knew. "Clear that away!" was all that -was said of them, and they were thrown over the parapet and removed -later on that they might not stink. Thiers alone dedicates a few -eloquent lines to their memory: "These wretches had occupied the -sacred citadel, having supplied themselves with guns from the arsenal, -and fired" (the wretches) "at the French. Some of them were sabered -and the Kremlin was purged of their presence." - -Murat was informed that the way had been cleared. The French entered -the gates and began pitching their camp in the Senate Square. Out of -the windows of the Senate House the soldiers threw chairs into the -Square for fuel and kindled fires there. - -Other detachments passed through the Kremlin and encamped along -the Moroseyka, the Lubyanka, and Pokrovka Streets. Others quartered -themselves along the Vozdvizhenka, the Nikolski, and the Tverskoy -Streets. No masters of the houses being found anywhere, the French -were not billeted on the inhabitants as is usual in towns but lived in -it as in a camp. - -Though tattered, hungry, worn out, and reduced to a third of their -original number, the French entered Moscow in good marching order. -It was a weary and famished, but still a fighting and menacing army. -But it remained an army only until its soldiers had dispersed into -their different lodgings. As soon as the men of the various -regiments began to disperse among the wealthy and deserted houses, the -army was lost forever and there came into being something nondescript, -neither citizens nor soldiers but what are known as marauders. When -five weeks later these same men left Moscow, they no longer formed -an army. They were a mob of marauders, each carrying a quantity of -articles which seemed to him valuable or useful. The aim of each man -when he left Moscow was no longer, as it had been, to conquer, but -merely to keep what he had acquired. Like a monkey which puts its -paw into the narrow neck of a jug, and having seized a handful of nuts -will not open its fist for fear of losing what it holds, and therefore -perishes, the French when they left Moscow had inevitably to perish -because they carried their loot with them, yet to abandon what they -had stolen was as impossible for them as it is for the monkey to -open its paw and let go of its nuts. Ten minutes after each regiment -had entered a Moscow district, not a soldier or officer was left. -Men in military uniforms and Hessian boots could be seen through the -windows, laughing and walking through the rooms. In cellars and -storerooms similar men were busy among the provisions, and in the -yards unlocking or breaking open coach house and stable doors, -lighting fires in kitchens and kneading and baking bread with -rolled-up sleeves, and cooking; or frightening, amusing, or -caressing women and children. There were many such men both in the -shops and houses--but there was no army. - -Order after order was issued by the French commanders that day -forbidding the men to disperse about the town, sternly forbidding -any violence to the inhabitants or any looting, and announcing a -roll call for that very evening. But despite all these measures the -men, who had till then constituted an army, flowed all over the -wealthy, deserted city with its comforts and plentiful supplies. As -a hungry herd of cattle keeps well together when crossing a barren -field, but gets out of hand and at once disperses uncontrollably as -soon as it reaches rich pastures, so did the army disperse all over -the wealthy city. - -No residents were left in Moscow, and the soldiers--like water -percolating through sand--spread irresistibly through the city in -all directions from the Kremlin into which they had first marched. The -cavalry, on entering a merchant's house that had been abandoned and -finding there stabling more than sufficient for their horses, went on, -all the same, to the next house which seemed to them better. Many of -them appropriated several houses, chalked their names on them, and -quarreled and even fought with other companies for them. Before they -had had time to secure quarters the soldiers ran out into the -streets to see the city and, hearing that everything had been -abandoned, rushed to places where valuables were to be had for the -taking. The officers followed to check the soldiers and were -involuntarily drawn into doing the same. In Carriage Row carriages had -been left in the shops, and generals flocked there to select -caleches and coaches for themselves. The few inhabitants who had -remained invited commanding officers to their houses, hoping thereby -to secure themselves from being plundered. There were masses of wealth -and there seemed no end to it. All around the quarters occupied by the -French were other regions still unexplored and unoccupied where, -they thought, yet greater riches might be found. And Moscow engulfed -the army ever deeper and deeper. When water is spilled on dry ground -both the dry ground and the water disappear and mud results; and in -the same way the entry of the famished army into the rich and deserted -city resulted in fires and looting and the destruction of both the -army and the wealthy city. - - -The French attributed the Fire of Moscow au patriotisme feroce de -Rostopchine,* the Russians to the barbarity of the French. In reality, -however, it was not, and could not be, possible to explain the burning -of Moscow by making any individual, or any group of people, -responsible for it. Moscow was burned because it found itself in a -position in which any town built of wood was bound to burn, quite -apart from whether it had, or had not, a hundred and thirty inferior -fire engines. Deserted Moscow had to burn as inevitably as a heap of -shavings has to burn on which sparks continually fall for several -days. A town built of wood, where scarcely a day passes without -conflagrations when the house owners are in residence and a police -force is present, cannot help burning when its inhabitants have left -it and it is occupied by soldiers who smoke pipes, make campfires of -the Senate chairs in the Senate Square, and cook themselves meals -twice a day. In peacetime it is only necessary to billet troops in the -villages of any district and the number of fires in that district -immediately increases. How much then must the probability of fire be -increased in an abandoned, wooden town where foreign troops are -quartered. "Le patriotisme feroce de Rostopchine" and the barbarity of -the French were not to blame in the matter. Moscow was set on fire -by the soldiers' pipes, kitchens, and campfires, and by the -carelessness of enemy soldiers occupying houses they did not own. Even -if there was any arson (which is very doubtful, for no one had any -reason to burn the houses--in any case a troublesome and dangerous -thing to do), arson cannot be regarded as the cause, for the same -thing would have happened without any incendiarism. - - -*To Rostopchin's ferocious patriotism. - - -However tempting it might be for the French to blame Rostopchin's -ferocity and for Russians to blame the scoundrel Bonaparte, or later -on to place an heroic torch in the hands of their own people, it is -impossible not to see that there could be no such direct cause of -the fire, for Moscow had to burn as every village, factory, or house -must burn which is left by its owners and in which strangers are -allowed to live and cook their porridge. Moscow was burned by its -inhabitants, it is true, but by those who had abandoned it and not -by those who remained in it. Moscow when occupied by the enemy did not -remain intact like Berlin, Vienna, and other towns, simply because its -inhabitants abandoned it and did not welcome the French with bread and -salt, nor bring them the keys of the city. - - - - - -CHAPTER XXVII - - -The absorption of the French by Moscow, radiating starwise as it -did, only reached the quarter where Pierre was staying by the -evening of the second of September. - -After the last two days spent in solitude and unusual circumstances, -Pierre was in a state bordering on insanity. He was completely -obsessed by one persistent thought. He did not know how or when this -thought had taken such possession of him, but he remembered nothing of -the past, understood nothing of the present, and all he saw and -heard appeared to him like a dream. - -He had left home only to escape the intricate tangle of life's -demands that enmeshed him, and which in his present condition he was -unable to unravel. He had gone to Joseph Alexeevich's house, on the -plea of sorting the deceased's books and papers, only in search of -rest from life's turmoil, for in his mind the memory of Joseph -Alexeevich was connected with a world of eternal, solemn, and calm -thoughts, quite contrary to the restless confusion into which he -felt himself being drawn. He sought a quiet refuge, and in Joseph -Alexeevich's study he really found it. When he sat with his elbows -on the dusty writing table in the deathlike stillness of the study, -calm and significant memories of the last few days rose one after -another in his imagination, particularly of the battle of Borodino and -of that vague sense of his own insignificance and insincerity compared -with the truth, simplicity, and strength of the class of men he -mentally classed as they. When Gerasim roused him from his reverie the -idea occurred to him of taking part in the popular defense of Moscow -which he knew was projected. And with that object he had asked Gerasim -to get him a peasant's coat and a pistol, confiding to him his -intentions of remaining in Joseph Alexeevich's house and keeping his -name secret. Then during the first day spent in inaction and -solitude (he tried several times to fix his attention on the Masonic -manuscripts, but was unable to do so) the idea that had previously -occurred to him of the cabalistic significance of his name in -connection with Bonaparte's more than once vaguely presented itself. -But the idea that he, L'russe Besuhof, was destined to set a limit -to the power of the Beast was as yet only one of the fancies that -often passed through his mind and left no trace behind. - -When, having bought the coat merely with the object of taking part -among the people in the defense of Moscow, Pierre had met the -Rostovs and Natasha had said to him: "Are you remaining in -Moscow?... How splendid!" the thought flashed into his mind that it -really would be a good thing, even if Moscow were taken, for him to -remain there and do what he was predestined to do. - -Next day, with the sole idea of not sparing himself and not -lagging in any way behind them, Pierre went to the Three Hills gate. -But when he returned to the house convinced that Moscow would not be -defended, he suddenly felt that what before had seemed to him merely a -possibility had now become absolutely necessary and inevitable. He -must remain in Moscow, concealing his name, and must meet Napoleon and -kill him, and either perish or put an end to the misery of all Europe- -which it seemed to him was solely due to Napoleon. - -Pierre knew all the details of the attempt on Bonaparte's life in -1809 by a German student in Vienna, and knew that the student had been -shot. And the risk to which he would expose his life by carrying out -his design excited him still more. - -Two equally strong feelings drew Pierre irresistibly to this -purpose. The first was a feeling of the necessity of sacrifice and -suffering in view of the common calamity, the same feeling that had -caused him to go to Mozhaysk on the twenty-fifth and to make his way -to the very thick of the battle and had now caused him to run away -from his home and, in place of the luxury and comfort to which he -was accustomed, to sleep on a hard sofa without undressing and eat the -same food as Gerasim. The other was that vague and quite Russian -feeling of contempt for everything conventional, artificial, and -human--for everything the majority of men regard as the greatest -good in the world. Pierre had first experienced this strange and -fascinating feeling at the Sloboda Palace, when he had suddenly felt -that wealth, power, and life--all that men so painstakingly acquire -and guard--if it has any worth has so only by reason the joy with -which it can all be renounced. - -It was the feeling that induces a volunteer recruit to spend his -last penny on drink, and a drunken man to smash mirrors or glasses for -no apparent reason and knowing that it will cost him all the money -he possesses: the feeling which causes a man to perform actions -which from an ordinary point of view are insane, to test, as it -were, his personal power and strength, affirming the existence of a -higher, nonhuman criterion of life. - -From the very day Pierre had experienced this feeling for the -first time at the Sloboda Palace he had been continuously under its -influence, but only now found full satisfaction for it. Moreover, at -this moment Pierre was supported in his design and prevented from -renouncing it by what he had already done in that direction. If he -were now to leave Moscow like everyone else, his flight from home, the -peasant coat, the pistol, and his announcement to the Rostovs that -he would remain in Moscow would all become not merely meaningless -but contemptible and ridiculous, and to this Pierre was very -sensitive. - -Pierre's physical condition, as is always the case, corresponded -to his mental state. The unaccustomed coarse food, the vodka he -drank during those days, the absence of wine and cigars, his dirty -unchanged linen, two almost sleepless nights passed on a short sofa -without bedding--all this kept him in a state of excitement -bordering on insanity. - -It was two o'clock in the afternoon. The French had already -entered Moscow. Pierre knew this, but instead of acting he only -thought about his undertaking, going over its minutest details in -his mind. In his fancy he did not clearly picture to himself either -the striking of the blow or the death of Napoleon, but with -extraordinary vividness and melancholy enjoyment imagined his own -destruction and heroic endurance. - -"Yes, alone, for the sake of all, I must do it or perish!" he -thought. "Yes, I will approach... and then suddenly... with pistol -or dagger? But that is all the same! 'It is not I but the hand of -Providence that punishes thee,' I shall say," thought he, imagining -what he would say when killing Napoleon. "Well then, take me and -execute me!" he went on, speaking to himself and bowing his head -with a sad but firm expression. - -While Pierre, standing in the middle of the room, was talking to -himself in this way, the study door opened and on the threshold -appeared the figure of Makar Alexeevich, always so timid before but -now quite transformed. - -His dressing gown was unfastened, his face red and distorted. He was -obviously drunk. On seeing Pierre he grew confused at first, but -noticing embarrassment on Pierre's face immediately grew bold and, -staggering on his thin legs, advanced into the middle of the room. - -"They're frightened," he said confidentially in a hoarse voice. "I -say I won't surrender, I say... Am I not right, sir?" - -He paused and then suddenly seeing the pistol on the table seized it -with unexpected rapidity and ran out into the corridor. - -Gerasim and the porter, who had followed Makar Alexeevich, stopped -him in the vestibule and tried to take the pistol from him. Pierre, -coming out into the corridor, looked with pity and repulsion at the -half-crazy old man. Makar Alexeevich, frowning with exertion, held -on to the pistol and screamed hoarsely, evidently with some heroic -fancy in his head. - -"To arms! Board them! No, you shan't get it," he yelled. - -"That will do, please, that will do. Have the goodness--please, sir, -to let go! Please, sir..." pleaded Gerasim, trying carefully to -steer Makar Alexeevich by the elbows back to the door. - -"Who are you? Bonaparte!..." shouted Makar Alexeevich. - -"That's not right, sir. Come to your room, please, and rest. Allow -me to have the pistol." - -"Be off, thou base slave! Touch me not! See this?" shouted Makar -Alexeevich, brandishing the pistol. "Board them!" - -"Catch hold!" whispered Gerasim to the porter. - -They seized Makar Alexeevich by the arms and dragged him to the -door. - -The vestibule was filled with the discordant sounds of a struggle -and of a tipsy, hoarse voice. - -Suddenly a fresh sound, a piercing feminine scream, reverberated -from the porch and the cook came running into the vestibule. - -"It's them! Gracious heavens! O Lord, four of them, horsemen!" she -cried. - -Gerasim and the porter let Makar Alexeevich go, and in the now -silent corridor the sound of several hands knocking at the front -door could be heard. - - - - - -CHAPTER XXVIII - - -Pierre, having decided that until he had carried out his design he -would disclose neither his identity nor his knowledge of French, stood -at the half-open door of the corridor, intending to conceal himself as -soon as the French entered. But the French entered and still Pierre -did not retire--an irresistible curiosity kept him there. - -There were two of them. One was an officer--a tall, soldierly, -handsome man--the other evidently a private or an orderly, -sunburned, short, and thin, with sunken cheeks and a dull -expression. The officer walked in front, leaning on a stick and -slightly limping. When he had advanced a few steps he stopped, -having apparently decided that these were good quarters, turned -round to the soldiers standing at the entrance, and in a loud voice of -command ordered them to put up the horses. Having done that, the -officer, lifting his elbow with a smart gesture, stroked his -mustache and lightly touched his hat. - -"Bonjour, la compagnie!"* said he gaily, smiling and looking about -him. - - -*"Good day, everybody!" - - -No one gave any reply. - -"Vous etes le bourgeois?"* the officer asked Gerasim. - - -*"Are you the master here?" - - -Gerasim gazed at the officer with an alarmed and inquiring look. - -"Quartier, quartier, logement!" said the officer, looking down at -the little man with a condescending and good-natured smile. "Les -francais sont de bons enfants. Que diable! Voyons! Ne nous fachons -pas, mon vieux!"* added he, clapping the scared and silent Gerasim -on the shoulder. "Well, does no one speak French in this -establishment?" he asked again in French, looking around and meeting -Pierre's eyes. Pierre moved away from the door. - - -*"Quarters, quarters, lodgings! The French are good fellows. What -the devil! There, don't let us be cross, old fellow!" - - -Again the officer turned to Gerasim and asked him to show him the -rooms in the house. - -"Master, not here--don't understand... me, you..." said Gerasim, -trying to render his words more comprehensible by contorting them. - -Still smiling, the French officer spread out his hands before -Gerasim's nose, intimating that he did not understand him either, -and moved, limping, to the door at which Pierre was standing. Pierre -wished to go away and conceal himself, but at that moment he saw Makar -Alexeevich appearing at the open kitchen door with the pistol in his -hand. With a madman's cunning, Makar Alexeevich eyed the Frenchman, -raised his pistol, and took aim. - -"Board them!" yelled the tipsy man, trying to press the trigger. -Hearing the yell the officer turned round, and at the same moment -Pierre threw himself on the drunkard. Just when Pierre snatched at and -struck up the pistol Makar Alexeevich at last got his fingers on the -trigger, there was a deafening report, and all were enveloped in a -cloud of smoke. The Frenchman turned pale and rushed to the door. - -Forgetting his intention of concealing his knowledge of French, -Pierre, snatching away the pistol and throwing it down, ran up to -the officer and addressed him in French. - -"You are not wounded?" he asked. - -"I think not," answered the Frenchman, feeling himself over. "But -I have had a lucky escape this time," he added, pointing to the -damaged plaster of the wall. "Who is that man?" said he, looking -sternly at Pierre. - -"Oh, I am really in despair at what has occurred," said Pierre -rapidly, quite forgetting the part he had intended to play. "He is -an unfortunate madman who did not know what he was doing." - -The officer went up to Makar Alexeevich and took him by the collar. - -Makar Alexeevich was standing with parted lips, swaying, as if about -to fall asleep, as he leaned against the wall. - -"Brigand! You shall pay for this," said the Frenchman, letting go of -him. "We French are merciful after victory, but we do not pardon -traitors," he added, with a look of gloomy dignity and a fine -energetic gesture. - -Pierre continued, in French, to persuade the officer not to hold -that drunken imbecile to account. The Frenchman listened in silence -with the same gloomy expression, but suddenly turned to Pierre with -a smile. For a few seconds he looked at him in silence. His handsome -face assumed a melodramatically gentle expression and he held out -his hand. - -"You have saved my life. You are French," said he. - -For a Frenchman that deduction was indubitable. Only a Frenchman -could perform a great deed, and to save his life--the life of M. -Ramballe, captain of the 13th Light Regiment--was undoubtedly a very -great deed. - -But however indubitable that conclusion and the officer's conviction -based upon it, Pierre felt it necessary to disillusion him. - -"I am Russian," he said quickly. - -"Tut, tut, tut! Tell that to others," said the officer, waving his -finger before his nose and smiling. "You shall tell me all about -that presently. I am delighted to meet a compatriot. Well, and what -are we to do with this man?" he added, addressing himself to Pierre as -to a brother. - -Even if Pierre were not a Frenchman, having once received that -loftiest of human appellations he could not renounce it, said the -officer's look and tone. In reply to his last question Pierre again -explained who Makar Alexeevich was and how just before their arrival -that drunken imbecile had seized the loaded pistol which they had -not had time to recover from him, and begged the officer to let the -deed go unpunished. - -The Frenchman expanded his chest and made a majestic gesture with -his arm. - -"You have saved my life! You are French. You ask his pardon? I grant -it you. Lead that man away!" said he quickly and energetically, and -taking the arm of Pierre whom he had promoted to be a Frenchman for -saving his life, he went with him into the room. - -The soldiers in the yard, hearing the shot, came into the passage -asking what had happened, and expressed their readiness to punish -the culprits, but the officer sternly checked them. - -"You will be called in when you are wanted," he said. - -The soldiers went out again, and the orderly, who had meanwhile -had time to visit the kitchen, came up to his officer. - -"Captain, there is soup and a leg of mutton in the kitchen," said -he. "Shall I serve them up?" - -"Yes, and some wine," answered the captain. - - - - - -CHAPTER XXIX - - -When the French officer went into the room with Pierre the latter -again thought it his duty to assure him that he was not French and -wished to go away, but the officer would not hear of it. He was so -very polite, amiable, good-natured, and genuinely grateful to Pierre -for saving his life that Pierre had not the heart to refuse, and sat -down with him in the parlor--the first room they entered. To -Pierre's assurances that he was not a Frenchman, the captain, -evidently not understanding how anyone could decline so flattering -an appellation, shrugged his shoulders and said that if Pierre -absolutely insisted on passing for a Russian let it be so, but for all -that he would be forever bound to Pierre by gratitude for saving his -life. - -Had this man been endowed with the slightest capacity for perceiving -the feelings of others, and had he at all understood what Pierre's -feelings were, the latter would probably have left him, but the -man's animated obtuseness to everything other than himself disarmed -Pierre. - -"A Frenchman or a Russian prince incognito," said the officer, -looking at Pierre's fine though dirty linen and at the ring on his -finger. "I owe my life to you and offer you my friendship. A Frenchman -never forgets either an insult or a service. I offer you my -friendship. That is all I can say." - -There was so much good nature and nobility (in the French sense of -the word) in the officer's voice, in the expression of his face and in -his gestures, that Pierre, unconsciously smiling in response to the -Frenchman's smile, pressed the hand held out to him. - -"Captain Ramballe, of the 13th Light Regiment, Chevalier of the -Legion of Honor for the affair on the seventh of September," he -introduced himself, a self-satisfied irrepressible smile puckering his -lips under his mustache. "Will you now be so good as to tell me with -whom I have the honor of conversing so pleasantly, instead of being in -the ambulance with that maniac's bullet in my body?" - -Pierre replied that he could not tell him his name and, blushing, -began to try to invent a name and to say something about his reason -for concealing it, but the Frenchman hastily interrupted him. - -"Oh, please!" said he. "I understand your reasons. You are an -officer... a superior officer perhaps. You have borne arms against us. -That's not my business. I owe you my life. That is enough for me. I am -quite at your service. You belong to the gentry?" he concluded with -a shade of inquiry in his tone. Pierre bent his head. "Your -baptismal name, if you please. That is all I ask. Monsieur Pierre, you -say.... That's all I want to know." - -When the mutton and an omelet had been served and a samovar and -vodka brought, with some wine which the French had taken from a -Russian cellar and brought with them, Ramballe invited Pierre to share -his dinner, and himself began to eat greedily and quickly like a -healthy and hungry man, munching his food rapidly with his strong -teeth, continually smacking his lips, and repeating--"Excellent! -Delicious!" His face grew red and was covered with perspiration. -Pierre was hungry and shared the dinner with pleasure. Morel, the -orderly, brought some hot water in a saucepan and placed a bottle of -claret in it. He also brought a bottle of kvass, taken from the -kitchen for them to try. That beverage was already known to the French -and had been given a special name. They called it limonade de cochon -(pig's lemonade), and Morel spoke well of the limonade de cochon he -had found in the kitchen. But as the captain had the wine they had -taken while passing through Moscow, he left the kvass to Morel and -applied himself to the bottle of Bordeaux. He wrapped the bottle up to -its neck in a table napkin and poured out wine for himself and for -Pierre. The satisfaction of his hunger and the wine rendered the -captain still more lively and he chatted incessantly all through -dinner. - -"Yes, my dear Monsieur Pierre, I owe you a fine votive candle for -saving me from that maniac.... You see, I have bullets enough in my -body already. Here is one I got at Wagram" (he touched his side) -"and a second at Smolensk"--he showed a scar on his cheek--"and this -leg which as you see does not want to march, I got that on the seventh -at the great battle of la Moskowa. Sacre Dieu! It was splendid! That -deluge of fire was worth seeing. It was a tough job you set us -there, my word! You may be proud of it! And on my honor, in spite of -the cough I caught there, I should be ready to begin again. I pity -those who did not see it." - -"I was there," said Pierre. - -"Bah, really? So much the better! You are certainly brave foes. -The great redoubt held out well, by my pipe!" continued the Frenchman. -"And you made us pay dear for it. I was at it three times--sure as I -sit here. Three times we reached the guns and three times we were -thrown back like cardboard figures. Oh, it was beautiful, Monsieur -Pierre! Your grenadiers were splendid, by heaven! I saw them close -up their ranks six times in succession and march as if on parade. Fine -fellows! Our King of Naples, who knows what's what, cried 'Bravo!' Ha, -ha! So you are one of us soldiers!" he added, smiling, after a -momentary pause. "So much the better, so much the better, Monsieur -Pierre! Terrible in battle... gallant... with the fair" (he winked and -smiled), "that's what the French are, Monsieur Pierre, aren't they?" - -The captain was so naively and good-humoredly gay, so real, and so -pleased with himself that Pierre almost winked back as he looked -merrily at him. Probably the word "gallant" turned the captain's -thoughts to the state of Moscow. - -"Apropos, tell me please, is it true that the women have all left -Moscow? What a queer idea! What had they to be afraid of?" - -"Would not the French ladies leave Paris if the Russians entered -it?" asked Pierre. - -"Ha, ha, ha!" The Frenchman emitted a merry, sanguine chuckle, -patting Pierre on the shoulder. "What a thing to say!" he exclaimed. -"Paris?... But Paris, Paris..." - -"Paris--the capital of the world," Pierre finished his remark for -him. - -The captain looked at Pierre. He had a habit of stopping short in -the middle of his talk and gazing intently with his laughing, kindly -eyes. - -"Well, if you hadn't told me you were Russian, I should have wagered -that you were Parisian! You have that... I don't know what, that..." -and having uttered this compliment, he again gazed at him in silence. - -"I have been in Paris. I spent years there," said Pierre. - -"Oh yes, one sees that plainly. Paris!... A man who doesn't know -Paris is a savage. You can tell a Parisian two leagues off. Paris is -Talma, la Duchenois, Potier, the Sorbonne, the boulevards," and -noticing that his conclusion was weaker than what had gone before, -he added quickly: "There is only one Paris in the world. You have been -to Paris and have remained Russian. Well, I don't esteem you the -less for it." - -Under the influence of the wine he had drunk, and after the days -he had spent alone with his depressing thoughts, Pierre -involuntarily enjoyed talking with this cheerful and good-natured man. - -"To return to your ladies--I hear they are lovely. What a wretched -idea to go and bury themselves in the steppes when the French army -is in Moscow. What a chance those girls have missed! Your peasants, -now--that's another thing; but you civilized people, you ought to know -us better than that. We took Vienna, Berlin, Madrid, Naples, Rome, -Warsaw, all the world's capitals.... We are feared, but we are -loved. We are nice to know. And then the Emperor..." he began, but -Pierre interrupted him. - -"The Emperor," Pierre repeated, and his face suddenly became sad and -embarrassed, "is the Emperor...?" - -"The Emperor? He is generosity, mercy, justice, order, genius- -that's what the Emperor is! It is I, Ramballe, who tell you so.... I -assure you I was his enemy eight years ago. My father was an -emigrant count.... But that man has vanquished me. He has taken hold -of me. I could not resist the sight of the grandeur and glory with -which he has covered France. When I understood what he wanted--when -I saw that he was preparing a bed of laurels for us, you know, I -said to myself: 'That is a monarch,' and I devoted myself to him! So -there! Oh yes, mon cher, he is the greatest man of the ages past or -future." - -"Is he in Moscow?" Pierre stammered with a guilty look. - -The Frenchman looked at his guilty face and smiled. - -"No, he will make his entry tomorrow," he replied, and continued his -talk. - -Their conversation was interrupted by the cries of several voices at -the gate and by Morel, who came to say that some Wurttemberg hussars -had come and wanted to put up their horses in the yard where the -captain's horses were. This difficulty had arisen chiefly because -the hussars did not understand what was said to them in French. - -The captain had their senior sergeant called in, and in a stern -voice asked him to what regiment he belonged, who was his commanding -officer, and by what right he allowed himself to claim quarters that -were already occupied. The German who knew little French, answered the -two first questions by giving the names of his regiment and of his -commanding officer, but in reply to the third question which he did -not understand said, introducing broken French into his own German, -that he was the quartermaster of the regiment and his commander had -ordered him to occupy all the houses one after another. Pierre, who -knew German, translated what the German said to the captain and gave -the captain's reply to the Wurttemberg hussar in German. When he had -understood what was said to him, the German submitted and took his men -elsewhere. The captain went out into the porch and gave some orders in -a loud voice. - -When he returned to the room Pierre was sitting in the same place as -before, with his head in his hands. His face expressed suffering. He -really was suffering at that moment. When the captain went out and -he was left alone, suddenly he came to himself and realized the -position he was in. It was not that Moscow had been taken or that -the happy conquerors were masters in it and were patronizing him. -Painful as that was it was not that which tormented Pierre at the -moment. He was tormented by the consciousness of his own weakness. The -few glasses of wine he had drunk and the conversation with this -good-natured man had destroyed the mood of concentrated gloom in which -he had spent the last few days and which was essential for the -execution of his design. The pistol, dagger, and peasant coat were -ready. Napoleon was to enter the town next day. Pierre still -considered that it would be a useful and worthy action to slay the -evildoer, but now he felt that he would not do it. He did not know -why, but he felt a foreboding that he would not carry out his -intention. He struggled against the confession of his weakness but -dimly felt that he could not overcome it and that his former gloomy -frame of mind, concerning vengeance, killing, and self-sacrifice, -had been dispersed like dust by contact with the first man he met. - -The captain returned to the room, limping slightly and whistling a -tune. - -The Frenchman's chatter which had previously amused Pierre now -repelled him. The tune he was whistling, his gait, and the gesture -with which he twirled his mustache, all now seemed offensive. "I -will go away immediately. I won't say another word to him," thought -Pierre. He thought this, but still sat in the same place. A strange -feeling of weakness tied him to the spot; he wished to get up and go -away, but could not do so. - -The captain, on the other hand, seemed very cheerful. He paced up -and down the room twice. His eyes shone and his mustache twitched as -if he were smiling to himself at some amusing thought. - -"The colonel of those Wurttembergers is delightful," he suddenly -said. "He's a German, but a nice fellow all the same.... But he's a -German." He sat down facing Pierre. "By the way, you know German, -then?" - -Pierre looked at him in silence. - -"What is the German for 'shelter'?" - -"Shelter?" Pierre repeated. "The German for shelter is Unterkunft." - -"How do you say it?" the captain asked quickly and doubtfully. - -"Unterkunft," Pierre repeated. - -"Onterkoff," said the captain and looked at Pierre for some -seconds with laughing eyes. "These Germans are first-rate fools, don't -you think so, Monsieur Pierre?" he concluded. - -"Well, let's have another bottle of this Moscow Bordeaux, shall -we? Morel will warm us up another little bottle. Morel!" he called out -gaily. - -Morel brought candles and a bottle of wine. The captain looked at -Pierre by the candlelight and was evidently struck by the troubled -expression on his companion's face. Ramballe, with genuine distress -and sympathy in his face, went up to Pierre and bent over him. - -"There now, we're sad," said he, touching Pierre's hand. "Have I -upset you? No, really, have you anything against me?" he asked Pierre. -"Perhaps it's the state of affairs?" - -Pierre did not answer, but looked cordially into the Frenchman's -eyes whose expression of sympathy was pleasing to him. - -"Honestly, without speaking of what I owe you, I feel friendship for -you. Can I do anything for you? Dispose of me. It is for life and -death. I say it with my hand on my heart!" said he, striking his -chest. - -"Thank you," said Pierre. - -The captain gazed intently at him as he had done when he learned -that "shelter" was Unterkunft in German, and his face suddenly -brightened. - -"Well, in that case, I drink to our friendship!" he cried gaily, -filling two glasses with wine. - -Pierre took one of the glasses and emptied it. Ramballe emptied -his too, again pressed Pierre's hand, and leaned his elbows on the -table in a pensive attitude. - -"Yes, my dear friend," he began, "such is fortune's caprice. Who -would have said that I should be a soldier and a captain of dragoons -in the service of Bonaparte, as we used to call him? Yet here I am -in Moscow with him. I must tell you, mon cher," he continued in the -sad and measured tones of a man who intends to tell a long story, -"that our name is one of the most ancient in France." - -And with a Frenchman's easy and naive frankness the captain told -Pierre the story of his ancestors, his childhood, youth, and -manhood, and all about his relations and his financial and family -affairs, "ma pauvre mere" playing of course an important part in the -story. - -"But all that is only life's setting, the real thing is love- -love! Am I not right, Monsieur Pierre?" said he, growing animated. -"Another glass?" - -Pierre again emptied his glass and poured himself out a third. - -"Oh, women, women!" and the captain, looking with glistening eyes at -Pierre, began talking of love and of his love affairs. - -There were very many of these, as one could easily believe, -looking at the officer's handsome, self-satisfied face, and noting the -eager enthusiasm with which he spoke of women. Though all Ramballe's -love stories had the sensual character which Frenchmen regard as the -special charm and poetry of love, yet he told his story with such -sincere conviction that he alone had experienced and known all the -charm of love and he described women so alluringly that Pierre -listened to him with curiosity. - -It was plain that l'amour which the Frenchman was so fond of was not -that low and simple kind that Pierre had once felt for his wife, nor -was it the romantic love stimulated by himself that he experienced for -Natasha. (Ramballe despised both these kinds of love equally: the -one he considered the "love of clodhoppers" and the other the "love of -simpletons.") L'amour which the Frenchman worshiped consisted -principally in the unnaturalness of his relation to the woman and in a -combination of incongruities giving the chief charm to the feeling. - -Thus the captain touchingly recounted the story of his love for a -fascinating marquise of thirty-five and at the same time for a -charming, innocent child of seventeen, daughter of the bewitching -marquise. The conflict of magnanimity between the mother and the -daughter, ending in the mother's sacrificing herself and offering -her daughter in marriage to her lover, even now agitated the -captain, though it was the memory of a distant past. Then he recounted -an episode in which the husband played the part of the lover, and -he--the lover--assumed the role of the husband, as well as several -droll incidents from his recollections of Germany, where "shelter" -is called Unterkunft and where the husbands eat sauerkraut and the -young girls are "too blonde." - -Finally, the latest episode in Poland still fresh in the captain's -memory, and which he narrated with rapid gestures and glowing face, -was of how he had saved the life of a Pole (in general, the saving -of life continually occurred in the captain's stories) and the Pole -had entrusted to him his enchanting wife (parisienne de coeur) while -himself entering the French service. The captain was happy, the -enchanting Polish lady wished to elope with him, but, prompted by -magnanimity, the captain restored the wife to the husband, saying as -he did so: "I have saved your life, and I save your honor!" Having -repeated these words the captain wiped his eyes and gave himself a -shake, as if driving away the weakness which assailed him at this -touching recollection. - -Listening to the captain's tales, Pierre--as often happens late in -the evening and under the influence of wine--followed all that was -told him, understood it all, and at the same time followed a train -of personal memories which, he knew not why, suddenly arose in his -mind. While listening to these love stories his own love for Natasha -unexpectedly rose to his mind, and going over the pictures of that -love in his imagination he mentally compared them with Ramballe's -tales. Listening to the story of the struggle between love and duty, -Pierre saw before his eyes every minutest detail of his last meeting -with the object of his love at the Sukharev water tower. At the time -of that meeting it had not produced an effect upon him--he had not -even once recalled it. But now it seemed to him that that meeting -had had in it something very important and poetic. - -"Peter Kirilovich, come here! We have recognized you," he now seemed -to hear the words she had uttered and to see before him her eyes, -her smile, her traveling hood, and a stray lock of her hair... and -there seemed to him something pathetic and touching in all this. - -Having finished his tale about the enchanting Polish lady, the -captain asked Pierre if he had ever experienced a similar impulse to -sacrifice himself for love and a feeling of envy of the legitimate -husband. - -Challenged by this question Pierre raised his head and felt a need -to express the thoughts that filled his mind. He began to explain that -he understood love for a women somewhat differently. He said that in -all his life he had loved and still loved only one woman, and that she -could never be his. - -"Tiens!" said the captain. - -Pierre then explained that he had loved this woman from his earliest -years, but that he had not dared to think of her because she was too -young, and because he had been an illegitimate son without a name. -Afterwards when he had received a name and wealth he dared not think -of her because he loved her too well, placing her far above everything -in the world, and especially therefore above himself. - -When he had reached this point, Pierre asked the captain whether -he understood that. - -The captain made a gesture signifying that even if he did not -understand it he begged Pierre to continue. - -"Platonic love, clouds..." he muttered. - -Whether it was the wine he had drunk, or an impulse of frankness, or -the thought that this man did not, and never would, know any of -those who played a part in his story, or whether it was all these -things together, something loosened Pierre's tongue. Speaking -thickly and with a faraway look in his shining eyes, he told the whole -story of his life: his marriage, Natasha's love for his best friend, -her betrayal of him, and all his own simple relations with her. -Urged on by Ramballe's questions he also told what he had at first -concealed--his own position and even his name. - -More than anything else in Pierre's story the captain was -impressed by the fact that Pierre was very rich, had two mansions in -Moscow, and that he had abandoned everything and not left the city, -but remained there concealing his name and station. - -When it was late at night they went out together into the street. -The night was warm and light. To the left of the house on the Pokrovka -a fire glowed--the first of those that were beginning in Moscow. To -the right and high up in the sky was the sickle of the waning moon and -opposite to it hung that bright comet which was connected in -Pierre's heart with his love. At the gate stood Gerasim, the cook, and -two Frenchmen. Their laughter and their mutually incomprehensible -remarks in two languages could be heard. They were looking at the glow -seen in the town. - -There was nothing terrible in the one small, distant fire in the -immense city. - -Gazing at the high starry sky, at the moon, at the comet, and at the -glow from the fire, Pierre experienced a joyful emotion. "There now, -how good it is, what more does one need?" thought he. And suddenly -remembering his intention he grew dizzy and felt so faint that he -leaned against the fence to save himself from falling. - -Without taking leave of his new friend, Pierre left the gate with -unsteady steps and returning to his room lay down on the sofa and -immediately fell asleep. - - - - - -CHAPTER XXX - - -The glow of the first fire that began on the second of September was -watched from the various roads by the fugitive Muscovites and by the -retreating troops, with many different feelings. - -The Rostov party spent the night at Mytishchi, fourteen miles from -Moscow. They had started so late on the first of September, the road -had been so blocked by vehicles and troops, so many things had been -forgotten for which servants were sent back, that they had decided -to spend that night at a place three miles out of Moscow. The next -morning they woke late and were again delayed so often that they -only got as far as Great Mytishchi. At ten o'clock that evening the -Rostov family and the wounded traveling with them were all distributed -in the yards and huts of that large village. The Rostovs' servants and -coachmen and the orderlies of the wounded officers, after attending to -their masters, had supper, fed the horses, and came out into the -porches. - -In a neighboring hut lay Raevski's adjutant with a fractured -wrist. The awful pain he suffered made him moan incessantly and -piteously, and his moaning sounded terrible in the darkness of the -autumn night. He had spent the first night in the same yard as the -Rostovs. The countess said she had been unable to close her eyes on -account of his moaning, and at Mytishchi she moved into a worse hut -simply to be farther away from the wounded man. - -In the darkness of the night one of the servants noticed, above -the high body of a coach standing before the porch, the small glow -of another fire. One glow had long been visible and everybody knew -that it was Little Mytishchi burning--set on fire by Mamonov's -Cossacks. - -"But look here, brothers, there's another fire!" remarked an -orderly. - -All turned their attention to the glow. - -"But they told us Little Mytishchi had been set on fire by Mamonov's -Cossacks." - -"But that's not Mytishchi, it's farther away." - -"Look, it must be in Moscow!" - -Two of the gazers went round to the other side of the coach and -sat down on its steps. - -"It's more to the left, why, Little Mytishchi is over there, and -this is right on the other side." - -Several men joined the first two. - -"See how it's flaring," said one. "That's a fire in Moscow: either -in the Sushchevski or the Rogozhski quarter." - -No one replied to this remark and for some time they all gazed -silently at the spreading flames of the second fire in the distance. - -Old Daniel Terentich, the count's valet (as he was called), came -up to the group and shouted at Mishka. - -"What are you staring at, you good-for-nothing?... The count will be -calling and there's nobody there; go and gather the clothes together." - -"I only ran out to get some water," said Mishka. - -"But what do you think, Daniel Terentich? Doesn't it look as if that -glow were in Moscow?" remarked one of the footmen. - -Daniel Terentich made no reply, and again for a long time they -were all silent. The glow spread, rising and failing, farther and -farther still. - -"God have mercy.... It's windy and dry..." said another voice. - -"Just look! See what it's doing now. O Lord! You can even see the -crows flying. Lord have mercy on us sinners!" - -"They'll put it out, no fear!" - -"Who's to put it out?" Daniel Terentich, who had hitherto been -silent, was heard to say. His voice was calm and deliberate. "Moscow -it is, brothers," said he. "Mother Moscow, the white..." his voice -faltered, and he gave way to an old man's sob. - -And it was as if they had all only waited for this to realize the -significance for them of the glow they were watching. Sighs were -heard, words of prayer, and the sobbing of the count's old valet. - - - - - -CHAPTER XXXI - - -The valet, returning to the cottage, informed the count that -Moscow was burning. The count donned his dressing gown and went out to -look. Sonya and Madame Schoss, who had not yet undressed, went out -with him. Only Natasha and the countess remained in the room. Petya -was no longer with the family, he had gone on with his regiment -which was making for Troitsa. - -The countess, on hearing that Moscow was on fire, began to cry. -Natasha, pale, with a fixed look, was sitting on the bench under the -icons just where she had sat down on arriving and paid no attention to -her father's words. She was listening to the ceaseless moaning of -the adjutant, three houses off. - -"Oh, how terrible," said Sonya returning from the yard chilled and -frightened. "I believe the whole of Moscow will burn, there's an awful -glow! Natasha, do look! You can see it from the window," she said to -her cousin, evidently wishing to distract her mind. - -But Natasha looked at her as if not understanding what was said to -her and again fixed her eyes on the corner of the stove. She had -been in this condition of stupor since the morning, when Sonya, to the -surprise and annoyance of the countess, had for some unaccountable -reason found it necessary to tell Natasha of Prince Andrew's wound and -of his being with their party. The countess had seldom been so angry -with anyone as she was with Sonya. Sonya had cried and begged to be -forgiven and now, as if trying to atone for her fault, paid -unceasing attention to her cousin. - -"Look, Natasha, how dreadfully it is burning!" said she. - -"What's burning?" asked Natasha. "Oh, yes, Moscow." - -And as if in order not to offend Sonya and to get rid of her, she -turned her face to the window, looked out in such a way that it was -evident that she could not see anything, and again settled down in her -former attitude. - -"But you didn't see it!" - -"Yes, really I did," Natasha replied in a voice that pleaded to be -left in peace. - -Both the countess and Sonya understood that, naturally, neither -Moscow nor the burning of Moscow nor anything else could seem of -importance to Natasha. - -The count returned and lay down behind the partition. The countess -went up to her daughter and touched her head with the back of her hand -as she was wont to do when Natasha was ill, then touched her -forehead with her lips as if to feel whether she was feverish, and -finally kissed her. - -"You are cold. You are trembling all over. You'd better lie down," -said the countess. - -"Lie down? All right, I will. I'll lie down at once," said Natasha. - -When Natasha had been told that morning that Prince Andrew was -seriously wounded and was traveling with their party, she had at first -asked many questions: Where was he going? How was he wounded? Was it -serious? And could she see him? But after she had been told that she -could not see him, that he was seriously wounded but that his life was -not in danger, she ceased to ask questions or to speak at all, -evidently disbelieving what they told her, and convinced that say what -she might she would still be told the same. All the way she had sat -motionless in a corner of the coach with wide open eyes, and the -expression in them which the countess knew so well and feared so much, -and now she sat in the same way on the bench where she had seated -herself on arriving. She was planning something and either deciding or -had already decided something in her mind. The countess knew this, but -what it might be she did not know, and this alarmed and tormented her. - -"Natasha, undress, darling; lie down on my bed." - -A bed had been made on a bedstead for the countess only. Madame -Schoss and the two girls were to sleep on some hay on the floor. - -"No, Mamma, I will lie down here on the floor," Natasha replied -irritably and she went to the window and opened it. Through the open -window the moans of the adjutant could be heard more distinctly. She -put her head out into the damp night air, and the countess saw her -slim neck shaking with sobs and throbbing against the window frame. -Natasha knew it was not Prince Andrew who was moaning. She knew Prince -Andrew was in the same yard as themselves and in a part of the hut -across the passage; but this dreadful incessant moaning made her -sob. The countess exchanged a look with Sonya. - -"Lie down, darling; lie down, my pet," said the countess, softly -touching Natasha's shoulders. "Come, lie down." - -"Oh, yes... I'll lie down at once," said Natasha, and began -hurriedly undressing, tugging at the tapes of her petticoat. - -When she had thrown off her dress and put on a dressing jacket, -she sat down with her foot under her on the bed that had been made -up on the floor, jerked her thin and rather short plait of hair to the -front, and began replaiting it. Her long, thin, practiced fingers -rapidly unplaited, replaited, and tied up her plait. Her head moved -from side to side from habit, but her eyes, feverishly wide, looked -fixedly before her. When her toilet for the night was finished she -sank gently onto the sheet spread over the hay on the side nearest the -door. - -"Natasha, you'd better lie in the middle," said Sonya. - -"I'll stay here," muttered Natasha. "Do lie down," she added -crossly, and buried her face in the pillow. - -The countess, Madame Schoss, and Sonya undressed hastily and lay -down. The small lamp in front of the icons was the only light left -in the room. But in the yard there was a light from the fire at Little -Mytishchi a mile and a half away, and through the night came the noise -of people shouting at a tavern Mamonov's Cossacks had set up across -the street, and the adjutant's unceasing moans could still be heard. - -For a long time Natasha listened attentively to the sounds that -reached her from inside and outside the room and did not move. First -she heard her mother praying and sighing and the creaking of her bed -under her, then Madame Schoss' familiar whistling snore and Sonya's -gentle breathing. Then the countess called to Natasha. Natasha did not -answer. - -"I think she's asleep, Mamma," said Sonya softly. - -After short silence the countess spoke again but this time no one -replied. - -Soon after that Natasha heard her mother's even breathing. Natasha -did not move, though her little bare foot, thrust out from under the -quilt, was growing cold on the bare floor. - -As if to celebrate a victory over everybody, a cricket chirped in -a crack in the wall. A cock crowed far off and another replied near -by. The shouting in the tavern had died down; only the moaning of -the adjutant was heard. Natasha sat up. - -"Sonya, are you asleep? Mamma?" she whispered. - -No one replied. Natasha rose slowly and carefully, crossed -herself, and stepped cautiously on the cold and dirty floor with her -slim, supple, bare feet. The boards of the floor creaked. Stepping -cautiously from one foot to the other she ran like a kitten the few -steps to the door and grasped the cold door handle. - -It seemed to her that something heavy was beating rhythmically -against all the walls of the room: it was her own heart, sinking -with alarm and terror and overflowing with love. - -She opened the door and stepped across the threshold and onto the -cold, damp earthen floor of the passage. The cold she felt refreshed -her. With her bare feet she touched a sleeping man, stepped over -him, and opened the door into the part of the hut where Prince -Andrew lay. It was dark in there. In the farthest corner, on a bench -beside a bed on which something was lying, stood a tallow candle -with a long, thick, and smoldering wick. - -From the moment she had been told that of Prince Andrew's wound -and his presence there, Natasha had resolved to see him. She did not -know why she had to, she knew the meeting would be painful, but felt -the more convinced that it was necessary. - -All day she had lived only in hope of seeing him that night. But now -that the moment had come she was filled with dread of what she might -see. How was he maimed? What was left of him? Was he like that -incessant moaning of the adjutant's? Yes, he was altogether like that. -In her imagination he was that terrible moaning personified. When -she saw an indistinct shape in the corner, and mistook his knees -raised under the quilt for his shoulders, she imagined a horrible body -there, and stood still in terror. But an irresistible impulse drew her -forward. She cautiously took one step and then another, and found -herself in the middle of a small room containing baggage. Another man- -Timokhin--was lying in a corner on the benches beneath the icons, -and two others--the doctor and a valet--lay on the floor. - -The valet sat up and whispered something. Timokhin, kept awake by -the pain in his wounded leg, gazed with wide-open eyes at this strange -apparition of a girl in a white chemise, dressing jacket, and -nightcap. The valet's sleepy, frightened exclamation, "What do you -want? What's the matter?" made Natasha approach more swiftly to what -was lying in the corner. Horribly unlike a man as that body looked, -she must see him. She passed the valet, the snuff fell from the candle -wick, and she saw Prince Andrew clearly with his arms outside the -quilt, and such as she had always seen him. - -He was the same as ever, but the feverish color of his face, his -glittering eyes rapturously turned toward her, and especially his -neck, delicate as a child's, revealed by the turn-down collar of his -shirt, gave him a peculiarly innocent, childlike look, such as she had -never seen on him before. She went up to him and with a swift, -flexible, youthful movement dropped on her knees. - -He smiled and held out his hand to her. - - - - - -CHAPTER XXXII - - -Seven days had passed since Prince Andrew found himself in the -ambulance station on the field of Borodino. His feverish state and the -inflammation of his bowels, which were injured, were in the doctor's - -opinion sure to carry him off. But on the seventh day he ate with -pleasure a piece of bread with some tea, and the doctor noticed that -his temperature was lower. He had regained consciousness that morning. -The first night after they left Moscow had been fairly warm and he had -remained in the caleche, but at Mytishchi the wounded man himself -asked to be taken out and given some tea. The pain caused by his -removal into the hut had made him groan aloud and again lose -consciousness. When he had been placed on his camp bed he lay for a -long time motionless with closed eyes. Then he opened them and -whispered softly: "And the tea?" His remembering such a small detail -of everyday life astonished the doctor. He felt Prince Andrew's pulse, -and to his surprise and dissatisfaction found it had improved. He -was dissatisfied because he knew by experience that if his patient did -not die now, he would do so a little later with greater suffering. -Timokhin, the red-nosed major of Prince Andrew's regiment, had -joined him in Moscow and was being taken along with him, having been -wounded in the leg at the battle of Borodino. They were accompanied by -a doctor, Prince Andrew's valet, his coachman, and two orderlies. - -They gave Prince Andrew some tea. He drank it eagerly, looking -with feverish eyes at the door in front of him as if trying to -understand and remember something. - -"I don't want any more. Is Timokhin here?" he asked. - -Timokhin crept along the bench to him. - -"I am here, your excellency." - -"How's your wound?" - -"Mine, sir? All right. But how about you?" - -Prince Andrew again pondered as if trying to remember something. - -"Couldn't one get a book?" he asked. - -"What book?" - -"The Gospels. I haven't one." - -The doctor promised to procure it for him and began to ask how he -was feeling. Prince Andrew answered all his questions reluctantly -but reasonably, and then said he wanted a bolster placed under him -as he was uncomfortable and in great pain. The doctor and valet lifted -the cloak with which he was covered and, making wry faces at the -noisome smell of mortifying flesh that came from the wound, began -examining that dreadful place. The doctor was very much displeased -about something and made a change in the dressings, turning the -wounded man over so that he groaned again and grew unconscious and -delirious from the agony. He kept asking them to get him the book -and put it under him. - -"What trouble would it be to you?" he said. "I have not got one. -Please get it for me and put it under for a moment," he pleaded in a -piteous voice. - -The doctor went into the passage to wash his hands. - -"You fellows have no conscience," said he to the valet who was -pouring water over his hands. "For just one moment I didn't look after -you... It's such pain, you know, that I wonder how he can bear it." - -"By the Lord Jesus Christ, I thought we had put something under -him!" said the valet. - -The first time Prince Andrew understood where he was and what was -the matter with him and remembered being wounded and how was when he -asked to be carried into the hut after his caleche had stopped at -Mytishchi. After growing confused from pain while being carried into -the hut he again regained consciousness, and while drinking tea once -more recalled all that had happened to him, and above all vividly -remembered the moment at the ambulance station when, at the sight of -the sufferings of a man he disliked, those new thoughts had come to -him which promised him happiness. And those thoughts, though now vague -and indefinite, again possessed his soul. He remembered that he had -now a new source of happiness and that this happiness had something to -do with the Gospels. That was why he asked for a copy of them. The -uncomfortable position in which they had put him and turned him over -again confused his thoughts, and when he came to himself a third -time it was in the complete stillness of the night. Everybody near him -was sleeping. A cricket chirped from across the passage; someone was -shouting and singing in the street; cockroaches rustled on the -table, on the icons, and on the walls, and a big fly flopped at the -head of the bed and around the candle beside him, the wick of which -was charred and had shaped itself like a mushroom. - -His mind was not in a normal state. A healthy man usually thinks of, -feels, and remembers innumerable things simultaneously, but has the -power and will to select one sequence of thoughts or events on which -to fix his whole attention. A healthy man can tear himself away from -the deepest reflections to say a civil word to someone who comes in -and can then return again to his own thoughts. But Prince Andrew's -mind was not in a normal state in that respect. All the powers of -his mind were more active and clearer than ever, but they acted -apart from his will. Most diverse thoughts and images occupied him -simultaneously. At times his brain suddenly began to work with a -vigor, clearness, and depth it had never reached when he was in -health, but suddenly in the midst of its work it would turn to some -unexpected idea and he had not the strength to turn it back again. - -"Yes, a new happiness was revealed to me of which man cannot be -deprived," he thought as he lay in the semi-darkness of the quiet hut, -gazing fixedly before him with feverish wide open eyes. "A happiness -lying beyond material forces, outside the material influences that act -on man--a happiness of the soul alone, the happiness of loving. -Every man can understand it, but to conceive it and enjoin it was -possible only for God. But how did God enjoin that law? And why was -the Son...?" - -And suddenly the sequence of these thoughts broke off, and Prince -Andrew heard (without knowing whether it was a delusion or reality) -a soft whispering voice incessantly and rhythmically repeating -"piti-piti-piti," and then "titi," and then again "piti-piti-piti," -and "ti-ti" once more. At the same time he felt that above his face, -above the very middle of it, some strange airy structure was being -erected out of slender needles or splinters, to the sound of this -whispered music. He felt that he had to balance carefully (though it -was difficult) so that this airy structure should not collapse; but -nevertheless it kept collapsing and again slowly rising to the sound -of whispered rhythmic music--"it stretches, stretches, spreading out -and stretching," said Prince Andrew to himself. While listening to -this whispering and feeling the sensation of this drawing out and -the construction of this edifice of needles, he also saw by glimpses a -red halo round the candle, and heard the rustle of the cockroaches and -the buzzing of the fly that flopped against his pillow and his face. -Each time the fly touched his face it gave him a burning sensation and -yet to his surprise it did not destroy the structure, though it -knocked against the very region of his face where it was rising. But -besides this there was something else of importance. It was -something white by the door--the statue of a sphinx, which also -oppressed him. - -"But perhaps that's my shirt on the table," he thought, "and -that's my legs, and that is the door, but why is it always -stretching and drawing itself out, and 'piti-piti-piti' and 'ti-ti' -and 'piti-piti-piti'...? That's enough, please leave off!" Prince -Andrew painfully entreated someone. And suddenly thoughts and feelings -again swam to the surface of his mind with peculiar clearness and -force. - -"Yes--love," he thought again quite clearly. "But not love which -loves for something, for some quality, for some purpose, or for some -reason, but the love which I--while dying--first experienced when I -saw my enemy and yet loved him. I experienced that feeling of love -which is the very essence of the soul and does not require an -object. Now again I feel that bliss. To love one's neighbors, to -love one's enemies, to love everything, to love God in all His -manifestations. It is possible to love someone dear to you with -human love, but an enemy can only be loved by divine love. That is why -I experienced such joy when I felt that I loved that man. What has -become of him? Is he alive?... - -"When loving with human love one may pass from love to hatred, but -divine love cannot change. No, neither death nor anything else can -destroy it. It is the very essence of the soul. Yet how many people -have I hated in my life? And of them all, I loved and hated none as -I did her." And he vividly pictured to himself Natasha, not as he -had done in the past with nothing but her charms which gave him -delight, but for the first time picturing to himself her soul. And -he understood her feelings, her sufferings, shame, and remorse. He now -understood for the first time all the cruelty of his rejection of her, -the cruelty of his rupture with her. "If only it were possible for -me to see her once more! Just once, looking into those eyes to say..." - - -"Piti-piti-piti and ti-ti and piti-piti-piti boom!" flopped the -fly... And his attention was suddenly carried into another world, a -world of reality and delirium in which something particular was -happening. In that world some structure was still being erected and -did not fall, something was still stretching out, and the candle -with its red halo was still burning, and the same shirtlike sphinx lay -near the door; but besides all this something creaked, there was a -whiff of fresh air, and a new white sphinx appeared, standing at the -door. And that sphinx had the pale face and shining eyes of the very -Natasha of whom he had just been thinking. - -"Oh, how oppressive this continual delirium is," thought Prince -Andrew, trying to drive that face from his imagination. But the face -remained before him with the force of reality and drew nearer. -Prince Andrew wished to return that former world of pure thought, -but he could not, and delirium drew him back into its domain. The soft -whispering voice continued its rhythmic murmur, something oppressed -him and stretched out, and the strange face was before him. Prince -Andrew collected all his strength in an effort to recover his -senses, he moved a little, and suddenly there was a ringing in his -ears, a dimness in his eyes, and like a man plunged into water he lost -consciousness. When he came to himself, Natasha, that same living -Natasha whom of all people he most longed to love with this new pure -divine love that had been revealed to him, was kneeling before him. He -realized that it was the real living Natasha, and he was not surprised -but quietly happy. Natasha, motionless on her knees (she was unable to -stir), with frightened eyes riveted on him, was restraining her -sobs. Her face was pale and rigid. Only in the lower part of it -something quivered. - -Prince Andrew sighed with relief, smiled, and held out his hand. - -"You?" he said. "How fortunate!" - -With a rapid but careful movement Natasha drew nearer to him on -her knees and, taking his hand carefully, bent her face over it and -began kissing it, just touching it lightly with her lips. - -"Forgive me!" she whispered, raising her head and glancing at him. -"Forgive me!" - -"I love you," said Prince Andrew. - -"Forgive...!" - -"Forgive what?" he asked. - -"Forgive me for what I ha-ve do-ne!" faltered Natasha in a -scarcely audible, broken whisper, and began kissing his hand more -rapidly, just touching it with her lips. - -"I love you more, better than before," said Prince Andrew, lifting -her face with his hand so as to look into her eyes. - -Those eyes, filled with happy tears, gazed at him timidly, -compassionately, and with joyous love. Natasha's thin pale face, -with its swollen lips, was more than plain--it was dreadful. But -Prince Andrew did not see that, he saw her shining eyes which were -beautiful. They heard the sound of voices behind them. - -Peter the valet, who was now wide awake, had roused the doctor. -Timokhin, who had not slept at all because of the pain in his leg, had -long been watching all that was going on, carefully covering his -bare body with the sheet as he huddled up on his bench. - -"What's this?" said the doctor, rising from his bed. "Please go -away, madam!" - -At that moment a maid sent by the countess, who had noticed her -daughter's absence, knocked at the door. - -Like a somnambulist aroused from her sleep Natasha went out of the -room and, returning to her hut, fell sobbing on her bed. - - -From that time, during all the rest of the Rostovs' journey, at -every halting place and wherever they spent a night, Natasha never -left the wounded Bolkonski, and the doctor had to admit that he had -not expected from a young girl either such firmness or such skill in -nursing a wounded man. - -Dreadful as the countess imagined it would be should Prince Andrew -die in her daughter's arms during the journey--as, judging by what the -doctor said, it seemed might easily happen--she could not oppose -Natasha. Though with the intimacy now established between the -wounded man and Natasha the thought occurred that should he recover -their former engagement would be renewed, no one--least of all Natasha -and Prince Andrew--spoke of this: the unsettled question of life and -death, which hung not only over Bolkonski but over all Russia, shut -out all other considerations. - - - - - -CHAPTER XXXIII - - -On the third of September Pierre awoke late. His head was aching, -the clothes in which he had slept without undressing felt -uncomfortable on his body, and his mind had a dim consciousness of -something shameful he had done the day before. That something shameful -was his yesterday's conversation with Captain Ramballe. - -It was eleven by the clock, but it seemed peculiarly dark out of -doors. Pierre rose, rubbed his eyes, and seeing the pistol with an -engraved stock which Gerasim had replaced on the writing table, he -remembered where he was and what lay before him that very day. - -"Am I not too late?" he thought. "No, probably he won't make his -entry into Moscow before noon." - -Pierre did not allow himself to reflect on what lay before him, -but hastened to act. - -After arranging his clothes, he took the pistol and was about to -go out. But it then occurred to him for the first time that he -certainly could not carry the weapon in his hand through the -streets. It was difficult to hide such a big pistol even under his -wide coat. He could not carry it unnoticed in his belt or under his -arm. Besides, it had been discharged, and he had not had time to -reload it. "No matter, dagger will do," he said to himself, though -when planning his design he had more than once come to the -conclusion that the chief mistake made by the student in 1809 had been -to try to kill Napoleon with a dagger. But as his chief aim -consisted not in carrying out his design, but in proving to himself -that he would not abandon his intention and was doing all he could -to achieve it, Pierre hastily took the blunt jagged dagger in a -green sheath which he had bought at the Sukharev market with the -pistol, and hid it under his waistcoat. - -Having tied a girdle over his coat and pulled his cap low on his -head, Pierre went down the corridor, trying to avoid making a noise or -meeting the captain, and passed out into the street. - -The conflagration, at which he had looked with so much -indifference the evening before, had greatly increased during the -night. Moscow was on fire in several places. The buildings in Carriage -Row, across the river, in the Bazaar and the Povarskoy, as well as the -barges on the Moskva River and the timber yards by the Dorogomilov -Bridge, were all ablaze. - -Pierre's way led through side streets to the Povarskoy and from -there to the church of St. Nicholas on the Arbat, where he had long -before decided that the deed should should be done. The gates of -most of the houses were locked and the shutters up. The streets and -lanes were deserted. The air was full of smoke and the smell of -burning. Now and then he met Russians with anxious and timid faces, -and Frenchmen with an air not of the city but of the camp, walking -in the middle of the streets. Both the Russians and the French -looked at Pierre with surprise. Besides his height and stoutness, -and the strange morose look of suffering in his face and whole figure, -the Russians stared at Pierre because they could not make out to -what class he could belong. The French followed him with -astonishment in their eyes chiefly because Pierre, unlike all the -other Russians who gazed at the French with fear and curiosity, paid -no attention to them. At the gate of one house three Frenchmen, who -were explaining something to some Russians who did not understand -them, stopped Pierre asking if he did not know French. - -Pierre shook his head and went on. In another side street a sentinel -standing beside a green caisson shouted at him, but only when the -shout was threateningly repeated and he heard the click of the man's -musket as he raised it did Pierre understand that he had to pass on -the other side of the street. He heard nothing and saw nothing of what -went on around him. He carried his resolution within himself in terror -and haste, like something dreadful and alien to him, for, after the -previous night's experience, he was afraid of losing it. But he was -not destined to bring his mood safely to his destination. And even had -he not been hindered by anything on the way, his intention could not -now have been carried out, for Napoleon had passed the Arbat more than -four hours previously on his way from the Dorogomilov suburb to the -Kremlin, and was now sitting in a very gloomy frame of mind in a royal -study in the Kremlin, giving detailed and exact orders as to -measures to be taken immediately to extinguish the fire, to prevent -looting, and to reassure the inhabitants. But Pierre did not know -this; he was entirely absorbed in what lay before him, and was -tortured--as those are who obstinately undertake a task that is -impossible for them not because of its difficulty but because of its -incompatibility with their natures--by the fear of weakening at the -decisive moment and so losing his self-esteem. - -Though he heard and saw nothing around him he found his way by -instinct and did not go wrong in the side streets that led to the -Povarskoy. - -As Pierre approached that street the smoke became denser and denser- -he even felt the heat of the fire. Occasionally curly tongues of flame -rose from under the roofs of the houses. He met more people in the -streets and they were more excited. But Pierre, though he felt that -something unusual was happening around him, did not realize that he -was approaching the fire. As he was going along a foot path across a -wide-open space adjoining the Povarskoy on one side and the gardens of -Prince Gruzinski's house on the other, Pierre suddenly heard the -desperate weeping of a woman close to him. He stopped as if -awakening from a dream and lifted his head. - -By the side of the path, on the dusty dry grass, all sorts of -household goods lay in a heap: featherbeds, a samovar, icons, and -trunks. On the ground, beside the trunks, sat a thin woman no longer -young, with long, prominent upper teeth, and wearing a black cloak and -cap. This woman, swaying to and fro and muttering something, was -choking with sobs. Two girls of about ten and twelve, dressed in dirty -short frocks and cloaks, were staring at their mother with a look of -stupefaction on their pale frightened faces. The youngest child, a boy -of about seven, who wore an overcoat and an immense cap evidently -not his own, was crying in his old nurse's arms. A dirty, barefooted -maid was sitting on a trunk, and, having undone her pale-colored -plait, was pulling it straight and sniffing at her singed hair. The -woman's husband, a short, round-shouldered man in the undress -uniform of a civilian official, with sausage-shaped whiskers and -showing under his square-set cap the hair smoothly brushed forward -over his temples, with expressionless face was moving the trunks, -which were placed one on another, and was dragging some garments -from under them. - -As soon as she saw Pierre, the woman almost threw herself at his -feet. - -"Dear people, good Christians, save me, help me, dear friends... -help us, somebody," she muttered between her sobs. "My girl... My -daughter! My youngest daughter is left behind. She's burned! Ooh! -Was it for this I nursed you.... Ooh!" - -"Don't, Mary Nikolievna!" said her husband to her in a low voice, -evidently only to justify himself before the stranger. "Sister must -have taken her, or else where can she be?" he added. - -"Monster! Villain!" shouted the woman angrily, suddenly ceasing to -weep. "You have no heart, you don't feel for your own child! Another -man would have rescued her from the fire. But this is a monster and -neither a man nor a father! You, honored sir, are a noble man," she -went on, addressing Pierre rapidly between her sobs. "The fire broke -out alongside, and blew our way, the maid called out 'Fire!' and we -rushed to collect our things. We ran out just as we were.... This is -what we have brought away.... The icons, and my dowry bed, all the -rest is lost. We seized the children. But not Katie! Ooh! O -Lord!..." and again she began to sob. "My child, my dear one! -Burned, burned!" - -"But where was she left?" asked Pierre. - -From the expression of his animated face the woman saw that this man -might help her. - -"Oh, dear sir!" she cried, seizing him by the legs. "My -benefactor, set my heart at ease.... Aniska, go, you horrid girl, show -him the way!" she cried to the maid, angrily opening her mouth and -still farther exposing her long teeth. - -"Show me the way, show me, I... I'll do it," gasped Pierre rapidly. - -The dirty maidservant stepped from behind the trunk, put up her -plait, sighed, and went on her short, bare feet along the path. Pierre -felt as if he had come back to life after a heavy swoon. He held his -head higher, his eyes shone with the light of life, and with swift -steps he followed the maid, overtook her, and came out on the -Povarskoy. The whole street was full of clouds of black smoke. Tongues -of flame here and there broke through that cloud. A great number of -people crowded in front of the conflagration. In the middle of the -street stood a French general saying something to those around him. -Pierre, accompanied by the maid, was advancing to the spot where the -general stood, but the French soldiers stopped him. - -"On ne passe pas!"* cried a voice. - - -*"You can't pass! - - -"This way, uncle," cried the girl. "We'll pass through the side -street, by the Nikulins'!" - -Pierre turned back, giving a spring now and then to keep up with -her. She ran across the street, turned down a side street to the left, -and, passing three houses, turned into a yard on the right. - -"It's here, close by," said she and, running across the yard, opened -a gate in a wooden fence and, stopping, pointed out to him a small -wooden wing of the house, which was burning brightly and fiercely. One -of its sides had fallen in, another was on fire, and bright flames -issued from the openings of the windows and from under the roof. - -As Pierre passed through the fence gate, he was enveloped by hot air -and involuntarily stopped. - -"Which is it? Which is your house?" he asked. - -"Ooh!" wailed the girl, pointing to the wing. "That's it, that was -our lodging. You've burned to death, our treasure, Katie, my -precious little missy! Ooh!" lamented Aniska, who at the sight of -the fire felt that she too must give expression to her feelings. - -Pierre rushed to the wing, but the heat was so great that he -involuntarily passed round in a curve and came upon the large house -that was as yet burning only at one end, just below the roof, and -around which swarmed a crowd of Frenchmen. At first Pierre did not -realize what these men, who were dragging something out, were about; -but seeing before him a Frenchman hitting a peasant with a blunt saber -and trying to take from him a fox-fur coat, he vaguely understood that -looting was going on there, but he had no time to dwell on that idea. - -The sounds of crackling and the din of falling walls and ceilings, -the whistle and hiss of the flames, the excited shouts of the -people, and the sight of the swaying smoke, now gathering into thick -black clouds and now soaring up with glittering sparks, with here -and there dense sheaves of flame (now red and now like golden fish -scales creeping along the walls), and the heat and smoke and -rapidity of motion, produced on Pierre the usual animating effects -of a conflagration. It had a peculiarly strong effect on him because -at the sight of the fire he felt himself suddenly freed from the ideas -that had weighed him down. He felt young, bright, adroit, and -resolute. He ran round to the other side of the lodge and was about to -dash into that part of it which was still standing, when just above -his head he heard several voices shouting and then a cracking sound -and the ring of something heavy falling close beside him. - -Pierre looked up and saw at a window of the large house some -Frenchmen who had just thrown out the drawer of a chest, filled with -metal articles. Other French soldiers standing below went up to the -drawer. - -"What does this fellow want?" shouted one of them referring to -Pierre. - -"There's a child in that house. Haven't you seen a child?" cried -Pierre. - -"What's he talking about? Get along!" said several voices, and one -of the soldiers, evidently afraid that Pierre might want to take -from them some of the plate and bronzes that were in the drawer, moved -threateningly toward him. - -"A child?" shouted a Frenchman from above. "I did hear something -squealing in the garden. Perhaps it's his brat that the fellow is -looking for. After all, one must be human, you know...." - -"Where is it? Where?" said Pierre. - -"There! There!" shouted the Frenchman at the window, pointing to the -garden at the back of the house. "Wait a bit--I'm coming down." - -And a minute or two later the Frenchman, a black-eyed fellow with -a spot on his cheek, in shirt sleeves, really did jump out of a window -on the ground floor, and clapping Pierre on the shoulder ran with -him into the garden. - -"Hurry up, you others!" he called out to his comrades. "It's getting -hot." - -When they reached a gravel path behind the house the Frenchman -pulled Pierre by the arm and pointed to a round, graveled space -where a three-year-old girl in a pink dress was lying under a seat. - -"There is your child! Oh, a girl, so much the better!" said the -Frenchman. "Good-by, Fatty. We must be human, we are all mortal you -know!" and the Frenchman with the spot on his cheek ran back to his -comrades. - -Breathless with joy, Pierre ran to the little girl and was going -to take her in his arms. But seeing a stranger the sickly, -scrofulous-looking child, unattractively like her mother, began to -yell and run away. Pierre, however, seized her and lifted her in his -arms. She screamed desperately and angrily and tried with her little -hands to pull Pierre's hands away and to bite them with her slobbering -mouth. Pierre was seized by a sense of horror and repulsion such as he -had experienced when touching some nasty little animal. But he made an -effort not to throw the child down and ran with her to the large -house. It was now, however, impossible to get back the way he had -come; the maid, Aniska, was no longer there, and Pierre with a feeling -of pity and disgust pressed the wet, painfully sobbing child to -himself as tenderly as he could and ran with her through the garden -seeking another way out. - - - - - -CHAPTER XXXIV - - -Having run through different yards and side streets, Pierre got back -with his little burden to the Gruzinski garden at the corner of the -Povarskoy. He did not at first recognize the place from which he had -set out to look for the child, so crowded was it now with people and -goods that had been dragged out of the houses. Besides Russian -families who had taken refuge here from the fire with their -belongings, there were several French soldiers in a variety of -clothing. Pierre took no notice of them. He hurried to find the family -of that civil servant in order to restore the daughter to her mother -and go to save someone else. Pierre felt that he had still much to -do and to do quickly. Glowing with the heat and from running, he -felt at that moment more strongly than ever the sense of youth, -animation, and determination that had come on him when he ran to -save the child. She had now become quiet and, clinging with her little -hands to Pierre's coat, sat on his arm gazing about her like some -little wild animal. He glanced at her occasionally with a slight -smile. He fancied he saw something pathetically innocent in that -frightened, sickly little face. - -He did not find the civil servant or his wife where he had left -them. He walked among the crowd with rapid steps, scanning the various -faces he met. Involuntarily he noticed a Georgian or Armenian family -consisting of a very handsome old man of Oriental type, wearing a new, -cloth-covered, sheepskin coat and new boots, an old woman of similar -type, and a young woman. That very young woman seemed to Pierre the -perfection of Oriental beauty, with her sharply outlined, arched, -black eyebrows and the extraordinarily soft, bright color of her long, -beautiful, expressionless face. Amid the scattered property and the -crowd on the open space, she, in her rich satin cloak with a bright -lilac shawl on her head, suggested a delicate exotic plant thrown -out onto the snow. She was sitting on some bundles a little behind the -old woman, and looked from under her long lashes with motionless, -large, almond-shaped eyes at the ground before her. Evidently she -was aware of her beauty and fearful because of it. Her face struck -Pierre and, hurrying along by the fence, he turned several times to -look at her. When he had reached the fence, still without finding -those he sought, he stopped and looked about him. - -With the child in his arms his figure was now more conspicuous -than before, and a group of Russians, both men and women, gathered -about him. - -"Have you lost anyone, my dear fellow? You're of the gentry -yourself, aren't you? Whose child is it?" they asked him. - -Pierre replied that the child belonged to a woman in a black coat -who had been sitting there with her other children, and he asked -whether anyone knew where she had gone. - -"Why, that must be the Anferovs," said an old deacon, addressing a -pockmarked peasant woman. "Lord have mercy, Lord have mercy!" he added -in his customary bass. - -"The Anferovs? No," said the woman. "They left in the morning. -That must be either Mary Nikolievna's or the Ivanovs'!" - -"He says 'a woman,' and Mary Nikolievna is a lady," remarked a house -serf. - -"Do you know her? She's thin, with long teeth," said Pierre. - -"That's Mary Nikolievna! They went inside the garden when these -wolves swooped down," said the woman, pointing to the French soldiers. - -"O Lord, have mercy!" added the deacon. - -"Go over that way, they're there. It's she! She kept on lamenting -and crying," continued the woman. "It's she. Here, this way!" - -But Pierre was not listening to the woman. He had for some seconds -been intently watching what was going on a few steps away. He was -looking at the Armenian family and at two French soldiers who had gone -up to them. One of these, a nimble little man, was wearing a blue coat -tied round the waist with a rope. He had a nightcap on his head and -his feet were bare. The other, whose appearance particularly struck -Pierre, was a long, lank, round-shouldered, fair-haired man, slow in -his movements and with an idiotic expression of face. He wore a -woman's loose gown of frieze, blue trousers, and large torn Hessian -boots. The little barefooted Frenchman in the blue coat went up to the -Armenians and, saying something, immediately seized the old man by his -legs and the old man at once began pulling off his boots. The other in -the frieze gown stopped in front of the beautiful Armenian girl and -with his hands in his pockets stood staring at her, motionless and -silent. - -"Here, take the child!" said Pierre peremptorily and hurriedly to -the woman, handing the little girl to her. "Give her back to them, -give her back!" he almost shouted, putting the child, who began -screaming, on the ground, and again looking at the Frenchman and the -Armenian family. - -The old man was already sitting barefoot. The little Frenchman had -secured his second boot and was slapping one boot against the other. -The old man was saying something in a voice broken by sobs, but Pierre -caught but a glimpse of this, his whole attention was directed to -the Frenchman in the frieze gown who meanwhile, swaying slowly from -side to side, had drawn nearer to the young woman and taking his hands -from his pockets had seized her by the neck. - -The beautiful Armenian still sat motionless and in the same -attitude, with her long lashes drooping as if she did not see or -feel what the soldier was doing to her. - -While Pierre was running the few steps that separated him from the -Frenchman, the tall marauder in the frieze gown was already tearing -from her neck the necklace the young Armenian was wearing, and the -young woman, clutching at her neck, screamed piercingly. - -"Let that woman alone!" exclaimed Pierre hoarsely in a furious -voice, seizing the soldier by his round shoulders and throwing him -aside. - -The soldier fell, got up, and ran away. But his comrade, throwing -down the boots and drawing his sword, moved threateningly toward -Pierre. - -"Voyons, Pas de betises!"* he cried. - - -*"Look here, no nonsense!" - - -Pierre was in such a transport of rage that he remembered nothing -and his strength increased tenfold. He rushed at the barefooted -Frenchman and, before the latter had time to draw his sword, knocked -him off his feet and hammered him with his fists. Shouts of approval -were heard from the crowd around, and at the same moment a mounted -patrol of French Uhlans appeared from round the corner. The Uhlans -came up at a trot to Pierre and the Frenchman and surrounded them. -Pierre remembered nothing of what happened after that. He only -remembered beating someone and being beaten and finally feeling that -his hands were bound and that a crowd of French soldiers stood -around him and were searching him. - -"Lieutenant, he has a dagger," were the first words Pierre -understood. - -"Ah, a weapon?" said the officer and turned to the barefooted -soldier who had been arrested with Pierre. "All right, you can tell -all about it at the court-martial." Then he turned to Pierre. "Do -you speak French?" - -Pierre looked around him with bloodshot eyes and did not reply. -His face probably looked very terrible, for the officer said something -in a whisper and four more Uhlans left the ranks and placed themselves -on both sides of Pierre. - -"Do you speak French?" the officer asked again, keeping at a -distance from Pierre. "Call the interpreter." - -A little man in Russian civilian clothes rode out from the ranks, -and by his clothes and manner of speaking Pierre at once knew him to -be a French salesman from one of the Moscow shops. - -"He does not look like a common man," said the interpreter, after -a searching look at Pierre. - -"Ah, he looks very much like an incendiary," remarked the officer. -"And ask him who he is," he added. - -"Who are you?" asked the interpreter in poor Russian. "You must -answer the chief." - -"I will not tell you who I am. I am your prisoner--take me!" -Pierre suddenly replied in French. - -"Ah, ah!" muttered the officer with a frown. "Well then, march!" - -A crowd had collected round the Uhlans. Nearest to Pierre stood -the pockmarked peasant woman with the little girl, and when the patrol -started she moved forward. - -"Where are they taking you to, you poor dear?" said she. "And the -little girl, the little girl, what am I to do with her if she's not -theirs?" said the woman. - -"What does that woman want?" asked the officer. - -Pierre was as if intoxicated. His elation increased at the sight -of the little girl he had saved. - -"What does she want?" he murmured. "She is bringing me my daughter -whom I have just saved from the flames," said he. "Good-by!" And -without knowing how this aimless lie had escaped him, he went along -with resolute and triumphant steps between the French soldiers. - -The French patrol was one of those sent out through the various -streets of Moscow by Durosnel's order to put a stop to the pillage, -and especially to catch the incendiaries who, according to the general -opinion which had that day originated among the higher French -officers, were the cause of the conflagrations. After marching through -a number of streets the patrol arrested five more Russian suspects: -a small shopkeeper, two seminary students, a peasant, and a house -serf, besides several looters. But of all these various suspected -characters, Pierre was considered to be the most suspicious of all. -When they had all been brought for the night to a large house on the -Zubov Rampart that was being used as a guardhouse, Pierre was placed -apart under strict guard. - - - - - -BOOK TWELVE: 1812 - - - - - -CHAPTER I - - -In Petersburg at that time a complicated struggle was being -carried on with greater heat than ever in the highest circles, between -the parties of Rumyantsev, the French, Marya Fedorovna, the Tsarevich, -and others, drowned as usual by the buzzing of the court drones. But -the calm, luxurious life of Petersburg, concerned only about -phantoms and reflections of real life, went on in its old way and made -it hard, except by a great effort, to realize the danger and the -difficult position of the Russian people. There were the same -receptions and balls, the same French theater, the same court -interests and service interests and intrigues as usual. Only in the -very highest circles were attempts made to keep in mind the -difficulties of the actual position. Stories were whispered of how -differently the two Empresses behaved in these difficult -circumstances. The Empress Marya, concerned for the welfare of the -charitable and educational institutions under her patronage, had given -directions that they should all be removed to Kazan, and the things -belonging to these institutions had already been packed up. The -Empress Elisabeth, however, when asked what instructions she would -be pleased to give--with her characteristic Russian patriotism had -replied that she could give no directions about state institutions for -that was the affair of the sovereign, but as far as she personally was -concerned she would be the last to quit Petersburg. - -At Anna Pavlovna's on the twenty-sixth of August, the very day of -the battle of Borodino, there was a soiree, the chief feature of which -was to be the reading of a letter from His Lordship the Bishop when -sending the Emperor an icon of the Venerable Sergius. It was -regarded as a model of ecclesiastical, patriotic eloquence. Prince -Vasili himself, famed for his elocution, was to read it. (He used to -read at the Empress'.) The art of his reading was supposed to lie in -rolling out the words, quite independently of their meaning, in a loud -and singsong voice alternating between a despairing wail and a -tender murmur, so that the wail fell quite at random on one word and -the murmur on another. This reading, as was always the case at Anna -Pavlovna's soirees, had a political significance. That evening she -expected several important personages who had to be made ashamed of -their visits to the French theater and aroused to a patriotic -temper. A good many people had already arrived, but Anna Pavlovna, not -yet seeing all those whom she wanted in her drawing room, did not -let the reading begin but wound up the springs of a general -conversation. - -The news of the day in Petersburg was the illness of Countess -Bezukhova. She had fallen ill unexpectedly a few days previously, -had missed several gatherings of which she was usually ornament, and -was said to be receiving no one, and instead of the celebrated -Petersburg doctors who usually attended her had entrusted herself to -some Italian doctor who was treating her in some new and unusual way. - -They all knew very well that the enchanting countess' illness -arose from an inconvenience resulting from marrying two husbands at -the same time, and that the Italian's cure consisted in removing -such inconvenience; but in Anna Pavlovna's presence no one dared to -think of this or even appear to know it. - -"They say the poor countess is very ill. The doctor says it is -angina pectoris." - -"Angina? Oh, that's a terrible illness!" - -"They say that the rivals are reconciled, thanks to the angina..." -and the word angina was repeated with great satisfaction. - -"The count is pathetic, they say. He cried like a child when the -doctor told him the case was dangerous." - -"Oh, it would be a terrible loss, she is an enchanting woman." - -"You are speaking of the poor countess?" said Anna Pavlovna, -coming up just then. "I sent to ask for news, and hear that she is a -little better. Oh, she is certainly the most charming woman in the -world," she went on, with a smile at her own enthusiasm. "We belong to -different camps, but that does not prevent my esteeming her as she -deserves. She is very unfortunate!" added Anna Pavlovna. - -Supposing that by these words Anna Pavlovna was somewhat lifting the -veil from the secret of the countess' malady, an unwary young man -ventured to express surprise that well known doctors had not been -called in and that the countess was being attended by a charlatan -who might employ dangerous remedies. - -"Your information maybe better than mine," Anna Pavlovna suddenly -and venomously retorted on the inexperienced young man, "but I know on -good authority that this doctor is a very learned and able man. He -is private physician to the Queen of Spain." - -And having thus demolished the young man, Anna Pavlovna turned to -another group where Bilibin was talking about the Austrians: having -wrinkled up his face he was evidently preparing to smooth it out again -and utter one of his mots. - -"I think it is delightful," he said, referring to a diplomatic -note that had been sent to Vienna with some Austrian banners -captured from the French by Wittgenstein, "the hero of Petropol" as he -was then called in Petersburg. - -"What? What's that?" asked Anna Pavlovna, securing silence for the -mot, which she had heard before. - -And Bilibin repeated the actual words of the diplomatic dispatch, -which he had himself composed. - -"The Emperor returns these Austrian banners," said Bilibin, -"friendly banners gone astray and found on a wrong path," and his brow -became smooth again. - -"Charming, charming!" observed Prince Vasili. - -"The path to Warsaw, perhaps," Prince Hippolyte remarked loudly -and unexpectedly. Everybody looked at him, understanding what he -meant. Prince Hippolyte himself glanced around with amused surprise. -He knew no more than the others what his words meant. During his -diplomatic career he had more than once noticed that such utterances -were received as very witty, and at every opportunity he uttered in -that way the first words that entered his head. "It may turn out -very well," he thought, "but if not, they'll know how to arrange -matters." And really, during the awkward silence that ensued, that -insufficiently patriotic person entered whom Anna Pavlovna had been -waiting for and wished to convert, and she, smiling and shaking a -finger at Hippolyte, invited Prince Vasili to the table and bringing -him two candles and the manuscript begged him to begin. Everyone -became silent. - - -"Most Gracious Sovereign and Emperor!" Prince Vasili sternly -declaimed, looking round at his audience as if to inquire whether -anyone had anything to say to the contrary. But no one said -anything. "Moscow, our ancient capital, the New Jerusalem, receives -her Christ"--he placed a sudden emphasis on the word her--"as a mother -receives her zealous sons into her arms, and through the gathering -mists, foreseeing the brilliant glory of thy rule, sings in -exultation, 'Hosanna, blessed is he that cometh!'" - - -Prince Vasili pronounced these last words in a tearful voice. - -Bilibin attentively examined his nails, and many of those present -appeared intimidated, as if asking in what they were to blame. Anna -Pavlovna whispered the next words in advance, like an old woman -muttering the prayer at Communion: "Let the bold and insolent -Goliath..." she whispered. - -Prince Vasili continued. - - -"Let the bold and insolent Goliath from the borders of France -encompass the realms of Russia with death-bearing terrors; humble -Faith, the sling of the Russian David, shall suddenly smite his head -in his blood-thirsty pride. This icon of the Venerable Sergius, the -servant of God and zealous champion of old of our country's weal, is -offered to Your Imperial Majesty. I grieve that my waning strength -prevents rejoicing in the sight of your most gracious presence. I -raise fervent prayers to Heaven that the Almighty may exalt the race -of the just, and mercifully fulfill the desires of Your Majesty." - - -"What force! What a style!" was uttered in approval both of reader -and of author. - -Animated by that address Anna Pavlovna's guests talked for a long -time of the state of the fatherland and offered various conjectures as -to the result of the battle to be fought in a few days. - -"You will see," said Anna Pavlovna, "that tomorrow, on the Emperor's -birthday, we shall receive news. I have a favorable presentiment!" - - - - - -CHAPTER II - - -Anna Pavlovna's presentiment was in fact fulfilled. Next day -during the service at the palace church in honor of the Emperor's -birthday, Prince Volkonski was called out of the church and received a -dispatch from Prince Kutuzov. It was Kutuzov's report, written from -Tatarinova on the day of the battle. Kutuzov wrote that the Russians -had not retreated a step, that the French losses were much heavier -than ours, and that he was writing in haste from the field of battle -before collecting full information. It followed that there must have -been a victory. And at once, without leaving the church, thanks were -rendered to the Creator for His help and for the victory. - -Anna Pavlovna's presentiment was justified, and all that morning a -joyously festive mood reigned in the city. Everyone believed the -victory to have been complete, and some even spoke of Napoleon's -having been captured, of his deposition, and of the choice of a new -ruler for France. - -It is very difficult for events to be reflected in their real -strength and completeness amid the conditions of court life and far -from the scene of action. General events involuntarily group -themselves around some particular incident. So now the courtiers' -pleasure was based as much on the fact that the news had arrived on -the Emperor's birthday as on the fact of the victory itself. It was -like a successfully arranged surprise. Mention was made in Kutuzov's -report of the Russian losses, among which figured the names of -Tuchkov, Bagration, and Kutaysov. In the Petersburg world this sad -side of the affair again involuntarily centered round a single -incident: Kutaysov's death. Everybody knew him, the Emperor liked him, -and he was young and interesting. That day everyone met with the -words: - -"What a wonderful coincidence! Just during the service. But what a -loss Kutaysov is! How sorry I am!" - -"What did I tell about Kutuzov?" Prince Vasili now said with a -prophet's pride. "I always said he was the only man capable of -defeating Napoleon." - -But next day no news arrived from the army and the public mood -grew anxious. The courtiers suffered because of the suffering the -suspense occasioned the Emperor. - -"Fancy the Emperor's position!" said they, and instead of -extolling Kutuzov as they had done the day before, they condemned -him as the cause of the Emperor's anxiety. That day Prince Vasili no -longer boasted of his protege Kutuzov, but remained silent when the -commander in chief was mentioned. Moreover, toward evening, as if -everything conspired to make Petersburg society anxious and uneasy, -a terrible piece of news was added. Countess Helene Bezukhova had -suddenly died of that terrible malady it had been so agreeable to -mention. Officially, at large gatherings, everyone said that -Countess Bezukhova had died of a terrible attack of angina pectoris, -but in intimate circles details were mentioned of how the private -physician of the Queen of Spain had prescribed small doses of a -certain drug to produce a certain effect; but Helene, tortured by -the fact that the old count suspected her and that her husband to whom -she had written (that wretched, profligate Pierre) had not replied, -had suddenly taken a very large dose of the drug, and had died in -agony before assistance could be rendered her. It was said that Prince -Vasili and the old count had turned upon the Italian, but the latter -had produced such letters from the unfortunate deceased that they -had immediately let the matter drop. - -Talk in general centered round three melancholy facts: the Emperor's -lack of news, the loss of Kutuzov, and the death of Helene. - -On the third day after Kutuzov's report a country gentleman -arrived from Moscow, and news of the surrender of Moscow to the French -spread through the whole town. This was terrible! What a position -for the Emperor to be in! Kutuzov was a traitor, and Prince Vasili -during the visits of condolence paid to him on the occasion of his -daughter's death said of Kutuzov, whom he had formerly praised (it was -excusable for him in his grief to forget what he had said), that it -was impossible to expect anything else from a blind and depraved old -man. - -"I only wonder that the fate of Russia could have been entrusted -to such a man." - -As long as this news remained unofficial it was possible to doubt -it, but the next day the following communication was received from -Count Rostopchin: - - -Prince Kutuzov's adjutant has brought me a letter in which he -demands police officers to guide the army to the Ryazan road. He -writes that he is regretfully abandoning Moscow. Sire! Kutuzov's -action decides the fate of the capital and of your empire! Russia will -shudder to learn of the abandonment of the city in which her greatness -is centered and in which lie the ashes of your ancestors! I shall -follow the army. I have had everything removed, and it only remains -for me to weep over the fate of my fatherland. - - -On receiving this dispatch the Emperor sent Prince Volkonski to -Kutuzov with the following rescript: - - -Prince Michael Ilarionovich! Since the twenty-ninth of August I have -received no communication from you, yet on the first of September I -received from the commander in chief of Moscow, via Yaroslavl, the sad -news that you, with the army, have decided to abandon Moscow. You -can yourself imagine the effect this news has had on me, and your -silence increases my astonishment. I am sending this by -Adjutant-General Prince Volkonski, to hear from you the situation of -the army and the reasons that have induced you to take this melancholy -decision. - - - - - -CHAPTER III - - -Nine days after the abandonment of Moscow, a messenger from -Kutuzov reached Petersburg with the official announcement of that -event. This messenger was Michaud, a Frenchman who did not know -Russian, but who was quoique etranger, russe de coeur et d'ame,* as he -said of himself. - - -*Though a foreigner, Russian in heart and soul. - - -The Emperor at once received this messenger in his study at the -palace on Stone Island. Michaud, who had never seen Moscow before -the campaign and who did not know Russian, yet felt deeply moved (as -he wrote) when he appeared before notre tres gracieux souverain* -with the news of the burning of Moscow, dont les flammes eclairaient -sa route.*[2] - - -*Our most gracious sovereign. - -*[2] Whose flames illumined his route. - - -Though the source of M. Michaud's chagrin must have been different -from that which caused Russians to grieve, he had such a sad face when -shown into the Emperor's study that the latter at once asked: - -"Have you brought me sad news, Colonel?" - -"Very sad, sire," replied Michaud, lowering his eyes with a sigh. -"The abandonment of Moscow." - -"Have they surrendered my ancient capital without a battle?" asked -the Emperor quickly, his face suddenly flushing. - -Michaud respectfully delivered the message Kutuzov had entrusted -to him, which was that it had been impossible to fight before -Moscow, and that as the only remaining choice was between losing the -army as well as Moscow, or losing Moscow alone, the field marshal -had to choose the latter. - -The Emperor listened in silence, not looking at Michaud. - -"Has the enemy entered the city?" he asked. - -"Yes, sire, and Moscow is now in ashes. I left it all in flames," -replied Michaud in a decided tone, but glancing at the Emperor he -was frightened by what he had done. - -The Emperor began to breathe heavily and rapidly, his lower lip -trembled, and tears instantly appeared in his fine blue eyes. - -But this lasted only a moment. He suddenly frowned, as if blaming -himself for his weakness, and raising his head addressed Michaud in -a firm voice: - -"I see, Colonel, from all that is happening, that Providence -requires great sacrifices of us... I am ready to submit myself in -all things to His will; but tell me, Michaud, how did you leave the -army when it saw my ancient capital abandoned without a battle? Did -you not notice discouragement?..." - -Seeing that his most gracious ruler was calm once more, Michaud also -grew calm, but was not immediately ready to reply to the Emperor's -direct and relevant question which required a direct answer. - -"Sire, will you allow me to speak frankly as befits a loyal -soldier?" he asked to gain time. - -"Colonel, I always require it," replied the Emperor. "Conceal -nothing from me, I wish to know absolutely how things are." - -"Sire!" said Michaud with a subtle, scarcely perceptible smile on -his lips, having now prepared a well-phrased reply, "sire, I left -the whole army, from its chiefs to the lowest soldier, without -exception in desperate and agonized terror..." - -"How is that?" the Emperor interrupted him, frowning sternly. "Would -misfortune make my Russians lose heart?... Never!" - -Michaud had only waited for this to bring out the phrase he had -prepared. - -"Sire," he said, with respectful playfulness, "they are only -afraid lest Your Majesty, in the goodness of your heart, should -allow yourself to be persuaded to make peace. They are burning for the -combat," declared this representative of the Russian nation, "and to -prove to Your Majesty by the sacrifice of their lives how devoted they -are...." - -"Ah!" said the Emperor reassured, and with a kindly gleam in his -eyes, he patted Michaud on the shoulder. "You set me at ease, -Colonel." - -He bent his head and was silent for some time. - -"Well, then, go back to the army," he said, drawing himself up to -his full height and addressing Michaud with a gracious and majestic -gesture, "and tell our brave men and all my good subjects wherever you -go that when I have not a soldier left I shall put myself at the -head of my beloved nobility and my good peasants and so use the last -resources of my empire. It still offers me more than my enemies -suppose," said the Emperor growing more and more animated; "but should -it ever be ordained by Divine Providence," he continued, raising to -heaven his fine eyes shining with emotion, "that my dynasty should -cease to reign on the throne of my ancestors, then after exhausting -all the means at my command, I shall let my beard grow to here" (he -pointed halfway down his chest) "and go and eat potatoes with the -meanest of my peasants, rather than sign the disgrace of my country -and of my beloved people whose sacrifices I know how to appreciate." - -Having uttered these words in an agitated voice the Emperor suddenly -turned away as if to hide from Michaud the tears that rose to his -eyes, and went to the further end of his study. Having stood there a -few moments, he strode back to Michaud and pressed his arm below the -elbow with a vigorous movement. The Emperor's mild and handsome face -was flushed and his eyes gleamed with resolution and anger. - -"Colonel Michaud, do not forget what I say to you here, perhaps we -may recall it with pleasure someday... Napoleon or I," said the -Emperor, touching his breast. "We can no longer both reign together. I -have learned to know him, and he will not deceive me any more...." - -And the Emperor paused, with a frown. - -When he heard these words and saw the expression of firm -resolution in the Emperor's eyes, Michaud--quoique etranger, russe -de coeur et d'ame--at that solemn moment felt himself enraptured by -all that he had heard (as he used afterwards to say), and gave -expression to his own feelings and those of the Russian people whose -representative he considered himself to be, in the following words: - -"Sire!" said he, "Your Majesty is at this moment signing the glory -of the nation and the salvation of Europe!" - -With an inclination of the head the Emperor dismissed him. - - - - - -CHAPTER IV - - -It is natural for us who were not living in those days to imagine -that when half Russia had been conquered and the inhabitants were -fleeing to distant provinces, and one levy after another was being -raised for the defense of the fatherland, all Russians from the -greatest to the least were solely engaged in sacrificing themselves, -saving their fatherland, or weeping over its downfall. The tales and -descriptions of that time without exception speak only of the -self-sacrifice, patriotic devotion, despair, grief, and the heroism of -the Russians. But it was not really so. It appears so to us because we -see only the general historic interest of that time and do not see all -the personal human interests that people had. Yet in reality those -personal interests of the moment so much transcend the general -interests that they always prevent the public interest from being felt -or even noticed. Most of the people at that time paid no attention -to the general progress of events but were guided only by their -private interests, and they were the very people whose activities at -that period were most useful. - -Those who tried to understand the general course of events and to -take part in it by self-sacrifice and heroism were the most useless -members of society, they saw everything upside down, and all they -did for the common good turned out to be useless and foolish--like -Pierre's and Mamonov's regiments which looted Russian villages, and -the lint the young ladies prepared and that never reached the wounded, -and so on. Even those, fond of intellectual talk and of expressing -their feelings, who discussed Russia's position at the time -involuntarily introduced into their conversation either a shade of -pretense and falsehood or useless condemnation and anger directed -against people accused of actions no one could possibly be guilty -of. In historic events the rule forbidding us to eat of the fruit of -the Tree of Knowledge is specially applicable. Only unconscious action -bears fruit, and he who plays a part in an historic event never -understands its significance. If he tries to realize it his efforts -are fruitless. - -The more closely a man was engaged in the events then taking place -in Russia the less did he realize their significance. In Petersburg -and in the provinces at a distance from Moscow, ladies, and -gentlemen in militia uniforms, wept for Russia and its ancient capital -and talked of self-sacrifice and so on; but in the army which -retired beyond Moscow there was little talk or thought of Moscow, -and when they caught sight of its burned ruins no one swore to be -avenged on the French, but they thought about their next pay, their -next quarters, of Matreshka the vivandiere, and like matters. - -As the war had caught him in the service, Nicholas Rostov took a -close and prolonged part in the defense of his country, but did so -casually, without any aim at self-sacrifice, and he therefore looked -at what was going on in Russia without despair and without dismally -racking his brains over it. Had he been asked what he thought of the -state of Russia, he would have said that it was not his business to -think about it, that Kutuzov and others were there for that purpose, -but that he had heard that the regiments were to be made up to their -full strength, that fighting would probably go on for a long time yet, -and that things being so it was quite likely he might be in command of -a regiment in a couple of years' time. - -As he looked at the matter in this way, he learned that he was being -sent to Voronezh to buy remounts for his division, not only without -regret at being prevented from taking part in the coming battle, but -with the greatest pleasure--which he did not conceal and which his -comrades fully understood. - -A few days before the battle of Borodino, Nicholas received the -necessary money and warrants, and having sent some hussars on in -advance, he set out with post horses for Voronezh. - -Only a man who has experienced it--that is, has passed some months -continuously in an atmosphere of campaigning and war--can understand -the delight Nicholas felt when he escaped from the region covered by -the army's foraging operations, provision trains, and hospitals. When- -free from soldiers, wagons, and the filthy traces of a camp--he saw -villages with peasants and peasant women, gentlemen's country -houses, fields where cattle were grazing, posthouses with -stationmasters asleep in them, he rejoiced as though seeing all this -for the first time. What for a long while specially surprised and -delighted him were the women, young and healthy, without a dozen -officers making up to each of them; women, too, who were pleased and -flattered that a passing officer should joke with them. - -In the highest spirits Nicholas arrived at night at a hotel in -Voronezh, ordered things he had long been deprived of in camp, and -next day, very clean-shaven and in a full-dress uniform he had not -worn for a long time, went to present himself to the authorities. - -The commander of the militia was a civilian general, an old man -who was evidently pleased with his military designation and rank. He -received Nicholas brusquely (imagining this to be characteristically -military) and questioned him with an important air, as if -considering the general progress of affairs and approving and -disapproving with full right to do so. Nicholas was in such good -spirits that this merely amused him. - -From the commander of the militia he drove to the governor. The -governor was a brisk little man, very simple and affable. He indicated -the stud farms at which Nicholas might procure horses, recommended -to him a horse dealer in the town and a landowner fourteen miles out -of town who had the best horses, and promised to assist him in every -way. - -"You are Count Ilya Rostov's son? My wife was a great friend of your -mother's. We are at home on Thursdays--today is Thursday, so please -come and see us quite informally," said the governor, taking leave -of him. - -Immediately on leaving the governor's, Nicholas hired post horses -and, taking his squadron quartermaster with him, drove at a gallop -to the landowner, fourteen miles away, who had the stud. Everything -seemed to him pleasant and easy during that first part of his stay -in Voronezh and, as usually happens when a man is in a pleasant -state of mind, everything went well and easily. - -The landowner to whom Nicholas went was a bachelor, an old -cavalryman, a horse fancier, a sportsman, the possessor of some -century-old brandy and some old Hungarian wine, who had a snuggery -where he smoked, and who owned some splendid horses. - -In very few words Nicholas bought seventeen picked stallions for six -thousand rubles--to serve, as he said, as samples of his remounts. -After dining and taking rather too much of the Hungarian wine, -Nicholas--having exchanged kisses with the landowner, with whom he was -already on the friendliest terms--galloped back over abominable roads, -in the brightest frame of mind, continually urging on the driver so as -to be in time for the governor's party. - -When he had changed, poured water over his head, and scented -himself, Nicholas arrived at the governor's rather late, but with -the phrase "better late than never" on his lips. - -It was not a ball, nor had dancing been announced, but everyone knew -that Catherine Petrovna would play valses and the ecossaise on the -clavichord and that there would be dancing, and so everyone had come -as to a ball. - -Provincial life in 1812 went on very much as usual, but with this -difference, that it was livelier in the towns in consequence of the -arrival of many wealthy families from Moscow, and as in everything -that went on in Russia at that time a special recklessness was -noticeable, an "in for a penny, in for a pound--who cares?" spirit, -and the inevitable small talk, instead of turning on the weather and -mutual acquaintances, now turned on Moscow, the army, and Napoleon. - -The society gathered together at the governor's was the best in -Voronezh. - -There were a great many ladies and some of Nicholas' Moscow -acquaintances, but there were no men who could at all vie with the -cavalier of St. George, the hussar remount officer, the good-natured -and well-bred Count Rostov. Among the men was an Italian prisoner, -an officer of the French army; and Nicholas felt that the presence -of that prisoner enhanced his own importance as a Russian hero. The -Italian was, as it were, a war trophy. Nicholas felt this, it seemed -to him that everyone regarded the Italian in the same light, and he -treated him cordially though with dignity and restraint. - -As soon as Nicholas entered in his hussar uniform, diffusing -around him a fragrance of perfume and wine, and had uttered the -words "better late than never" and heard them repeated several times -by others, people clustered around him; all eyes turned on him, and he -felt at once that he had entered into his proper position in the -province--that of a universal favorite: a very pleasant position, -and intoxicatingly so after his long privations. At posting -stations, at inns, and in the landowner's snuggery, maidservants had -been flattered by his notice, and here too at the governor's party -there were (as it seemed to Nicholas) an inexhaustible number of -pretty young women, married and unmarried, impatiently awaiting his -notice. The women and girls flirted with him and, from the first -day, the people concerned themselves to get this fine young -daredevil of an hussar married and settled down. Among these was the -governor's wife herself, who welcomed Rostov as a near relative and -called him "Nicholas." - -Catherine Petrovna did actually play valses and the ecossaise, and -dancing began in which Nicholas still further captivated the -provincial society by his agility. His particularly free manner of -dancing even surprised them all. Nicholas was himself rather surprised -at the way he danced that evening. He had never danced like that in -Moscow and would even have considered such a very free and easy manner -improper and in bad form, but here he felt it incumbent on him to -astonish them all by something unusual, something they would have to -accept as the regular thing in the capital though new to them in the -provinces. - -All the evening Nicholas paid attention to a blue-eyed, plump and -pleasing little blonde, the wife of one of the provincial officials. -With the naive conviction of young men in a merry mood that other -men's wives were created for them, Rostov did not leave the lady's -side and treated her husband in a friendly and conspiratorial style, -as if, without speaking of it, they knew how capitally Nicholas and -the lady would get on together. The husband, however, did not seem -to share that conviction and tried to behave morosely with Rostov. But -the latter's good-natured naivete was so boundless that sometimes even -he involuntarily yielded to Nicholas' good humor. Toward the end of -the evening, however, as the wife's face grew more flushed and -animated, the husband's became more and more melancholy and solemn, as -though there were but a given amount of animation between them and -as the wife's share increased the husband's diminished. - - - - - -CHAPTER V - - -Nicholas sat leaning slightly forward in an armchair, bending -closely over the blonde lady and paying her mythological compliments -with a smile that never left his face. Jauntily shifting the -position of his legs in their tight riding breeches, diffusing an odor -of perfume, and admiring his partner, himself, and the fine outlines -of his legs in their well-fitting Hessian boots, Nicholas told the -blonde lady that he wished to run away with a certain lady here in -Voronezh. - -"Which lady?" - -"A charming lady, a divine one. Her eyes" (Nicholas looked at his -partner) "are blue, her mouth coral and ivory; her figure" (he glanced -at her shoulders) "like Diana's...." - -The husband came up and sullenly asked his wife what she was talking -about. - -"Ah, Nikita Ivanych!" cried Nicholas, rising politely, and as if -wishing Nikita Ivanych to share his joke, he began to tell him of -his intention to elope with a blonde lady. - -The husband smiled gloomily, the wife gaily. The governor's -good-natured wife came up with a look of disapproval. - -"Anna Ignatyevna wants to see you, Nicholas," said she, -pronouncing the name so that Nicholas at once understood that Anna -Ignatyevna was a very important person. "Come, Nicholas! You know -you let me call you so?" - -"Oh, yes, Aunt. Who is she?" - -"Anna Ignatyevna Malvintseva. She has heard from her niece how you -rescued her... Can you guess?" - -"I rescued such a lot of them!" said Nicholas. - -"Her niece, Princess Bolkonskaya. She is here in Voronezh with her -aunt. Oho! How you blush. Why, are...?" - -"Not a bit! Please don't, Aunt!" - -"Very well, very well!... Oh, what a fellow you are!" - -The governor's wife led him up to a tall and very stout old lady -with a blue headdress, who had just finished her game of cards with -the most important personages of the town. This was Malvintseva, -Princess Mary's aunt on her mother's side, a rich, childless widow who -always lived in Voronezh. When Rostov approached her she was -standing settling up for the game. She looked at him and, screwing -up her eyes sternly, continued to upbraid the general who had won from -her. - -"Very pleased, mon cher," she then said, holding out her hand to -Nicholas. "Pray come and see me." - -After a few words about Princess Mary and her late father, whom -Malvintseva had evidently not liked, and having asked what Nicholas -knew of Prince Andrew, who also was evidently no favorite of hers, the -important old lady dismissed Nicholas after repeating her invitation -to come to see her. - -Nicholas promised to come and blushed again as he bowed. At the -mention of Princess Mary he experienced a feeling of shyness and -even of fear, which he himself did not understand. - -When he had parted from Malvintseva Nicholas wished to return to the -dancing, but the governor's little wife placed her plump hand on his -sleeve and, saying that she wanted to have a talk with him, led him to -her sitting room, from which those who were there immediately withdrew -so as not to be in her way. - -"Do you know, dear boy," began the governor's wife with a serious -expression on her kind little face, "that really would be the match -for you: would you like me to arrange it?" - -"Whom do you mean, Aunt?" asked Nicholas. - -"I will make a match for you with the princess. Catherine Petrovna -speaks of Lily, but I say, no--the princess! Do you want me to do -it? I am sure your mother will be grateful to me. What a charming girl -she is, really! And she is not at all so plain, either." - -"Not at all," replied Nicholas as if offended at the idea. "As -befits a soldier, Aunt, I don't force myself on anyone or refuse -anything," he said before he had time to consider what he was saying. - -"Well then, remember, this is not a joke!" - -"Of course not!" - -"Yes, yes," the governor's wife said as if talking to herself. "But, -my dear boy, among other things you are too attentive to the other, -the blonde. One is sorry for the husband, really...." - -"Oh no, we are good friends with him," said Nicholas in the -simplicity of his heart; it did not enter his head that a pastime so -pleasant to himself might not be pleasant to someone else. - -"But what nonsense I have been saying to the governor's wife!" -thought Nicholas suddenly at supper. "She will really begin to arrange -a match... and Soyna...?" And on taking leave of the governor's -wife, when she again smilingly said to him, "Well then, remember!" -he drew her aside. - -"But see here, to tell the truth, Aunt..." - -"What is it, my dear? Come, let's sit down here," said she. - -Nicholas suddenly felt a desire and need to tell his most intimate -thoughts (which he would not have told to his mother, his sister, or -his friend) to this woman who was almost a stranger. When he -afterwards recalled that impulse to unsolicited and inexplicable -frankness which had very important results for him, it seemed to -him--as it seems to everyone in such cases--that it was merely some -silly whim that seized him: yet that burst of frankness, together with -other trifling events, had immense consequences for him and for all -his family. - -"You see, Aunt, Mamma has long wanted me to marry an heiress, but -the very idea of marrying for money is repugnant to me." - -"Oh yes, I understand," said the governor's wife. - -"But Princess Bolkonskaya--that's another matter. I will tell you -the truth. In the first place I like her very much, I feel drawn to -her; and then, after I met her under such circumstances--so strangely, -the idea often occurred to me: 'This is fate.' Especially if you -remember that Mamma had long been thinking of it; but I had never -happened to meet her before, somehow it had always happened that we -did not meet. And as long as my sister Natasha was engaged to her -brother it was of course out of the question for me to think of -marrying her. And it must needs happen that I should meet her just -when Natasha's engagement had been broken off... and then -everything... So you see... I never told this to anyone and never -will, only to you." - -The governor's wife pressed his elbow gratefully. - -"You know Sonya, my cousin? I love her, and promised to marry her, -and will do so.... So you see there can be no question about-" said -Nicholas incoherently and blushing. - -"My dear boy, what a way to look at it! You know Sonya has nothing -and you yourself say your Papa's affairs are in a very bad way. And -what about your mother? It would kill her, that's one thing. And -what sort of life would it be for Sonya--if she's a girl with a heart? -Your mother in despair, and you all ruined.... No, my dear, you and -Sonya ought to understand that." - -Nicholas remained silent. It comforted him to hear these arguments. - -"All the same, Aunt, it is impossible," he rejoined with a sigh, -after a short pause. "Besides, would the princess have me? And -besides, she is now in mourning. How can one think of it!" - -"But you don't suppose I'm going to get you married at once? There -is always a right way of doing things," replied the governor's wife. - -"What a matchmaker you are, Aunt..." said Nicholas, kissing her -plump little hand. - - - - - -CHAPTER VI - - -On reaching Moscow after her meeting with Rostov, Princess Mary -had found her nephew there with his tutor, and a letter from Prince -Andrew giving her instructions how to get to her Aunt Malvintseva at -Voronezh. That feeling akin to temptation which had tormented her -during her father's illness, since his death, and especially since her -meeting with Rostov was smothered by arrangements for the journey, -anxiety about her brother, settling in a new house, meeting new -people, and attending to her nephew's education. She was sad. Now, -after a month passed in quiet surroundings, she felt more and more -deeply the loss of her father which was associated in her mind with -the ruin of Russia. She was agitated and incessantly tortured by the -thought of the dangers to which her brother, the only intimate -person now remaining to her, was exposed. She was worried too about -her nephew's education for which she had always felt herself -incompetent, but in the depths of her soul she felt at peace--a -peace arising from consciousness of having stifled those personal -dreams and hopes that had been on the point of awakening within her -and were related to her meeting with Rostov. - -The day after her party the governor's wife came to see -Malvintseva and, after discussing her plan with the aunt, remarked -that though under present circumstances a formal betrothal was, of -course, not to be thought of, all the same the young people might be -brought together and could get to know one another. Malvintseva -expressed approval, and the governor's wife began to speak of Rostov -in Mary's presence, praising him and telling how he had blushed when -Princess Mary's name was mentioned. But Princess Mary experienced a -painful rather than a joyful feeling--her mental tranquillity was -destroyed, and desires, doubts, self-reproach, and hopes reawoke. - -During the two days that elapsed before Rostov called, Princess Mary -continually thought of how she ought to behave to him. First she -decided not to come to the drawing room when he called to see her -aunt--that it would not be proper for her, in her deep mourning, to -receive visitors; then she thought this would be rude after what he -had done for her; then it occurred to her that her aunt and the -governor's wife had intentions concerning herself and Rostov--their -looks and words at times seemed to confirm this supposition--then -she told herself that only she, with her sinful nature, could think -this of them: they could not forget that situated as she was, while -still wearing deep mourning, such matchmaking would be an insult to -her and to her father's memory. Assuming that she did go down to see -him, Princess Mary imagined the words he would say to her and what she -would say to him, and these words sometimes seemed undeservedly cold -and then to mean too much. More than anything she feared lest the -confusion she felt might overwhelm her and betray her as soon as she -saw him. - -But when on Sunday after church the footman announced in the drawing -room that Count Rostov had called, the princess showed no confusion, -only a slight blush suffused her cheeks and her eyes lit up with a new -and radiant light. - -"You have met him, Aunt?" said she in a calm voice, unable herself -to understand that she could be outwardly so calm and natural. - -When Rostov entered the room, the princess dropped her eyes for an -instant, as if to give the visitor time to greet her aunt, and then -just as Nicholas turned to her she raised her head and met his look -with shining eyes. With a movement full of dignity and grace she -half rose with a smile of pleasure, held out her slender, delicate -hand to him, and began to speak in a voice in which for the first time -new deep womanly notes vibrated. Mademoiselle Bourienne, who was in -the drawing room, looked at Princess Mary in bewildered surprise. -Herself a consummate coquette, she could not have maneuvered better on -meeting a man she wished to attract. - -"Either black is particularly becoming to her or she really has -greatly improved without my having noticed it. And above all, what -tact and grace!" thought Mademoiselle Bourienne. - -Had Princess Mary been capable of reflection at that moment, she -would have been more surprised than Mademoiselle Bourienne at the -change that had taken place in herself. From the moment she recognized -that dear, loved face, a new life force took possession of her and -compelled her to speak and act apart from her own will. From the -time Rostov entered, her face became suddenly transformed. It was as -if a light had been kindled in a carved and painted lantern and the -intricate, skillful, artistic work on its sides, that previously -seemed dark, coarse, and meaningless, was suddenly shown up in -unexpected and striking beauty. For the first time all that pure, -spiritual, inward travail through which she had lived appeared on -the surface. All her inward labor, her dissatisfaction with herself, -her sufferings, her strivings after goodness, her meekness, love, -and self-sacrifice--all this now shone in those radiant eyes, in her -delicate smile, and in every trait of her gentle face. - -Rostov saw all this as clearly as if he had known her whole life. He -felt that the being before him was quite different from, and better -than, anyone he had met before, and above all better than himself. - -Their conversation was very simple and unimportant. They spoke of -the war, and like everyone else unconsciously exaggerated their sorrow -about it; they spoke of their last meeting--Nicholas trying to -change the subject--they talked of the governor's kind wife, of -Nicholas' relations, and of Princess Mary's. - -She did not talk about her brother, diverting the conversation as -soon as her aunt mentioned Andrew. Evidently she could speak of -Russia's misfortunes with a certain artificiality, but her brother was -too near her heart and she neither could nor would speak lightly of -him. Nicholas noticed this, as he noticed every shade of Princess -Mary's character with an observation unusual to him, and everything -confirmed his conviction that she was a quite unusual and -extraordinary being. Nicholas blushed and was confused when people -spoke to him about the princess (as she did when he was mentioned) and -even when he thought of her, but in her presence he felt quite at -ease, and said not at all what he had prepared, but what, quite -appropriately, occurred to him at the moment. - -When a pause occurred during his short visit, Nicholas, as is -usual when there are children, turned to Prince Andrew's little son, -caressing him and asking whether he would like to be an hussar. He -took the boy on his knee, played with him, and looked round at -Princess Mary. With a softened, happy, timid look she watched the -boy she loved in the arms of the man she loved. Nicholas also -noticed that look and, as if understanding it, flushed with pleasure -and began to kiss the boy with good natured playfulness. - -As she was in mourning Princess Mary did not go out into society, -and Nicholas did not think it the proper thing to visit her again; but -all the same the governor's wife went on with her matchmaking, passing -on to Nicholas the flattering things Princess Mary said of him and -vice versa, and insisting on his declaring himself to Princess Mary. -For this purpose she arranged a meeting between the young people at -the bishop's house before Mass. - -Though Rostov told the governeor's wife that he would not make any -declaration to Princess Mary, he promised to go. - -As at Tilsit Rostov had not allowed himself to doubt that what -everybody considered right was right, so now, after a short but -sincere struggle between his effort to arrange his life by his own -sense of justice, and in obedient submission to circumstances, he -chose the latter and yielded to the power he felt irresistibly -carrying him he knew not where. He knew that after his promise to -Sonya it would be what he deemed base to declare his feelings to -Princess Mary. And he knew that he would never act basely. But he also -knew (or rather felt at the bottom of his heart) that by resigning -himself now to the force of circumstances and to those who were -guiding him, he was not only doing nothing wrong, but was doing -something very important--more important than anything he had ever -done in his life. - -After meeting Princess Mary, though the course of his life went on -externally as before, all his former amusements lost their charm for -him and he often thought about her. But he never thought about her -as he had thought of all the young ladies without exception whom he -had met in society, nor as he had for a long time, and at one time -rapturously, thought about Sonya. He had pictured each of those -young ladies as almost all honest-hearted young men do, that is, as -a possible wife, adapting her in his imagination to all the conditions -of married life: a white dressing gown, his wife at the tea table, his -wife's carriage, little ones, Mamma and Papa, their relations to -her, and so on--and these pictures of the future had given him -pleasure. But with Princess Mary, to whom they were trying to get -him engaged, he could never picture anything of future married life. -If he tried, his pictures seemed incongruous and false. It made him -afraid. - - - - - -CHAPTER VII - - -The dreadful news of the battle of Borodino, of our losses in killed -and wounded, and the still more terrible news of the loss of Moscow -reached Voronezh in the middle of September. Princess Mary, having -learned of her brother's wound only from the Gazette and having no -definite news of him, prepared (so Nicholas heard, he had not seen her -again himself) to set off in search of Prince Andrew. - -When he received the news of the battle of Borodino and the -abandonment of Moscow, Rostov was not seized with despair, anger, -the desire for vengeance, or any feeling of that kind, but -everything in Voronezh suddenly seemed to him dull and tiresome, and -he experienced an indefinite feeling of shame and awkwardness. The -conversations he heard seemed to him insincere; he did not know how to -judge all these affairs and felt that only in the regiment would -everything again become clear to him. He made haste to finish buying -the horses, and often became unreasonably angry with his servant and -squadron quartermaster. - -A few days before his departure a special thanksgiving, at which -Nicholas was present, was held in the cathedral for the Russian -victory. He stood a little behind the governor and held himself with -military decorum through the service, meditating on a great variety of -subjects. When the service was over the governor's wife beckoned him -to her. - -"Have you seen the princess?" she asked, indicating with a -movement of her head a lady standing on the opposite side, beyond -the choir. - -Nicholas immediately recognized Princess Mary not so much by the -profile he saw under her bonnet as by the feeling of solicitude, -timidity, and pity that immediately overcame him. Princess Mary, -evidently engrossed by her thoughts, was crossing herself for the last -time before leaving the church. - -Nicholas looked at her face with surprise. It was the same face he -had seen before, there was the same general expression of refined, -inner, spiritual labor, but now it was quite differently lit up. There -was a pathetic expression of sorrow, prayer, and hope in it. As had -occurred before when she was present, Nicholas went up to her -without waiting to be prompted by the governor's wife and not asking -himself whether or not it was right and proper to address her here -in church, and told her he had heard of her trouble and sympathized -with his whole soul. As soon as she heard his voice a vivid glow -kindled in her face, lighting up both her sorrow and her joy. - -"There is one thing I wanted to tell you, Princess," said Rostov. -"It is that if your brother, Prince Andrew Nikolievich, were not -living, it would have been at once announced in the Gazette, as he -is a colonel." - -The princess looked at him, not grasping what he was saying, but -cheered by the expression of regretful sympathy on his face. - -"And I have known so many cases of a splinter wound" (the Gazette -said it was a shell) "either proving fatal at once or being very -slight," continued Nicholas. "We must hope for the best, and I am -sure..." - -Princess Mary interrupted him. - -"Oh, that would be so dread..." she began and, prevented by -agitation from finishing, she bent her head with a movement as -graceful as everything she did in his presence and, looking up at -him gratefully, went out, following her aunt. - -That evening Nicholas did not go out, but stayed at home to settle -some accounts with the horse dealers. When he had finished that -business it was already too late to go anywhere but still too early to -go to bed, and for a long time he paced up and down the room, -reflecting on his life, a thing he rarely did. - -Princess Mary had made an agreeable impression on him when he had -met her in Smolensk province. His having encountered her in such -exceptional circumstances, and his mother having at one time mentioned -her to him as a good match, had drawn his particular attention to her. -When he met her again in Voronezh the impression she made on him was -not merely pleasing but powerful. Nicholas had been struck by the -peculiar moral beauty he observed in her at this time. He was, -however, preparing to go away and it had not entered his head to -regret that he was thus depriving himself of chances of meeting her. -But that day's encounter in church had, he felt, sunk deeper than -was desirable for his peace of mind. That pale, sad, refined face, -that radiant look, those gentle graceful gestures, and especially -the deep and tender sorrow expressed in all her features agitated -him and evoked his sympathy. In men Rostov could not bear to see the -expression of a higher spiritual life (that was why he did not like -Prince Andrew) and he referred to it contemptuously as philosophy -and dreaminess, but in Princess Mary that very sorrow which revealed -the depth of a whole spiritual world foreign to him was an -irresistible attraction. - -"She must be a wonderful woman. A real angel!" he said to himself. -"Why am I not free? Why was I in such a hurry with Sonya?" And he -involuntarily compared the two: the lack of spirituality in the one -and the abundance of it in the other--a spirituality he himself lacked -and therefore valued most highly. He tried to picture what would -happen were he free. How he would propose to her and how she would -become his wife. But no, he could not imagine that. He felt awed, -and no clear picture presented itself to his mind. He had long ago -pictured to himself a future with Sonya, and that was all clear and -simple just because it had all been thought out and he knew all -there was in Sonya, but it was impossible to picture a future with -Princess Mary, because he did not understand her but simply loved her. - -Reveries about Sonya had had something merry and playful in them, -but to dream of Princess Mary was always difficult and a little -frightening. - -"How she prayed!" he thought. "It was plain that her whole soul -was in her prayer. Yes, that was the prayer that moves mountains, -and I am sure her prayer will be answered. Why don't I pray for what I -want?" he suddenly thought. "What do I want? To be free, released from -Sonya... She was right," he thought, remembering what the governor's -wife had said: "Nothing but misfortune can come of marrying Sonya. -Muddles, grief for Mamma... business difficulties... muddles, terrible -muddles! Besides, I don't love her--not as I should. O, God! release -me from this dreadful, inextricable position!" he suddenly began to -pray. "Yes, prayer can move mountains, but one must have faith and not -pray as Natasha and I used to as children, that the snow might turn -into sugar--and then run out into the yard to see whether it had -done so. No, but I am not praying for trifles now," he thought as he -put his pipe down in a corner, and folding his hands placed himself -before the icon. Softened by memories of Princess Mary he began to -pray as he had not done for a long time. Tears were in his eyes and in -his throat when the door opened and Lavrushka came in with some -papers. - -"Blockhead! Why do you come in without being called?" cried -Nicholas, quickly changing his attitude. - -"From the governor," said Lavrushka in a sleepy voice. "A courier -has arrived and there's a letter for you." - -"Well, all right, thanks. You can go!" - -Nicholas took the two letters, one of which was from his mother -and the other from Sonya. He recognized them by the handwriting and -opened Sonya's first. He had read only a few lines when he turned pale -and his eyes opened wide with fear and joy. - -"No, it's not possible!" he cried aloud. - -Unable to sit still he paced up and down the room holding the letter -and reading it. He glanced through it, then read it again, and then -again, and standing still in the middle of the room he raised his -shoulders, stretching out his hands, with his mouth wide open and -his eyes fixed. What he had just been praying for with confidence that -God would hear him had come to pass; but Nicholas was as much -astonished as if it were something extraordinary and unexpected, and -as if the very fact that it had happened so quickly proved that it had -not come from God to whom he had prayed, but by some ordinary -coincidence. - -This unexpected and, as it seemed to Nicholas, quite voluntary -letter from Sonya freed him from the knot that fettered him and from -which there had seemed no escape. She wrote that the last -unfortunate events--the loss of almost the whole of the Rostovs' -Moscow property--and the countess' repeatedly expressed wish that -Nicholas should marry Princess Bolkonskaya, together with his -silence and coldness of late, had all combined to make her decide to -release him from his promise and set him completely free. - - -It would be too painful to me to think that I might be a cause of -sorrow or discord in the family that has been so good to me (she -wrote), and my love has no aim but the happiness of those I love; -so, Nicholas, I beg you to consider yourself free, and to be assured -that, in spite of everything, no one can love you more than does - -Your Sonya - - -Both letters were written from Troitsa. The other, from the -countess, described their last days in Moscow, their departure, the -fire, and the destruction of all their property. In this letter the -countess also mentioned that Prince Andrew was among the wounded -traveling with them; his state was very critical, but the doctor -said there was now more hope. Sonya and Natasha were nursing him. - -Next day Nicholas took his mother's letter and went to see -Princess Mary. Neither he nor she said a word about what "Natasha -nursing him" might mean, but thanks to this letter Nicholas suddenly -became almost as intimate with the princess as if they were relations. - -The following day he saw Princess Mary off on her journey to -Yaroslavl, and a few days later left to rejoin his regiment. - - - - - -CHAPTER VIII - - -Sonya's letter written from Troitsa, which had come as an answer -to Nicholas' prayer, was prompted by this: the thought of getting -Nicholas married to an heiress occupied the old countess' mind more -and more. She knew that Sonya was the chief obstacle to this -happening, and Sonya's life in the countess' house had grown harder -and harder, especially after they had received a letter from -Nicholas telling of his meeting with Princess Mary in Bogucharovo. The -countess let no occasion slip of making humiliating or cruel allusions -to Sonya. - -But a few days before they left Moscow, moved and excited by all -that was going on, she called Sonya to her and, instead of reproaching -and making demands on her, tearfully implored her to sacrifice herself -and repay all that the family had done for her by breaking off her -engagement with Nicholas. - -"I shall not be at peace till you promise me this." - -Sonya burst into hysterical tears and replied through her sobs -that she would do anything and was prepared for anything, but gave -no actual promise and could not bring herself to decide to do what was -demanded of her. She must sacrifice herself for the family that had -reared and brought her up. To sacrifice herself for others was Sonya's -habit. Her position in the house was such that only by sacrifice could -she show her worth, and she was accustomed to this and loved doing it. -But in all her former acts of self-sacrifice she had been happily -conscious that they raised her in her own esteem and in that of -others, and so made her more worthy of Nicholas whom she loved more -than anything in the world. But now they wanted her to sacrifice the -very thing that constituted the whole reward for her self-sacrifice -and the whole meaning of her life. And for the first time she felt -bitterness against those who had been her benefactors only to -torture her the more painfully; she felt jealous of Natasha who had -never experienced anything of this sort, had never needed to sacrifice -herself, but made others sacrifice themselves for her and yet was -beloved by everybody. And for the first time Sonya felt that out of -her pure, quiet love for Nicholas a passionate feeling was beginning -to grow up which was stronger than principle, virtue, or religion. -Under the influence of this feeling Sonya, whose life of dependence -had taught her involuntarily to be secretive, having answered the -countess in vague general terms, avoided talking with her and resolved -to wait till she should see Nicholas, not in order to set him free but -on the contrary at that meeting to bind him to her forever. - -The bustle and terror of the Rostovs' last days in Moscow stifled -the gloomy thoughts that oppressed Sonya. She was glad to find -escape from them in practical activity. But when she heard of Prince -Andrew's presence in their house, despite her sincere pity for him and -for Natasha, she was seized by a joyful and superstitious feeling that -God did not intend her to be separated from Nicholas. She knew that -Natasha loved no one but Prince Andrew and had never ceased to love -him. She knew that being thrown together again under such terrible -circumstances they would again fall in love with one another, and that -Nicholas would then not be able to marry Princess Mary as they would -be within the prohibited degrees of affinity. Despite all the terror -of what had happened during those last days and during the first -days of their journey, this feeling that Providence was intervening in -her personal affairs cheered Sonya. - -At the Troitsa monastery the Rostovs first broke their journey for a -whole day. - -Three large rooms were assigned to them in the monastery hostelry, -one of which was occupied by Prince Andrew. The wounded man was much -better that day and Natasha was sitting with him. In the next room sat -the count and countess respectfully conversing with the prior, who was -calling on them as old acquaintances and benefactors of the monastery. -Sonya was there too, tormented by curiosity as to what Prince Andrew -and Natasha were talking about. She heard the sound of their voices -through the door. That door opened and Natasha came out, looking -excited. Not noticing the monk, who had risen to greet her and was -drawing back the wide sleeve on his right arm, she went up to Sonya -and took her hand. - -"Natasha, what are you about? Come here!" said the countess. - -Natasha went up to the monk for his blessing, and advised her to -pray for aid to God and His saint. - -As soon as the prior withdrew, Natasha took her friend by the hand -and went with her into the unoccupied room. - -"Sonya, will he live?" she asked. "Sonya, how happy I am, and how -unhappy!... Sonya, dovey, everything is as it used to be. If only he -lives! He cannot... because... because... of" and Natasha burst into -tears. - -"Yes! I knew it! Thank God!" murmured Sonya. "He will live." - -Sonya was not less agitated than her friend by the latter's fear and -grief and by her own personal feelings which she shared with no one. -Sobbing, she kissed and comforted Natasha. "If only he lives!" she -thought. Having wept, talked, and wiped away their tears, the two -friends went together to Prince Andrew's door. Natasha opened it -cautiously and glanced into the room, Sonya standing beside her at the -half-open door. - -Prince Andrew was lying raised high on three pillows. His pale -face was calm, his eyes closed, and they could see his regular -breathing. - -"O, Natasha!" Sonya suddenly almost screamed, catching her -companion's arm and stepping back from the door. - -"What? What is it?" asked Natasha. - -"It's that, that..." said Sonya, with a white face and trembling -lips. - -Natasha softly closed the door and went with Sonya to the window, -not yet understanding what the latter was telling her. - -"You remember," said Sonya with a solemn and frightened -expression. "You remember when I looked in the mirror for you... at -Otradnoe at Christmas? Do you remember what I saw?" - -"Yes, yes!" cried Natasha opening her eyes wide, and vaguely -recalling that Sonya had told her something about Prince Andrew whom -she had seen lying down. - -"You remember?" Sonya went on. "I saw it then and told everybody, -you and Dunyasha. I saw him lying on a bed," said she, making a -gesture with her hand and a lifted finger at each detail, "and that he -had his eyes closed and was covered just with a pink quilt, and that -his hands were folded," she concluded, convincing herself that the -details she had just seen were exactly what she had seen in the -mirror. - -She had in fact seen nothing then but had mentioned the first -thing that came into her head, but what she had invented then seemed -to her now as real as any other recollection. She not only -remembered what she had then said--that he turned to look at her and -smiled and was covered with something red--but was firmly convinced -that she had then seen and said that he was covered with a pink -quilt and that his eyes were closed. - -"Yes, yes, it really was pink!" cried Natasha, who now thought she -too remembered the word pink being used, and saw in this the most -extraordinary and mysterious part of the prediction. - -"But what does it mean?" she added meditatively. - -"Oh, I don't know, it is all so strange," replied Sonya, clutching -at her head. - -A few minutes later Prince Andrew rang and Natasha went to him, -but Sonya, feeling unusually excited and touched, remained at the -window thinking about the strangeness of what had occurred. - - -They had an opportunity that day to send letters to the army, and -the countess was writing to her son. - -"Sonya!" said the countess, raising her eyes from her letter as -her niece passed, "Sonya, won't you write to Nicholas?" She spoke in a -soft, tremulous voice, and in the weary eyes that looked over her -spectacles Sonya read all that the countess meant to convey with these -words. Those eyes expressed entreaty, shame at having to ask, fear -of a refusal, and readiness for relentless hatred in case of such -refusal. - -Sonya went up to the countess and, kneeling down, kissed her hand. - -"Yes, Mamma, I will write," said she. - -Sonya was softened, excited, and touched by all that had occurred -that day, especially by the mysterious fulfillment she had just seen -of her vision. Now that she knew that the renewal of Natasha's -relations with Prince Andrew would prevent Nicholas from marrying -Princess Mary, she was joyfully conscious of a return of that -self-sacrificing spirit in which she was accustomed to live and -loved to live. So with a joyful consciousness of performing a -magnanimous deed--interrupted several times by the tears that dimmed -her velvety black eyes--she wrote that touching letter the arrival -of which had so amazed Nicholas. - - - - - -CHAPTER IX - - -The officer and soldiers who had arrested Pierre treated him with -hostility but yet with respect, in the guardhouse to which he was -taken. In their attitude toward him could still be felt both -uncertainty as to who he might be--perhaps a very important person- -and hostility as a result of their recent personal conflict with him. - -But when the guard was relieved next morning, Pierre felt that for -the new guard--both officers and men--he was not as interesting as -he had been to his captors; and in fact the guard of the second day -did not recognize in this big, stout man in a peasant coat the -vigorous person who had fought so desperately with the marauder and -the convoy and had uttered those solemn words about saving a child; -they saw in him only No. 17 of the captured Russians, arrested and -detained for some reason by order of the Higher Command. If they -noticed anything remarkable about Pierre, it was only his unabashed, -meditative concentration and thoughtfulness, and the way he spoke -French, which struck them as surprisingly good. In spite of this he -was placed that day with the other arrested suspects, as the -separate room he had occupied was required by an officer. - -All the Russians confined with Pierre were men of the lowest class -and, recognizing him as a gentleman, they all avoided him, more -especially as he spoke French. Pierre felt sad at hearing them -making fun of him. - -That evening he learned that all these prisoners (he, probably, -among them) were to be tried for incendiarism. On the third day he was -taken with the others to a house where a French general with a white -mustache sat with two colonels and other Frenchmen with scarves on -their arms. With the precision and definiteness customary in -addressing prisoners, and which is supposed to preclude human frailty, -Pierre like the others was questioned as to who he was, where he had -been, with what object, and so on. - -These questions, like questions put at trials generally, left the -essence of the matter aside, shut out the possibility of that -essence's being revealed, and were designed only to form a channel -through which the judges wished the answers of the accused to flow -so as to lead to the desired result, namely a conviction. As soon as -Pierre began to say anything that did not fit in with that aim, the -channel was removed and the water could flow to waste. Pierre felt, -moreover, what the accused always feel at their trial, perplexity as -to why these questions were put to him. He had a feeling that it was -only out of condescension or a kind of civility that this device of -placing a channel was employed. He knew he was in these men's power, -that only by force had they brought him there, that force alone gave -them the right to demand answers to their questions, and that the sole -object of that assembly was to inculpate him. And so, as they had -the power and wish to inculpate him, this expedient of an inquiry -and trial seemed unnecessary. It was evident that any answer would -lead to conviction. When asked what he was doing when he was arrested, -Pierre replied in a rather tragic manner that he was restoring to -its parents a child he had saved from the flames. Why had he fought -the marauder? Pierre answered that he "was protecting a woman," and -that "to protect a woman who was being insulted was the duty of -every man; that..." They interrupted him, for this was not to the -point. Why was he in the yard of a burning house where witnesses had -seen him? He replied that he had gone out to see what was happening in -Moscow. Again they interrupted him: they had not asked where he was -going, but why he was found near the fire? Who was he? they asked, -repeating their first question, which he had declined to answer. Again -he replied that he could not answer it. - -"Put that down, that's bad... very bad," sternly remarked the -general with the white mustache and red flushed face. - - -On the fourth day fires broke out on the Zubovski rampart. - -Pierre and thirteen others were moved to the coach house of a -merchant's house near the Crimean bridge. On his way through the -streets Pierre felt stifled by the smoke which seemed to hang over the -whole city. Fires were visible on all sides. He did not then realize -the significance of the burning of Moscow, and looked at the fires -with horror. - -He passed four days in the coach house near the Crimean bridge and -during that time learned, from the talk of the French soldiers, that -all those confined there were awaiting a decision which might come any -day from the marshal. What marshal this was, Pierre could not learn -from the soldiers. Evidently for them "the marshal" represented a very -high and rather mysterious power. - -These first days, before the eighth of September when the -prisoners were had up for a second examination, were the hardest of -all for Pierre. - - - - - -CHAPTER X - - -On the eighth of September an officer--a very important one -judging by the respect the guards showed him--entered the coach -house where the prisoners were. This officer, probably someone on -the staff, was holding a paper in his hand, and called over all the -Russians there, naming Pierre as "the man who does not give his name." -Glancing indolently and indifferently at all the prisoners, he ordered -the officer in charge to have them decently dressed and tidied up -before taking them to the marshal. An hour later a squad of soldiers -arrived and Pierre with thirteen others was led to the Virgin's Field. -It was a fine day, sunny after rain, and the air was unusually pure. -The smoke did not hang low as on the day when Pierre had been taken -from the guardhouse on the Zubovski rampart, but rose through the pure -air in columns. No flames were seen, but columns of smoke rose on -all sides, and all Moscow as far as Pierre could see was one vast -charred ruin. On all sides there were waste spaces with only stoves -and chimney stacks still standing, and here and there the blackened -walls of some brick houses. Pierre gazed at the ruins and did not -recognize districts he had known well. Here and there he could see -churches that had not been burned. The Kremlin, which was not -destroyed, gleamed white in the distance with its towers and the -belfry of Ivan the Great. The domes of the New Convent of the Virgin -glittered brightly and its bells were ringing particularly clearly. -These bells reminded Pierre that it was Sunday and the feast of the -Nativity of the Virgin. But there seemed to be no one to celebrate -this holiday: everywhere were blackened ruins, and the few Russians to -be seen were tattered and frightened people who tried to hide when -they saw the French. - -It was plain that the Russian nest was ruined and destroyed, but -in place of the Russian order of life that had been destroyed, -Pierre unconsciously felt that a quite different, firm, French order -had been established over this ruined nest. He felt this in the -looks of the soldiers who, marching in regular ranks briskly and -gaily, were escorting him and the other criminals; he felt it in the -looks of an important French official in a carriage and pair driven by -a soldier, whom they met on the way. He felt it in the merry sounds of -regimental music he heard from the left side of the field, and felt -and realized it especially from the list of prisoners the French -officer had read out when he came that morning. Pierre had been -taken by one set of soldiers and led first to one and then to -another place with dozens of other men, and it seemed that they -might have forgotten him, or confused him with the others. But no: the -answers he had given when questioned had come back to him in his -designation as "the man who does not give his name," and under that -appellation, which to Pierre seemed terrible, they were now leading -him somewhere with unhesitating assurance on their faces that he and -all the other prisoners were exactly the ones they wanted and that -they were being taken to the proper place. Pierre felt himself to be -an insignificant chip fallen among the wheels of a machine whose -action he did not understand but which was working well. - -He and the other prisoners were taken to the right side of the -Virgin's Field, to a large white house with an immense garden not -far from the convent. This was Prince Shcherbitov's house, where -Pierre had often been in other days, and which, as he learned from the -talk of the soldiers, was now occupied by the marshal, the Duke of -Eckmuhl (Davout). - -They were taken to the entrance and led into the house one by one. -Pierre was the sixth to enter. He was conducted through a glass -gallery, an anteroom, and a hall, which were familiar to him, into a -long low study at the door of which stood an adjutant. - -Davout, spectacles on nose, sat bent over a table at the further end -of the room. Pierre went close up to him, but Davout, evidently -consulting a paper that lay before him, did not look up. Without -raising his eyes, he said in a low voice: - -"Who are you?" - -Pierre was silent because he was incapable of uttering a word. To -him Davout was not merely a French general, but a man notorious for -his cruelty. Looking at his cold face, as he sat like a stern -schoolmaster who was prepared to wait awhile for an answer, Pierre -felt that every instant of delay might cost him his life; but he did -not know what to say. He did not venture to repeat what he had said at -his first examination, yet to disclose his rank and position was -dangerous and embarrassing. So he was silent. But before he had -decided what to do, Davout raised his head, pushed his spectacles back -on his forehead, screwed up his eyes, and looked intently at him. - -"I know that man," he said in a cold, measured tone, evidently -calculated to frighten Pierre. - -The chill that had been running down Pierre's back now seized his -head as in a vise. - -"You cannot know me, General, I have never seen you..." - -"He is a Russian spy," Davout interrupted, addressing another -general who was present, but whom Pierre had not noticed. - -Davout turned away. With an unexpected reverberation in his voice -Pierre rapidly began: - -"No, monseigneur," he said, suddenly remembering that Davout was a -duke. "No, monseigneur, you cannot have known me. I am a militia -officer and have not quitted Moscow." - -"Your name?" asked Davout. - -"Bezukhov." - -"What proof have I that you are not lying?" - -"Monseigneur!" exclaimed Pierre, not in an offended but in a -pleading voice. - -Davout looked up and gazed intently at him. For some seconds they -looked at one another, and that look saved Pierre. Apart from -conditions of war and law, that look established human relations -between the two men. At that moment an immense number of things passed -dimly through both their minds, and they realized that they were -both children of humanity and were brothers. - -At the first glance, when Davout had only raised his head from the -papers where human affairs and lives were indicated by numbers, Pierre -was merely a circumstance, and Davout could have shot him without -burdening his conscience with an evil deed, but now he saw in him a -human being. He reflected for a moment. - -"How can you show me that you are telling the truth?" said Davout -coldly. - -Pierre remembered Ramballe, and named him and his regiment and the -street where the house was. - -"You are not what you say," returned Davout. - -In a trembling, faltering voice Pierre began adducing proofs of -the truth of his statements. - -But at that moment an adjutant entered and reported something to -Davout. - -Davout brightened up at the news the adjutant brought, and began -buttoning up his uniform. It seemed that he had quite forgotten -Pierre. - -When the adjutant reminded him of the prisoner, he jerked his head -in Pierre's direction with a frown and ordered him to be led away. But -where they were to take him Pierre did not know: back to the coach -house or to the place of execution his companions had pointed out to -him as they crossed the Virgin's Field. - -He turned his head and saw that the adjutant was putting another -question to Davout. - -"Yes, of course!" replied Davout, but what this "yes" meant, -Pierre did not know. - -Pierre could not afterwards remember how he went, whether it was -far, or in which direction. His faculties were quite numbed, he was -stupefied, and noticing nothing around him went on moving his legs -as the others did till they all stopped and he stopped too. The only -thought in his mind at that time was: who was it that had really -sentenced him to death? Not the men on the commission that had first -examined him--not one of them wished to or, evidently, could have done -it. It was not Davout, who had looked at him in so human a way. In -another moment Davout would have realized that he was doing wrong, but -just then the adjutant had come in and interrupted him. The -adjutant, also, had evidently had no evil intent though he might -have refrained from coming in. Then who was executing him, killing -him, depriving him of life--him, Pierre, with all his memories, -aspirations, hopes, and thoughts? Who was doing this? And Pierre -felt that it was no one. - -It was a system--a concurrence of circumstances. - -A system of some sort was killing him--Pierre--depriving him of -life, of everything, annihilating him. - - - - - -CHAPTER XI - - -From Prince Shcherbatov's house the prisoners were led straight down -the Virgin's Field, to the left of the nunnery, as far as a kitchen -garden in which a post had been set up. Beyond that post a fresh pit -had been dug in the ground, and near the post and the pit a large -crowd stood in a semicircle. The crowd consisted of a few Russians and -many of Napoleon's soldiers who were not on duty--Germans, Italians, -and Frenchmen, in a variety of uniforms. To the right and left of -the post stood rows of French troops in blue uniforms with red -epaulets and high boots and shakos. - -The prisoners were placed in a certain order, according to the -list (Pierre was sixth), and were led to the post. Several drums -suddenly began to beat on both sides of them, and at that sound Pierre -felt as if part of his soul had been torn away. He lost the power of -thinking or understanding. He could only hear and see. And he had only -one wish--that the frightful thing that had to happen should happen -quickly. Pierre looked round at his fellow prisoners and scrutinized -them. - -The two first were convicts with shaven heads. One was tall and -thin, the other dark, shaggy, and sinewy, with a flat nose. The -third was a domestic serf, about forty-five years old, with grizzled -hair and a plump, well-nourished body. The fourth was a peasant, a -very handsome man with a broad, light-brown beard and black eyes. -The fifth was a factory hand, a thin, sallow-faced lad of eighteen -in a loose coat. - -Pierre heard the French consulting whether to shoot them -separately or two at a time. "In couples," replied the officer in -command in a calm voice. There was a stir in the ranks of the soldiers -and it was evident that they were all hurrying--not as men hurry to do -something they understand, but as people hurry to finish a necessary -but unpleasant and incomprehensible task. - -A French official wearing a scarf came up to the right of the row of -prisoners and read out the sentence in Russian and in French. - -Then two pairs of Frenchmen approached the criminals and at the -officer's command took the two convicts who stood first in the row. -The convicts stopped when they reached the post and, while sacks -were being brought, looked dumbly around as a wounded beast looks at -an approaching huntsman. One crossed himself continually, the other -scratched his back and made a movement of the lips resembling a smile. -With hurried hands the soldiers blindfolded them, drawing the sacks -over their heads, and bound them to the post. - -Twelve sharpshooters with muskets stepped out of the ranks with a -firm regular tread and halted eight paces from the post. Pierre turned -away to avoid seeing what was going to happen. Suddenly a crackling, -rolling noise was heard which seemed to him louder than the most -terrific thunder, and he looked round. There was some smoke, and the -Frenchmen were doing something near the pit, with pale faces and -trembling hands. Two more prisoners were led up. In the same way and -with similar looks, these two glanced vainly at the onlookers with -only a silent appeal for protection in their eyes, evidently unable to -understand or believe what was going to happen to them. They could not -believe it because they alone knew what their life meant to them, -and so they neither understood nor believed that it could be taken -from them. - -Again Pierre did not wish to look and again turned away; but again -the sound as of a frightful explosion struck his ear, and at the -same moment he saw smoke, blood, and the pale, scared faces of the -Frenchmen who were again doing something by the post, their -trembling hands impeding one another. Pierre, breathing heavily, -looked around as if asking what it meant. The same question was -expressed in all the looks that met his. - -On the faces of all the Russians and of the French soldiers and -officers without exception, he read the same dismay, horror, and -conflict that were in his own heart. "But who, after all, is doing -this? They are all suffering as I am. Who then is it? Who?" flashed -for an instant through his mind. - -"Sharpshooters of the 86th, forward!" shouted someone. The fifth -prisoner, the one next to Pierre, was led away--alone. Pierre did -not understand that he was saved, that he and the rest had been -brought there only to witness the execution. With ever-growing horror, -and no sense of joy or relief, he gazed at what was taking place. -The fifth man was the factory lad in the loose cloak. The moment -they laid hands on him he sprang aside in terror and clutched at -Pierre. (Pierre shuddered and shook himself free.) The lad was -unable to walk. They dragged him along, holding him up under the arms, -and he screamed. When they got him to the post he grew quiet, as if he -suddenly understood something. Whether he understood that screaming -was useless or whether he thought it incredible that men should kill -him, at any rate he took his stand at the post, waiting to be -blindfolded like the others, and like a wounded animal looked around -him with glittering eyes. - -Pierre was no longer able to turn away and close his eyes. His -curiosity and agitation, like that of the whole crowd, reached the -highest pitch at this fifth murder. Like the others this fifth man -seemed calm; he wrapped his loose cloak closer and rubbed one bare -foot with the other. - -When they began to blindfold him he himself adjusted the knot -which hurt the back of his head; then when they propped him against -the bloodstained post, he leaned back and, not being comfortable in -that position, straightened himself, adjusted his feet, and leaned -back again more comfortably. Pierre did not take his eyes from him and -did not miss his slightest movement. - -Probably a word of command was given and was followed by the reports -of eight muskets; but try as he would Pierre could not afterwards -remember having heard the slightest sound of the shots. He only saw -how the workman suddenly sank down on the cords that held him, how -blood showed itself in two places, how the ropes slackened under the -weight of the hanging body, and how the workman sat down, his head -hanging unnaturally and one leg bent under him. Pierre ran up to the -post. No one hindered him. Pale, frightened people were doing -something around the workman. The lower jaw of an old Frenchman with a -thick mustache trembled as he untied the ropes. The body collapsed. -The soldiers dragged it awkwardly from the post and began pushing it -into the pit. - -They all plainly and certainly knew that they were criminals who -must hide the traces of their guilt as quickly as possible. - -Pierre glanced into the pit and saw that the factory lad was lying -with his knees close up to his head and one shoulder higher than the -other. That shoulder rose and fell rhythmically and convulsively, -but spadefuls of earth were already being thrown over the whole -body. One of the soldiers, evidently suffering, shouted gruffly and -angrily at Pierre to go back. But Pierre did not understand him and -remained near the post, and no one drove him away. - -When the pit had been filled up a command was given. Pierre was -taken back to his place, and the rows of troops on both sides of the -post made a half turn and went past it at a measured pace. The -twenty-four sharpshooters with discharged muskets, standing in the -center of the circle, ran back to their places as the companies passed -by. - -Pierre gazed now with dazed eyes at these sharpshooters who ran in -couples out of the circle. All but one rejoined their companies. -This one, a young soldier, his face deadly pale, his shako pushed -back, and his musket resting on the ground, still stood near the pit -at the spot from which he had fired. He swayed like a drunken man, -taking some steps forward and back to save himself from falling. An -old, noncommissioned officer ran out of the ranks and taking him by -the elbow dragged him to his company. The crowd of Russians and -Frenchmen began to disperse. They all went away silently and with -drooping heads. - -"That will teach them to start fires," said one of the Frenchmen. - -Pierre glanced round at the speaker and saw that it was a soldier -who was trying to find some relief after what had been done, but was -not able to do so. Without finishing what he had begun to say he -made a hopeless movement with his arm and went away. - - - - - -CHAPTER XII - - -After the execution Pierre was separated from the rest of the -prisoners and placed alone in a small, ruined, and befouled church. - -Toward evening a noncommissioned officer entered with two soldiers -and told him that he had been pardoned and would now go to the -barracks for the prisoners of war. Without understanding what was said -to him, Pierre got up and went with the soldiers. They took him to the -upper end of the field, where there were some sheds built of charred -planks, beams, and battens, and led him into one of them. In the -darkness some twenty different men surrounded Pierre. He looked at -them without understanding who they were, why they were there, or what -they wanted of him. He heard what they said, but did not understand -the meaning of the words and made no kind of deduction from or -application of them. He replied to questions they put to him, but -did not consider who was listening to his replies, nor how they -would understand them. He looked at their faces and figures, but -they all seemed to him equally meaningless. - -From the moment Pierre had witnessed those terrible murders -committed by men who did not wish to commit them, it was as if the -mainspring of his life, on which everything depended and which made -everything appear alive, had suddenly been wrenched out and everything -had collapsed into a heap of meaningless rubbish. Though he did not -acknowledge it to himself, his faith in the right ordering of the -universe, in humanity, in his own soul, and in God, had been -destroyed. He had experienced this before, but never so strongly as -now. When similar doubts had assailed him before, they had been the -result of his own wrongdoing, and at the bottom of his heart he had -felt that relief from his despair and from those doubts was to be -found within himself. But now he felt that the universe had crumbled -before his eyes and only meaningless ruins remained, and this not by -any fault of his own. He felt that it was not in his power to regain -faith in the meaning of life. - -Around him in the darkness men were standing and evidently something -about him interested them greatly. They were telling him something and -asking him something. Then they led him away somewhere, and at last he -found himself in a corner of the shed among men who were laughing -and talking on all sides. - -"Well, then, mates... that very prince who..." some voice at the -other end of the shed was saying, with a strong emphasis on the word -who. - -Sitting silent and motionless on a heap of straw against the wall, -Pierre sometimes opened and sometimes closed his eyes. But as soon -as he closed them he saw before him the dreadful face of the factory -lad--especially dreadful because of its simplicity--and the faces of -the murderers, even more dreadful because of their disquiet. And he -opened his eyes again and stared vacantly into the darkness around -him. - -Beside him in a stooping position sat a small man of whose -presence he was first made aware by a strong smell of perspiration -which came from him every time he moved. This man was doing -something to his legs in the darkness, and though Pierre could not see -his face he felt that the man continually glanced at him. On growing -used to the darkness Pierre saw that the man was taking off his leg -bands, and the way he did it aroused Pierre's interest. - -Having unwound the string that tied the band on one leg, he -carefully coiled it up and immediately set to work on the other leg, -glancing up at Pierre. While one hand hung up the first string the -other was already unwinding the band on the second leg. In this way, -having carefully removed the leg bands by deft circular motions of his -arm following one another uninterruptedly, the man hung the leg -bands up on some pegs fixed above his head. Then he took out a -knife, cut something, closed the knife, placed it under the head of -his bed, and, seating himself comfortably, clasped his arms round -his lifted knees and fixed his eyes on Pierre. The latter was -conscious of something pleasant, comforting, and well rounded in these -deft movements, in the man's well-ordered arrangements in his -corner, and even in his very smell, and he looked at the man without -taking his eyes from him. - -"You've seen a lot of trouble, sir, eh?" the little man suddenly -said. - -And there was so much kindliness and simplicity in his singsong -voice that Pierre tried to reply, but his jaw trembled and he felt -tears rising to his eyes. The little fellow, giving Pierre no time -to betray his confusion, instantly continued in the same pleasant -tones: - -"Eh, lad, don't fret!" said he, in the tender singsong caressing -voice old Russian peasant women employ. "Don't fret, friend--'suffer -an hour, live for an age!' that's how it is, my dear fellow. And -here we live, thank heaven, without offense. Among these folk, too, -there are good men as well as bad," said he, and still speaking, he -turned on his knees with a supple movement, got up, coughed, and -went off to another part of the shed. - -"Eh, you rascal!" Pierre heard the same kind voice saying at the -other end of the shed. "So you've come, you rascal? She remembers... -Now, now, that'll do!" - -And the soldier, pushing away a little dog that was jumping up at -him, returned to his place and sat down. In his hands he had something -wrapped in a rag. - -"Here, eat a bit, sir," said he, resuming his former respectful tone -as he unwrapped and offered Pierre some baked potatoes. "We had soup -for dinner and the potatoes are grand!" - -Pierre had not eaten all day and the smell of the potatoes seemed -extremely pleasant to him. He thanked the soldier and began to eat. - -"Well, are they all right?" said the soldier with a smile. "You -should do like this." - -He took a potato, drew out his clasp knife, cut the potato into -two equal halves on the palm of his hand, sprinkled some salt on it -from the rag, and handed it to Pierre. - -"The potatoes are grand!" he said once more. "Eat some like that!" - -Pierre thought he had never eaten anything that tasted better. - -"Oh, I'm all right," said he, "but why did they shoot those poor -fellows? The last one was hardly twenty." - -"Tss, tt...!" said the little man. "Ah, what a sin... what a sin!" -he added quickly, and as if his words were always waiting ready in his -mouth and flew out involuntarily he went on: "How was it, sir, that -you stayed in Moscow?" - -"I didn't think they would come so soon. I stayed accidentally," -replied Pierre. - -"And how did they arrest you, dear lad? At your house?" - -"No, I went to look at the fire, and they arrested me there, and -tried me as an incendiary." - -"Where there's law there's injustice," put in the little man. - -"And have you been here long?" Pierre asked as he munched the last -of the potato. - -"I? It was last Sunday they took me, out of a hospital in Moscow." - -"Why, are you a soldier then?" - -"Yes, we are soldiers of the Apsheron regiment. I was dying of -fever. We weren't told anything. There were some twenty of us lying -there. We had no idea, never guessed at all." - -"And do you feel sad here?" Pierre inquired. - -"How can one help it, lad? My name is Platon, and the surname is -Karataev," he added, evidently wishing to make it easier for Pierre to -address him. "They call me 'little falcon' in the regiment. How is one -to help feeling sad? Moscow--she's the mother of cities. How can one -see all this and not feel sad? But 'the maggot gnaws the cabbage, -yet dies first'; that's what the old folks used to tell us," he -added rapidly. - -"What? What did you say?" asked Pierre. - -"Who? I?" said Karataev. "I say things happen not as we plan but -as God judges," he replied, thinking that he was repeating what he had -said before, and immediately continued: - -"Well, and you, have you a family estate, sir? And a house? So you -have abundance, then? And a housewife? And your old parents, are -they still living?" he asked. - -And though it was too dark for Pierre to see, he felt that a -suppressed smile of kindliness puckered the soldier's lips as he put -these questions. He seemed grieved that Pierre had no parents, -especially that he had no mother. - -"A wife for counsel, a mother-in-law for welcome, but there's none -as dear as one's own mother!" said he. "Well, and have you little -ones?" he went on asking. - -Again Pierre's negative answer seemed to distress him, and he -hastened to add: - -"Never mind! You're young folks yet, and please God may still have -some. The great thing is to live in harmony...." - -"But it's all the same now," Pierre could not help saying. - -"Ah, my dear fellow!" rejoined Karataev, "never decline a prison -or a beggar's sack!" - -He seated himself more comfortably and coughed, evidently -preparing to tell a long story. - -"Well, my dear fellow, I was still living at home," he began. "We -had a well-to-do homestead, plenty of land, we peasants lived well and -our house was one to thank God for. When Father and we went out mowing -there were seven of us. We lived well. We were real peasants. It so -happened..." - -And Platon Karataev told a long story of how he had gone into -someone's copse to take wood, how he had been caught by the keeper, -had been tried, flogged, and sent to serve as a soldier. - -"Well, lad," and a smile changed the tone of his voice "we thought -it was a misfortune but it turned out a blessing! If it had not been -for my sin, my brother would have had to go as a soldier. But he, my -younger brother, had five little ones, while I, you see, only left a -wife behind. We had a little girl, but God took her before I went as a -soldier. I come home on leave and I'll tell you how it was, I look and -see that they are living better than before. The yard full of -cattle, the women at home, two brothers away earning wages, and only -Michael the youngest, at home. Father, he says, 'All my children are -the same to me: it hurts the same whichever finger gets bitten. But if -Platon hadn't been shaved for a soldier, Michael would have had to -go.' called us all to him and, will you believe it, placed us in front -of the icons. 'Michael,' he says, 'come here and bow down to his feet; -and you, young woman, you bow down too; and you, grandchildren, also -bow down before him! Do you understand?' he says. That's how it is, -dear fellow. Fate looks for a head. But we are always judging, 'that's -not well--that's not right!' Our luck is like water in a dragnet: -you pull at it and it bulges, but when you've drawn it out it's empty! -That's how it is." - -And Platon shifted his seat on the straw. - -After a short silence he rose. - -"Well, I think you must be sleepy," said he, and began rapidly -crossing himself and repeating: - -"Lord Jesus Christ, holy Saint Nicholas, Frola and Lavra! Lord Jesus -Christ, holy Saint Nicholas, Frola and Lavra! Lord Jesus Christ, -have mercy on us and save us!" he concluded, then bowed to the ground, -got up, sighed, and sat down again on his heap of straw. "That's the -way. Lay me down like a stone, O God, and raise me up like a loaf," he -muttered as he lay down, pulling his coat over him. - -"What prayer was that you were saying?" asked Pierre. - -"Eh?" murmured Platon, who had almost fallen asleep. "What was I -saying? I was praying. Don't you pray?" - -"Yes, I do," said Pierre. "But what was that you said: Frola and -Lavra?" - -"Well, of course," replied Platon quickly, "the horses' saints. -One must pity the animals too. Eh, the rascal! Now you've curled up -and got warm, you daughter of a bitch!" said Karataev, touching the -dog that lay at his feet, and again turning over he fell asleep -immediately. - -Sounds of crying and screaming came from somewhere in the distance -outside, and flames were visible through the cracks of the shed, but -inside it was quiet and dark. For a long time Pierre did not sleep, -but lay with eyes open in the darkness, listening to the regular -snoring of Platon who lay beside him, and he felt that the world -that had been shattered was once more stirring in his soul with a -new beauty and on new and unshakable foundations. - - - - - -CHAPTER XIII - - -Twenty-three soldiers, three officers, and two officials were -confined in the shed in which Pierre had been placed and where he -remained for four weeks. - -When Pierre remembered them afterwards they all seemed misty figures -to him except Platon Karataev, who always remained in his mind a -most vivid and precious memory and the personification of everything -Russian, kindly, and round. When Pierre saw his neighbor next -morning at dawn the first impression of him, as of something round, -was fully confirmed: Platon's whole figure--in a French overcoat -girdled with a cord, a soldier's cap, and bast shoes--was round. His -head was quite round, his back, chest, shoulders, and even his arms, -which he held as if ever ready to embrace something, were rounded, his -pleasant smile and his large, gentle brown eyes were also round. - -Platon Karataev must have been fifty, judging by his stories of -campaigns he had been in, told as by an old soldier. He did not -himself know his age and was quite unable to determine it. But his -brilliantly white, strong teeth which showed in two unbroken -semicircles when he laughed--as he often did--were all sound and good, -there was not a gray hair in his beard or on his head, and his whole -body gave an impression of suppleness and especially of firmness and -endurance. - -His face, despite its fine, rounded wrinkles, had an expression of -innocence and youth, his voice was pleasant and musical. But the chief -peculiarity of his speech was its directness and appositeness. It -was evident that he never considered what he had said or was going -to say, and consequently the rapidity and justice of his intonation -had an irresistible persuasiveness. - -His physical strength and agility during the first days of his -imprisonment were such that he seemed not to know what fatigue and -sickness meant. Every night before lying down, he said: "Lord, lay -me down as a stone and raise me up as a loaf!" and every morning on -getting up, he said: "I lay down and curled up, I get up and shake -myself." And indeed he only had to lie down, to fall asleep like a -stone, and he only had to shake himself, to be ready without a -moment's delay for some work, just as children are ready to play -directly they awake. He could do everything, not very well but not -badly. He baked, cooked, sewed, planed, and mended boots. He was -always busy, and only at night allowed himself conversation--of -which he was fond--and songs. He did not sing like a trained singer -who knows he is listened to, but like the birds, evidently giving vent -to the sounds in the same way that one stretches oneself or walks -about to get rid of stiffness, and the sounds were always -high-pitched, mournful, delicate, and almost feminine, and his face at -such times was very serious. - -Having been taken prisoner and allowed his beard to grow, he -seemed to have thrown off all that had been forced upon him- -everything military and alien to himself--and had returned to his -former peasant habits. - -"A soldier on leave--a shirt outside breeches," he would say. - -He did not like talking about his life as a soldier, though he did -not complain, and often mentioned that he had not been flogged once -during the whole of his army service. When he related anything it -was generally some old and evidently precious memory of his -"Christian" life, as he called his peasant existence. The proverbs, of -which his talk was full, were for the most part not the coarse and -indecent saws soldiers employ, but those folk sayings which taken -without a context seem so insignificant, but when used appositely -suddenly acquire a significance of profound wisdom. - -He would often say the exact opposite of what he had said on a -previous occasion, yet both would be right. He liked to talk and he -talked well, adorning his speech with terms of endearment and with -folk sayings which Pierre thought he invented himself, but the chief -charm of his talk lay in the fact that the commonest events--sometimes -just such as Pierre had witnessed without taking notice of them- -assumed in Karataev's a character of solemn fitness. He liked to -hear the folk tales one of the soldiers used to tell of an evening -(they were always the same), but most of all he liked to hear -stories of real life. He would smile joyfully when listening to such -stories, now and then putting in a word or asking a question to make -the moral beauty of what he was told clear to himself. Karataev had no -attachments, friendships, or love, as Pierre understood them, but -loved and lived affectionately with everything life brought him in -contact with, particularly with man--not any particular man, but those -with whom he happened to be. He loved his dog, his comrades, the -French, and Pierre who was his neighbor, but Pierre felt that in spite -of Karataev's affectionate tenderness for him (by which he -unconsciously gave Pierre's spiritual life its due) he would not -have grieved for a moment at parting from him. And Pierre began to -feel in the same way toward Karataev. - -To all the other prisoners Platon Karataev seemed a most ordinary -soldier. They called him "little falcon" or "Platosha," chaffed him -good-naturedly, and sent him on errands. But to Pierre he always -remained what he had seemed that first night: an unfathomable, -rounded, eternal personification of the spirit of simplicity and -truth. - -Platon Karataev knew nothing by heart except his prayers. When he -began to speak he seemed not to know how he would conclude. - -Sometimes Pierre, struck by the meaning of his words, would ask -him to repeat them, but Platon could never recall what he had said a -moment before, just as he never could repeat to Pierre the words of -his favorite song: native and birch tree and my heart is sick occurred -in it, but when spoken and not sung, no meaning could be got out of -it. He did not, and could not, understand the meaning of words apart -from their context. Every word and action of his was the manifestation -of an activity unknown to him, which was his life. But his life, as he -regarded it, had no meaning as a separate thing. It had meaning only -as part of a whole of which he was always conscious. His words and -actions flowed from him as evenly, inevitably, and spontaneously as -fragrance exhales from a flower. He could not understand the value -or significance of any word or deed taken separately. - - - - - -CHAPTER XIV - - -When Princess Mary heard from Nicholas that her brother was with the -Rostovs at Yaroslavl she at once prepared to go there, in spite of her -aunt's efforts to dissuade her--and not merely to go herself but to -take her nephew with her. Whether it were difficult or easy, -possible or impossible, she did not ask and did not want to know: it -was her duty not only herself to be near her brother who was perhaps -dying, but to do everything possible to take his son to him, and so -she prepared to set off. That she had not heard from Prince Andrew -himself, Princess Mary attributed to his being too weak to write or to -his considering the long journey too hard and too dangerous for her -and his son. - -In a few days Princess Mary was ready to start. Her equipages were -the huge family coach in which she had traveled to Voronezh, a -semiopen trap, and a baggage cart. With her traveled Mademoiselle -Bourienne, little Nicholas and his tutor, her old nurse, three -maids, Tikhon, and a young footman and courier her aunt had sent to -accompany her. - -The usual route through Moscow could not be thought of, and the -roundabout way Princess Mary was obliged to take through Lipetsk, -Ryazan, Vladimir, and Shuya was very long and, as post horses were not -everywhere obtainable, very difficult, and near Ryazan where the -French were said to have shown themselves was even dangerous. - -During this difficult journey Mademoiselle Bourienne, Dessalles, and -Princess Mary's servants were astonished at her energy and firmness of -spirit. She went to bed later and rose earlier than any of them, and -no difficulties daunted her. Thanks to her activity and energy, -which infected her fellow travelers, they approached Yaroslavl by -the end of the second week. - -The last days of her stay in Voronezh had been the happiest of her -life. Her love for Rostov no longer tormented or agitated her. It -filled her whole soul, had become an integral part of herself, and she -no longer struggled against it. Latterly she had become convinced that -she loved and was beloved, though she never said this definitely to -herself in words. She had become convinced of it at her last interview -with Nicholas, when he had come to tell her that her brother was -with the Rostovs. Not by a single word had Nicholas alluded to the -fact that Prince Andrew's relations with Natasha might, if he -recovered, be renewed, but Princess Mary saw by his face that he -knew and thought of this. - -Yet in spite of that, his relation to her--considerate, delicate, -and loving--not only remained unchanged, but it sometimes seemed to -Princess Mary that he was even glad that the family connection between -them allowed him to express his friendship more freely. She knew -that she loved for the first and only time in her life and felt that -she was beloved, and was happy in regard to it. - -But this happiness on one side of her spiritual nature did not -prevent her feeling grief for her brother with full force; on the -contrary, that spiritual tranquility on the one side made it the -more possible for her to give full play to her feeling for her -brother. That feeling was so strong at the moment of leaving -Voronezh that those who saw her off, as they looked at her careworn, -despairing face, felt sure she would fall ill on the journey. But -the very difficulties and preoccupations of the journey, which she -took so actively in hand, saved her for a while from her grief and -gave her strength. - -As always happens when traveling, Princess Mary thought only of -the journey itself, forgetting its object. But as she approached -Yaroslavl the thought of what might await her there--not after many -days, but that very evening--again presented itself to her and her -agitation increased to its utmost limit. - -The courier who had been sent on in advance to find out where the -Rostovs were staying in Yaroslavl, and in what condition Prince Andrew -was, when he met the big coach just entering the town gates was -appalled by the terrible pallor of the princess' face that looked -out at him from the window. - -"I have found out everything, your excellency: the Rostovs are -staying at the merchant Bronnikov's house, in the Square not far -from here, right above the Volga," said the courier. - -Princess Mary looked at him with frightened inquiry, not -understanding why he did not reply to what she chiefly wanted to know: -how was her brother? Mademoiselle Bourienne put that question for her. - -"How is the prince?" she asked. - -"His excellency is staying in the same house with them." - -"Then he is alive," thought Princess Mary, and asked in a low voice: -"How is he?" - -"The servants say he is still the same." - -What "still the same" might mean Princess Mary did not ask, but with -an unnoticed glance at little seven-year-old Nicholas, who was sitting -in front of her looking with pleasure at the town, she bowed her -head and did not raise it again till the heavy coach, rumbling, -shaking and swaying, came to a stop. The carriage steps clattered as -they were let down. - -The carriage door was opened. On the left there was water--a great -river--and on the right a porch. There were people at the entrance: -servants, and a rosy girl with a large plait of black hair, smiling as -it seemed to Princess Mary in an unpleasantly affected way. (This -was Sonya.) Princess Mary ran up the steps. "This way, this way!" said -the girl, with the same artificial smile, and the princess found -herself in the hall facing an elderly woman of Oriental type, who came -rapidly to meet her with a look of emotion. This was the countess. She -embraced Princess Mary and kissed her. - -"Mon enfant!" she muttered, "je vous aime et vous connais depuis -longtemps."* - - -*"My child! I love you and have known you a long time." - - Despite her excitement, Princess Mary realized that this was the -countess and that it was necessary to say something to her. Hardly -knowing how she did it, she contrived to utter a few polite phrases in -French in the same tone as those that had been addressed to her, and -asked: "How is he?" - -"The doctor says that he is not in danger," said the countess, but -as she spoke she raised her eyes with a sigh, and her gesture conveyed -a contradiction of her words. - -"Where is he? Can I see him--can I?" asked the princess. - -"One moment, Princess, one moment, my dear! Is this his son?" said -the countess, turning to little Nicholas who was coming in with -Dessalles. "There will be room for everybody, this is a big house. Oh, -what a lovely boy!" - -The countess took Princess Mary into the drawing room, where Sonya -was talking to Mademoiselle Bourienne. The countess caressed the -boy, and the old count came in and welcomed the princess. He had -changed very much since Princess Mary had last seen him. Then he had -been a brisk, cheerful, self-assured old man; now he seemed a pitiful, -bewildered person. While talking to Princess Mary he continually -looked round as if asking everyone whether he was doing the right -thing. After the destruction of Moscow and of his property, thrown out -of his accustomed groove he seemed to have lost the sense of his own -significance and to feel that there was no longer a place for him in -life. - -In spite of her one desire to see her brother as soon as possible, -and her vexation that at the moment when all she wanted was to see him -they should be trying to entertain her and pretending to admire her -nephew, the princess noticed all that was going on around her and felt -the necessity of submitting, for a time, to this new order of things -which she had entered. She knew it to be necessary, and though it -was hard for her she was not vexed with these people. - -"This is my niece," said the count, introducing Sonya--"You don't -know her, Princess?" - -Princess Mary turned to Sonya and, trying to stifle the hostile -feeling that arose in her toward the girl, she kissed her. But she -felt oppressed by the fact that the mood of everyone around her was so -far from what was in her own heart. - -"Where is he?" she asked again, addressing them all. - -"He is downstairs. Natasha is with him," answered Sonya, flushing. -"We have sent to ask. I think you must be tired, Princess." - -Tears of vexation showed themselves in Princess Mary's eyes. She -turned away and was about to ask the countess again how to go to -him, when light, impetuous, and seemingly buoyant steps were heard -at the door. The princess looked round and saw Natasha coming in, -almost running--that Natasha whom she had liked so little at their -meeting in Moscow long since. - -But hardly had the princess looked at Natasha's face before she -realized that here was a real comrade in her grief, and consequently a -friend. She ran to meet her, embraced her, and began to cry on her -shoulder. - -As soon as Natasha, sitting at the head of Prince Andrew's bed, -heard of Princess Mary's arrival, she softly left his room and -hastened to her with those swift steps that had sounded buoyant to -Princess Mary. - -There was only one expression on her agitated face when she ran into -the drawing room--that of love--boundless love for him, for her, and -for all that was near to the man she loved; and of pity, suffering for -others, and passionate desire to give herself entirely to helping -them. It was plain that at that moment there was in Natasha's heart no -thought of herself or of her own relations with Prince Andrew. - -Princess Mary, with her acute sensibility, understood all this at -the first glance at Natasha's face, and wept on her shoulder with -sorrowful pleasure. - -"Come, come to him, Mary," said Natasha, leading her into the -other room. - -Princess Mary raised her head, dried her eyes, and turned to -Natasha. She felt that from her she would be able to understand and -learn everything. - -"How..." she began her question but stopped short. - -She felt that it was impossible to ask, or to answer, in words. -Natasha's face eyes would have to tell her all more clearly -and profoundly. - -Natasha was gazing at her, but seemed afraid and in doubt whether to -say all she knew or not; she seemed to feel that before those luminous -eyes which penetrated into the very depths of her heart, it was -impossible not to tell the whole truth which she saw. And suddenly, -Natasha's lips twitched, ugly wrinkles gathered round her mouth, and -covering her face with her hands she burst into sobs. - -Princess Mary understood. - -But she still hoped, and asked, in words she herself did not trust: - -"But how is his wound? What is his general condition?" - -"You, you... will see," was all Natasha could say. - -They sat a little while downstairs near his room till they had -left off crying and were able to go to him with calm faces. - -"How has his whole illness gone? Is it long since he grew worse? -When did this happen?" Princess Mary inquired. - -Natasha told her that at first there had been danger from his -feverish condition and the pain he suffered, but at Troitsa that had -passed and the doctor had only been afraid of gangrene. That danger -had also passed. When they reached Yaroslavl the wound had begun to -fester (Natasha knew all about such things as festering) and the -doctor had said that the festering might take a normal course. Then -fever set in, but the doctor had said the fever was not very serious. - -"But two days ago this suddenly happened," said Natasha, -struggling with her sobs. "I don't know why, but you will see what -he is like." - -"Is he weaker? Thinner?" asked the princess. - -"No, it's not that, but worse. You will see. O, Mary, he is too -good, he cannot, cannot live, because..." - - - - - -CHAPTER XV - - -When Natasha opened Prince Andrew's door with a familiar movement -and let Princess Mary pass into the room before her, the princess felt -the sobs in her throat. Hard as she had tried to prepare herself, -and now tried to remain tranquil, she knew that she would be unable to -look at him without tears. - -The princess understood what Natasha had meant by the words: "two -days ago this suddenly happened." She understood those words to mean -that he had suddenly softened and that this softening and gentleness -were signs of approaching death. As she stepped to the door she -already saw in imagination Andrew's face as she remembered it in -childhood, a gentle, mild, sympathetic face which he had rarely shown, -and which therefore affected her very strongly. She was sure he -would speak soft, tender words to her such as her father had uttered -before his death, and that she would not be able to bear it and -would burst into sobs in his presence. Yet sooner or later it had to -be, and she went in. The sobs rose higher and higher in her throat -as she more and more clearly distinguished his form and her -shortsighted eyes tried to make out his features, and then she saw his -face and met his gaze. - -He was lying in a squirrel-fur dressing gown on a divan, -surrounded by pillows. He was thin and pale. In one thin, -translucently white hand he held a handkerchief, while with the -other he stroked the delicate mustache he had grown, moving his -fingers slowly. His eyes gazed at them as they entered. - -On seeing his face and meeting his eyes Princess Mary's pace -suddenly slackened, she felt her tears dry up and her sobs ceased. She -suddenly felt guilty and grew timid on catching the expression of -his face and eyes. - -"But in what am I to blame?" she asked herself. And his cold, -stern look replied: "Because you are alive and thinking of the living, -while I..." - -In the deep gaze that seemed to look not outwards but -inwards there was an almost hostile expression as he slowly regarded -his sister and Natasha. - -He kissed his sister, holding her hand in his as was their wont. - -"How are you, Mary? How did you manage to get here?" said he in a -voice as calm and aloof as his look. - -Had he screamed in agony, that scream would not have struck such -horror into Princess Mary's heart as the tone of his voice. - -"And have you brought little Nicholas?" he asked in the same slow, -quiet manner and with an obvious effort to remember. - -"How are you now?" said Princess Mary, herself surprised at what she -was saying. - -"That, my dear, you must ask the doctor," he replied, and again -making an evident effort to be affectionate, he said with his lips -only (his words clearly did not correspond to his thoughts): - -"Merci, chere amie, d'etre venue."* - - -*"Thank you for coming, my dear." - - -Princess Mary pressed his hand. The pressure made him wince just -perceptibly. He was silent, and she did not know what to say. She -now understood what had happened to him two days before. In his words, -his tone, and especially in that calm, almost antagonistic look -could be felt an estrangement from everything belonging to this world, -terrible in one who is alive. Evidently only with an effort did he -understand anything living; but it was obvious that he failed to -understand, not because he lacked the power to do so but because he -understood something else--something the living did not and could -not understand--and which wholly occupied his mind. - -"There, you see how strangely fate has brought us together," said -he, breaking the silence and pointing to Natasha. "She looks after -me all the time." - -Princess Mary heard him and did not understand how he could say such -a thing. He, the sensitive, tender Prince Andrew, how could he say -that, before her whom he loved and who loved him? Had he expected to -live he could not have said those words in that offensively cold tone. -If he had not known that he was dying, how could he have failed to -pity her and how could he speak like that in her presence? The only -explanation was that he was indifferent, because something else, -much more important, had been revealed to him. - -The conversation was cold and disconnected and continually broke -off. - -"Mary came by way of Ryazan," said Natasha. - -Prince Andrew did not notice that she called his sister Mary, and -only after calling her so in his presence did Natasha notice it -herself. - -"Really?" he asked. - -"They told her that all Moscow has been burned down, and that..." - -Natasha stopped. It was impossible to talk. It was plain that he was -making an effort to listen, but could not do so. - -"Yes, they say it's burned," he said. "It's a great pity," and he -gazed straight before him, absently stroking his mustache with his -fingers. - -"And so you have met Count Nicholas, Mary?" Prince Andrew suddenly -said, evidently wishing to speak pleasantly to them. "He wrote here -that he took a great liking to you," he went on simply and calmly, -evidently unable to understand all the complex significance his -words had for living people. "If you liked him too, it would be a good -thing for you to get married," he added rather more quickly, as if -pleased at having found words he had long been seeking. - -Princess Mary heard his words but they had no meaning for her, -except as a proof of how far away he now was from everything living. - -"Why talk of me?" she said quietly and glanced at Natasha. - -Natasha, who felt her glance, did not look at her. All three were -again silent. - -"Andrew, would you like..." Princess Mary suddenly said in a -trembling voice, "would you like to see little Nicholas? He is -always talking about you!" - -Prince Andrew smiled just perceptibly and for the first time, but -Princess Mary, who knew his face so well, saw with horror that he -did not smile with pleasure or affection for his son, but with -quiet, gentle irony because he thought she was trying what she -believed to be the last means of arousing him. - -"Yes, I shall be very glad to see him. Is he quite well?" - -When little Nicholas was brought into Prince Andrew's room he looked -at his father with frightened eyes, but did not cry, because no one -else was crying. Prince Andrew kissed him and evidently did not know -what to say to him. - -When Nicholas had been led away, Princess Mary again went up to -her brother, kissed him, and unable to restrain her tears any longer -began to cry. - -He looked at her attentively. - -"Is it about Nicholas?" he asked. - -Princess Mary nodded her head, weeping. - -"Mary, you know the Gosp..." but he broke off. - -"What did you say?" - -"Nothing. You mustn't cry here," he said, looking at her with the -same cold expression. - - -When Princess Mary began to cry, he understood that she was crying -at the thought that little Nicholas would be left without a father. -With a great effort he tried to return to life and to see things -from their point of view. - -"Yes, to them it must seem sad!" he thought. "But how simple it is. - -"The fowls of the air sow not, neither do they reap, yet your Father -feedeth them," he said to himself and wished to say to Princess -Mary; "but no, they will take it their own way, they won't understand! -They can't understand that all those feelings they prize so--all our -feelings, all those ideas that seem so important to us, are -unnecessary. We cannot understand one another," and he remained -silent. - - -Prince Andrew's little son was seven. He could scarcely read, and -knew nothing. After that day he lived through many things, gaining -knowledge, observation, and experience, but had he possessed all the -faculties he afterwards acquired, he could not have had a better or -more profound understanding of the meaning of the scene he had -witnessed between his father, Mary, and Natasha, than he had then. -He understood it completely, and, leaving the room without crying, -went silently up to Natasha who had come out with him and looked shyly -at her with his beautiful, thoughtful eyes, then his uplifted, rosy -upper lip trembled and leaning his head against her he began to cry. - -After that he avoided Dessalles and the countess who caressed him -and either sat alone or came timidly to Princess Mary, or to Natasha -of whom he seemed even fonder than of his aunt, and clung to them -quietly and shyly. - -When Princess Mary had left Prince Andrew she fully understood -what Natasha's face had told her. She did not speak any more to -Natasha of hopes of saving his life. She took turns with her beside -his sofa, and did not cry any more, but prayed continually, turning in -soul to that Eternal and Unfathomable, whose presence above the -dying man was now so evident. - - - - - -CHAPTER XVI - - -Not only did Prince Andrew know he would die, but he felt that he -was dying and was already half dead. He was conscious of an -aloofness from everything earthly and a strange and joyous lightness -of existence. Without haste or agitation he awaited what was coming. -That inexorable, eternal, distant, and unknown the presence of which -he had felt continually all his life--was now near to him and, by -the strange lightness he experienced, almost comprehensible and -palpable... - - -Formerly he had feared the end. He had twice experienced that -terribly tormenting fear of death--the end--but now he no longer -understood that fear. - - He had felt it for the first time when the shell spun like a top -before him, and he looked at the fallow field, the bushes, and the -sky, and knew that he was face to face with death. When he came to -himself after being wounded and the flower of eternal, unfettered love -had instantly unfolded itself in his soul as if freed from the bondage -of life that had restrained it, he no longer feared death and ceased -to think about it. - -During the hours of solitude, suffering, and partial delirium he -spent after he was wounded, the more deeply he penetrated into the new -principle of eternal love revealed to him, the more he unconsciously -detached himself from earthly life. To love everything and everybody -and always to sacrifice oneself for love meant not to love anyone, not -to live this earthly life. And the more imbued he became with that -principle of love, the more he renounced life and the more -completely he destroyed that dreadful barrier which--in the absence of -such love--stands between life and death. When during those first days -he remembered that he would have to die, he said to himself: "Well, -what of it? So much the better!" - -But after the night in Mytishchi when, half delirious, he had seen -her for whom he longed appear before him and, having pressed her -hand to his lips, had shed gentle, happy tears, love for a -particular woman again crept unobserved into his heart and once more -bound him to life. And joyful and agitating thoughts began to occupy -his mind. Recalling the moment at the ambulance station when he had -seen Kuragin, he could not now regain the feeling he then had, but was -tormented by the question whether Kuragin was alive. And he dared -not inquire. - -His illness pursued its normal physical course, but what Natasha -referred to when she said: "This suddenly happened," had occurred -two days before Princess Mary arrived. It was the last spiritual -struggle between life and death, in which death gained the victory. It -was the unexpected realization of the fact that he still valued life -as presented to him in the form of his love for Natasha, and a last, -though ultimately vanquished, attack of terror before the unknown. - -It was evening. As usual after dinner he was slightly feverish, -and his thoughts were preternaturally clear. Sonya was sitting by -the table. He began to doze. Suddenly a feeling of happiness seized -him. - -"Ah, she has come!" thought he. - -And so it was: in Sonya's place sat Natasha who had just come in -noiselessly. - -Since she had begun looking after him, he had always experienced -this physical consciousness of her nearness. She was sitting in an -armchair placed sideways, screening the light of the candle from -him, and was knitting a stocking. She had learned to knit stockings -since Prince Andrew had casually mentioned that no one nursed the sick -so well as old nurses who knit stockings, and that there is -something soothing in the knitting of stockings. The needles clicked -lightly in her slender, rapidly moving hands, and he could clearly see -the thoughtful profile of her drooping face. She moved, and the ball -rolled off her knees. She started, glanced round at him, and screening -the candle with her hand stooped carefully with a supple and exact -movement, picked up the ball, and regained her former position. - -He looked at her without moving and saw that she wanted to draw a -deep breath after stooping, but refrained from doing so and breathed -cautiously. - -At the Troitsa monastery they had spoken of the past, and he had -told her that if he lived he would always thank God for his wound -which had brought them together again, but after that they never spoke -of the future. - -"Can it or can it not be?" he now thought as he looked at her and -listened to the light click of the steel needles. "Can fate have -brought me to her so strangely only for me to die?... Is it possible -that the truth of life has been revealed to me only to show me that -I have spent my life in falsity? I love her more than anything in -the world! But what am I to do if I love her?" he thought, and he -involuntarily groaned, from a habit acquired during his sufferings. - -On hearing that sound Natasha put down the stocking, leaned nearer -to him, and suddenly, noticing his shining eyes, stepped lightly up to -him and bent over him. - -"You are not asleep?" - -"No, I have been looking at you a long time. I felt you come in. -No one else gives me that sense of soft tranquillity that you do... -that light. I want to weep for joy." - -Natasha drew closer to him. Her face shone with rapturous joy. - -"Natasha, I love you too much! More than anything in the world." - -"And I!"--She turned away for an instant. "Why too much?" she asked. - -"Why too much?... Well, what do you, what do you feel in your -soul, your whole soul--shall I live? What do you think?" - -"I am sure of it, sure!" Natasha almost shouted, taking hold of both -his hands with a passionate movement. - -He remained silent awhile. - -"How good it would be!" and taking her hand he kissed it. - -Natasha felt happy and agitated, but at once remembered that this -would not do and that he had to be quiet. - -"But you have not slept," she said, repressing her joy. "Try to -sleep... please!" - -He pressed her hand and released it, and she went back to the candle -and sat down again in her former position. Twice she turned and looked -at him, and her eyes met his beaming at her. She set herself a task on -her stocking and resolved not to turn round till it was finished. - -Soon he really shut his eyes and fell asleep. He did not sleep -long and suddenly awoke with a start and in a cold perspiration. - -As he fell asleep he had still been thinking of the subject that now -always occupied his mind--about life and death, and chiefly about -death. He felt himself nearer to it. - -"Love? What is love?" he thought. - -"Love hinders death. Love is life. All, everything that I -understand, I understand only because I love. Everything is, -everything exists, only because I love. Everything is united by it -alone. Love is God, and to die means that I, a particle of love, shall -return to the general and eternal source." These thoughts seemed to -him comforting. But they were only thoughts. Something was lacking -in them, they were not clear, they were too one-sidedly personal and -brain-spun. And there was the former agitation and obscurity. He -fell asleep. - -He dreamed that he was lying in the room he really was in, but -that he was quite well and unwounded. Many various, indifferent, and -insignificant people appeared before him. He talked to them and -discussed something trivial. They were preparing to go away somewhere. -Prince Andrew dimly realized that all this was trivial and that he had -more important cares, but he continued to speak, surprising them by -empty witticisms. Gradually, unnoticed, all these persons began to -disappear and a single question, that of the closed door, superseded -all else. He rose and went to the door to bolt and lock it. Everything -depended on whether he was, or was not, in time to lock it. He went, -and tried to hurry, but his legs refused to move and he knew he -would not be in time to lock the door though he painfully strained all -his powers. He was seized by an agonizing fear. And that fear was -the fear of death. It stood behind the door. But just when he was -clumsily creeping toward the door, that dreadful something on the -other side was already pressing against it and forcing its way in. -Something not human--death--was breaking in through that door, and had -to be kept out. He seized the door, making a final effort to hold it -back--to lock it was no longer possible--but his efforts were weak and -clumsy and the door, pushed from behind by that terror, opened and -closed again. - -Once again it pushed from outside. His last superhuman efforts -were vain and both halves of the door noiselessly opened. It -entered, and it was death, and Prince Andrew died. - -But at the instant he died, Prince Andrew remembered that he was -asleep, and at the very instant he died, having made an effort, he -awoke. - -"Yes, it was death! I died--and woke up. Yes, death is an -awakening!" And all at once it grew light in his soul and the veil -that had till then concealed the unknown was lifted from his spiritual -vision. He felt as if powers till then confined within him had been -liberated, and that strange lightness did not again leave him. - -When, waking in a cold perspiration, he moved on the divan, -Natasha went up and asked him what was the matter. He did not answer -and looked at her strangely, not understanding. - -That was what had happened to him two days before Princess Mary's -arrival. From that day, as the doctor expressed it, the wasting -fever assumed a malignant character, but what the doctor said did -not interest Natasha, she saw the terrible moral symptoms which to her -were more convincing. - -From that day an awakening from life came to Prince Andrew -together with his awakening from sleep. And compared to the duration -of life it did not seem to him slower than an awakening from sleep -compared to the duration of a dream. - -There was nothing terrible or violent in this comparatively slow -awakening. - -His last days and hours passed in an ordinary and simple way. Both -Princess Mary and Natasha, who did not leave him, felt this. They -did not weep or shudder and during these last days they themselves -felt that they were not attending on him (he was no longer there, he -had left them) but on what reminded them most closely of him--his -body. Both felt this so strongly that the outward and terrible side of -death did not affect them and they did not feel it necessary to foment -their grief. Neither in his presence nor out of it did they weep, -nor did they ever talk to one another about him. They felt that they -could not express in words what they understood. - -They both saw that he was sinking slowly and quietly, deeper and -deeper, away from them, and they both knew that this had to be so -and that it was right. - -He confessed, and received communion: everyone came to take leave of -him. When they brought his son to him, he pressed his lips to the -boy's and turned away, not because he felt it hard and sad (Princess -Mary and Natasha understood that) but simply because he thought it was -all that was required of him, but when they told him to bless the boy, -he did what was demanded and looked round as if asking whether there -was anything else he should do. - -When the last convulsions of the body, which the spirit was leaving, -occurred, Princess Mary and Natasha were present. - -"Is it over?" said Princess Mary when his body had for a few minutes -lain motionless, growing cold before them. Natasha went up, looked -at the dead eyes, and hastened to close them. She closed them but -did not kiss them, but clung to that which reminded her most nearly of -him--his body. - -"Where has he gone? Where is he now?..." - -When the body, washed and dressed, lay in the coffin on a table, -everyone came to take leave of him and they all wept. - -Little Nicholas cried because his heart was rent by painful -perplexity. The countess and Sonya cried from pity for Natasha and -because he was no more. The old count cried because he felt that -before long, he, too, must take the same terrible step. - -Natasha and Princess Mary also wept now, but not because of their -own personal grief; they wept with a reverent and softening emotion -which had taken possession of their souls at the consciousness of -the simple and solemn mystery of death that had been accomplished in -their presence. - - - - - -BOOK THIRTEEN: 1812 - - - - - -CHAPTER I - - -Man's mind cannot grasp the causes of events in their -completeness, but the desire to find those causes is implanted in -man's soul. And without considering the multiplicity and complexity of -the conditions any one of which taken separately may seem to be the -cause, he snatches at the first approximation to a cause that seems to -him intelligible and says: "This is the cause!" In historical events -(where the actions of men are the subject of observation) the first -and most primitive approximation to present itself was the will of the -gods and, after that, the will of those who stood in the most -prominent position--the heroes of history. But we need only -penetrate to the essence of any historic event--which lies in the -activity of the general mass of men who take part in it--to be -convinced that the will of the historic hero does not control the -actions of the mass but is itself continually controlled. It may -seem to be a matter of indifference whether we understand the -meaning of historical events this way or that; yet there is the same -difference between a man who says that the people of the West moved on -the East because Napoleon wished it and a man who says that this -happened because it had to happen, as there is between those who -declared that the earth was stationary and that the planets moved -round it and those who admitted that they did not know what upheld the -earth, but knew there were laws directing its movement and that of the -other planets. There is, and can be, no cause of an historical event -except the one cause of all causes. But there are laws directing -events, and some of these laws are known to us while we are -conscious of others we cannot comprehend. The discovery of these -laws is only possible when we have quite abandoned the -attempt to find the cause in the will of some one man, just as the -discovery of the laws of the motion of the planets was possible only -when men abandoned the conception of the fixity of the earth. - -The historians consider that, next to the battle of Borodino and the -occupation of Moscow by the enemy and its destruction by fire, the -most important episode of the war of 1812 was the movement of the -Russian army from the Ryazana to the Kaluga road and to the Tarutino -camp--the so-called flank march across the Krasnaya Pakhra River. They -ascribe the glory of that achievement of genius to different men and -dispute as to whom the honor is due. Even foreign historians, -including the French, acknowledge the genius of the Russian commanders -when they speak of that flank march. But it is hard to understand -why military writers, and following them others, consider this flank -march to be the profound conception of some one man who saved Russia -and destroyed Napoleon. In the first place it is hard to understand -where the profundity and genius of this movement lay, for not much -mental effort was needed to see that the best position for an army -when it is not being attacked is where there are most provisions; -and even a dull boy of thirteen could have guessed that the best -position for an army after its retreat from Moscow in 1812 was on -the Kaluga road. So it is impossible to understand by what reasoning -the historians reach the conclusion that this maneuver was a -profound one. And it is even more difficult to understand just why -they think that this maneuver was calculated to save Russia and -destroy the French; for this flank march, had it been preceded, -accompanied, or followed by other circumstances, might have proved -ruinous to the Russians and salutary for the French. If the position -of the Russian army really began to improve from the time of that -march, it does not at all follow that the march was the cause of it. - -That flank march might not only have failed to give any advantage to -the Russian army, but might in other circumstances have led to its -destruction. What would have happened had Moscow not burned down? If -Murat had not lost sight of the Russians? If Napoleon had not remained -inactive? If the Russian army at Krasnaya Pakhra had given battle as -Bennigsen and Barclay advised? What would have happened had the French -attacked the Russians while they were marching beyond the Pakhra? What -would have happened if on approaching Tarutino, Napoleon had -attacked the Russians with but a tenth of the energy he had shown when -he attacked them at Smolensk? What would have happened had the -French moved on Petersburg?... In any of these eventualities the flank -march that brought salvation might have proved disastrous. - -The third and most incomprehensible thing is that people studying -history deliberately avoid seeing that this flank march cannot be -attributed to any one man, that no one ever foresaw it, and that in -reality, like the retreat from Fili, it did not suggest itself to -anyone in its entirety, but resulted--moment by moment, step by -step, event by event--from an endless number of most diverse -circumstances and was only seen in its entirety when it had been -accomplished and belonged to the past. - -At the council at Fili the prevailing thought in the minds of the -Russian commanders was the one naturally suggesting itself, namely, -a direct retreat by the Nizhni road. In proof of this there is the -fact that the majority of the council voted for such a retreat, and -above all there is the well-known conversation after the council, -between the commander in chief and Lanskoy, who was in charge of the -commissariat department. Lanskoy informed the commander in chief -that the army supplies were for the most part stored along the Oka -in the Tula and Ryazan provinces, and that if they retreated on Nizhni -the army would be separated from its supplies by the broad river -Oka, which cannot be crossed early in winter. This was the first -indication of the necessity of deviating from what had previously -seemed the most natural course--a direct retreat on Nizhni-Novgorod. -The army turned more to the south, along the Ryazan road and nearer to -its supplies. Subsequently the inactivity of the French (who even -lost sight of the Russian army), concern for the safety of the arsenal -at Tula, and especially the advantages of drawing nearer to its -supplies caused the army to turn still further south to the Tula road. -Having crossed over, by a forced march, to the Tula road beyond the -Pakhra, the Russian commanders intended to remain at Podolsk and had -no thought of the Tarutino position; but innumerable circumstances and -the reappearance of French troops who had for a time lost touch with -the Russians, and projects of giving battle, and above all the -abundance of provisions in Kaluga province, obliged our army to turn -still more to the south and to cross from the Tula to the Kaluga -road and go to Tarutino, which was between the roads along which those -supplies lay. Just as it is impossible to say when it was decided to -abandon Moscow, so it is impossible to say precisely when, or by whom, -it was decided to move to Tarutino. Only when the army had got -there, as the result of innumerable and varying forces, did people -begin to assure themselves that they had desired this movement and -long ago foreseen its result. - - - - - -CHAPTER II - - -The famous flank movement merely consisted in this: after the -advance of the French had ceased, the Russian army, which had been -continually retreating straight back from the invaders, deviated -from that direct course and, not finding itself pursued, was naturally -drawn toward the district where supplies were abundant. - -If instead of imagining to ourselves commanders of genius leading -the Russian army, we picture that army without any leaders, it could -not have done anything but make a return movement toward Moscow, -describing an arc in the direction where most provisions were to be -found and where the country was richest. - -That movement from the Nizhni to the Ryazan, Tula, and Kaluga -roads was so natural that even the Russian marauders moved in that -direction, and demands were sent from Petersburg for Kutuzov to take -his army that way. At Tarutino Kutuzov received what was almost a -reprimand from the Emperor for having moved his army along the -Ryazan road, and the Emperor's letter indicated to him the very -position he had already occupied near Kaluga. - -Having rolled like a ball in the direction of the impetus given by -the whole campaign and by the battle of Borodino, the Russian army- -when the strength of that impetus was exhausted and no fresh push -was received--assumed the position natural to it. - -Kutuzov's merit lay, not in any strategic maneuver of genius, as -it is called, but in the fact that he alone understood the -significance of what had happened. He alone then understood the -meaning of the French army's inactivity, he alone continued to -assert that the battle of Borodino had been a victory, he alone--who -as commander in chief might have been expected to be eager to -attack--employed his whole strength to restrain the Russian army -from useless engagements. - -The beast wounded at Borodino was lying where the fleeing hunter had -left him; but whether he was still alive, whether he was strong and -merely lying low, the hunter did not know. Suddenly the beast was -heard to moan. - -The moan of that wounded beast (the French army) which betrayed -its calamitous condition was the sending of Lauriston to Kutuzov's -camp with overtures for peace. - -Napoleon, with his usual assurance that whatever entered his head -was right, wrote to Kutuzov the first words that occurred to him, -though they were meaningless. - - -MONSIEUR LE PRINCE KOUTOUZOV: I am sending one of my -adjutants-general to discuss several interesting questions with you. I -beg your Highness to credit what he says to you, especially when he -expresses the sentiment of esteem and special regard I have long -entertained for your person. This letter having no other object, I -pray God, monsieur le Prince Koutouzov, to keep you in His holy and -gracious protection! - -NAPOLEON - -MOSCOW, OCTOBER 30, 1812 - - -Kutuzov replied: "I should be cursed by posterity were I looked on -as the initiator of a settlement of any sort. Such is the present -spirit of my nation." But he continued to exert all his powers to -restrain his troops from attacking. - -During the month that the French troops were pillaging in Moscow and -the Russian troops were quietly encamped at Tarutino, a change had -taken place in the relative strength of the two armies--both in spirit -and in number--as a result of which the superiority had passed to -the Russian side. Though the condition and numbers of the French -army were unknown to the Russians, as soon as that change occurred the -need of attacking at once showed itself by countless signs. These -signs were: Lauriston's mission; the abundance of provisions at -Tarutino; the reports coming in from all sides of the inactivity and -disorder of the French; the flow of recruits to our regiments; the -fine weather; the long rest the Russian soldiers had enjoyed, and -the impatience to do what they had been assembled for, which usually -shows itself in an army that has been resting; curiosity as to what -the French army, so long lost sight of, was doing; the boldness with -which our outposts now scouted close up to the French stationed at -Tarutino; the news of easy successes gained by peasants and -guerrilla troops over the French, the envy aroused by this; the desire -for revenge that lay in the heart of every Russian as long as the -French were in Moscow, and (above all) a dim consciousness in every -soldier's mind that the relative strength of the armies had changed -and that the advantage was now on our side. There was a substantial -change in the relative strength, and an advance had become inevitable. -And at once, as a clock begins to strike and chime as soon as the -minute hand has completed a full circle, this change was shown by an -increased activity, whirring, and chiming in the higher spheres. - - - - - -CHAPTER III - - -The Russian army was commanded by Kutuzov and his staff, and also by -the Emperor from Petersburg. Before the news of the abandonment of -Moscow had been received in Petersburg, a detailed plan of the whole -campaign had been drawn up and sent to Kutuzov for his guidance. -Though this plan had been drawn up on the supposition that Moscow -was still in our hands, it was approved by the staff and accepted as a -basis for action. Kutuzov only replied that movements arranged from -a distance were always difficult to execute. So fresh instructions -were sent for the solution of difficulties that might be -encountered, as well as fresh people who were to watch Kutuzov's -actions and report upon them. - -Besides this, the whole staff of the Russian army was now -reorganized. The posts left vacant by Bagration, who had been -killed, and by Barclay, who had gone away in dudgeon, had to be -filled. Very serious consideration was given to the question whether -it would be better to put A in B's place and B in D's, or on the -contrary to put D in A's place, and so on--as if anything more than -A's or B's satisfaction depended on this. - -As a result of the hostility between Kutuzov and Bennigsen, his -Chief of Staff, the presence of confidential representatives of the -Emperor, and these transfers, a more than usually complicated play -of parties was going on among the staff of the army. A was undermining -B, D was undermining C, and so on in all possible combinations and -permutations. In all these plottings the subject of intrigue was -generally the conduct of the war, which all these men believed they -were directing; but this affair of the war went on independently of -them, as it had to go: that is, never in the way people devised, but -flowing always from the essential attitude of the masses. Only in -the highest spheres did all these schemes, crossings, and -interminglings appear to be a true reflection of what had to happen. - - -Prince Michael Ilarionovich! (wrote the Emperor on the second of -October in a letter that reached Kutuzov after the battle at Tarutino) -Since September 2 Moscow has been in the hands of the enemy. Your last -reports were written on the twentieth, and during all this time not -only has no action been taken against the enemy or for the relief of -the ancient capital, but according to your last report you have even -retreated farther. Serpukhov is already occupied by an enemy -detachment and Tula with its famous arsenal so indispensable to the -army, is in danger. From General Wintzingerode's reports, I see that -an enemy corps of ten thousand men is moving on the Petersburg road. -Another corps of several thousand men is moving on Dmitrov. A third -has advanced along the Vladimir road, and a fourth, rather -considerable detachment is stationed between Ruza and Mozhaysk. -Napoleon himself was in Moscow as late as the twenty-fifth. In view of -all this information, when the enemy has scattered his forces in large -detachments, and with Napoleon and his Guards in Moscow, is it -possible that the enemy's forces confronting you are so considerable -as not to allow of your taking the offensive? On the contrary, he is -probably pursuing you with detachments, or at most with an army -corps much weaker than the army entrusted to you. It would seem -that, availing yourself of these circumstances, you might -advantageously attack a weaker one and annihilate him, or at least -oblige him to retreat, retaining in our hands an important part of the -provinces now occupied by the enemy, and thereby averting danger -from Tula and other towns in the interior. You will be responsible -if the enemy is able to direct a force of any size against -Petersburg to threaten this capital in which it has not been -possible to retain many troops; for with the army entrusted to you, -and acting with resolution and energy, you have ample means to avert -this fresh calamity. Remember that you have still to answer to our -offended country for the loss of Moscow. You have experienced my -readiness to reward you. That readiness will not weaken in me, but I -and Russia have a right to expect from you all the zeal, firmness, and -success which your intellect, military talent, and the courage of -the troops you command justify us in expecting. - - -But by the time this letter, which proved that the real relation -of the forces had already made itself felt in Petersburg, was -dispatched, Kutuzov had found himself unable any longer to restrain -the army he commanded from attacking and a battle had taken place. - -On the second of October a Cossack, Shapovalov, who was out -scouting, killed one hare and wounded another. Following the wounded -hare he made his way far into the forest and came upon the left -flank of Murat's army, encamped there without any precautions. The -Cossack laughingly told his comrades how he had almost fallen into the -hands of the French. A cornet, hearing the story, informed his -commander. - -The Cossack was sent for and questioned. The Cossack officers wished -to take advantage of this chance to capture some horses, but one of -the superior officers, who was acquainted with the higher authorities, -reported the incident to a general on the staff. The state of -things on the staff had of late been exceedingly strained. Ermolov had -been to see Bennigsen a few days previously and had entreated him to -use his influence with the commander in chief to induce him to take -the offensive. - -"If I did not know you I should think you did not want what you -are asking for. I need only advise anything and his Highness is sure -to do the opposite," replied Bennigsen. - -The Cossack's report, confirmed by horse patrols who were sent -out, was the final proof that events had matured. The tightly coiled -spring was released, the clock began to whirr and the chimes to -play. Despite all his supposed power, his intellect, his experience, -and his knowledge of men, Kutuzov--having taken into consideration the -Cossack's report, a note from Bennigsen who sent personal reports to -the Emperor, the wishes he supposed the Emperor to hold, and the -fact that all the generals expressed the same wish--could no longer -check the inevitable movement, and gave the order to do what he -regarded as useless and harmful--gave his approval, that is, to the -accomplished fact. - - - - - -CHAPTER IV - - -Bennigsen's note and the Cossack's information that the left flank -of the French was unguarded were merely final indications that it -was necessary to order an attack, and it was fixed for the fifth of -October. - -On the morning of the fourth of October Kutuzov signed the -dispositions. Toll read them to Ermolov, asking him to attend to the -further arrangements. - -"All right--all right. I haven't time just now," replied Ermolov, -and left the hut. - -The dispositions drawn up by Toll were very good. As in the -Austerlitz dispositions, it was written--though not in German this -time: - -"The First Column will march here and here," "the Second Column will -march there and there," and so on; and on paper, all these columns -arrived at their places at the appointed time and destroyed the enemy. -Everything had been admirably thought out as is usual in dispositions, -and as is always the case, not a single column reached its place at -the appointed time. - -When the necessary number of copies of the dispositions had been -prepared, an officer was summoned and sent to deliver them to -Ermolov to deal with. A young officer of the Horse Guards, Kutuzov's -orderly, pleased at the importance of the mission entrusted to him, -went to Ermolov's quarters. - -"Gone away," said Ermolov's orderly. - -The officer of the Horse Guards went to a general with whom -Ermolov was often to be found. - -"No, and the general's out too." - -The officer, mounting his horse, rode off to someone else. - -"No, he's gone out." - -"If only they don't make me responsible for this delay! What a -nuisance it is!" thought the officer, and he rode round the whole -camp. One man said he had seen Ermolov ride past with some other -generals, others said he must have returned home. The officer searched -till six o'clock in the evening without even stopping to eat. -Ermolov was nowhere to be found and no one knew where he was. The -officer snatched a little food at a comrade's, and rode again to the -vanguard to find Miloradovich. Miloradovich too was away, but here -he was told that he had gone to a ball at General Kikin's and that -Ermolov was probably there too. - -"But where is it?" - -"Why, there, over at Echkino," said a Cossack officer, pointing to a -country house in the far distance. - -"What, outside our line?" - -"They've put two regiments as outposts, and they're having such a -spree there, it's awful! Two bands and three sets of singers!" - -The officer rode out beyond our lines to Echkino. While still at a -distance he heard as he rode the merry sounds of a soldier's dance -song proceeding from the house. - -"In the meadows... in the meadows!" he heard, accompanied by -whistling and the sound of a torban, drowned every now and then by -shouts. These sounds made his spirits rise, but at the same time he -was afraid that he would be blamed for not having executed sooner -the important order entrusted to him. It was already past eight -o'clock. He dismounted and went up into the porch of a large country -house which had remained intact between the Russian and French forces. -In the refreshment room and the hall, footmen were bustling about with -wine and viands. Groups of singers stood outside the windows. The -officer was admitted and immediately saw all the chief generals of the -army together, and among them Ermolov's big imposing figure. They -all had their coats unbuttoned and were standing in a semicircle -with flushed and animated faces, laughing loudly. In the middle of the -room a short handsome general with a red face was dancing the trepak -with much spirit and agility. - -"Ha, ha, ha! Bravo, Nicholas Ivanych! Ha, ha, ha!" - -The officer felt that by arriving with important orders at such a -moment he was doubly to blame, and he would have preferred to wait; -but one of the generals espied him and, hearing what he had come -about, informed Ermolov. - -Ermolov came forward with a frown on his face and, hearing what -the officer had to say, took the papers from him without a word. - - -"You think he went off just by chance?" said a comrade, who was on -the staff that evening, to the officer of the Horse Guards, -referring to Ermolov. "It was a trick. It was done on purpose to get -Konovnitsyn into trouble. You'll see what a mess there'll be -tomorrow." - - - - - -CHAPTER V - - -Next day the decrepit Kutuzov, having given orders to be called -early, said his prayers, dressed, and, with an unpleasant -consciousness of having to direct a battle he did not approve of, -got into his caleche and drove from Letashovka (a village three and -a half miles from Tarutino) to the place where the attacking columns -were to meet. He sat in the caleche, dozing and waking up by turns, -and listening for any sound of firing on the right as an indication -that the action had begun. But all was still quiet. A damp dull autumn -morning was just dawning. On approaching Tarutino Kutuzov noticed -cavalrymen leading their horses to water across the road along which -he was driving. Kutuzov looked at them searchingly, stopped his -carriage, and inquired what regiment they belonged to. They belonged -to a column that should have been far in front and in ambush long -before then. "It may be a mistake," thought the old commander in -chief. But a little further on he saw infantry regiments with their -arms piled and the soldiers, only partly dressed, eating their rye -porridge and carrying fuel. He sent for an officer. The officer -reported that no order to advance had been received. - -"How! Not rec..." Kutuzov began, but checked himself immediately and -sent for a senior officer. Getting out of his caleche, he waited -with drooping head and breathing heavily, pacing silently up and down. -When Eykhen, the officer of the general staff whom he had summoned, -appeared, Kutuzov went purple in the face, not because that officer -was to blame for the mistake, but because he was an object of -sufficient importance for him to vent his wrath on. Trembling and -panting the old man fell into that state of fury in which he sometimes -used to roll on the ground, and he fell upon Eykhen, threatening him -with his hands, shouting and loading him with gross abuse. Another -man, Captain Brozin, who happened to turn up and who was not at all to -blame, suffered the same fate. - -"What sort of another blackguard are you? I'll have you shot! -Scoundrels!" yelled Kutuzov in a hoarse voice, waving his arms and -reeling. - -He was suffering physically. He, the commander in chief, a Serene -Highness who everybody said possessed powers such as no man had ever -had in Russia, to be placed in this position--made the laughingstock -of the whole army! "I needn't have been in such a hurry to pray -about today, or have kept awake thinking everything over all night," -thought he to himself. "When I was a chit of an officer no one would -have dared to mock me so... and now!" He was in a state of physical -suffering as if from corporal punishment, and could not avoid -expressing it by cries of anger and distress. But his strength soon -began to fail him, and looking about him, conscious of having said -much that was amiss, he again got into his caleche and drove back in -silence. - -His wrath, once expended, did not return, and blinking feebly he -listened to excuses and self-justifications (Ermolov did not come to -see him till the next day) and to the insistence of Bennigsen, -Konovnitsyn, and Toll that the movement that had miscarried should -be executed next day. And once more Kutuzov had to consent. - - - - - -CHAPTER VI - - -Next day the troops assembled in their appointed places in the -evening and advanced during the night. It was an autumn night with -dark purple clouds, but no rain. The ground was damp but not muddy, -and the troops advanced noiselessly, only occasionally a jingling of -the artillery could be faintly heard. The men were forbidden to talk -out loud, to smoke their pipes, or to strike a light, and they tried -to prevent their horses neighing. The secrecy of the undertaking -heightened its charm and they marched gaily. Some columns, -supposing they had reached their destination, halted, piled arms, and -settled down on the cold ground, but the majority marched all night -and arrived at places where they evidently should not have been. - -Only Count Orlov-Denisov with his Cossacks (the least important -detachment of all) got to his appointed place at the right time. -This detachment halted at the outskirts of a forest, on the path -leading from the village of Stromilova to Dmitrovsk. - -Toward dawn, Count Orlov-Denisov, who had dozed off, was awakened by -a deserter from the French army being brought to him. This was a -Polish sergeant of Poniatowski's corps, who explained in Polish that -he had come over because he had been slighted in the service: that -he ought long ago to have been made an officer, that he was braver -than any of them, and so he had left them and wished to pay them -out. He said that Murat was spending the night less than a mile from -where they were, and that if they would let him have a convoy of a -hundred men he would capture him alive. Count Orlov-Denisov -consulted his fellow officers. - -The offer was too tempting to be refused. Everyone volunteered to go -and everybody advised making the attempt. After much disputing and -arguing, Major-General Grekov with two Cossack regiments decided to go -with the Polish sergeant. - -"Now, remember," said Count Orlov-Denisov to the sergeant at -parting, "if you have been lying I'll have you hanged like a dog; -but if it's true you shall have a hundred gold pieces!" - -Without replying, the sergeant, with a resolute air, mounted and -rode away with Grekov whose men had quickly assembled. They -disappeared into the forest, and Count Orlov-Denisov, having seen -Grekov off, returned, shivering from the freshness of the early dawn -and excited by what he had undertaken on his own responsibility, and -began looking at the enemy camp, now just visible in the deceptive -light of dawn and the dying campfires. Our columns ought to have begun -to appear on an open declivity to his right. He looked in that -direction, but though the columns would have been visible quite far -off, they were not to be seen. It seemed to the count that things were -beginning to stir in the French camp, and his keen-sighted adjutant -confirmed this. - -"Oh, it is really too late," said Count Orlov, looking at the camp. - -As often happens when someone we have trusted is no longer before -our eyes, it suddenly seemed quite clear and obvious to him that the -sergeant was an impostor, that he had lied, and that the whole Russian -attack would be ruined by the absence of those two regiments, which he -would lead away heaven only knew where. How could one capture a -commander in chief from among such a mass of troops! - -"I am sure that rascal was lying," said the count. - -"They can still be called back," said one of his suite, who like -Count Orlov felt distrustful of the adventure when he looked at the -enemy's camp. - -"Eh? Really... what do you think? Should we let them go on or not?" - -"Will you have them fetched back?" - -"Fetch them back, fetch them back!" said Count Orlov with sudden -determination, looking at his watch. "It will be too late. It is quite -light." - -And the adjutant galloped through the forest after Grekov. When -Grekov returned, Count Orlov-Denisov, excited both by the abandoned -attempt and by vainly awaiting the infantry columns that still did not -appear, as well as by the proximity of the enemy, resolved to advance. -All his men felt the same excitement. - -"Mount!" he commanded in a whisper. The men took their places and -crossed themselves.... "Forward, with God's aid!" - -"Hurrah-ah-ah!" reverberated in the forest, and the Cossack -companies, trailing their lances and advancing one after another as if -poured out of a sack, dashed gaily across the brook toward the camp. - -One desperate, frightened yell from the first French soldier who saw -the Cossacks, and all who were in the camp, undressed and only just -waking up, ran off in all directions, abandoning cannons, muskets, and -horses. - -Had the Cossacks pursued the French, without heeding what was behind -and around them, they would have captured Murat and everything -there. That was what the officers desired. But it was impossible to -make the Cossacks budge when once they had got booty and prisoners. -None of them listened to orders. Fifteen hundred prisoners and -thirty-eight guns were taken on the spot, besides standards and -(what seemed most important to the Cossacks) horses, saddles, -horsecloths, and the like. All this had to be dealt with, the -prisoners and guns secured, the booty divided--not without some -shouting and even a little themselves--and it was on this that the -Cossacks all busied themselves. - -The French, not being farther pursued, began to recover -themselves: they formed into detachments and began firing. -Orlov-Denisov, still waiting for the other columns to arrive, advanced -no further. - -Meantime, according to the dispositions which said that "the First -Column will march" and so on, the infantry of the belated columns, -commanded by Bennigsen and directed by Toll, had started in due -order and, as always happens, had got somewhere, but not to their -appointed places. As always happens the men, starting cheerfully, -began to halt; murmurs were heard, there was a sense of confusion, and -finally a backward movement. Adjutants and generals galloped about, -shouted, grew angry, quarreled, said they had come quite wrong and -were late, gave vent to a little abuse, and at last gave it all up and -went forward, simply to get somewhere. "We shall get somewhere or -other!" And they did indeed get somewhere, though not to their right -places; a few eventually even got to their right place, but too late -to be of any use and only in time to be fired at. Toll, who in this -battle played the part of Weyrother at Austerlitz, galloped -assiduously from place to place, finding everything upside down -everywhere. Thus he stumbled on Bagovut's corps in a wood when it -was already broad daylight, though the corps should long before have -joined Orlov-Denisov. Excited and vexed by the failure and supposing -that someone must be responsible for it, Toll galloped up to the -commander of the corps and began upbraiding him severely, saying -that he ought to be shot. General Bagovut, a fighting old soldier of -placid temperament, being also upset by all the delay, confusion, -and cross-purposes, fell into a rage to everybody's surprise and quite -contrary to his usual character and said disagreeable things to Toll. - -"I prefer not to take lessons from anyone, but I can die with my men -as well as anybody," he said, and advanced with a single division. - -Coming out onto a field under the enemy's fire, this brave general -went straight ahead, leading his men under fire, without considering -in his agitation whether going into action now, with a single -division, would be of any use or no. Danger, cannon balls, and bullets -were just what he needed in his angry mood. One of the first bullets -killed him, and other bullets killed many of his men. And his division -remained under fire for some time quite uselessly. - - - - - -CHAPTER VII - - -Meanwhile another column was to have attacked the French from the -front, but Kutuzov accompanied that column. He well knew that -nothing but confusion would come of this battle undertaken against his -will, and as far as was in his power held the troops back. He did -not advance. - -He rode silently on his small gray horse, indolently answering -suggestions that they should attack. - -"The word attack is always on your tongue, but you don't see that we -are unable to execute complicated maneuvers," said he to -Miloradovich who asked permission to advance. - -"We couldn't take Murat prisoner this morning or get to the place in -time, and nothing can be done now!" he replied to someone else. - -When Kutuzov was informed that at the French rear--where according -to the reports of the Cossacks there had previously been nobody--there -were now two battalions of Poles, he gave a sidelong glance at Ermolov -who was behind him and to whom he had not spoken since the previous -day. - -"You see! They are asking to attack and making plans of all kinds, -but as soon as one gets to business nothing is ready, and the enemy, -forewarned, takes measures accordingly." - -Ermolov screwed up his eyes and smiled faintly on hearing these -words. He understood that for him the storm had blown over, and that -Kutuzov would content himself with that hint. - -"He's having a little fun at my expense," said Ermolov softly, -nudging with his knee Raevski who was at his side. - -Soon after this, Ermolov moved up to Kutuzov and respectfully -remarked: - -"It is not too late yet, your Highness--the enemy has not gone away- -if you were to order an attack! If not, the Guards will not so much as -see a little smoke." - -Kutuzov did not reply, but when they reported to him that Murat's -troops were in retreat he ordered an advance, though at every -hundred paces he halted for three quarters of an hour. - -The whole battle consisted in what Orlov-Denisov's Cossacks had -done: the rest of the army merely lost some hundreds of men uselessly. - -In consequence of this battle Kutuzov received a diamond decoration, -and Bennigsen some diamonds and a hundred thousand rubles, others also -received pleasant recognitions corresponding to their various -grades, and following the battle fresh changes were made in the staff. - -"That's how everything is done with us, all topsy-turvy!" said the -Russian officers and generals after the Tarutino battle, letting it be -understood that some fool there is doing things all wrong but that -we ourselves should not have done so, just as people speak today. -But people who talk like that either do not know what they are talking -about or deliberately deceive themselves. No battle--Tarutino, -Borodino, or Austerlitz--takes place as those who planned it -anticipated. That is an essential condition. - -A countless number of free forces (for nowhere is man freer than -during a battle, where it is a question of life and death) influence -the course taken by the fight, and that course never can be known in -advance and never coincides with the direction of any one force. - -If many simultaneously and variously directed forces act on a -given body, the direction of its motion cannot coincide with any one -of those forces, but will always be a mean--what in mechanics is -represented by the diagonal of a parallelogram of forces. - -If in the descriptions given by historians, especially French -ones, we find their wars and battles carried out in accordance with -previously formed plans, the only conclusion to be drawn is that those -descriptions are false. - -The battle of Tarutino obviously did not attain the aim Toll had -in view--to lead the troops into action in the order prescribed by the -dispositions; nor that which Count Orlov-Denisov may have had in view- -to take Murat prisoner; nor the result of immediately destroying the -whole corps, which Bennigsen and others may have had in view; nor -the aim of the officer who wished to go into action to distinguish -himself; nor that of the Cossack who wanted more booty than he got, -and so on. But if the aim of the battle was what actually resulted and -what all the Russians of that day desired--to drive the French out -of Russia and destroy their army--it is quite clear that the battle of -Tarutino, just because of its incongruities, was exactly what was -wanted at that stage of the campaign. It would be difficult and even -impossible to imagine any result more opportune than the actual -outcome of this battle. With a minimum of effort and insignificant -losses, despite the greatest confusion, the most important results -of the whole campaign were attained: the transition from retreat to -advance, an exposure of the weakness of the French, and the -administration of that shock which Napoleon's army had only awaited to -begin its flight. - - - - - -CHAPTER VIII - - -Napoleon enters Moscow after the brilliant victory de la Moskowa; -there can be no doubt about the victory for the battlefield remains in -the hands of the French. The Russians retreat and abandon their -ancient capital. Moscow, abounding in provisions, arms, munitions, and -incalculable wealth, is in Napoleon's hands. The Russian army, only -half the strength of the French, does not make a single attempt to -attack for a whole month. Napoleon's position is most brilliant. He -can either fall on the Russian army with double its strength and -destroy it; negotiate an advantageous peace, or in case of a refusal -make a menacing move on Petersburg, or even, in the case of a reverse, -return to Smolensk or Vilna; or remain in Moscow; in short, no special -genius would seem to be required to retain the brilliant position -the French held at that time. For that, only very simple and easy -steps were necessary: not to allow the troops to loot, to prepare -winter clothing--of which there was sufficient in Moscow for the whole -army--and methodically to collect the provisions, of which -(according to the French historians) there were enough in Moscow to -supply the whole army for six months. Yet Napoleon, that greatest of -all geniuses, who the historians declare had control of the army, took -none of these steps. - -He not merely did nothing of the kind, but on the contrary he used -his power to select the most foolish and ruinous of all the courses -open to him. Of all that Napoleon might have done: wintering in -Moscow, advancing on Petersburg or on Nizhni-Novgorod, or retiring -by a more northerly or more southerly route (say by the road Kutuzov -afterwards took), nothing more stupid or disastrous can be imagined -than what he actually did. He remained in Moscow till October, letting -the troops plunder the city; then, hesitating whether to leave a -garrison behind him, he quitted Moscow, approached Kutuzov without -joining battle, turned to the right and reached Malo-Yaroslavets, -again without attempting to break through and take the road Kutuzov -took, but retiring instead to Mozhaysk along the devastated Smolensk -road. Nothing more stupid than that could have been devised, or more -disastrous for the army, as the sequel showed. Had Napoleon's aim been -to destroy his army, the most skillful strategist could hardly have -devised any series of actions that would so completely have -accomplished that purpose, independently of anything the Russian -army might do. - - -Napoleon, the man of genius, did this! But to say that he -destroyed his army because he wished to, or because he was very -stupid, would be as unjust as to say that he had brought his troops to -Moscow because he wished to and because he was very clever and a -genius. - -In both cases his personal activity, having no more force than the -personal activity of any soldier, merely coincided with the laws -that guided the event. - -The historians quite falsely represent Napoleon's faculties as -having weakened in Moscow, and do so only because the results did -not justify his actions. He employed all his ability and strength to -do the best he could for himself and his army, as he had done -previously and as he did subsequently in 1813. His activity at that -time was no less astounding than it was in Egypt, in Italy, in -Austria, and in Prussia. We do not know for certain in how far his -genius was genuine in Egypt--where forty centuries looked down upon -his grandeur--for his great exploits there are all told us by -Frenchmen. We cannot accurately estimate his genius in Austria or -Prussia, for we have to draw our information from French or German -sources, and the incomprehensible surrender of whole corps without -fighting and of fortresses without a siege must incline Germans to -recognize his genius as the only explanation of the war carried on -in Germany. But we, thank God, have no need to recognize his genius in -order to hide our shame. We have paid for the right to look at the -matter plainly and simply, and we will not abandon that right. - -His activity in Moscow was as amazing and as full of genius as -elsewhere. Order after order order and plan after plan were issued -by him from the time he entered Moscow till the time he left it. The -absence of citizens and of a deputation, and even the burning of -Moscow, did not disconcert him. He did not lose sight either of the -welfare of his army or of the doings of the enemy, or of the welfare -of the people of Russia, or of the direction of affairs in Paris, or -of diplomatic considerations concerning the terms of the anticipated -peace. - - - - - -CHAPTER IX - - -With regard to military matters, Napoleon immediately on his entry -into Moscow gave General Sabastiani strict orders to observe the -movements of the Russian army, sent army corps out along the different -roads, and charged Murat to find Kutuzov. Then he gave careful -directions about the fortification of the Kremlin, and drew up a -brilliant plan for a future campaign over the whole map of Russia. - -With regard to diplomatic questions, Napoleon summoned Captain -Yakovlev, who had been robbed and was in rags and did not know how -to get out of Moscow, minutely explained to him his whole policy and -his magnanimity, and having written a letter to the Emperor -Alexander in which he considered it his duty to inform his Friend -and Brother that Rostopchin had managed affairs badly in Moscow, he -dispatched Yakovlev to Petersburg. - -Having similarly explained his views and his magnanimity to -Tutolmin, he dispatched that old man also to Petersburg to negotiate. - -With regard to legal matters, immediately after the fires he gave -orders to find and execute the incendiaries. And the scoundrel -Rostopchin was punished by an order to burn down his houses. - -With regard to administrative matters, Moscow was granted a -constitution. A municipality was established and the following -announcement issued: - - -INHABITANTS OF MOSCOW! - -Your misfortunes are cruel, but His Majesty the Emperor and King -desires to arrest their course. Terrible examples have taught you -how he punishes disobedience and crime. Strict measures have been -taken to put an end to disorder and to re-establish public security. A -paternal administration, chosen from among yourselves, will form -your municipality or city government. It will take care of you, of -your needs, and of your welfare. Its members will be distinguished -by a red ribbon worn across the shoulder, and the mayor of the city -will wear a white belt as well. But when not on duty they will only -wear a red ribbon round the left arm. - -The city police is established on its former footing, and better -order already prevails in consequence of its activity. The -government has appointed two commissaries general, or chiefs of -police, and twenty commissaries or captains of wards have been -appointed to the different wards of the city. You will recognize -them by the white ribbon they will wear on the left arm. Several -churches of different denominations are open, and divine service is -performed in them unhindered. Your fellow citizens are returning every -day to their homes. and orders have been given that they should find -in them the help and protection due to their misfortunes. These are -the measures the government has adopted to re-establish order and -relieve your condition. But to achieve this aim it is necessary that -you should add your efforts and should, if possible, forget the -misfortunes you have suffered, should entertain the hope of a less -cruel fate, should be certain that inevitable and ignominious death -awaits those who make any attempt on your persons or on what remains -of your property, and finally that you should not doubt that these -will be safeguarded, since such is the will of the greatest and most -just of monarchs. Soldiers and citizens, of whatever nation you may -be, re-establish public confidence, the source of the welfare of a -state, live like brothers, render mutual aid and protection one to -another, unite to defeat the intentions of the evil-minded, obey the -military and civil authorities, and your tears will soon cease to -flow! - - -With regard to supplies for the army, Napoleon decreed that all -the troops in turn should enter Moscow a la maraude* to obtain -provisions for themselves, so that the army might have its future -provided for. - - -*As looters. - - -With regard to religion, Napoleon ordered the priests to be -brought back and services to be again performed in the churches. - -With regard to commerce and to provisioning the army, the -following was placarded everywhere: - - -PROCLAMATION! - -You, peaceful inhabitants of Moscow, artisans and workmen whom -misfortune has driven from the city, and you scattered tillers of -the soil, still kept out in the fields by groundless fear, listen! -Tranquillity is returning to this capital and order is being -restored in it. Your fellow countrymen are emerging boldly from -their hiding places on finding that they are respected. Any violence -to them or to their property is promptly punished. His Majesty the -Emperor and King protects them, and considers no one among you his -enemy except those who disobey his orders. He desires to end your -misfortunes and restore you to your homes and families. Respond, -therefore, to his benevolent intentions and come to us without fear. -Inhabitants, return with confidence to your abodes! You will soon find -means of satisfying your needs. Craftsmen and industrious artisans, -return to your work, your houses, your shops, where the protection -of guards awaits you! You shall receive proper pay for your work. -And lastly you too, peasants, come from the forests where you are -hiding in terror, return to your huts without fear, in full -assurance that you will find protection! Markets are established in -the city where peasants can bring their surplus supplies and the -products of the soil. The government has taken the following steps -to ensure freedom of sale for them: (1) From today, peasants, -husbandmen, and those living in the neighborhood of Moscow may without -any danger bring their supplies of all kinds to two appointed markets, -of which one is on the Mokhovaya Street and the other at the Provision -Market. (2) Such supplies will be bought from them at such prices as -seller and buyer may agree on, and if a seller is unable to obtain a -fair price he will be free to take his goods back to his village and -no one may hinder him under any pretense. (3) Sunday and Wednesday -of each week are appointed as the chief market days and to that end -a sufficient number of troops will be stationed along the highroads on -Tuesdays and Saturdays at such distances from the town as to protect -the carts. (4) Similar measures will be taken that peasants with their -carts and horses may meet with no hindrance on their return journey. -(5) Steps will immediately be taken to re-establish ordinary trading. - -Inhabitants of the city and villages, and you, workingmen and -artisans, to whatever nation you belong, you are called on to carry -out the paternal intentions of His Majesty the Emperor and King and to -co-operate with him for the public welfare! Lay your respect and -confidence at his feet and do not delay to unite with us! - - -With the object of raising the spirits of the troops and of the -people, reviews were constantly held and rewards distributed. The -Emperor rode through the streets to comfort the inhabitants, and, -despite his preoccupation with state affairs, himself visited the -theaters that were established by his order. - -In regard to philanthropy, the greatest virtue of crowned heads, -Napoleon also did all in his power. He caused the words Maison de ma -Mere to be inscribed on the charitable institutions, thereby combining -tender filial affection with the majestic benevolence of a monarch. He -visited the Foundling Hospital and, allowing the orphans saved by -him to kiss his white hands, graciously conversed with Tutolmin. Then, -as Thiers eloquently recounts, he ordered his soldiers to be paid in -forged Russian money which he had prepared: "Raising the use of -these means by an act worthy of himself and of the French army, he let -relief be distributed to those who had been burned out. But as food -was too precious to be given to foreigners, who were for the most part -enemies, Napoleon preferred to supply them with money with which to -purchase food from outside, and had paper rubles distributed to them." - -With reference to army discipline, orders were continually being -issued to inflict severe punishment for the nonperformance of military -duties and to suppress robbery. - - - - - -CHAPTER X - - -But strange to say, all these measures, efforts, and plans--which -were not at all worse than others issued in similar circumstances--did -not affect the essence of the matter but, like the hands of a clock -detached from the mechanism, swung about in an arbitrary and aimless -way without engaging the cogwheels. - -With reference to the military side--the plan of campaign--that work -of genius of which Thiers remarks that, "His genius never devised -anything more profound, more skillful, or more admirable," and -enters into a polemic with M. Fain to prove that this work of genius -must be referred not to the fourth but to the fifteenth of October- -that plan never was or could be executed, for it was quite out of -touch with the facts of the case. The fortifying of the Kremlin, for -which la Mosquee (as Napoleon termed the church of Basil the -Beatified) was to have been razed to the ground, proved quite useless. -The mining of the Kremlin only helped toward fulfilling Napoleon's -wish that it should be blown up when he left Moscow--as a child -wants the floor on which he has hurt himself to be beaten. The pursuit -of the Russian army, about which Napoleon was so concerned, produced -an unheard-of result. The French generals lost touch with the -Russian army of sixty thousand men, and according to Thiers it was -only eventually found, like a lost pin, by the skill--and apparently -the genius--of Murat. - -With reference to diplomacy, all Napoleon's arguments as to his -magnanimity and justice, both to Tutolmin and to Yakovlev (whose chief -concern was to obtain a greatcoat and a conveyance), proved useless; -Alexander did not receive these envoys and did not reply to their -embassage. - -With regard to legal matters, after the execution of the supposed -incendiaries the rest of Moscow burned down. - -With regard to administrative matters, the establishment of a -municipality did not stop the robberies and was only of use to certain -people who formed part of that municipality and under pretext of -preserving order looted Moscow or saved their own property from -being looted. - -With regard to religion, as to which in Egypt matters had so -easily been settled by Napoleon's visit to a mosque, no results were -achieved. Two or three priests who were found in Moscow did try to -carry out Napoleon's wish, but one of them was slapped in the face -by a French soldier while conducting service, and a French official -reported of another that: "The priest whom I found and invited to -say Mass cleaned and locked up the church. That night the doors were -again broken open, the padlocks smashed, the books mutilated, and -other disorders perpetrated." - -With reference to commerce, the proclamation to industrious -workmen and to peasants evoked no response. There were no -industrious workmen, and the peasants caught the commissaries who -ventured too far out of town with the proclamation and killed them. - -As to the theaters for the entertainment of the people and the -troops, these did not meet with success either. The theaters set up in -the Kremlin and in Posnyakov's house were closed again at once because -the actors and actresses were robbed. - -Even philanthropy did not have the desired effect. The genuine as -well as the false paper money which flooded Moscow lost its value. The -French, collecting booty, cared only for gold. Not only was the -paper money valueless which Napoleon so graciously distributed to -the unfortunate, but even silver lost its value in relation to gold. - -But the most amazing example of the ineffectiveness of the orders -given by the authorities at that time was Napoleon's attempt to stop -the looting and re-establish discipline. - -This is what the army authorities were reporting: - -"Looting continues in the city despite the decrees against it. Order -is not yet restored and not a single merchant is carrying on trade -in a lawful manner. The sutlers alone venture to trade, and they -sell stolen goods." - -"The neighborhood of my ward continues to be pillaged by soldiers of -the 3rd Corps who, not satisfied with taking from the unfortunate -inhabitants hiding in the cellars the little they have left, even have -the ferocity to wound them with their sabers, as I have repeatedly -witnessed." - -"Nothing new, except that the soldiers are robbing and pillaging- -October 9." - -"Robbery and pillaging continue. There is a band of thieves in our -district who ought to be arrested by a strong force--October 11." - -"The Emperor is extremely displeased that despite the strict -orders to stop pillage, parties of marauding Guards are continually -seen returning to the Kremlin. Among the Old Guard disorder and -pillage were renewed more violently than ever yesterday evening, -last night, and today. The Emperor sees with regret that the picked -soldiers appointed to guard his person, who should set an example of -discipline, carry disobedience to such a point that they break into -the cellars and stores containing army supplies. Others have disgraced -themselves to the extent of disobeying sentinels and officers, and -have abused and beaten them." - -"The Grand Marshal of the palace," wrote the governor, "complains -bitterly that in spite of repeated orders, the soldiers continue to -commit nuisances in all the courtyards and even under the very windows -of the Emperor." - -That army, like a herd of cattle run wild and trampling underfoot -the provender which might have saved it from starvation, disintegrated -and perished with each additional day it remained in Moscow. But it -did not go away. - -It began to run away only when suddenly seized by a panic caused -by the capture of transport trains on the Smolensk road, and by the -battle of Tarutino. The news of that battle of Tarutino, -unexpectedly received by Napoleon at a review, evoked in him a -desire to punish the Russians (Thiers says), and he issued the order -for departure which the whole army was demanding. - -Fleeing from Moscow the soldiers took with them everything they -had stolen. Napoleon, too, carried away his own personal tresor, but -on seeing the baggage trains that impeded the army, he was (Thiers -says) horror-struck. And yet with his experience of war he did not -order all the superfluous vehicles to be burned, as he had done with -those of a certain marshal when approaching Moscow. He gazed at the -caleches and carriages in which soldiers were riding and remarked that -it was a very good thing, as those vehicles could be used to carry -provisions, the sick, and the wounded. - -The plight of the whole army resembled that of a wounded animal -which feels it is perishing and does not know what it is doing. To -study the skillful tactics and aims of Napoleon and his army from -the time it entered Moscow till it was destroyed is like studying -the dying leaps and shudders of a mortally wounded animal. Very -often a wounded animal, hearing a rustle, rushes straight at the -hunter's gun, runs forward and back again, and hastens its own end. -Napoleon, under pressure from his whole army, did the same thing. -The rustle of the battle of Tarutino frightened the beast, and it -rushed forward onto the hunter's gun, reached him, turned back, and -finally--like any wild beast--ran back along the most -disadvantageous and dangerous path, where the old scent was familiar. - -During the whole of that period Napoleon, who seems to us to have -been the leader of all these movements--as the figurehead of a ship -may seem to a savage to guide the vessel--acted like a child who, -holding a couple of strings inside a carriage, thinks he is driving -it. - - - - - -CHAPTER XI - - -Early in the morning of the sixth of October Pierre went out of -the shed, and on returning stopped by the door to play with a little -blue-gray dog, with a long body and short bandy legs, that jumped -about him. This little dog lived in their shed, sleeping beside -Karataev at night; it sometimes made excursions into the town but -always returned again. Probably it had never had an owner, and it -still belonged to nobody and had no name. The French called it Azor; -the soldier who told stories called it Femgalka; Karataev and others -called it Gray, or sometimes Flabby. Its lack of a master, a name, -or even of a breed or any definite color did not seem to trouble the -blue-gray dog in the least. Its furry tail stood up firm and round -as a plume, its bandy legs served it so well that it would often -gracefully lift a hind leg and run very easily and quickly on three -legs, as if disdaining to use all four. Everything pleased it. Now -it would roll on its back, yelping with delight, now bask in the sun -with a thoughtful air of importance, and now frolic about playing with -a chip of wood or a straw. - -Pierre's attire by now consisted of a dirty torn shirt (the only -remnant of his former clothing), a pair of soldier's trousers which by -Karataev's advice he tied with string round the ankles for warmth, and -a peasant coat and cap. Physically he had changed much during this -time. He no longer seemed stout, though he still had the appearance of -solidity and strength hereditary in his family. A beard and mustache -covered the lower part of his face, and a tangle of hair, infested -with lice, curled round his head like a cap. The look of his eyes -was resolute, calm, and animatedly alert, as never before. The -former slackness which had shown itself even in his eyes was now -replaced by an energetic readiness for action and resistance. His feet -were bare. - -Pierre first looked down the field across which vehicles and -horsemen were passing that morning, then into the distance across -the river, then at the dog who was pretending to be in earnest about -biting him, and then at his bare feet which he placed with pleasure in -various positions, moving his dirty thick big toes. Every time he -looked at his bare feet a smile of animated self-satisfaction -flitted across his face. The sight of them reminded him of all he -had experienced and learned during these weeks and this recollection -was pleasant to him. - -For some days the weather had been calm and clear with slight frosts -in the mornings--what is called an "old wives' summer." - -In the sunshine the air was warm, and that warmth was particularly -pleasant with the invigorating freshness of the morning frost still in -the air. - -On everything--far and near--lay the magic crystal glitter seen only -at that time autumn. The Sparrow Hills were visible in the distance, -with the village, the church, and the large white house. The bare -trees, the sand, the bricks and roofs of the houses, the green -church spire, and the corners of the white house in the distance, -all stood out in the transparent air in most delicate outline and with -unnatural clearness. Near by could be seen the familiar ruins of a -half-burned mansion occupied by the French, with lilac bushes still -showing dark green beside the fence. And even that ruined and befouled -house--which in dull weather was repulsively ugly--seemed quietly -beautiful now, in the clear, motionless brilliance. - -A French corporal, with coat unbuttoned in a homely way, a -skullcap on his head, and a short pipe in his mouth, came from -behind a corner of the shed and approached Pierre with a friendly -wink. - -"What sunshine, Monsieur Kiril!" (Their name for Pierre.) "Eh? -Just like spring!" - -And the corporal leaned against the door and offered Pierre his -pipe, though whenever he offered it Pierre always declined it. - -"To be on the march in such weather..." he began. - -Pierre inquired what was being said about leaving, and the -corporal told him that nearly all the troops were starting and there -ought to be an order about the prisoners that day. Sokolov, one of the -soldiers in the shed with Pierre, was dying, and Pierre told the -corporal that something should be done about him. The corporal replied -that Pierre need not worry about that as they had an ambulance and a -permanent hospital and arrangements would be made for the sick, and -that in general everything that could happen had been foreseen by -the authorities. - -"Besides, Monsieur Kiril, you have only to say a word to the -captain, you know. He is a man who never forgets anything. Speak to -the captain when he makes his round, he will do anything for you." - -(The captain of whom the corporal spoke often had long chats with -Pierre and showed him all sorts of favors.) - -"'You see, St. Thomas,' he said to me the other day. 'Monsieur Kiril -is a man of education, who speaks French. He is a Russian seigneur who -has had misfortunes, but he is a man. He knows what's what.... If he -wants anything and asks me, he won't get a refusal. When one has -studied, you see, one likes education and well-bred people.' It is for -your sake I mention it, Monsieur Kiril. The other day if it had not -been for you that affair would have ended ill." - -And after chatting a while longer, the corporal went away. (The -affair he had alluded to had happened a few days before--a fight -between the prisoners and the French soldiers, in which Pierre had -succeeded in pacifying his comrades.) Some of the prisoners who had -heard Pierre talking to the corporal immediately asked what the -Frenchman had said. While Pierre was repeating what he had been told -about the army leaving Moscow, a thin, sallow, tattered French soldier -came up to the door of the shed. Rapidly and timidly raising his -fingers to his forehead by way of greeting, he asked Pierre whether -the soldier Platoche to whom he had given a shirt to sew was in that -shed. - -A week before the French had had boot leather and linen issued to -them, which they had given out to the prisoners to make up into -boots and shirts for them. - -"Ready, ready, dear fellow!" said Karataev, coming out with a neatly -folded shirt. - -Karataev, on account of the warm weather and for convenience at -work, was wearing only trousers and a tattered shirt as black as soot. -His hair was bound round, workman fashion, with a wisp of lime-tree -bast, and his round face seemed rounder and pleasanter than ever. - -"A promise is own brother to performance! I said Friday and here -it is, ready," said Platon, smiling and unfolding the shirt he had -sewn. - -The Frenchman glanced around uneasily and then, as if overcoming his -hesitation, rapidly threw off his uniform and put on the shirt. He had -a long, greasy, flowered silk waistcoat next to his sallow, thin -bare body, but no shirt. He was evidently afraid the prisoners looking -on would laugh at him, and thrust his head into the shirt hurriedly. -None of the prisoners said a word. - -"See, it fits well!" Platon kept repeating, pulling the shirt -straight. - -The Frenchman, having pushed his head and hands through, without -raising his eyes, looked down at the shirt and examined the seams. - -"You see, dear man, this is not a sewing shop, and I had no proper -tools; and, as they say, one needs a tool even to kill a louse," -said Platon with one of his round smiles, obviously pleased with his -work. - -"It's good, quite good, thank you," said the Frenchman, in French, -"but there must be some linen left over. - -"It will fit better still when it sets to your body," said Karataev, -still admiring his handiwork. "You'll be nice and comfortable...." - -"Thanks, thanks, old fellow.... But the bits left over?" said the -Frenchman again and smiled. He took out an assignation ruble note -and gave it to Karataev. "But give me the pieces that are over." - -Pierre saw that Platon did not want to understand what the Frenchman -was saying, and he looked on without interfering. Karataev thanked the -Frenchman for the money and went on admiring his own work. The -Frenchman insisted on having the pieces returned that were left over -and asked Pierre to translate what he said. - -"What does he want the bits for?" said Karataev. "They'd make fine -leg bands for us. Well, never mind." - -And Karataev, with a suddenly changed and saddened expression, -took a small bundle of scraps from inside his shirt and gave it to the -Frenchman without looking at him. "Oh dear!" muttered Karataev and -went away. The Frenchman looked at the linen, considered for a moment, -then looked inquiringly at Pierre and, as if Pierre's look had told -him something, suddenly blushed and shouted in a squeaky voice: - -"Platoche! Eh, Platoche! Keep them yourself!" And handing back the -odd bits he turned and went out. - -"There, look at that," said Karataev, swaying his head. "People said -they were not Christians, but they too have souls. It's what the old -folk used to say: 'A sweating hand's an open hand, a dry hand's -close.' He's naked, but yet he's given it back." - -Karataev smiled thoughtfully and was silent awhile looking at the -pieces. - -"But they'll make grand leg bands, dear friend," he said, and went -back into the shed. - - - - - -CHAPTER XII - - -Four weeks had passed since Pierre had been taken prisoner and -though the French had offered to move him from the men's to the -officers' shed, he had stayed in the shed where he was first put. - -In burned and devastated Moscow Pierre experienced almost the -extreme limits of privation a man can endure; but thanks to his -physical strength and health, of which he had till then been -unconscious, and thanks especially to the fact that the privations -came so gradually that it was impossible to say when they began, he -endured his position not only lightly but joyfully. And just at this -time he obtained the tranquillity and ease of mind he had formerly -striven in vain to reach. He had long sought in different ways that -tranquillity of mind, that inner harmony which had so impressed him in -the soldiers at the battle of Borodino. He had sought it in -philanthropy, in Freemasonry, in the dissipations of town life, in -wine, in heroic feats of self-sacrifice, and in romantic love for -Natasha; he had sought it by reasoning--and all these quests and -experiments had failed him. And now without thinking about it he had -found that peace and inner harmony only through the horror of death, -through privation, and through what he recognized in Karataev. - -Those dreadful moments he had lived through at the executions had as -it were forever washed away from his imagination and memory the -agitating thoughts and feelings that had formerly seemed so important. -It did not now occur to him to think of Russia, or the war, or -politics, or Napoleon. It was plain to him that all these things -were no business of his, and that he was not called on to judge -concerning them and therefore could not do so. "Russia and summer -weather are not bound together," he thought, repeating words of -Karataev's which he found strangely consoling. His intention of -killing Napoleon and his calculations of the cabalistic number of -the beast of the Apocalypse now seemed to him meaningless and even -ridiculous. His anger with his wife and anxiety that his name should -not be smirched now seemed not merely trivial but even amusing. What -concern was it of his that somewhere or other that woman was leading -the life she preferred? What did it matter to anybody, and -especially to him, whether or not they found out that their prisoner's -name was Count Bezukhov? - -He now often remembered his conversation with Prince Andrew and -quite agreed with him, though he understood Prince Andrew's thoughts -somewhat differently. Prince Andrew had thought and said that -happiness could only be negative, but had said it with a shade of -bitterness and irony as though he was really saying that all desire -for positive happiness is implanted in us merely to torment us and -never be satisfied. But Pierre believed it without any mental -reservation. The absence of suffering, the satisfaction of one's needs -and consequent freedom in the choice of one's occupation, that is, -of one's way of life, now seemed to Pierre to be indubitably man's -highest happiness. Here and now for the first time he fully -appreciated the enjoyment of eating when he wanted to eat, drinking -when he wanted to drink, sleeping when he wanted to sleep, of warmth -when he was cold, of talking to a fellow man when he wished to talk -and to hear a human voice. The satisfaction of one's needs--good food, -cleanliness, and freedom--now that he was deprived of all this, seemed -to Pierre to constitute perfect happiness; and the choice of -occupation, that is, of his way of life--now that that was so -restricted--seemed to him such an easy matter that he forgot that a -superfluity of the comforts of life destroys all joy in satisfying -one's needs, while great freedom in the choice of occupation--such -freedom as his wealth, his education, and his social position had -given him in his own life--is just what makes the choice of occupation -insolubly difficult and destroys the desire and possibility of -having an occupation. - -All Pierre's daydreams now turned on the time when he would be free. -Yet subsequently, and for the rest of his life, he thought and spoke -with enthusiasm of that month of captivity, of those irrecoverable, -strong, joyful sensations, and chiefly of the complete peace of mind -and inner freedom which he experienced only during those weeks. - -When on the first day he got up early, went out of the shed at dawn, -and saw the cupolas and crosses of the New Convent of the Virgin still -dark at first, the hoarfrost on the dusty grass, the Sparrow Hills, -and the wooded banks above the winding river vanishing in the purple -distance, when he felt the contact of the fresh air and heard the -noise of the crows flying from Moscow across the field, and when -afterwards light gleamed from the east and the sun's rim appeared -solemnly from behind a cloud, and the cupolas and crosses, the -hoarfrost, the distance and the river, all began to sparkle in the -glad light--Pierre felt a new joy and strength in life such as he -had never before known. And this not only stayed with him during the -whole of his imprisonment, but even grew in strength as the -hardships of his position increased. - -That feeling of alertness and of readiness for anything was still -further strengthened in him by the high opinion his fellow prisoners -formed of him soon after his arrival at the shed. With his knowledge -of languages, the respect shown him by the French, his simplicity, his -readiness to give anything asked of him (he received the allowance -of three rubles a week made to officers); with his strength, which -he showed to the soldiers by pressing nails into the walls of the hut; -his gentleness to his companions, and his capacity for sitting still -and thinking without doing anything (which seemed to them -incomprehensible), he appeared to them a rather mysterious and -superior being. The very qualities that had been a hindrance, if not -actually harmful, to him in the world he had lived in--his strength, -his disdain for the comforts of life, his absent-mindedness and -simplicity--here among these people gave him almost the status of a -hero. And Pierre felt that their opinion placed responsibilities -upon him. - - - - -CHAPTER XIII - - -The French evacuation began on the night between the sixth and -seventh of October: kitchens and sheds were dismantled, carts -loaded, and troops and baggage trains started. - -At seven in the morning a French convoy in marching trim, wearing -shakos and carrying muskets, knapsacks, and enormous sacks, stood in -front of the sheds, and animated French talk mingled with curses -sounded all along the lines. - -In the shed everyone was ready, dressed, belted, shod, and only -awaited the order to start. The sick soldier, Sokolov, pale and thin -with dark shadows round his eyes, alone sat in his place barefoot -and not dressed. His eyes, prominent from the emaciation of his -face, gazed inquiringly at his comrades who were paying no attention -to him, and he moaned regularly and quietly. It was evidently not so -much his sufferings that caused him to moan (he had dysentery) as -his fear and grief at being left alone. - -Pierre, girt with a rope round his waist and wearing shoes -Karataev had made for him from some leather a French soldier had -torn off a tea chest and brought to have his boots mended with, went -up to the sick man and squatted down beside him. - -"You know, Sokolov, they are not all going away! They have a -hospital here. You may be better off than we others," said Pierre. - -"O Lord! Oh, it will be the death of me! O Lord!" moaned the man -in a louder voice. - -"I'll go and ask them again directly," said Pierre, rising and going -to the door of the shed. - -Just as Pierre reached the door, the corporal who had offered him -a pipe the day before came up to it with two soldiers. The corporal -and soldiers were in marching kit with knapsacks and shakos that had -metal straps, and these changed their familiar faces. - -The corporal came, according to orders, to shut the door. The -prisoners had to be counted before being let out. - -"Corporal, what will they do with the sick man?..." Pierre began. - -But even as he spoke he began to doubt whether this was the corporal -he knew or a stranger, so unlike himself did the corporal seem at that -moment. Moreover, just as Pierre was speaking a sharp rattle of -drums was suddenly heard from both sides. The corporal frowned at -Pierre's words and, uttering some meaningless oaths, slammed the door. -The shed became semidark, and the sharp rattle of the drums on two -sides drowned the sick man's groans. - -"There it is!... It again!..." said Pierre to himself, and an -involuntary shudder ran down his spine. In the corporal's changed -face, in the sound of his voice, in the stirring and deafening noise -of the drums, he recognized that mysterious, callous force which -compelled people against their will to kill their fellow men--that -force the effect of which he had witnessed during the executions. To -fear or to try to escape that force, to address entreaties or -exhortations to those who served as its tools, was useless. Pierre -knew this now. One had to wait and endure. He did not again go to -the sick man, nor turn to look at him, but stood frowning by the -door of the hut. - -When that door was opened and the prisoners, crowding against one -another like a flock of sheep, squeezed into the exit, Pierre pushed -his way forward and approached that very captain who as the corporal -had assured him was ready to do anything for him. The captain was also -in marching kit, and on his cold face appeared that same it which -Pierre had recognized in the corporal's words and in the roll of the -drums. - -"Pass on, pass on!" the captain reiterated, frowning sternly, and -looking at the prisoners who thronged past him. - -Pierre went up to him, though he knew his attempt would be vain. - -"What now?" the officer asked with a cold look as if not recognizing -Pierre. - -Pierre told him about the sick man. - -"He'll manage to walk, devil take him!" said the captain. "Pass -on, pass on!" he continued without looking at Pierre. - -"But he is dying," Pierre again began. - -"Be so good..." shouted the captain, frowning angrily. - -"Dram-da-da-dam, dam-dam..." rattled the drums, and Pierre -understood that this mysterious force completely controlled these -men and that it was now useless to say any more. - -The officer prisoners were separated from the soldiers and told to -march in front. There were about thirty officers, with Pierre among -them, and about three hundred men. - -The officers, who had come from the other sheds, were all -strangers to Pierre and much better dressed than he. They looked at -him and at his shoes mistrustfully, as at an alien. Not far from him -walked a fat major with a sallow, bloated, angry face, who was wearing -a Kazan dressing grown tied round with a towel, and who evidently -enjoyed the respect of his fellow prisoners. He kept one hand, in -which he clasped his tobacco pouch, inside the bosom of his dressing -gown and held the stem of his pipe firmly with the other. Panting -and puffing, the major grumbled and growled at everybody because he -thought he was being pushed and that they were all hurrying when -they had nowhere to hurry to and were all surprised at something -when there was nothing to be surprised at. Another, a thin little -officer, was speaking to everyone, conjecturing where they were now -being taken and how far they would get that day. An official in felt -boots and wearing a commissariat uniform ran round from side to side -and gazed at the ruins of Moscow, loudly announcing his observations -as to what had been burned down and what this or that part of the city -was that they could see. A third officer, who by his accent was a -Pole, disputed with the commissariat officer, arguing that he was -mistaken in his identification of the different wards of Moscow. - -"What are you disputing about?" said the major angrily. "What does -it matter whether it is St. Nicholas or St. Blasius? You see it's -burned down, and there's an end of it.... What are you pushing for? -Isn't the road wide enough?" said he, turning to a man behind him -who was not pushing him at all. - -"Oh, oh, oh! What have they done?" the prisoners on one side and -another were heard saying as they gazed on the charred ruins. "All -beyond the river, and Zubova, and in the Kremlin.... Just look! -There's not half of it left. Yes, I told you--the whole quarter beyond -the river, and so it is." - -"Well, you know it's burned, so what's the use of talking?" said the -major. - -As they passed near a church in the Khamovniki (one of the few -unburned quarters of Moscow) the whole mass of prisoners suddenly -started to one side and exclamations of horror and disgust were heard. - -"Ah, the villains! What heathens! Yes; dead, dead, so he is... And -smeared with something!" - -Pierre too drew near the church where the thing was that evoked -these exclamations, and dimly made out something leaning against the -palings surrounding the church. From the words of his comrades who saw -better than he did, he found that this was the body of a man, set -upright against the palings with its face smeared with soot. - -"Go on! What the devil... Go on! Thirty thousand devils!..." the -convoy guards began cursing and the French soldiers, with fresh -virulence, drove away with their swords the crowd of prisoners who -were gazing at the dead man. - - - - - -CHAPTER XIV - - -Through the cross streets of the Khamovniki quarter the prisoners -marched, followed only by their escort and the vehicles and wagons -belonging to that escort, but when they reached the supply stores they -came among a huge and closely packed train of artillery mingled with -private vehicles. - -At the bridge they all halted, waiting for those in front to get -across. From the bridge they had a view of endless lines of moving -baggage trains before and behind them. To the right, where the -Kaluga road turns near Neskuchny, endless rows of troops and carts -stretched away into the distance. These were troops of Beauharnais' -corps which had started before any of the others. Behind, along the -riverside and across the Stone Bridge, were Ney's troops and -transport. - -Davout's troops, in whose charge were the prisoners, were crossing -the Crimean bridge and some were already debouching into the Kaluga -road. But the baggage trains stretched out so that the last of -Beauharnais' train had not yet got out of Moscow and reached the -Kaluga road when the vanguard of Ney's army was already emerging -from the Great Ordynka Street. - -When they had crossed the Crimean bridge the prisoners moved a few -steps forward, halted, and again moved on, and from all sides vehicles -and men crowded closer and closer together. They advanced the few -hundred paces that separated the bridge from the Kaluga road, taking -more than an hour to do so, and came out upon the square where the -streets of the Transmoskva ward and the Kaluga road converge, and -the prisoners jammed close together had to stand for some hours at -that crossway. From all sides, like the roar of the sea, were heard -the rattle of wheels, the tramp of feet, and incessant shouts of anger -and abuse. Pierre stood pressed against the wall of a charred house, -listening to that noise which mingled in his imagination with the roll -of the drums. - -To get a better view, several officer prisoners climbed onto the -wall of the half-burned house against which Pierre was leaning. - -"What crowds! Just look at the crowds!... They've loaded goods -even on the cannon! Look there, those are furs!" they exclaimed. "Just -see what the blackguards have looted.... There! See what that one -has behind in the cart.... Why, those are settings taken from some -icons, by heaven!... Oh, the rascals!... See how that fellow has -loaded himself up, he can hardly walk! Good lord, they've even grabbed -those chaises!... See that fellow there sitting on the trunks.... -Heavens! They're fighting." - -"That's right, hit him on the snout--on his snout! Like this, we -shan't get away before evening. Look, look there.... Why, that must be -Napoleon's own. See what horses! And the monograms with a crown! -It's like a portable house.... That fellow's dropped his sack and -doesn't see it. Fighting again... A woman with a baby, and not -bad-looking either! Yes, I dare say, that's the way they'll let you -pass... Just look, there's no end to it. Russian wenches, by heaven, -so they are! In carriages--see how comfortably they've settled -themselves!" - -Again, as at the church in Khamovniki, a wave of general curiosity -bore all the prisoners forward onto the road, and Pierre, thanks to -his stature, saw over the heads of the others what so attracted -their curiosity. In three carriages involved among the munition carts, -closely squeezed together, sat women with rouged faces, dressed in -glaring colors, who were shouting something in shrill voices. - -From the moment Pierre had recognized the appearance of the -mysterious force nothing had seemed to him strange or dreadful: -neither the corpse smeared with soot for fun nor these women -hurrying away nor the burned ruins of Moscow. All that he now -witnessed scarcely made an impression on him--as if his soul, making -ready for a hard struggle, refused to receive impressions that might -weaken it. - -The women's vehicles drove by. Behind them came more carts, -soldiers, wagons, soldiers, gun carriages, carriages, soldiers, -ammunition carts, more soldiers, and now and then women. - -Pierre did not see the people as individuals but saw their movement. - -All these people and horses seemed driven forward by some -invisible power. During the hour Pierre watched them they all came -flowing from the different streets with one and the same desire to get -on quickly; they all jostled one another, began to grow angry and to -fight, white teeth gleamed, brows frowned, ever the same words of -abuse flew from side to side, and all the faces bore the same -swaggeringly resolute and coldly cruel expression that had struck -Pierre that morning on the corporal's face when the drums were -beating. - -It was not till nearly evening that the officer commanding the -escort collected his men and with shouts and quarrels forced his way -in among the baggage trains, and the prisoners, hemmed in on all -sides, emerged onto the Kaluga road. - -They marched very quickly, without resting, and halted only when the -sun began to set. The baggage carts drew up close together and the men -began to prepare for their night's rest. They all appeared angry and -dissatisfied. For a long time, oaths, angry shouts, and fighting could -be heard from all sides. A carriage that followed the escort ran -into one of the carts and knocked a hole in it with its pole. -Several soldiers ran toward the cart from different sides: some beat -the carriage horses on their heads, turning them aside, others -fought among themselves, and Pierre saw that one German was badly -wounded on the head by a sword. - -It seemed that all these men, now that they had stopped amid -fields in the chill dusk of the autumn evening, experienced one and -the same feeling of unpleasant awakening from the hurry and -eagerness to push on that had seized them at the start. Once at a -standstill they all seemed to understand that they did not yet know -where they were going, and that much that was painful and difficult -awaited them on this journey. - -During this halt the escort treated the prisoners even worse than -they had done at the start. It was here that the prisoners for the -first time received horseflesh for their meat ration. - -From the officer down to the lowest soldier they showed what -seemed like personal spite against each of the prisoners, in -unexpected contrast to their former friendly relations. - -This spite increased still more when, on calling over the roll of -prisoners, it was found that in the bustle of leaving Moscow one -Russian soldier, who had pretended to suffer from colic, had -escaped. Pierre saw a Frenchman beat a Russian soldier cruelly for -straying too far from the road, and heard his friend the captain -reprimand and threaten to court-martial a noncommissioned officer on -account of the escape of the Russian. To the noncommissioned officer's -excuse that the prisoner was ill and could not walk, the officer -replied that the order was to shoot those who lagged behind. Pierre -felt that that fatal force which had crushed him during the -executions, but which he had not felt during his imprisonment, now -again controlled his existence. It was terrible, but he felt that in -proportion to the efforts of that fatal force to crush him, there grew -and strengthened in his soul a power of life independent of it. - -He ate his supper of buckwheat soup with horseflesh and chatted with -his comrades. - -Neither Pierre nor any of the others spoke of what they had seen -in Moscow, or of the roughness of their treatment by the French, or of -the order to shoot them which had been announced to them. As if in -reaction against the worsening of their position they were all -particularly animated and gay. They spoke of personal reminiscences, -of amusing scenes they had witnessed during the campaign, and -avoided all talk of their present situation. - -The sun had set long since. Bright stars shone out here and there in -the sky. A red glow as of a conflagration spread above the horizon -from the rising full moon, and that vast red ball swayed strangely -in the gray haze. It grew light. The evening was ending, but the night -had not yet come. Pierre got up and left his new companions, -crossing between the campfires to the other side of the road where -he had been told the common soldier prisoners were stationed. He -wanted to talk to them. On the road he was stopped by a French -sentinel who ordered him back. - -Pierre turned back, not to his companions by the campfire, but to an -unharnessed cart where there was nobody. Tucking his legs under him -and dropping his head he sat down on the cold ground by the wheel of -the cart and remained motionless a long while sunk in thought. -Suddenly he burst out into a fit of his broad, good-natured -laughter, so loud that men from various sides turned with surprise -to see what this strange and evidently solitary laughter could mean. - -"Ha-ha-ha!" laughed Pierre. And he said aloud to himself: "The -soldier did not let me pass. They took me and shut me up. They hold me -captive. What, me? Me? My immortal soul? Ha-ha-ha! Ha-ha-ha!..." and -he laughed till tears started to his eyes. - -A man got up and came to see what this queer big fellow was laughing -at all by himself. Pierre stopped laughing, got up, went farther -away from the inquisitive man, and looked around him. - -The huge, endless bivouac that had previously resounded with the -crackling of campfires and the voices of many men had grown quiet, the -red campfires were growing paler and dying down. High up in the -light sky hung the full moon. Forests and fields beyond the camp, -unseen before, were now visible in the distance. And farther still, -beyond those forests and fields, the bright, oscillating, limitless -distance lured one to itself. Pierre glanced up at the sky and the -twinkling stars in its faraway depths. "And all that is me, all that -is within me, and it is all I!" thought Pierre. "And they caught all -that and put it into a shed boarded up with planks!" He smiled, and -went and lay down to sleep beside his companions. - - - - - -CHAPTER XV - - -In the early days of October another envoy came to Kutuzov with a -letter from Napoleon proposing peace and falsely dated from Moscow, -though Napoleon was already not far from Kutuzov on the old Kaluga -road. Kutuzov replied to this letter as he had done to the one -formerly brought by Lauriston, saying that there could be no -question of peace. - -Soon after that a report was received from Dorokhov's guerrilla -detachment operating to the left of Tarutino that troops of -Broussier's division had been seen at Forminsk and that being -separated from the rest of the French army they might easily be -destroyed. The soldiers and officers again demanded action. Generals -on the staff, excited by the memory of the easy victory at Tarutino, -urged Kutuzov to carry out Dorokhov's suggestion. Kutuzov did not -consider any offensive necessary. The result was a compromise which -was inevitable: a small detachment was sent to Forminsk to attack -Broussier. - -By a strange coincidence, this task, which turned out to be a most -difficult and important one, was entrusted to Dokhturov--that same -modest little Dokhturov whom no one had described to us as drawing -up plans of battles, dashing about in front of regiments, showering -crosses on batteries, and so on, and who was thought to be and was -spoken of as undecided and undiscerning--but whom we find commanding -wherever the position was most difficult all through the -Russo-French wars from Austerlitz to the year 1813. At Austerlitz he -remained last at the Augezd dam, rallying the regiments, saving what -was possible when all were flying and perishing and not a single -general was left in the rear guard. Ill with fever he went to Smolensk -with twenty thousand men to defend the town against Napoleon's whole -army. In Smolensk, at the Malakhov Gate, he had hardly dozed off in -a paroxysm of fever before he was awakened by the bombardment of the -town--and Smolensk held out all day long. At the battle of Borodino, -when Bagration was killed and nine tenths of the men of our left flank -had fallen and the full force of the French artillery fire was -directed against it, the man sent there was this same irresolute and -undiscerning Dokhturov--Kutuzov hastening to rectify a mistake he -had made by sending someone else there first. And the quiet little -Dokhturov rode thither, and Borodino became the greatest glory of -the Russian army. Many heroes have been described to us in verse and -prose, but of Dokhturov scarcely a word has been said. - -It was Dokhturov again whom they sent to Forminsk and from there -to Malo-Yaroslavets, the place where the last battle with the French -was fought and where the obvious disintegration of the French army -began; and we are told of many geniuses and heroes of that period of -the campaign, but of Dokhturov nothing or very little is said and that -dubiously. And this silence about Dokhturov is the clearest -testimony to his merit. - -It is natural for a man who does not understand the workings of a -machine to imagine that a shaving that has fallen into it by chance -and is interfering with its action and tossing about in it is its most -important part. The man who does not understand the construction of -the machine cannot conceive that the small connecting cogwheel which -revolves quietly is one of the most essential parts of the machine, -and not the shaving which merely harms and hinders the working. - -On the tenth of October when Dokhturov had gone halfway to -Forminsk and stopped at the village of Aristovo, preparing -faithfully to execute the orders he had received, the whole French -army having, in its convulsive movement, reached Murat's position -apparently in order to give battle--suddenly without any reason turned -off to the left onto the new Kaluga road and began to enter -Forminsk, where only Broussier had been till then. At that time -Dokhturov had under his command, besides Dorokhov's detachment, the -two small guerrilla detachments of Figner and Seslavin. - -On the evening of October 11 Seslavin came to the Aristovo -headquarters with a French guardsman he had captured. The prisoner -said that the troops that had entered Forminsk that day were the -vanguard of the whole army, that Napoleon was there and the whole army -had left Moscow four days previously. That same evening a house serf -who had come from Borovsk said he had seen an immense army entering -the town. Some Cossacks of Dokhturov's detachment reported having -sighted the French Guards marching along the road to Borovsk. From all -these reports it was evident that where they had expected to meet a -single division there was now the whole French army marching from -Moscow in an unexpected direction--along the Kaluga road. Dokhturov -was unwilling to undertake any action, as it was not clear to him -now what he ought to do. He had been ordered to attack Forminsk. But -only Broussier had been there at that time and now the whole French -army was there. Ermolov wished to act on his own judgment, but -Dokhturov insisted that he must have Kutuzov's instructions. So it was -decided to send a dispatch to the staff. - -For this purpose a capable officer, Bolkhovitinov, was chosen, who -was to explain the whole affair by word of mouth, besides delivering a -written report. Toward midnight Bolkhovitinov, having received the -dispatch and verbal instructions, galloped off to the General Staff -accompanied by a Cossack with spare horses. - - - - - -CHAPTER XVI - - -It was a warm, dark, autumn night. It had been raining for four -days. Having changed horses twice and galloped twenty miles in an hour -and a half over a sticky, muddy road, Bolkhovitinov reached Litashevka -after one o'clock at night. Dismounting at a cottage on whose wattle -fence hung a signboard, GENERAL STAFF, and throwing down his reins, he -entered a dark passage. - -"The general on duty, quick! It's very important!" said he to -someone who had risen and was sniffing in the dark passage. - -"He has been very unwell since the evening and this is the third -night he has not slept," said the orderly pleadingly in a whisper. -"You should wake the captain first." - -"But this is very important, from General Dokhturov," said -Bolkhovitinov, entering the open door which he had found by feeling in -the dark. - -The orderly had gone in before him and began waking somebody. - -"Your honor, your honor! A courier." - -"What? What's that? From whom?" came a sleepy voice. - -"From Dokhturov and from Alexey Petrovich. Napoleon is at Forminsk," -said Bolkhovitinov, unable to see in the dark who was speaking but -guessing by the voice that it was not Konovnitsyn. - -The man who had wakened yawned and stretched himself. - -"I don't like waking him," he said, fumbling for something. "He is -very ill. Perhaps this is only a rumor." - -"Here is the dispatch," said Bolkhovitinov. "My orders are to give -it at once to the general on duty." - -"Wait a moment, I'll light a candle. You damned rascal, where do you -always hide it?" said the voice of the man who was stretching himself, -to the orderly. (This was Shcherbinin, Konovnitsyn's adjutant.) -"I've found it, I've found it!" he added. - -The orderly was striking a light and Shcherbinin was fumbling for -something on the candlestick. - -"Oh, the nasty beasts!" said he with disgust. - -By the light of the sparks Bolkhovitinov saw Shcherbinin's -youthful face as he held the candle, and the face of another man who -was still asleep. This was Konovnitsyn. - -When the flame of the sulphur splinters kindled by the tinder burned -up, first blue and then red, Shcherbinin lit the tallow candle, from -the candlestick of which the cockroaches that had been gnawing it were -running away, and looked at the messenger. Bolkhovitinov was -bespattered all over with mud and had smeared his face by wiping it -with his sleeve. - -"Who gave the report?" inquired Shcherbinin, taking the envelope. - -"The news is reliable," said Bolkhovitinov. "Prisoners, Cossacks, -and the scouts all say the same thing." - -"There's nothing to be done, we'll have to wake him," said -Shcherbinin, rising and going up to the man in the nightcap who lay -covered by a greatcoat. "Peter Petrovich!" said he. (Konovnitsyn did -not stir.) "To the General Staff!" he said with a smile, knowing -that those words would be sure to arouse him. - -And in fact the head in the nightcap was lifted at once. On -Konovnitsyn's handsome, resolute face with cheeks flushed by fever, -there still remained for an instant a faraway dreamy expression remote -from present affairs, but then he suddenly started and his face -assumed its habitual calm and firm appearance. - -"Well, what is it? From whom?" he asked immediately but without -hurry, blinking at the light. - -While listening to the officer's report Konovnitsyn broke the seal -and read the dispatch. Hardly had he done so before he lowered his -legs in their woolen stockings to the earthen floor and began -putting on his boots. Then he took off his nightcap, combed his hair -over his temples, and donned his cap. - -"Did you get here quickly? Let us go to his Highness." - -Konovnitsyn had understood at once that the news brought was of -great importance and that no time must be lost. He did not consider or -ask himself whether the news was good or bad. That did not interest -him. He regarded the whole business of the war not with his -intelligence or his reason but by something else. There was within him -a deep unexpressed conviction that all would be well, but that one -must not trust to this and still less speak about it, but must only -attend to one's own work. And he did his work, giving his whole -strength to the task. - -Peter Petrovich Konovnitsyn, like Dokhturov, seems to have been -included merely for propriety's sake in the list of the so-called -heroes of 1812--the Barclays, Raevskis, Ermolovs, Platovs, and -Miloradoviches. Like Dokhturov he had the reputation of being a man of -very limited capacity and information, and like Dokhturov he never -made plans of battle but was always found where the situation was most -difficult. Since his appointment as general on duty he had always -slept with his door open, giving orders that every messenger should be -allowed to wake him up. In battle he was always under fire, so that -Kutuzov reproved him for it and feared to send him to the front, and -like Dokhturov he was one of those unnoticed cogwheels that, without -clatter or noise, constitute the most essential part of the machine. - -Coming out of the hut into the damp, dark night Konovnitsyn frowned- -partly from an increased pain in his head and partly at the unpleasant -thought that occurred to him, of how all that nest of influential -men on the staff would be stirred up by this news, especially -Bennigsen, who ever since Tarutino had been at daggers drawn with -Kutuzov; and how they would make suggestions, quarrel, issue orders, -and rescind them. And this premonition was disagreeable to him -though he knew it could not be helped. - -And in fact Toll, to whom he went to communicate the news, -immediately began to expound his plans to a general sharing his -quarters, until Konovnitsyn, who listened in weary silence, reminded -him that they must go to see his Highness. - - - - - -CHAPTER XVII - - -Kutuzov like all old people did not sleep much at night. He often -fell asleep unexpectedly in the daytime, but at night, lying on his -bed without undressing, he generally remained awake thinking. - -So he lay now on his bed, supporting his large, heavy, scarred -head on his plump hand, with his one eye open, meditating and -peering into the darkness. - -Since Bennigsen, who corresponded with the Emperor and had more -influence than anyone else on the staff, had begun to avoid him, -Kutuzov was more at ease as to the possibility of himself and his -troops being obliged to take part in useless aggressive movements. The -lesson of the Tarutino battle and of the day before it, which -Kutuzov remembered with pain, must, he thought, have some effect on -others too. - -"They must understand that we can only lose by taking the offensive. -Patience and time are my warriors, my champions," thought Kutuzov. -He knew that an apple should not be plucked while it is green. It will -fall of itself when ripe, but if picked unripe the apple is spoiled, -the tree is harmed, and your teeth are set on edge. Like an -experienced sportsman he knew that the beast was wounded, and -wounded as only the whole strength of Russia could have wounded it, -but whether it was mortally wounded or not was still an undecided -question. Now by the fact of Lauriston and Barthelemi having been -sent, and by the reports of the guerrillas, Kutuzov was almost sure -that the wound was mortal. But he needed further proofs and it was -necessary to wait. - -"They want to run to see how they have wounded it. Wait and we shall -see! Continual maneuvers, continual advances!" thought he. "What -for? Only to distinguish themselves! As if fighting were fun. They are -like children from whom one can't get any sensible account of what has -happened because they all want to show how well they can fight. But -that's not what is needed now. - -"And what ingenious maneuvers they all propose to me! It seems to -them that when they have thought of two or three contingencies" (he -remembered the general plan sent him from Petersburg) "they have -foreseen everything. But the contingencies are endless." - -The undecided question as to whether the wound inflicted at Borodino -was mortal or not had hung over Kutuzov's head for a whole month. On -the one hand the French had occupied Moscow. On the other Kutuzov felt -assured with all his being that the terrible blow into which he and -all the Russians had put their whole strength must have been mortal. -But in any case proofs were needed; he had waited a whole month for -them and grew more impatient the longer he waited. Lying on his bed -during those sleepless nights he did just what he reproached those -younger generals for doing. He imagined all sorts of possible -contingencies, just like the younger men, but with this difference, -that he saw thousands of contingencies instead of two or three and -based nothing on them. The longer he thought the more contingencies -presented themselves. He imagined all sorts of movements of the -Napoleonic army as a whole or in sections--against Petersburg, or -against him, or to outflank him. He thought too of the possibility -(which he feared most of all) that Napoleon might fight him with his -own weapon and remain in Moscow awaiting him. Kutuzov even imagined -that Napoleon's army might turn back through Medyn and Yukhnov, but -the one thing he could not foresee was what happened--the insane, -convulsive stampede of Napoleon's army during its first eleven days -after leaving Moscow: a stampede which made possible what Kutuzov -had not yet even dared to think of--the complete extermination of -the French. Dorokhov's report about Broussier's division, the -guerrillas' reports of distress in Napoleon's army, rumors of -preparations for leaving Moscow, all confirmed the supposition that -the French army was beaten and preparing for flight. But these were -only suppositions, which seemed important to the younger men but not -to Kutuzov. With his sixty years' experience he knew what value to -attach to rumors, knew how apt people who desire anything are to group -all news so that it appears to confirm what they desire, and he knew -how readily in such cases they omit all that makes for the contrary. -And the more he desired it the less he allowed himself to believe -it. This question absorbed all his mental powers. All else was to -him only life's customary routine. To such customary routine -belonged his conversations with the staff, the letters he wrote from -Tarutino to Madame de Stael, the reading of novels, the distribution -of awards, his correspondence with Petersburg, and so on. But the -destruction of the French, which he alone foresaw, was his heart's one -desire. - -On the night of the eleventh of October he lay leaning on his arm -and thinking of that. - -There was a stir in the next room and he heard the steps of Toll, -Konovnitsyn, and Bolkhovitinov. - -"Eh, who's there? Come in, come in! What news?" the field marshal -called out to them. - -While a footman was lighting a candle, Toll communicated the -substance of the news. - -"Who brought it?" asked Kutuzov with a look which, when the candle -was lit, struck Toll by its cold severity. - -"There can be no doubt about it, your Highness." - -"Call him in, call him here." - -Kutuzov sat up with one leg hanging down from the bed and his big -paunch resting against the other which was doubled under him. He -screwed up his seeing eye to scrutinize the messenger more -carefully, as if wishing to read in his face what preoccupied his -own mind. - -"Tell me, tell me, friend," said he to Bolkhovitinov in his low, -aged voice, as he pulled together the shirt which gaped open on his -chest, "come nearer--nearer. What news have you brought me? Eh? That -Napoleon has left Moscow? Are you sure? Eh?" - -Bolkhovitinov gave a detailed account from the beginning of all he -had been told to report. - -"Speak quicker, quicker! Don't torture me!" Kutuzov interrupted him. - -Bolkhovitinov told him everything and was then silent, awaiting -instructions. Toll was beginning to say something but Kutuzov -checked him. He tried to say something, but his face suddenly puckered -and wrinkled; he waved his arm at Toll and turned to the opposite side -of the room, to the corner darkened by the icons that hung there. - -"O Lord, my Creator, Thou has heard our prayer..." said he in a -tremulous voice with folded hands. "Russia is saved. I thank Thee, O -Lord!" and he wept. - - - - - -CHAPTER XVIII - - -From the time he received this news to the end of the campaign all -Kutuzov's activity was directed toward restraining his troops, by -authority, by guile, and by entreaty, from useless attacks, maneuvers, -or encounters with the perishing enemy. Dokhturov went to -Malo-Yaroslavets, but Kutuzov lingered with the main army and gave -orders for the evacuation of Kaluga--a retreat beyond which town -seemed to him quite possible. - -Everywhere Kutuzov retreated, but the enemy without waiting for -his retreat fled in the opposite direction. - -Napoleon's historians describe to us his skilled maneuvers at -Tarutino and Malo-Yaroslavets, and make conjectures as to what would -have happened had Napoleon been in time to penetrate into the rich -southern provinces. - -But not to speak of the fact that nothing prevented him from -advancing into those southern provinces (for the Russian army did -not bar his way), the historians forget that nothing could have -saved his army, for then already it bore within itself the germs of -inevitable ruin. How could that army--which had found abundant -supplies in Moscow and had trampled them underfoot instead of -keeping them, and on arriving at Smolensk had looted provisions -instead of storing them--how could that army recuperate in Kaluga -province, which was inhabited by Russians such as those who lived in -Moscow, and where fire had the same property of consuming what was set -ablaze? - -That army could not recover anywhere. Since the battle of Borodino -and the pillage of Moscow it had borne within itself, as it were, -the chemical elements of dissolution. - -The members of what had once been an army--Napoleon himself and -all his soldiers fled--without knowing whither, each concerned only to -make his escape as quickly as possible from this position, of the -hopelessness of which they were all more or less vaguely conscious. - -So it came about that at the council at Malo-Yaroslavets, when the -generals pretending to confer together expressed various opinions, all -mouths were closed by the opinion uttered by the simple-minded soldier -Mouton who, speaking last, said what they all felt: that the one thing -needful was to get away as quickly as possible; and no one, not even -Napoleon, could say anything against that truth which they all -recognized. - -But though they all realized that it was necessary to get away, -there still remained a feeling of shame at admitting that they must -flee. An external shock was needed to overcome that shame, and this -shock came in due time. It was what the French called "le hourra de -l'Empereur." - -The day after the council at Malo-Yaroslavets Napoleon rode out -early in the morning amid the lines of his army with his suite of -marshals and an escort, on the pretext of inspecting the army and -the scene of the previous and of the impending battle. Some Cossacks -on the prowl for booty fell in with the Emperor and very nearly -captured him. If the Cossacks did not capture Napoleon then, what -saved him was the very thing that was destroying the French army, -the booty on which the Cossacks fell. Here as at Tarutino they went -after plunder, leaving the men. Disregarding Napoleon they rushed -after the plunder and Napoleon managed to escape. - -When les enfants du Don might so easily have taken the Emperor -himself in the midst of his army, it was clear that there was -nothing for it but to fly as fast as possible along the nearest, -familiar road. Napoleon with his forty-year-old stomach understood -that hint, not feeling his former agility and boldness, and under -the influence of the fright the Cossacks had given him he at once -agreed with Mouton and issued orders--as the historians tell us--to -retreat by the Smolensk road. - -That Napoleon agreed with Mouton, and that the army retreated, -does not prove that Napoleon caused it to retreat, but that the forces -which influenced the whole army and directed it along the Mozhaysk -(that is, the Smolensk) road acted simultaneously on him also. - - - - - -CHAPTER XIX - - -A man in motion always devises an aim for that motion. To be able to -go a thousand miles he must imagine that something good awaits him -at the end of those thousand miles. One must have the prospect of a -promised land to have the strength to move. - -The promised land for the French during their advance had been -Moscow, during their retreat it was their native land. But that native -land was too far off, and for a man going a thousand miles it is -absolutely necessary to set aside his final goal and to say to -himself: "Today I shall get to a place twenty-five miles off where I -shall rest and spend the night," and during the first day's journey -that resting place eclipses his ultimate goal and attracts all his -hopes and desires. And the impulses felt by a single person are always -magnified in a crowd. - -For the French retreating along the old Smolensk road, the final -goal--their native land--was too remote, and their immediate goal -was Smolensk, toward which all their desires and hopes, enormously -intensified in the mass, urged them on. It was not that they knew that -much food and fresh troops awaited them in Smolensk, nor that they -were told so (on the contrary their superior officers, and Napoleon -himself, knew that provisions were scarce there), but because this -alone could give them strength to move on and endure their present -privations. So both those who knew and those who did not know deceived -themselves, and pushed on to Smolensk as to a promised land. - -Coming out onto the highroad the French fled with surprising -energy and unheard-of rapidity toward the goal they had fixed on. -Besides the common impulse which bound the whole crowd of French -into one mass and supplied them with a certain energy, there was -another cause binding them together--their great numbers. As with -the physical law of gravity, their enormous mass drew the individual -human atoms to itself. In their hundreds of thousands they moved -like a whole nation. - -Each of them desired nothing more than to give himself up as a -prisoner to escape from all this horror and misery; but on the one -hand the force of this common attraction to Smolensk, their goal, drew -each of them in the same direction; on the other hand an army corps -could not surrender to a company, and though the French availed -themselves of every convenient opportunity to detach themselves and to -surrender on the slightest decent pretext, such pretexts did not -always occur. Their very numbers and their crowded and swift -movement deprived them of that possibility and rendered it not only -difficult but impossible for the Russians to stop this movement, to -which the French were directing all their energies. Beyond a certain -limit no mechanical disruption of the body could hasten the process of -decomposition. - -A lump of snow cannot be melted instantaneously. There is a -certain limit of time in less than which no amount of heat can melt -the snow. On the contrary the greater the heat the more solidified the -remaining snow becomes. - -Of the Russian commanders Kutuzov alone understood this. When the -flight of the French army along the Smolensk road became well defined, -what Konovnitsyn had foreseen on the night of the eleventh of -October began to occur. The superior officers all wanted to -distinguish themselves, to cut off, to seize, to capture, and to -overthrow the French, and all clamored for action. - -Kutuzov alone used all his power (and such power is very limited -in the case of any commander in chief) to prevent an attack. - -He could not tell them what we say now: "Why fight, why block the -road, losing our own men and inhumanly slaughtering unfortunate -wretches? What is the use of that, when a third of their army has -melted away on the road from Moscow to Vyazma without any battle?" But -drawing from his aged wisdom what they could understand, he told -them of the golden bridge, and they laughed at and slandered him, -flinging themselves on, rending and exulting over the dying beast. - -Ermolov, Miloradovich, Platov, and others in proximity to the French -near Vyazma could not resist their desire to cut off and break up -two French corps, and by way of reporting their intention to Kutuzov -they sent him a blank sheet of paper in an envelope. - -And try as Kutuzov might to restrain the troops, our men attacked, -trying to bar the road. Infantry regiments, we are told, advanced to -the attack with music and with drums beating, and killed and lost -thousands of men. - -But they did not cut off or overthrow anybody and the French army, -closing up more firmly at the danger, continued, while steadily -melting away, to pursue its fatal path to Smolensk. - - - - - - -BOOK FOURTEEN: 1812 - - - - - -CHAPTER I - - -The Battle of Borodino, with the occupation of Moscow that -followed it and the flight of the French without further conflicts, is -one of the most instructive phenomena in history. - -All historians agree that the external activity of states and -nations in their conflicts with one another is expressed in wars, -and that as a direct result of greater or less success in war the -political strength of states and nations increases or decreases. - -Strange as may be the historical account of how some king or -emperor, having quarreled with another, collects an army, fights his -enemy's army, gains a victory by killing three, five, or ten -thousand men, and subjugates a kingdom and an entire nation of several -millions, all the facts of history (as far as we know it) confirm -the truth of the statement that the greater or lesser success of one -army against another is the cause, or at least an essential -indication, of an increase or decrease in the strength of the -nation--even though it is unintelligible why the defeat of an army- -a hundredth part of a nation--should oblige that whole nation to -submit. An army gains a victory, and at once the rights of the -conquering nation have increased to the detriment of the defeated. -An army has suffered defeat, and at once a people loses its rights -in proportion to the severity of the reverse, and if its army -suffers a complete defeat the nation is quite subjugated. - -So according to history it has been found from the most ancient -times, and so it is to our own day. All Napoleon's wars serve to -confirm this rule. In proportion to the defeat of the Austrian army -Austria loses its rights, and the rights and the strength of France -increase. The victories of the French at Jena and Auerstadt destroy -the independent existence of Prussia. - -But then, in 1812, the French gain a victory near Moscow. Moscow -is taken and after that, with no further battles, it is not Russia -that ceases to exist, but the French army of six hundred thousand, and -then Napoleonic France itself. To strain the facts to fit the rules of -history: to say that the field of battle at Borodino remained in the -hands of the Russians, or that after Moscow there were other battles -that destroyed Napoleon's army, is impossible. - -After the French victory at Borodino there was no general engagement -nor any that were at all serious, yet the French army ceased to exist. -What does this mean? If it were an example taken from the history of -China, we might say that it was not an historic phenomenon (which is -the historians' usual expedient when anything does not fit their -standards); if the matter concerned some brief conflict in which -only a small number of troops took part, we might treat it as an -exception; but this event occurred before our fathers' eyes, and for -them it was a question of the life or death of their fatherland, and -it happened in the greatest of all known wars. - -The period of the campaign of 1812 from the battle of Borodino to -the expulsion of the French proved that the winning of a battle does -not produce a conquest and is not even an invariable indication of -conquest; it proved that the force which decides the fate of peoples -lies not in the conquerors, nor even in armies and battles, but in -something else. - -The French historians, describing the condition of the French army -before it left Moscow, affirm that all was in order in the Grand Army, -except the cavalry, the artillery, and the transport--there was no -forage for the horses or the cattle. That was a misfortune no one -could remedy, for the peasants of the district burned their hay rather -than let the French have it. - -The victory gained did not bring the usual results because the -peasants Karp and Vlas (who after the French had evacuated Moscow -drove in their carts to pillage the town, and in general personally -failed to manifest any heroic feelings), and the whole innumerable -multitude of such peasants, did not bring their hay to Moscow for -the high price offered them, but burned it instead. - -Let us imagine two men who have come out to fight a duel with -rapiers according to all the rules of the art of fencing. The -fencing has gone on for some time; suddenly one of the combatants, -feeling himself wounded and understanding that the matter is no joke -but concerns his life, throws down his rapier, and seizing the first -cudgel that comes to hand begins to brandish it. Then let us imagine -that the combatant who so sensibly employed the best and simplest -means to attain his end was at the same time influenced by -traditions of chivalry and, desiring to conceal the facts of the case, -insisted that he had gained his victory with the rapier according to -all the rules of art. One can imagine what confusion and obscurity -would result from such an account of the duel. - -The fencer who demanded a contest according to the rules of -fencing was the French army; his opponent who threw away the rapier -and snatched up the cudgel was the Russian people; those who try to -explain the matter according to the rules of fencing are the -historians who have described the event. - -After the burning of Smolensk a war began which did not follow any -previous traditions of war. The burning of towns and villages, the -retreats after battles, the blow dealt at Borodino and the renewed -retreat, the burning of Moscow, the capture of marauders, the -seizure of transports, and the guerrilla war were all departures -from the rules. - -Napoleon felt this, and from the time he took up the correct fencing -attitude in Moscow and instead of his opponent's rapier saw a cudgel -raised above his head, he did not cease to complain to Kutuzov and -to the Emperor Alexander that the war was being carried on contrary to -all the rules--as if there were any rules for killing people. In spite -of the complaints of the French as to the nonobservance of the -rules, in spite of the fact that to some highly placed Russians it -seemed rather disgraceful to fight with a cudgel and they wanted to -assume a pose en quarte or en tierce according to all the rules, and -to make an adroit thrust en prime, and so on--the cudgel of the -people's war was lifted with all its menacing and majestic strength, -and without consulting anyone's tastes or rules and regardless of -anything else, it rose and fell with stupid simplicity, but -consistently, and belabored the French till the whole invasion had -perished. - -And it is well for a people who do not--as the French did in 1813- -salute according to all the rules of art, and, presenting the hilt -of their rapier gracefully and politely, hand it to their -magnanimous conqueror, but at the moment of trial, without asking what -rules others have adopted in similar cases, simply and easily pick -up the first cudgel that comes to hand and strike with it till the -feeling of resentment and revenge in their soul yields to a feeling of -contempt and compassion. - - - - - -CHAPTER II - - -One of the most obvious and advantageous departures from the -so-called laws of war is the action of scattered groups against men -pressed together in a mass. Such action always occurs in wars that -take on a national character. In such actions, instead of two crowds -opposing each other, the men disperse, attack singly, run away when -attacked by stronger forces, but again attack when opportunity offers. -This was done by the guerrillas in Spain, by the mountain tribes in -the Caucasus, and by the Russians in 1812. - -People have called this kind of war "guerrilla warfare" and assume -that by so calling it they have explained its meaning. But such a -war does not fit in under any rule and is directly opposed to a -well-known rule of tactics which is accepted as infallible. That -rule says that an attacker should concentrate his forces in order to -be stronger than his opponent at the moment of conflict. - -Guerrilla war (always successful, as history shows) directly -infringes that rule. - -This contradiction arises from the fact that military science -assumes the strength of an army to be identical with its numbers. -Military science says that the more troops the greater the strength. -Les gros bataillons ont toujours raison.* - - -*Large battalions are always victorious. - - -For military science to say this is like defining momentum in -mechanics by reference to the mass only: stating that momenta are -equal or unequal to each other simply because the masses involved -are equal or unequal. - -Momentum (quantity of motion) is the product of mass and velocity. - -In military affairs the strength of an army is the product of its -mass and some unknown x. - -Military science, seeing in history innumerable instances of the -fact that the size of any army does not coincide with its strength and -that small detachments defeat larger ones, obscurely admits the -existence of this unknown factor and tries to discover it--now in a -geometric formation, now in the equipment employed, now, and most -usually, in the genius of the commanders. But the assignment of -these various meanings to the factor does not yield results which -accord with the historic facts. - -Yet it is only necessary to abandon the false view (adopted to -gratify the "heroes") of the efficacy of the directions issued in -wartime by commanders, in order to find this unknown quantity. - -That unknown quantity is the spirit of the army, that is to say, the -greater or lesser readiness to fight and face danger felt by all the -men composing an army, quite independently of whether they are, or are -not, fighting under the command of a genius, in two--or three-line -formation, with cudgels or with rifles that repeat thirty times a -minute. Men who want to fight will always put themselves in the most -advantageous conditions for fighting. - -The spirit of an army is the factor which multiplied by the mass -gives the resulting force. To define and express the significance of -this unknown factor--the spirit of an army--is a problem for science. - -This problem is only solvable if we cease arbitrarily to -substitute for the unknown x itself the conditions under which that -force becomes apparent--such as the commands of the general, the -equipment employed, and so on--mistaking these for the real -significance of the factor, and if we recognize this unknown -quantity in its entirety as being the greater or lesser desire to -fight and to face danger. Only then, expressing known historic facts -by equations and comparing the relative significance of this factor, -can we hope to define the unknown. - -Ten men, battalions, or divisions, fighting fifteen men, battalions, -or divisions, conquer--that is, kill or take captive--all the -others, while themselves losing four, so that on the one side four and -on the other fifteen were lost. Consequently the four were equal to -the fifteen, and therefore 4x = 15y. Consequently x/y = 15/4. This -equation does not give us the value of the unknown factor but gives us -a ratio between two unknowns. And by bringing variously selected -historic units (battles, campaigns, periods of war) into such -equations, a series of numbers could be obtained in which certain laws -should exist and might be discovered. - -The tactical rule that an army should act in masses when -attacking, and in smaller groups in retreat, unconsciously confirms -the truth that the strength of an army depends on its spirit. To -lead men forward under fire more discipline (obtainable only by -movement in masses) is needed than is needed to resist attacks. But -this rule which leaves out of account the spirit of the army -continually proves incorrect and is in particularly striking -contrast to the facts when some strong rise or fall in the spirit of -the troops occurs, as in all national wars. - -The French, retreating in 1812--though according to tactics they -should have separated into detachments to defend themselves- -congregated into a mass because the spirit of the army had so fallen -that only the mass held the army together. The Russians, on the -contrary, ought according to tactics to have attacked in mass, but -in fact they split up into small units, because their spirit had so -risen that separate individuals, without orders, dealt blows at the -French without needing any compulsion to induce them to expose -themselves to hardships and dangers. - - - - - -CHAPTER III - - -The so-called partisan war began with the entry of the French into -Smolensk. - -Before partisan warfare had been officially recognized by the -government, thousands of enemy stragglers, marauders, and foragers had -been destroyed by the Cossacks and the peasants, who killed them off -as instinctively as dogs worry a stray mad dog to death. Denis -Davydov, with his Russian instinct, was the first to recognize the -value of this terrible cudgel which regardless of the rules of -military science destroyed the French, and to him belongs the credit -for taking the first step toward regularizing this method of warfare. - -On August 24 Davydov's first partisan detachment was formed and then -others were recognized. The further the campaign progressed the more -numerous these detachments became. - -The irregulars destroyed the great army piecemeal. They gathered the -fallen leaves that dropped of themselves from that withered tree- -the French army--and sometimes shook that tree itself. By October, -when the French were fleeing toward Smolensk, there were hundreds of -such companies, of various sizes and characters. There were some -that adopted all the army methods and had infantry, artillery, staffs, -and the comforts of life. Others consisted solely of Cossack -cavalry. There were also small scratch groups of foot and horse, and -groups of peasants and landowners that remained unknown. A sacristan -commanded one party which captured several hundred prisoners in the -course of a month; and there was Vasilisa, the wife of a village -elder, who slew hundreds of the French. - -The partisan warfare flamed up most fiercely in the latter days of -October. Its first period had passed: when the partisans themselves, -amazed at their own boldness, feared every minute to be surrounded and -captured by the French, and hid in the forests without unsaddling, -hardly daring to dismount and always expecting to be pursued. By the -end of October this kind of warfare had taken definite shape: it had -become clear to all what could be ventured against the French and what -could not. Now only the commanders of detachments with staffs, and -moving according to rules at a distance from the French, still -regarded many things as impossible. The small bands that had started -their activities long before and had already observed the French -closely considered things possible which the commanders of the big -detachments did not dare to contemplate. The Cossacks and peasants who -crept in among the French now considered everything possible. - -On October 22, Denisov (who was one of the irregulars) was with -his group at the height of the guerrilla enthusiasm. Since early -morning he and his party had been on the move. All day long he had -been watching from the forest that skirted the highroad a large French -convoy of cavalry baggage and Russian prisoners separated from the -rest of the army, which--as was learned from spies and prisoners- -was moving under a strong escort to Smolensk. Besides Denisov and -Dolokhov (who also led a small party and moved in Denisov's vicinity), -the commanders of some large divisions with staffs also knew of this -convoy and, as Denisov expressed it, were sharpening their teeth for -it. Two of the commanders of large parties--one a Pole and the other a -German--sent invitations to Denisov almost simultaneously, -requesting him to join up with their divisions to attack the convoy. - -"No, bwother, I have gwown mustaches myself," said Denisov on -reading these documents, and he wrote to the German that, despite -his heartfelt desire to serve under so valiant and renowned a general, -he had to forgo that pleasure because he was already under the command -of the Polish general. To the Polish general he replied to the same -effect, informing him that he was already under the command of the -German. - -Having arranged matters thus, Denisov and Dolokhov intended, without -reporting matters to the higher command, to attack and seize that -convoy with their own small forces. On October 22 it was moving from -the village of Mikulino to that of Shamshevo. To the left of the -road between Mikulino and Shamshevo there were large forests, -extending in some places up to the road itself though in others a mile -or more back from it. Through these forests Denisov and his party rode -all day, sometimes keeping well back in them and sometimes coming to -the very edge, but never losing sight of the moving French. That -morning, Cossacks of Denisov's party had seized and carried off into -the forest two wagons loaded with cavalry saddles, which had stuck -in the mud not far from Mikulino where the forest ran close to the -road. Since then, and until evening, the party had the movements of -the French without attacking. It was necessary to let the French reach -Shamshevo quietly without alarming them and then, after joining -Dolokhov who was to come that evening to a consultation at a -watchman's hut in the forest less than a mile from Shamshevo, to -surprise the French at dawn, falling like an avalanche on their -heads from two sides, and rout and capture them all at one blow. - -In their rear, more than a mile from Mikulino where the forest -came right up to the road, six Cossacks were posted to report if any -fresh columns of French should show themselves. - -Beyond Shamshevo, Dolokhov was to observe the road in the same -way, to find out at what distance there were other French troops. They -reckoned that the convoy had fifteen hundred men. Denisov had two -hundred, and Dolokhov might have as many more, but the disparity of -numbers did not deter Denisov. All that he now wanted to know was what -troops these were and to learn that he had to capture a "tongue"--that -is, a man from the enemy column. That morning's attack on the wagons -had been made so hastily that the Frenchmen with the wagons had all -been killed; only a little drummer boy had been taken alive, and as he -was a straggler he could tell them nothing definite about the troops -in that column. - -Denisov considered it dangerous to make a second attack for fear -of putting the whole column on the alert, so he sent Tikhon -Shcherbaty, a peasant of his party, to Shamshevo to try and seize at -least one of the French quartermasters who had been sent on in -advance. - - - - -CHAPTER IV - - -It was a warm rainy autumn day. The sky and the horizon were both -the color of muddy water. At times a sort of mist descended, and -then suddenly heavy slanting rain came down. - -Denisov in a felt cloak and a sheepskin cap from which the rain -ran down was riding a thin thoroughbred horse with sunken sides. -Like his horse, which turned its head and laid its ears back, he -shrank from the driving rain and gazed anxiously before him. His -thin face with its short, thick black beard looked angry. - -Beside Denisov rode an esaul,* Denisov's fellow worker, also in felt -cloak and sheepskin cap, and riding a large sleek Don horse. - - -*A captain of Cossacks. - - -Esaul Lovayski the Third was a tall man as straight as an arrow, -pale-faced, fair-haired, with narrow light eyes and with calm -self-satisfaction in his face and bearing. Though it was impossible to -say in what the peculiarity of the horse and rider lay, yet at first -glance at the esaul and Denisov one saw that the latter was wet and -uncomfortable and was a man mounted on a horse, while looking at the -esaul one saw that he was as comfortable and as much at ease as always -and that he was not a man who had mounted a horse, but a man who was -one with his horse, a being consequently possessed of twofold -strength. - -A little ahead of them walked a peasant guide, wet to the skin and -wearing a gray peasant coat and a white knitted cap. - -A little behind, on a poor, small, lean Kirghiz mount with an -enormous tail and mane and a bleeding mouth, rode a young officer in a -blue French overcoat. - -Beside him rode an hussar, with a boy in a tattered French uniform -and blue cap behind him on the crupper of his horse. The boy held on -to the hussar with cold, red hands, and raising his eyebrows gazed -about him with surprise. This was the French drummer boy captured that -morning. - -Behind them along the narrow, sodden, cutup forest road came hussars -in threes and fours, and then Cossacks: some in felt cloaks, some in -French greatcoats, and some with horsecloths over their heads. The -horses, being drenched by the rain, all looked black whether -chestnut or bay. Their necks, with their wet, close-clinging manes, -looked strangely thin. Steam rose from them. Clothes, saddles, -reins, were all wet, slippery, and sodden, like the ground and the -fallen leaves that strewed the road. The men sat huddled up trying not -to stir, so as to warm the water that had trickled to their bodies and -not admit the fresh cold water that was leaking in under their -seats, their knees, and at the back of their necks. In the midst of -the outspread line of Cossacks two wagons, drawn by French horses -and by saddled Cossack horses that had been hitched on in front, -rumbled over the tree stumps and branches and splashed through the -water that lay in the ruts. - -Denisov's horse swerved aside to avoid a pool in the track and -bumped his rider's knee against a tree. - -"Oh, the devil!" exclaimed Denisov angrily, and showing his teeth he -struck his horse three times with his whip, splashing himself and -his comrades with mud. - -Denisov was out of sorts both because of the rain and also from -hunger (none of them had eaten anything since morning), and yet more -because he still had no news from Dolokhov and the man sent to capture -a "tongue" had not returned. - -"There'll hardly be another such chance to fall on a transport as -today. It's too risky to attack them by oneself, and if we put it -off till another day one of the big guerrilla detachments will -snatch the prey from under our noses," thought Denisov, continually -peering forward, hoping to see a messenger from Dolokhov. - -On coming to a path in the forest along which he could see far to -the right, Denisov stopped. - -"There's someone coming," said he. - -The esaul looked in the direction Denisov indicated. - -"There are two, an officer and a Cossack. But it is not -presupposable that it is the lieutenant colonel himself," said the -esaul, who was fond of using words the Cossacks did not know. - -The approaching riders having descended a decline were no longer -visible, but they reappeared a few minutes later. In front, at a weary -gallop and using his leather whip, rode an officer, disheveled and -drenched, whose trousers had worked up to above his knees. Behind him, -standing in the stirrups, trotted a Cossack. The officer, a very young -lad with a broad rosy face and keen merry eyes, galloped up to Denisov -and handed him a sodden envelope. - -"From the general," said the officer. "Please excuse its not being -quite dry." - -Denisov, frowning, took the envelope and opened it. - -"There, they kept telling us: 'It's dangerous, it's dangerous,'" -said the officer, addressing the esaul while Denisov was reading the -dispatch. "But Komarov and I"--he pointed to the Cossack--"were -prepared. We have each of us two pistols.... But what's this?" he -asked, noticing the French drummer boy. "A prisoner? You've already -been in action? May I speak to him?" - -"Wostov! Petya!" exclaimed Denisov, having run through the dispatch. -"Why didn't you say who you were?" and turning with a smile he held -out his hand to the lad. - -The officer was Petya Rostov. - -All the way Petya had been preparing himself to behave with -Denisov as befitted a grownup man and an officer--without hinting at -their previous acquaintance. But as soon as Denisov smiled at him -Petya brightened up, blushed with pleasure, forgot the official manner -he had been rehearsing, and began telling him how he had already -been in a battle near Vyazma and how a certain hussar had -distinguished himself there. - -"Well, I am glad to see you," Denisov interrupted him, and his -face again assumed its anxious expression. - -"Michael Feoklitych," said he to the esaul, "this is again fwom that -German, you know. He"--he indicated Petya--"is serving under him." - -And Denisov told the esaul that the dispatch just delivered was a -repetition of the German general's demand that he should join forces -with him for an attack on the transport. - -"If we don't take it tomowwow, he'll snatch it fwom under our -noses," he added. - -While Denisov was talking to the esaul, Petya--abashed by -Denisov's cold tone and supposing that it was due to the condition -of his trousers--furtively tried to pull them down under his greatcoat -so that no one should notice it, while maintaining as martial an air -as possible. - -"Will there be any orders, your honor?" he asked Denisov, holding -his hand at the salute and resuming the game of adjutant and general -for which he had prepared himself, "or shall I remain with your -honor?" - -"Orders?" Denisov repeated thoughtfully. "But can you stay till -tomowwow?" - -"Oh, please... May I stay with you?" cried Petya. - -"But, just what did the genewal tell you? To weturn at once?" -asked Denisov. - -Petya blushed. - -"He gave me no instructions. I think I could?" he returned, -inquiringly. - -"Well, all wight," said Denisov. - -And turning to his men he directed a party to go on to the halting -place arranged near the watchman's hut in the forest, and told the -officer on the Kirghiz horse (who performed the duties of an adjutant) -to go and find out where Dolokhov was and whether he would come that -evening. Denisov himself intended going with the esaul and Petya to -the edge of the forest where it reached out to Shamshevo, to have a -look at the part of the French bivouac they were to attack next day. - -"Well, old fellow," said he to the peasant guide, "lead us to -Shamshevo." - -Denisov, Petya, and the esaul, accompanied by some Cossacks and -the hussar who had the prisoner, rode to the left across a ravine to -the edge of the forest. - - - - - -CHAPTER V - - -The rain had stopped, and only the mist was falling and drops from -the trees. Denisov, the esaul, and Petya rode silently, following -the peasant in the knitted cap who, stepping lightly with outturned -toes and moving noiselessly in his bast shoes over the roots and wet -leaves, silently led them to the edge of the forest. - -He ascended an incline, stopped, looked about him, and advanced to -where the screen of trees was less dense. On reaching a large oak tree -that had not yet shed its leaves, he stopped and beckoned mysteriously -to them with his hand. - -Denisov and Petya rode up to him. From the spot where the peasant -was standing they could see the French. Immediately beyond the forest, -on a downward slope, lay a field of spring rye. To the right, beyond a -steep ravine, was a small village and a landowner's house with a -broken roof. In the village, in the house, in the garden, by the well, -by the pond, over all the rising ground, and all along the road uphill -from the bridge leading to the village, not more than five hundred -yards away, crowds of men could be seen through the shimmering mist. -Their un-Russian shouting at their horses which were straining -uphill with the carts, and their calls to one another, could be -clearly heard. - -"Bwing the prisoner here," said Denisov in a low voice, not taking -his eyes off the French. - -A Cossack dismounted, lifted the boy down, and took him to -Denisov. Pointing to the French troops, Denisov asked him what these -and those of them were. The boy, thrusting his cold hands into his -pockets and lifting his eyebrows, looked at Denisov in affright, but -in spite of an evident desire to say all he knew gave confused -answers, merely assenting to everything Denisov asked him. Denisov -turned away from him frowning and addressed the esaul, conveying his -own conjectures to him. - -Petya, rapidly turning his head, looked now at the drummer boy, -now at Denisov, now at the esaul, and now at the French in the village -and along the road, trying not to miss anything of importance. - -"Whether Dolokhov comes or not, we must seize it, eh?" said -Denisov with a merry sparkle in his eyes. - -"It is a very suitable spot," said the esaul. - -"We'll send the infantwy down by the swamps," Denisov continued. -"They'll cweep up to the garden; you'll wide up fwom there with the -Cossacks"--he pointed to a spot in the forest beyond the village--"and -I with my hussars fwom here. And at the signal shot..." - -"The hollow is impassable--there's a swamp there," said the esaul. -"The horses would sink. We must ride round more to the left...." - -While they were talking in undertones the crack of a shot sounded -from the low ground by the pond, a puff of white smoke appeared, -then another, and the sound of hundreds of seemingly merry French -voices shouting together came up from the slope. For a moment -Denisov and the esaul drew back. They were so near that they thought -they were the cause of the firing and shouting. But the firing and -shouting did not relate to them. Down below, a man wearing something -red was running through the marsh. The French were evidently firing -and shouting at him. - -"Why, that's our Tikhon," said the esaul. - -"So it is! It is!" - -"The wascal!" said Denisov. - -"He'll get away!" said the esaul, screwing up his eyes. - -The man whom they called Tikhon, having run to the stream, plunged -in so that the water splashed in the air, and, having disappeared -for an instant, scrambled out on all fours, all black with the wet, -and ran on. The French who had been pursuing him stopped. - -"Smart, that!" said the esaul. - -"What a beast!" said Denisov with his former look of vexation. "What -has he been doing all this time?" - -"Who is he?" asked Petya. - -"He's our plastun. I sent him to capture a 'tongue.'" - -"Oh, yes," said Petya, nodding at the first words Denisov uttered as -if he understood it all, though he really did not understand -anything of it. - -Tikhon Shcherbaty was one of the most indispensable men in their -band. He was a peasant from Pokrovsk, near the river Gzhat. When -Denisov had come to Pokrovsk at the beginning of his operations and -had as usual summoned the village elder and asked him what he knew -about the French, the elder, as though shielding himself, had replied, -as all village elders did, that he had neither seen nor heard anything -of them. But when Denisov explained that his purpose was to kill the -French, and asked if no French had strayed that way, the elder replied -that some "more-orderers" had really been at their village, but that -Tikhon Shcherbaty was the only man who dealt with such matters. -Denisov had Tikhon called and, having praised him for his activity, -said a few words in the elder's presence about loyalty to the Tsar and -the country and the hatred of the French that all sons of the -fatherland should cherish. - -"We don't do the French any harm," said Tikhon, evidently frightened -by Denisov's words. "We only fooled about with the lads for fun, you -know! We killed a score or so of 'more-orderers,' but we did no harm -else..." - -Next day when Denisov had left Pokrovsk, having quite forgotten -about this peasant, it was reported to him that Tikhon had attached -himself to their party and asked to be allowed to remain with it. -Denisov gave orders to let him do so. - -Tikhon, who at first did rough work, laying campfires, fetching -water, flaying dead horses, and so on, soon showed a great liking -and aptitude for partisan warfare. At night he would go out for -booty and always brought back French clothing and weapons, and when -told to would bring in French captives also. Denisov then relieved him -from drudgery and began taking him with him when he went out on -expeditions and had him enrolled among the Cossacks. - -Tikhon did not like riding, and always went on foot, never lagging -behind the cavalry. He was armed with a musketoon (which he carried -rather as a joke), a pike and an ax, which latter he used as a wolf -uses its teeth, with equal case picking fleas out of its fur or -crunching thick bones. Tikhon with equal accuracy would split logs -with blows at arm's length, or holding the head of the ax would cut -thin little pegs or carve spoons. In Denisov's party he held a -peculiar and exceptional position. When anything particularly -difficult or nasty had to be done--to push a cart out of the mud -with one's shoulders, pull a horse out of a swamp by its tail, skin -it, slink in among the French, or walk more than thirty miles in a -day--everybody pointed laughingly at Tikhon. - -"It won't hurt that devil--he's as strong as a horse!" they said -of him. - -Once a Frenchman Tikhon was trying to capture fired a pistol at -him and shot him in the fleshy part of the back. That wound (which -Tikhon treated only with internal and external applications of -vodka) was the subject of the liveliest jokes by the whole detachment- -jokes in which Tikhon readily joined. - -"Hallo, mate! Never again? Gave you a twist?" the Cossacks would -banter him. And Tikhon, purposely writhing and making faces, pretended -to be angry and swore at the French with the funniest curses. The only -effect of this incident on Tikhon was that after being wounded he -seldom brought in prisoners. - -He was the bravest and most useful man in the party. No one found -more opportunities for attacking, no one captured or killed more -Frenchmen, and consequently he was made the buffoon of all the -Cossacks and hussars and willingly accepted that role. Now he had been -sent by Denisov overnight to Shamshevo to capture a "tongue." But -whether because he had not been content to take only one Frenchman -or because he had slept through the night, he had crept by day into -some bushes right among the French and, as Denisov had witnessed -from above, had been detected by them. - - - - - -CHAPTER VI - - -After talking for some time with the esaul about next day's -attack, which now, seeing how near they were to the French, he -seemed to have definitely decided on, Denisov turned his horse and -rode back. - -"Now, my lad, we'll go and get dwy," he said to Petya. - -As they approached the watchhouse Denisov stopped, peering into -the forest. Among the trees a man with long legs and long, swinging -arms, wearing a short jacket, bast shoes, and a Kazan hat, was -approaching with long, light steps. He had a musketoon over his -shoulder and an ax stuck in his girdle. When he espied Denisov he -hastily threw something into the bushes, removed his sodden hat by its -floppy brim, and approached his commander. It was Tikhon. His wrinkled -and pockmarked face and narrow little eyes beamed with -self-satisfied merriment. He lifted his head high and gazed at Denisov -as if repressing a laugh. - -"Well, where did you disappear to?" inquired Denisov. - -"Where did I disappear to? I went to get Frenchmen," answered Tikhon -boldly and hurriedly, in a husky but melodious bass voice. - -"Why did you push yourself in there by daylight? You ass! Well, -why haven't you taken one?" - -"Oh, I took one all right," said Tikhon. - -"Where is he?" - -"You see, I took him first thing at dawn," Tikhon continued, -spreading out his flat feet with outturned toes in their bast shoes. -"I took him into the forest. Then I see he's no good and think I'll go -and fetch a likelier one." - -"You see?... What a wogue--it's just as I thought," said Denisov -to the esaul. "Why didn't you bwing that one?" - -"What was the good of bringing him?" Tikhon interrupted hastily -and angrily--"that one wouldn't have done for you. As if I don't -know what sort you want!" - -"What a bwute you are!... Well?" - -"I went for another one," Tikhon continued, "and I crept like this -through the wood and lay down." (He suddenly lay down on his stomach -with a supple movement to show how he had done it.) "One turned up and -I grabbed him, like this." (He jumped up quickly and lightly.) -"'Come along to the colonel,' I said. He starts yelling, and -suddenly there were four of them. They rushed at me with their -little swords. So I went for them with my ax, this way: 'What are -you up to?' says I. 'Christ be with you!'" shouted Tikhon, waving -his arms with an angry scowl and throwing out his chest. - -"Yes, we saw from the hill how you took to your heels through the -puddles!" said the esaul, screwing up his glittering eyes. - -Petya badly wanted to laugh, but noticed that they all refrained -from laughing. He turned his eyes rapidly from Tikhon's face to the -esaul's and Denisov's, unable to make out what it all meant. - -"Don't play the fool!" said Denisov, coughing angrily. "Why didn't -you bwing the first one?" - -Tikhon scratched his back with one hand and his head with the other, -then suddenly his whole face expanded into a beaming, foolish grin, -disclosing a gap where he had lost a tooth (that was why he was called -Shcherbaty--the gap-toothed). Denisov smiled, and Petya burst into a -peal of merry laughter in which Tikhon himself joined. - -"Oh, but he was a regular good-for-nothing," said Tikhon. "The -clothes on him--poor stuff! How could I bring him? And so rude, your -honor! Why, he says: 'I'm a general's son myself, I won't go!' he -says." - -"You are a bwute!" said Denisov. "I wanted to question..." - -"But I questioned him," said Tikhon. "He said he didn't know much. -'There are a lot of us,' he says, 'but all poor stuff--only soldiers -in name,' he says. 'Shout loud at them,' he says, 'and you'll take -them all,'" Tikhon concluded, looking cheerfully and resolutely into -Denisov's eyes. - -"I'll give you a hundwed sharp lashes--that'll teach you to play the -fool!" said Denisov severely. - -"But why are you angry?" remonstrated Tikhon, "just as if I'd -never seen your Frenchmen! Only wait till it gets dark and I'll -fetch you any of them you want--three if you like." - -"Well, let's go," said Denisov, and rode all the way to the -watchhouse in silence and frowning angrily. - -Tikhon followed behind and Petya heard the Cossacks laughing with -him and at him, about some pair of boots he had thrown into the -bushes. - -When the fit of laughter that had seized him at Tikhon's words and -smile had passed and Petya realized for a moment that this Tikhon -had killed a man, he felt uneasy. He looked round at the captive -drummer boy and felt a pang in his heart. But this uneasiness lasted -only a moment. He felt it necessary to hold his head higher, to -brace himself, and to question the esaul with an air of importance -about tomorrow's undertaking, that he might not be unworthy of the -company in which he found himself. - -The officer who had been sent to inquire met Denisov on the way with -the news that Dolokhov was soon coming and that all was well with him. - -Denisov at once cheered up and, calling Petya to him, said: "Well, -tell me about yourself." - - - - - -CHAPTER VII - - -Petya, having left his people after their departure from Moscow, -joined his regiment and was soon taken as orderly by a general -commanding a large guerrilla detachment. From the time he received his -commission, and especially since he had joined the active army and -taken part in the battle of Vyazma, Petya had been in a constant state -of blissful excitement at being grown-up and in a perpetual ecstatic -hurry not to miss any chance to do something really heroic. He was -highly delighted with what he saw and experienced in the army, but -at the same time it always seemed to him that the really heroic -exploits were being performed just where he did not happen to be. -And he was always in a hurry to get where he was not. - -When on the twenty-first of October his general expressed a wish -to send somebody to Denisov's detachment, Petya begged so piteously to -be sent that the general could not refuse. But when dispatching him he -recalled Petya's mad action at the battle of Vyazma, where instead -of riding by the road to the place to which he had been sent, he had -galloped to the advanced line under the fire of the French and had -there twice fired his pistol. So now the general explicitly forbade -his taking part in any action whatever of Denisov's. That was why -Petya had blushed and grown confused when Denisov asked him whether he -could stay. Before they had ridden to the outskirts of the forest -Petya had considered he must carry out his instructions strictly and -return at once. But when he saw the French and saw Tikhon and -learned that there would certainly be an attack that night, he -decided, with the rapidity with which young people change their views, -that the general, whom he had greatly respected till then, was a -rubbishy German, that Denisov was a hero, the esaul a hero, and Tikhon -a hero too, and that it would be shameful for him to leave them at a -moment of difficulty. - -It was already growing dusk when Denisov, Petya, and the esaul -rode up to the watchhouse. In the twilight saddled horses could be -seen, and Cossacks and hussars who had rigged up rough shelters in the -glade and were kindling glowing fires in a hollow of the forest -where the French could not see the smoke. In the passage of the -small watchhouse a Cossack with sleeves rolled up was chopping some -mutton. In the room three officers of Denisov's band were converting a -door into a tabletop. Petya took off his wet clothes, gave them to -be dried, and at once began helping the officers to fix up the -dinner table. - -In ten minutes the table was ready and a napkin spread on it. On the -table were vodka, a flask of rum, white bread, roast mutton, and salt. - -Sitting at table with the officers and tearing the fat savory mutton -with his hands, down which the grease trickled, Petya was in an -ecstatic childish state of love for all men, and consequently of -confidence that others loved him in the same way. - -"So then what do you think, Vasili Dmitrich?" said he to Denisov. -"It's all right my staying a day with you?" And not waiting for a -reply he answered his own question: "You see I was told to find out- -well, I am finding out.... Only do let me into the very... into the -chief... I don't want a reward... But I want..." - -Petya clenched his teeth and looked around, throwing back his head -and flourishing his arms. - -"Into the vewy chief..." Denisov repeated with a smile. - -"Only, please let me command something, so that I may really -command..." Petya went on. "What would it be to you?... Oh, you want a -knife?" he said, turning to an officer who wished to cut himself a -piece of mutton. - -And he handed him his clasp knife. The officer admired it. - -"Please keep it. I have several like it," said Petya, blushing. -"Heavens! I was quite forgetting!" he suddenly cried. "I have some -raisins, fine ones; you know, seedless ones. We have a new sutler -and he has such capital things. I bought ten pounds. I am used to -something sweet. Would you like some?..." and Petya ran out into the -passage to his Cossack and brought back some bags which contained -about five pounds of raisins. "Have some, gentlemen, have some!" - -"You want a coffeepot, don't you?" he asked the esaul. "I bought a -capital one from our sutler! He has splendid things. And he's very -honest, that's the chief thing. I'll be sure to send it to you. Or -perhaps your flints are giving out, or are worn out--that happens -sometimes, you know. I have brought some with me, here they are"- -and he showed a bag--"a hundred flints. I bought them very cheap. -Please take as many as you want, or all if you like...." - -Then suddenly, dismayed lest he had said too much, Petya stopped and -blushed. - -He tried to remember whether he had not done anything else that -was foolish. And running over the events of the day he remembered -the French drummer boy. "It's capital for us here, but what of him? -Where have they put him? Have they fed him? Haven't they hurt his -feelings?" he thought. But having caught himself saying too much about -the flints, he was now afraid to speak out. - -"I might ask," he thought, "but they'll say: 'He's a boy himself and -so he pities the boy.' I'll show them tomorrow whether I'm a boy. Will -it seem odd if I ask?" Petya thought. "Well, never mind!" and -immediately, blushing and looking anxiously at the officers to see -if they appeared ironical, he said: - -"May I call in that boy who was taken prisoner and give him -something to eat?... Perhaps..." - -"Yes, he's a poor little fellow," said Denisov, who evidently saw -nothing shameful in this reminder. "Call him in. His name is Vincent -Bosse. Have him fetched." - -"I'll call him," said Petya. - -"Yes, yes, call him. A poor little fellow," Denisov repeated. - -Petya was standing at the door when Denisov said this. He slipped in -between the officers, came close to Denisov, and said: - -"Let me kiss you, dear old fellow! Oh, how fine, how splendid!" - -And having kissed Denisov he ran out of the hut. - -"Bosse! Vincent!" Petya cried, stopping outside the door. - -"Who do you want, sir?" asked a voice in the darkness. - -Petya replied that he wanted the French lad who had been captured -that day. - -"Ah, Vesenny?" said a Cossack. - -Vincent, the boy's name, had already been changed by the Cossacks -into Vesenny (vernal) and into Vesenya by the peasants and soldiers. -In both these adaptations the reference to spring (vesna) matched -the impression made by the young lad. - -"He is warming himself there by the bonfire. Ho, Vesenya! -Vesenya!--Vesenny!" laughing voices were heard calling to one -another in the darkness. - -"He's a smart lad," said an hussar standing near Petya. "We gave him -something to eat a while ago. He was awfully hungry!" - -The sound of bare feet splashing through the mud was heard in the -darkness, and the drummer boy came to the door. - -"Ah, c'est vous!" said Petya. "Voulez-vous manger? N'ayez pas -peur, on ne vous fera pas de mal,"* he added shyly and affectionately, -touching the boy's hand. "Entrez, entrez."*[2] - - -*"Ah, it's you! Do you want something to eat? Don't be afraid, -they won't hurt you." - -*[2] "Come in, come in." - - -"Merci, monsieur,"* said the drummer boy in a trembling almost -childish voice, and he began scraping his dirty feet on the threshold. - - -*"Thank you, sir." - - -There were many things Petya wanted to say to the drummer boy, but -did not dare to. He stood irresolutely beside him in the passage. Then -in the darkness he took the boy's hand and pressed it. - -"Come in, come in!" he repeated in a gentle whisper. "Oh, what can I -do for him?" he thought, and opening the door he let the boy pass in -first. - -When the boy had entered the hut, Petya sat down at a distance -from him, considering it beneath his dignity to pay attention to -him. But he fingered the money in his pocket and wondered whether it -would seem ridiculous to give some to the drummer boy. - - - - - -CHAPTER VIII - - -The arrival of Dolokhov diverted Petya's attention from the -drummer boy, to whom Denisov had had some mutton and vodka given, -and whom he had had dressed in a Russian coat so that he might be kept -with their band and not sent away with the other prisoners. Petya -had heard in the army many stories of Dolokhov's extraordinary bravery -and of his cruelty to the French, so from the moment he entered the -hut Petya did not take his eyes from him, but braced himself up more -and more and held his head high, that he might not be unworthy even of -such company. - -Dolokhov's appearance amazed Petya by its simplicity. - -Denisov wore a Cossack coat, had a beard, had an icon of Nicholas -the Wonder-Worker on his breast, and his way of speaking and -everything he did indicated his unusual position. But Dolokhov, who in -Moscow had worn a Persian costume, had now the appearance of a most -correct officer of the Guards. He was clean-shaven and wore a -Guardsman's padded coat with an Order of St. George at his -buttonhole and a plain forage cap set straight on his head. He took -off his wet felt cloak in a corner of the room, and without greeting -anyone went up to Denisov and began questioning him about the matter -in hand. Denisov told him of the designs the large detachments had -on the transport, of the message Petya had brought, and his own -replies to both generals. Then he told him all he knew of the French -detachment. - -"That's so. But we must know what troops they are and their -numbers," said Dolokhov. "It will be necessary to go there. We can't -start the affair without knowing for certain how many there are. I -like to work accurately. Here now--wouldn't one of these gentlemen -like to ride over to the French camp with me? I have brought a spare -uniform." - -"I, I... I'll go with you!" cried Petya. - -"There's no need for you to go at all," said Denisov, addressing -Dolokhov, "and as for him, I won't let him go on any account." - -"I like that!" exclaimed Petya. "Why shouldn't I go?" - -"Because it's useless." - -"Well, you must excuse me, because... because... I shall go, and -that's all. You'll take me, won't you?" he said, turning to Dolokhov. - -"Why not?" Dolokhov answered absently, scrutinizing the face of -the French drummer boy. "Have you had that youngster with you long?" -he asked Denisov. - -"He was taken today but he knows nothing. I'm keeping him with me." - -"Yes, and where do you put the others?" inquired Dolokhov. - -"Where? I send them away and take a weceipt for them," shouted -Denisov, suddenly flushing. "And I say boldly that I have not a single -man's life on my conscience. Would it be difficult for you to send -thirty or thwee hundwed men to town under escort, instead of staining- -I speak bluntly--staining the honor of a soldier?" - -"That kind of amiable talk would be suitable from this young count -of sixteen," said Dolokhov with cold irony, "but it's time for you -to drop it." - -"Why, I've not said anything! I only say that I'll certainly go with -you," said Petya shyly. - -"But for you and me, old fellow, it's time to drop these amenities," -continued Dolokhov, as if he found particular pleasure in speaking -of this subject which irritated Denisov. "Now, why have you kept -this lad?" he went on, swaying his head. "Because you are sorry for -him! Don't we know those 'receipts' of yours? You send a hundred men -away, and thirty get there. The rest either starve or get killed. So -isn't it all the same not to send them?" - -The esaul, screwing up his light-colored eyes, nodded approvingly. - -"That's not the point. I'm not going to discuss the matter. I do not -wish to take it on my conscience. You say they'll die. All wight. Only -not by my fault!" - -Dolokhov began laughing. - -"Who has told them not to capture me these twenty times over? But if -they did catch me they'd string me up to an aspen tree, and with all -your chivalry just the same." He paused. "However, we must get to -work. Tell the Cossack to fetch my kit. I have two French uniforms -in it. Well, are you coming with me?" he asked Petya. - -"I? Yes, yes, certainly!" cried Petya, blushing almost to tears -and glancing at Denisov. - -While Dolokhov had been disputing with Denisov what should be done -with prisoners, Petya had once more felt awkward and restless; but -again he had no time to grasp fully what they were talking about. -"If grown-up, distinguished men think so, it must be necessary and -right," thought he. "But above all Denisov must not dare to imagine -that I'll obey him and that he can order me about. I will certainly go -to the French camp with Dolokhov. If he can, so can I!" - -And to all Denisov's persuasions, Petya replied that he too was -accustomed to do everything accurately and not just anyhow, and that -he never considered personal danger. - -"For you'll admit that if we don't know for sure how many of them -there are... hundreds of lives may depend on it, while there are -only two of us. Besides, I want to go very much and certainly will go, -so don't hinder me," said he. "It will only make things worse..." - - - - - -CHAPTER IX - - -Having put on French greatcoats and shakos, Petya and Dolokhov -rode to the clearing from which Denisov had reconnoitered the French -camp, and emerging from the forest in pitch darkness they descended -into the hollow. On reaching the bottom, Dolokhov told the Cossacks -accompanying him to await him there and rode on at a quick trot -along the road to the bridge. Petya, his heart in his mouth with -excitement, rode by his side. - -"If we're caught, I won't be taken alive! I have a pistol," -whispered he. - -"Don't talk Russian," said Dolokhov in a hurried whisper, and at -that very moment they heard through the darkness the challenge: "Qui -vive?"* and the click of a musket. - - -*"Who goes there?" - - -The blood rushed to Petya's face and he grasped his pistol. - -"Lanciers du 6-me,"* replied Dolokhov, neither hastening nor -slackening his horse's pace. - - -*"Lancers of the 6th Regiment." - - -The black figure of a sentinel stood on the bridge. - -"Mot d'ordre."* - - -*"Password." - - -Dolokhov reined in his horse and advanced at a walk. - -"Dites donc, le colonel Gerard est ici?"* he asked. - - -*"Tell me, is Colonel Gerard here?" - - -"Mot d'ordre," repeated the sentinel, barring the way and not -replying. - -"Quand un officier fait sa ronde, les sentinelles ne demandent pas -le mot d'ordre..." cried Dolokhov suddenly flaring up and riding -straight at the sentinel. "Je vous demande si le colonel est ici."* - - -*"When an officer is making his round, sentinels don't ask him for -the password.... I am asking you if the colonel is here." - - -And without waiting for an answer from the sentinel, who had stepped -aside, Dolokhov rode up the incline at a walk. - -Noticing the black outline of a man crossing the road, Dolokhov -stopped him and inquired where the commander and officers were. The -man, a soldier with a sack over his shoulder, stopped, came close up -to Dolokhov's horse, touched it with his hand, and explained simply -and in a friendly way that the commander and the officers were -higher up the hill to the right in the courtyard of the farm, as he -called the landowner's house. - -Having ridden up the road, on both sides of which French talk -could be heard around the campfires, Dolokhov turned into the -courtyard of the landowner's house. Having ridden in, he dismounted -and approached a big blazing campfire, around which sat several men -talking noisily. Something was boiling in a small cauldron at the edge -of the fire and a soldier in a peaked cap and blue overcoat, lit up by -the fire, was kneeling beside it stirring its contents with a ramrod. - -"Oh, he's a hard nut to crack," said one of the officers who was -sitting in the shadow at the other side of the fire. - -"He'll make them get a move on, those fellows!" said another, -laughing. - -Both fell silent, peering out through the darkness at the sound of -Dolokhov's and Petya's steps as they advanced to the fire leading -their horses. - -"Bonjour, messieurs!"* said Dolokhov loudly and clearly. - - -*"Good day, gentlemen." - - -There was a stir among the officers in the shadow beyond the fire, -and one tall, long-necked officer, walking round the fire, came up -to Dolokhov. - -"Is that you, Clement?" he asked. "Where the devil...?" But, noticing -his mistake, he broke off short and, with a frown, greeted Dolokhov as -a stranger, asking what he could do for him. - -Dolokhov said that he and his companion were trying to overtake -their regiment, and addressing the company in general asked whether -they knew anything of the 6th Regiment. None of them knew anything, -and Petya thought the officers were beginning to look at him and -Dolokhov with hostility and suspicion. For some seconds all were -silent. - -"If you were counting on the evening soup, you have come too -late," said a voice from behind the fire with a repressed laugh. - -Dolokhov replied that they were not hungry and must push on -farther that night. - -He handed the horses over to the soldier who was stirring the pot -and squatted down on his heels by the fire beside the officer with the -long neck. That officer did not take his eyes from Dolokhov and -again asked to what regiment he belonged. Dolokhov, as if he had not -heard the question, did not reply, but lighting a short French pipe -which he took from his pocket began asking the officer in how far -the road before them was safe from Cossacks. - -"Those brigands are everywhere," replied an officer from behind -the fire. - -Dolokhov remarked that the Cossacks were a danger only to stragglers -such as his companion and himself, "but probably they would not dare -to attack large detachments?" he added inquiringly. No one replied. - -"Well, now he'll come away," Petya thought every moment as he -stood by the campfire listening to the talk. - -But Dolokhov restarted the conversation which had dropped and -began putting direct questions as to how many men there were in the -battalion, how many battalions, and how many prisoners. Asking about -the Russian prisoners with that detachment, Dolokhov said: - -"A horrid business dragging these corpses about with one! It would -be better to shoot such rabble," and burst into loud laughter, so -strange that Petya thought the French would immediately detect their -disguise, and involuntarily took a step back from the campfire. - -No one replied a word to Dolokhov's laughter, and a French officer -whom they could not see (he lay wrapped in a greatcoat) rose and -whispered something to a companion. Dolokhov got up and called to -the soldier who was holding their horses. - -"Will they bring our horses or not?" thought Petya, instinctively -drawing nearer to Dolokhov. - -The horses were brought. - -"Good evening, gentlemen," said Dolokhov. - -Petya wished to say "Good night" but could not utter a word. The -officers were whispering together. Dolokhov was a long time mounting -his horse which would not stand still, then he rode out of the yard at -a footpace. Petya rode beside him, longing to look round to see -whether or no the French were running after them, but not daring to. - -Coming out onto the road Dolokhov did not ride back across the -open country, but through the village. At one spot he stopped and -listened. "Do you hear?" he asked. Petya recognized the sound of -Russian voices and saw the dark figures of Russian prisoners round -their campfires. When they had descended to the bridge Petya and -Dolokhov rode past the sentinel, who without saying a word paced -morosely up and down it, then they descended into the hollow where the -Cossacks awaited them. - -"Well now, good-by. Tell Denisov, 'at the first shot at -daybreak,'" said Dolokhov and was about to ride away, but Petya seized -hold of him. - -"Really!" he cried, "you are such a hero! Oh, how fine, how -splendid! How I love you!" - -"All right, all right!" said Dolokhov. But Petya did not let go of -him and Dolokhov saw through the gloom that Petya was bending toward -him and wanted to kiss him. Dolokhov kissed him, laughed, turned his -horse, and vanished into the darkness. - - - - - -CHAPTER X - - -Having returned to the watchman's hut, Petya found Denisov in the -passage. He was awaiting Petya's return in a state of agitation, -anxiety, and self-reproach for having let him go. - -"Thank God!" he exclaimed. "Yes, thank God!" he repeated, -listening to Petya's rapturous account. "But, devil take you, I -haven't slept because of you! Well, thank God. Now lie down. We can -still get a nap before morning." - -"But... no," said Petya, "I don't want to sleep yet. Besides I -know myself, if I fall asleep it's finished. And then I am used to not -sleeping before a battle." - -He sat awhile in the hut joyfully recalling the details of his -expedition and vividly picturing to himself what would happen next -day. - -Then, noticing that Denisov was asleep, he rose and went out of -doors. - -It was still quite dark outside. The rain was over, but drops were -still falling from the trees. Near the watchman's hut the black shapes -of the Cossacks' shanties and of horses tethered together could be -seen. Behind the hut the dark shapes of the two wagons with their -horses beside them were discernible, and in the hollow the dying -campfire gleamed red. Not all the Cossacks and hussars were asleep; -here and there, amid the sounds of falling drops and the munching of -the horses near by, could be heard low voices which seemed to be -whispering. - -Petya came out, peered into the darkness, and went up to the wagons. -Someone was snoring under them, and around them stood saddled horses -munching their oats. In the dark Petya recognized his own horse, which -he called "Karabakh" though it was of Ukranian breed, and went up to -it. - -"Well, Karabakh! We'll do some service tomorrow," said he, -sniffing its nostrils and kissing it. - -"Why aren't you asleep, sir?" said a Cossack who was sitting under a -wagon. - -"No, ah... Likhachev--isn't that your name? Do you know I have -only just come back! We've been into the French camp." - -And Petya gave the Cossack a detailed account not only of his ride -but also of his object, and why he considered it better to risk his -life than to act "just anyhow." - -"Well, you should get some sleep now," said the Cossack. - -"No, I am used to this," said Petya. "I say, aren't the flints in -your pistols worn out? I brought some with me. Don't you want any? You -can have some." - - -The Cossack bent forward from under the wagon to get a closer look -at Petya. - -"Because I am accustomed to doing everything accurately," said -Petya. "Some fellows do things just anyhow, without preparation, and -then they're sorry for it afterwards. I don't like that." - -"Just so," said the Cossack. - -"Oh yes, another thing! Please, my dear fellow, will you sharpen -my saber for me? It's got bl..." (Petya feared to tell a lie, and -the saber never had been sharpened.) "Can you do it?" - -"Of course I can." - -Likhachev got up, rummaged in his pack, and soon Petya heard the -warlike sound of steel on whetstone. He climbed onto the wagon and sat -on its edge. The Cossack was sharpening the saber under the wagon. - -"I say! Are the lads asleep?" asked Petya. - -"Some are, and some aren't--like us." - -"Well, and that boy?" - -"Vesenny? Oh, he's thrown himself down there in the passage. Fast -asleep after his fright. He was that glad!" - -After that Petya remained silent for a long time, listening to the -sounds. He heard footsteps in the darkness and a black figure -appeared. - -"What are you sharpening?" asked a man coming up to the wagon. - -"Why, this gentleman's saber." - -"That's right," said the man, whom Petya took to be an hussar. -"Was the cup left here?" - -"There, by the wheel!" - -The hussar took the cup. - -"It must be daylight soon," said he, yawning, and went away. - -Petya ought to have known that he was in a forest with Denisov's -guerrilla band, less than a mile from the road, sitting on a wagon -captured from the French beside which horses were tethered, that under -it Likhachev was sitting sharpening a saber for him, that the big dark -blotch to the right was the watchman's hut, and the red blotch below -to the left was the dying embers of a campfire, that the man who had -come for the cup was an hussar who wanted a drink; but he neither knew -nor waited to know anything of all this. He was in a fairy kingdom -where nothing resembled reality. The big dark blotch might really be -the watchman's hut or it might be a cavern leading to the very -depths of the earth. Perhaps the red spot was a fire, or it might be -the eye of an enormous monster. Perhaps he was really sitting on a -wagon, but it might very well be that he was not sitting on a wagon -but on a terribly high tower from which, if he fell, he would have -to fall for a whole day or a whole month, or go on falling and never -reach the bottom. Perhaps it was just the Cossack, Likhachev, who -was sitting under the wagon, but it might be the kindest, bravest, -most wonderful, most splendid man in the world, whom no one knew of. -It might really have been that the hussar came for water and went back -into the hollow, but perhaps he had simply vanished--disappeared -altogether and dissolved into nothingness. - -Nothing Petya could have seen now would have surprised him. He was -in a fairy kingdom where everything was possible. - -He looked up at the sky. And the sky was a fairy realm like the -earth. It was clearing, and over the tops of the trees clouds were -swiftly sailing as if unveiling the stars. Sometimes it looked as if -the clouds were passing, and a clear black sky appeared. Sometimes -it seemed as if the black spaces were clouds. Sometimes the sky seemed -to be rising high, high overhead, and then it seemed to sink so low -that one could touch it with one's hand. - -Petya's eyes began to close and he swayed a little. - -The trees were dripping. Quiet talking was heard. The horses neighed -and jostled one another. Someone snored. - -"Ozheg-zheg, Ozheg-zheg..." hissed the saber against the -whetstone, and suddenly Petya heard an harmonious orchestra playing -some unknown, sweetly solemn hymn. Petya was as musical as Natasha and -more so than Nicholas, but had never learned music or thought about -it, and so the melody that unexpectedly came to his mind seemed to him -particularly fresh and attractive. The music became more and more -audible. The melody grew and passed from one instrument to another. -And what was played was a fugue--though Petya had not the least -conception of what a fugue is. Each instrument--now resembling a -violin and now a horn, but better and clearer than violin or horn- -played its own part, and before it had finished the melody merged with -another instrument that began almost the same air, and then with a -third and a fourth; and they all blended into one and again became -separate and again blended, now into solemn church music, now into -something dazzlingly brilliant and triumphant. - -"Oh--why, that was in a dream!" Petya said to himself, as he lurched -forward. "It's in my ears. But perhaps it's music of my own. Well, -go on, my music! Now!..." - -He closed his eyes, and, from all sides as if from a distance, -sounds fluttered, grew into harmonies, separated, blended, and again -all mingled into the same sweet and solemn hymn. "Oh, this is -delightful! As much as I like and as I like!" said Petya to himself. -He tried to conduct that enormous orchestra. - -"Now softly, softly die away!" and the sounds obeyed him. "Now -fuller, more joyful. Still more and more joyful!" And from an -unknown depth rose increasingly triumphant sounds. "Now voices join -in!" ordered Petya. And at first from afar he heard men's voices and -then women's. The voices grew in harmonious triumphant strength, and -Petya listened to their surpassing beauty in awe and joy. - -With a solemn triumphal march there mingled a song, the drip from -the trees, and the hissing of the saber, "Ozheg-zheg-zheg..." and -again the horses jostled one another and neighed, not disturbing the -choir but joining in it. - -Petya did not know how long this lasted: he enjoyed himself all -the time, wondered at his enjoyment and regretted that there was no -one to share it. He was awakened by Likhachev's kindly voice. - -"It's ready, your honor; you can split a Frenchman in half with it!" - -Petya woke up. - -"It's getting light, it's really getting light!" he exclaimed. - -The horses that had previously been invisible could now be seen to -their very tails, and a watery light showed itself through the bare -branches. Petya shook himself, jumped up, took a ruble from his pocket -and gave it to Likhachev; then he flourished the saber, tested it, and -sheathed it. The Cossacks were untying their horses and tightening -their saddle girths. - -"And here's the commander," said Likhachev. - -Denisov came out of the watchman's hut and, having called Petya, -gave orders to get ready. - - - - -CHAPTER XI - - -The men rapidly picked out their horses in the semidarkness, -tightened their saddle girths, and formed companies. Denisov stood -by the watchman's hut giving final orders. The infantry of the -detachment passed along the road and quickly disappeared amid the -trees in the mist of early dawn, hundreds of feet splashing through -the mud. The esaul gave some orders to his men. Petya held his horse -by the bridle, impatiently awaiting the order to mount. His face, -having been bathed in cold water, was all aglow, and his eyes were -particularly brilliant. Cold shivers ran down his spine and his -whole body pulsed rhythmically. - -"Well, is ev'wything weady?" asked Denisov. "Bwing the horses." - -The horses were brought. Denisov was angry with the Cossack -because the saddle girths were too slack, reproved him, and mounted. -Petya put his foot in the stirrup. His horse by habit made as if to -nip his leg, but Petya leaped quickly into the saddle unconscious of -his own weight and, turning to look at the hussars starting in the -darkness behind him, rode up to Denisov. - -"Vasili Dmitrich, entrust me with some commission! Please... for -God's sake...!" said he. - -Denisov seemed to have forgotten Petya's very existence. He turned -to glance at him. - -"I ask one thing of you," he said sternly, "to obey me and not shove -yourself forward anywhere." - -He did not say another word to Petya but rode in silence all the -way. When they had come to the edge of the forest it was noticeably -growing light over the field. Denisov talked in whispers with the -esaul and the Cossacks rode past Petya and Denisov. When they had -all ridden by, Denisov touched his horse and rode down the hill. -Slipping onto their haunches and sliding, the horses descended with -their riders into the ravine. Petya rode beside Denisov, the pulsation -of his body constantly increasing. It was getting lighter and lighter, -but the mist still hid distant objects. Having reached the valley, -Denisov looked back and nodded to a Cossack beside him. - -"The signal!" said he. - -The Cossack raised his arm and a shot rang out. In an instant the -tramp of horses galloping forward was heard, shouts came from -various sides, and then more shots. - -At the first sound of trampling hoofs and shouting, Petya lashed his -horse and loosening his rein galloped forward, not heeding Denisov who -shouted at him. It seemed to Petya that at the moment the shot was -fired it suddenly became as bright as noon. He galloped to the bridge. -Cossacks were galloping along the road in front of him. On the -bridge he collided with a Cossack who had fallen behind, but he -galloped on. In front of him soldiers, probably Frenchmen, were -running from right to left across the road. One of them fell in the -mud under his horse's feet. - -Cossacks were crowding about a hut, busy with something. From the -midst of that crowd terrible screams arose. Petya galloped up, and the -first thing he saw was the pale face and trembling jaw of a Frenchman, -clutching the handle of a lance that had been aimed at him. - -"Hurrah!... Lads!... ours!" shouted Petya, and giving rein to his -excited horse he galloped forward along the village street. - -He could hear shooting ahead of him. Cossacks, hussars, and ragged -Russian prisoners, who had come running from both sides of the road, -were shouting something loudly and incoherently. A gallant-looking -Frenchman, in a blue overcoat, capless, and with a frowning red -face, had been defending himself against the hussars. When Petya -galloped up the Frenchman had already fallen. "Too late again!" -flashed through Petya's mind and he galloped on to the place from -which the rapid firing could be heard. The shots came from the yard of -the landowner's house he had visited the night before with Dolokhov. -The French were making a stand there behind a wattle fence in a garden -thickly overgrown with bushes and were firing at the Cossacks who -crowded at the gateway. Through the smoke, as he approached the -gate, Petya saw Dolokhov, whose face was of a pale-greenish tint, -shouting to his men. "Go round! Wait for the infantry!" he exclaimed -as Petya rode up to him. - -"Wait?... Hurrah-ah-ah!" shouted Petya, and without pausing a moment -galloped to the place whence came the sounds of firing and where the -smoke was thickest. - -A volley was heard, and some bullets whistled past, while others -plashed against something. The Cossacks and Dolokhov galloped after -Petya into the gateway of the courtyard. In the dense wavering smoke -some of the French threw down their arms and ran out of the bushes -to meet the Cossacks, while others ran down the hill toward the -pond. Petya was galloping along the courtyard, but instead of -holding the reins he waved both his arms about rapidly and -strangely, slipping farther and farther to one side in his saddle. His -horse, having galloped up to a campfire that was smoldering in the -morning light, stopped suddenly, and Petya fell heavily on to the -wet ground. The Cossacks saw that his arms and legs jerked rapidly -though his head was quite motionless. A bullet had pierced his skull. - -After speaking to the senior French officer, who came out of the -house with a white handkerchief tied to his sword and announced that -they surrendered, Dolokhov dismounted and went up to Petya, who lay -motionless with outstretched arms. - -"Done for!" he said with a frown, and went to the gate to meet -Denisov who was riding toward him. - -"Killed?" cried Denisov, recognizing from a distance the -unmistakably lifeless attitude--very familiar to him--in which Petya's -body was lying. - -"Done for!" repeated Dolokhov as if the utterance of these words -afforded him pleasure, and he went quickly up to the prisoners, who -were surrounded by Cossacks who had hurried up. "We won't take -them!" he called out to Denisov. - -Denisov did not reply; he rode up to Petya, dismounted, and with -trembling hands turned toward himself the bloodstained, -mud-bespattered face which had already gone white. - -"I am used to something sweet. Raisins, fine ones... take them all!" -he recalled Petya's words. And the Cossacks looked round in surprise -at the sound, like the yelp of a dog, with which Denisov turned -away, walked to the wattle fence, and seized hold of it. - -Among the Russian prisoners rescued by Denisov and Dolokhov was -Pierre Bezukhov. - - - - - -CHAPTER XII - -During the whole of their march from Moscow no fresh orders had been -issued by the French authorities concerning the party of prisoners -among whom was Pierre. On the twenty-second of October that party -was no longer with the same troops and baggage trains with which it -had left Moscow. Half the wagons laden with hardtack that had traveled -the first stages with them had been captured by Cossacks, the other -half had gone on ahead. Not one of those dismounted cavalrymen who had -marched in front of the prisoners was left; they had all -disappeared. The artillery the prisoners had seen in front of them -during the first days was now replaced by Marshal Junot's enormous -baggage train, convoyed by Westphalians. Behind the prisoners came a -cavalry baggage train. - -From Vyazma onwards the French army, which had till then moved in -three columns, went on as a single group. The symptoms of disorder -that Pierre had noticed at their first halting place after leaving -Moscow had now reached the utmost limit. - -The road along which they moved was bordered on both sides by dead -horses; ragged men who had fallen behind from various regiments -continually changed about, now joining the moving column, now again -lagging behind it. - -Several times during the march false alarms had been given and the -soldiers of the escort had raised their muskets, fired, and run -headlong, crushing one another, but had afterwards reassembled and -abused each other for their causeless panic. - -These three groups traveling together--the cavalry stores, the -convoy of prisoners, and Junot's baggage train--still constituted a -separate and united whole, though each of the groups was rapidly -melting away. - -Of the artillery baggage train which had consisted of a hundred -and twenty wagons, not more than sixty now remained; the rest had been -captured or left behind. Some of Junot's wagons also had been captured -or abandoned. Three wagons had been raided and robbed by stragglers -from Davout's corps. From the talk of the Germans Pierre learned -that a larger guard had been allotted to that baggage train than to -the prisoners, and that one of their comrades, a German soldier, had -been shot by the marshal's own order because a silver spoon -belonging to the marshal had been found in his possession. - -The group of prisoners had melted away most of all. Of the three -hundred and thirty men who had set out from Moscow fewer than a -hundred now remained. The prisoners were more burdensome to the escort -than even the cavalry saddles or Junot's baggage. They understood that -the saddles and Junot's spoon might be of some use, but that cold -and hungry soldiers should have to stand and guard equally cold and -hungry Russians who froze and lagged behind on the road (in which case -the order was to shoot them) was not merely incomprehensible but -revolting. And the escort, as if afraid, in the grievous condition -they themselves were in, of giving way to the pity they felt for the -prisoners and so rendering their own plight still worse, treated -them with particular moroseness and severity. - -At Dorogobuzh while the soldiers of the convoy, after locking the -prisoners in a stable, had gone off to pillage their own stores, -several of the soldier prisoners tunneled under the wall and ran away, -but were recaptured by the French and shot. - -The arrangement adopted when they started, that the officer -prisoners should be kept separate from the rest, had long since been -abandoned. All who could walk went together, and after the third stage -Pierre had rejoined Karataev and the gray-blue bandy-legged dog that -had chosen Karataev for its master. - -On the third day after leaving Moscow Karataev again fell ill with -the fever he had suffered from in the hospital in Moscow, and as he -grew gradually weaker Pierre kept away from him. Pierre did not know -why, but since Karataev had begun to grow weaker it had cost him an -effort to go near him. When he did so and heard the subdued moaning -with which Karataev generally lay down at the halting places, and when -he smelled the odor emanating from him which was now stronger than -before, Pierre moved farther away and did not think about him. - -While imprisoned in the shed Pierre had learned not with his -intellect but with his whole being, by life itself, that man is -created for happiness, that happiness is within him, in the -satisfaction of simple human needs, and that all unhappiness arises -not from privation but from superfluity. And now during these last -three weeks of the march he had learned still another new, consolatory -truth--that nothing in this world is terrible. He had learned that -as there is no condition in which man can be happy and entirely -free, so there is no condition in which he need be unhappy and lack -freedom. He learned that suffering and freedom have their limits and -that those limits are very near together; that the person in a bed -of roses with one crumpled petal suffered as keenly as he now, -sleeping on the bare damp earth with one side growing chilled while -the other was warming; and that when he had put on tight dancing shoes -he had suffered just as he did now when he walked with bare feet -that were covered with sores--his footgear having long since fallen to -pieces. He discovered that when he had married his wife--of his own -free will as it had seemed to him--he had been no more free than now -when they locked him up at night in a stable. Of all that he himself -subsequently termed his sufferings, but which at the time he -scarcely felt, the worst was the state of his bare, raw, and -scab-covered feet. (The horseflesh was appetizing and nourishing, -the saltpeter flavor of the gunpowder they used instead of salt was -even pleasant; there was no great cold, it was always warm walking -in the daytime, and at night there were the campfires; the lice that -devoured him warmed his body.) The one thing that was at first hard to -bear was his feet. - -After the second day's march Pierre, having examined his feet by the -campfire, thought it would be impossible to walk on them; but when -everybody got up he went along, limping, and, when he had warmed up, -walked without feeling the pain, though at night his feet were more -terrible to look at than before. However, he did not look at them now, -but thought of other things. - -Only now did Pierre realize the full strength of life in man and the -saving power he has of transferring his attention from one thing to -another, which is like the safety valve of a boiler that allows -superfluous steam to blow off when the pressure exceeds a certain -limit. - -He did not see and did not hear how they shot the prisoners who -lagged behind, though more than a hundred perished in that way. He did -not think of Karataev who grew weaker every day and evidently would -soon have to share that fate. Still less did Pierre think about -himself. The harder his position became and the more terrible the -future, the more independent of that position in which he found -himself were the joyful and comforting thoughts, memories, and -imaginings that came to him. - - - - - -CHAPTER XIII - - -At midday on the twenty-second of October Pierre was going uphill -along the muddy, slippery road, looking at his feet and at the -roughness of the way. Occasionally he glanced at the familiar crowd -around him and then again at his feet. The former and the latter -were alike familiar and his own. The blue-gray bandy legged dog ran -merrily along the side of the road, sometimes in proof of its -agility and self-satisfaction lifting one hind leg and hopping along -on three, and then again going on all four and rushing to bark at -the crows that sat on the carrion. The dog was merrier and sleeker -than it had been in Moscow. All around lay the flesh of different -animals--from men to horses--in various stages of decomposition; and -as the wolves were kept off by the passing men the dog could eat all -it wanted. - -It had been raining since morning and had seemed as if at any moment -it might cease and the sky clear, but after a short break it began -raining harder than before. The saturated road no longer absorbed -the water, which ran along the ruts in streams. - -Pierre walked along, looking from side to side, counting his steps -in threes, and reckoning them off on his fingers. Mentally -addressing the rain, he repeated: "Now then, now then, go on! Pelt -harder!" - -It seemed to him that he was thinking of nothing, but far down and -deep within him his soul was occupied with something important and -comforting. This something was a most subtle spiritual deduction -from a conversation with Karataev the day before. - -At their yesterday's halting place, feeling chilly by a dying -campfire, Pierre had got up and gone to the next one, which was -burning better. There Platon Karataev was sitting covered up--head and -all--with his greatcoat as if it were a vestment, telling the soldiers -in his effective and pleasant though now feeble voice a story Pierre -knew. It was already past midnight, the hour when Karataev was usually -free of his fever and particularly lively. When Pierre reached the -fire and heard Platon's voice enfeebled by illness, and saw his -pathetic face brightly lit up by the blaze, he felt a painful prick at -his heart. His feeling of pity for this man frightened him and he -wished to go away, but there was no other fire, and Pierre sat down, -trying not to look at Platon. - -"Well, how are you?" he asked. - -"How am I? If we grumble at sickness, God won't grant us death," -replied Platon, and at once resumed the story he had begun. - -"And so, brother," he continued, with a smile on his pale -emaciated face and a particularly happy light in his eyes, "you -see, brother..." - -Pierre had long been familiar with that story. Karataev had told -it to him alone some half-dozen times and always with a specially -joyful emotion. But well as he knew it, Pierre now listened to that -tale as to something new, and the quiet rapture Karataev evidently -felt as he told it communicated itself also to Pierre. The story was -of an old merchant who lived a good and God-fearing life with his -family, and who went once to the Nizhni fair with a companion--a -rich merchant. - -Having put up at an inn they both went to sleep, and next morning -his companion was found robbed and with his throat cut. A bloodstained -knife was found under the old merchant's pillow. He was tried, -knouted, and his nostrils having been torn off, "all in due form" as -Karataev put it, he was sent to hard labor in Siberia. - -"And so, brother" (it was at this point that Pierre came up), "ten -years or more passed by. The old man was living as a convict, -submitting as he should and doing no wrong. Only he prayed to God -for death. Well, one night the convicts were gathered just as we -are, with the old man among them. And they began telling what each was -suffering for, and how they had sinned against God. One told how he -had taken a life, another had taken two, a third had set a house on -fire, while another had simply been a vagrant and had done nothing. So -they asked the old man: 'What are you being punished for, Daddy?'--'I, -my dear brothers,' said he, 'am being punished for my own and other -men's sins. But I have not killed anyone or taken anything that was -not mine, but have only helped my poorer brothers. I was a merchant, -my dear brothers, and had much property. 'And he went on to tell -them all about it in due order. 'I don't grieve for myself,' he -says, 'God, it seems, has chastened me. Only I am sorry for my old -wife and the children,' and the old man began to weep. Now it happened -that in the group was the very man who had killed the other -merchant. 'Where did it happen, Daddy?' he said. 'When, and in what -month?' He asked all about it and his heart began to ache. So he comes -up to the old man like this, and falls down at his feet! 'You are -perishing because of me, Daddy,' he says. 'It's quite true, lads, that -this man,' he says, 'is being tortured innocently and for nothing! I,' -he says, 'did that deed, and I put the knife under your head while you -were asleep. Forgive me, Daddy,' he says, 'for Christ's sake!'" - -Karataev paused, smiling joyously as he gazed into the fire, and -he drew the logs together. - -"And the old man said, 'God will forgive you, we are all sinners -in His sight. I suffer for my own sins,' and he wept bitter tears. -Well, and what do you think, dear friends?" Karataev continued, his -face brightening more and more with a rapturous smile as if what he -now had to tell contained the chief charm and the whole meaning of his -story: "What do you think, dear fellows? That murderer confessed to -the authorities. 'I have taken six lives,' he says (he was a great -sinner), 'but what I am most sorry for is this old man. Don't let -him suffer because of me.' So he confessed and it was all written down -and the papers sent off in due form. The place was a long way off, and -while they were judging, what with one thing and another, filling in -the papers all in due form--the authorities I mean--time passed. The -affair reached the Tsar. After a while the Tsar's decree came: to -set the merchant free and give him a compensation that had been -awarded. The paper arrived and they began to look for the old man. -'Where is the old man who has been suffering innocently and in vain? A -paper has come from the Tsar!' so they began looking for him," here -Karataev's lower jaw trembled, "but God had already forgiven him--he -was dead! That's how it was, dear fellows!" Karataev concluded and sat -for a long time silent, gazing before him with a smile. - -And Pierre's soul was dimly but joyfully filled not by the story -itself but by its mysterious significance: by the rapturous joy that -lit up Karataev's face as he told it, and the mystic significance of -that joy. - - - - - -CHAPTER XIV - - -"A vos places!"* suddenly cried a voice. - - -*"To your places." - - -A pleasant feeling of excitement and an expectation of something -joyful and solemn was aroused among the soldiers of the convoy and the -prisoners. From all sides came shouts of command, and from the left -came smartly dressed cavalrymen on good horses, passing the -prisoners at a trot. The expression on all faces showed the tension -people feel at the approach of those in authority. The prisoners -thronged together and were pushed off the road. The convoy formed up. - -"The Emperor! The Emperor! The Marshal! The Duke!" and hardly had -the sleek cavalry passed, before a carriage drawn by six gray horses -rattled by. Pierre caught a glimpse of a man in a three-cornered hat -with a tranquil look on his handsome, plump, white face. It was one of -the marshals. His eye fell on Pierre's large and striking figure, -and in the expression with which he frowned and looked away Pierre -thought he detected sympathy and a desire to conceal that sympathy. - -The general in charge of the stores galloped after the carriage with -a red and frightened face, whipping up his skinny horse. Several -officers formed a group and some soldiers crowded round them. Their -faces all looked excited and worried. - -"What did he say? What did he say?" Pierre heard them ask. - -While the marshal was passing, the prisoners had huddled together in -a crowd, and Pierre saw Karataev whom he had not yet seen that -morning. He sat in his short overcoat leaning against a birch tree. On -his face, besides the look of joyful emotion it had worn yesterday -while telling the tale of the merchant who suffered innocently, -there was now an expression of quiet solemnity. - -Karataev looked at Pierre with his kindly round eyes now filled with -tears, evidently wishing him to come near that he might say -something to him. But Pierre was not sufficiently sure of himself. -He made as if he did not notice that look and moved hastily away. - -When the prisoners again went forward Pierre looked round. -Karataev was still sitting at the side of the road under the birch -tree and two Frenchmen were talking over his head. Pierre did not look -round again but went limping up the hill. - -From behind, where Karataev had been sitting, came the sound of a -shot. Pierre heard it plainly, but at that moment he remembered that -he had not yet finished reckoning up how many stages still remained to -Smolensk--a calculation he had begun before the marshal went by. And -he again started reckoning. Two French soldiers ran past Pierre, one -of whom carried a lowered and smoking gun. They both looked pale, -and in the expression on their faces--one of them glanced timidly at -Pierre--there was something resembling what he had seen on the face of -the young soldier at the execution. Pierre looked at the soldier and -remembered that, two days before, that man had burned his shirt -while drying it at the fire and how they had laughed at him. - -Behind him, where Karataev had been sitting, the dog began to -howl. "What a stupid beast! Why is it howling?" thought Pierre. - -His comrades, the prisoner soldiers walking beside him, avoided -looking back at the place where the shot had been fired and the dog -was howling, just as Pierre did, but there was a set look on all their -faces. - - - - - -CHAPTER XV - - -The stores, the prisoners, and the marshal's baggage train stopped -at the village of Shamshevo. The men crowded together round the -campfires. Pierre went up to the fire, ate some roast horseflesh, -lay down with his back to the fire, and immediately fell asleep. He -again slept as he had done at Mozhaysk after the battle of Borodino. - -Again real events mingled with dreams and again someone, he or -another, gave expression to his thoughts, and even to the same -thoughts that had been expressed in his dream at Mozhaysk. - -"Life is everything. Life is God. Everything changes and moves and -that movement is God. And while there is life there is joy in -consciousness of the divine. To love life is to love God. Harder and -more blessed than all else is to love this life in one's sufferings, -in innocent sufferings." - -"Karataev!" came to Pierre's mind. - -And suddenly he saw vividly before him a long-forgotten, kindly -old man who had given him geography lessons in Switzerland. "Wait a -bit," said the old man, and showed Pierre a globe. This globe was -alive--a vibrating ball without fixed dimensions. Its whole surface -consisted of drops closely pressed together, and all these drops moved -and changed places, sometimes several of them merging into one, -sometimes one dividing into many. Each drop tried to spread out and -occupy as much space as possible, but others striving to do the same -compressed it, sometimes destroyed it, and sometimes merged with it. - -"That is life," said the old teacher. - -"How simple and clear it is," thought Pierre. "How is it I did not -know it before?" - -"God is in the midst, and each drop tries to expand so as to reflect -Him to the greatest extent. And it grows, merges, disappears from -the surface, sinks to the depths, and again emerges. There now, -Karataev has spread out and disappeared. Do you understand, my child?" -said the teacher. - -"Do you understand, damn you?" shouted a voice, and Pierre woke up. - -He lifted himself and sat up. A Frenchman who had just pushed a -Russian soldier away was squatting by the fire, engaged in roasting -a piece of meat stuck on a ramrod. His sleeves were rolled up and -his sinewy, hairy, red hands with their short fingers deftly turned -the ramrod. His brown morose face with frowning brows was clearly -visible by the glow of the charcoal. - -"It's all the same to him," he muttered, turning quickly to a -soldier who stood behind him. "Brigand! Get away!" - -And twisting the ramrod he looked gloomily at Pierre, who turned -away and gazed into the darkness. A prisoner, the Russian soldier -the Frenchman had pushed away, was sitting near the fire patting -something with his hand. Looking more closely Pierre recognized the -blue-gray dog, sitting beside the soldier, wagging its tail. - -"Ah, he's come?" said Pierre. "And Plat-" he began, but did not -finish. - -Suddenly and simultaneously a crowd of memories awoke in his -fancy--of the look Platon had given him as he sat under the tree, of -the shot heard from that spot, of the dog's howl, of the guilty -faces of the two Frenchmen as they ran past him, of the lowered and -smoking gun, and of Karataev's absence at this halt--and he was on the -point of realizing that Karataev had been killed, but just at that -instant, he knew not why, the recollection came to his mind of a -summer evening he had spent with a beautiful Polish lady on the -veranda of his house in Kiev. And without linking up the events of the -day or drawing a conclusion from them, Pierre closed his eyes, -seeing a vision of the country in summertime mingled with memories -of bathing and of the liquid, vibrating globe, and he sank into -water so that it closed over his head. - -Before sunrise he was awakened by shouts and loud and rapid -firing. French soldiers were running past him. - -"The Cossacks!" one of them shouted, and a moment later a crowd of -Russians surrounded Pierre. - -For a long time he could not understand what was happening to him. -All around he heard his comrades sobbing with joy. - -"Brothers! Dear fellows! Darlings!" old soldiers exclaimed, weeping, -as they embraced Cossacks and hussars. - -The hussars and Cossacks crowded round the prisoners; one offered -them clothes, another boots, and a third bread. Pierre sobbed as he -sat among them and could not utter a word. He hugged the first soldier -who approached him, and kissed him, weeping. - -Dolokhov stood at the gate of the ruined house, letting a crowd of -disarmed Frenchmen pass by. The French, excited by all that had -happened, were talking loudly among themselves, but as they passed -Dolokhov who gently switched his boots with his whip and watched -them with cold glassy eyes that boded no good, they became silent. -On the opposite side stood Dolokhov's Cossack, counting the -prisoners and marking off each hundred with a chalk line on the gate. - -"How many?" Dolokhov asked the Cossack. - -"The second hundred," replied the Cossack. - -"Filez, filez!"* Dolokhov kept saying, having adopted this -expression from the French, and when his eyes met those of the -prisoners they flashed with a cruel light. - - -*"Get along, get along!" - - -Denisov, bareheaded and with a gloomy face, walked behind some -Cossacks who were carrying the body of Petya Rostov to a hole that had -been dug in the garden. - - - - - -CHAPTER XVI - - -After the twenty-eighth of October when the frosts began, the flight -of the French assumed a still more tragic character, with men -freezing, or roasting themselves to death at the campfires, while -carriages with people dressed in furs continued to drive past, -carrying away the property that had been stolen by the Emperor, kings, -and dukes; but the process of the flight and disintegration of the -French army went on essentially as before. - -From Moscow to Vyazma the French army of seventy-three thousand -men not reckoning the Guards (who did nothing during the whole war but -pillage) was reduced to thirty-six thousand, though not more than five -thousand had fallen in battle. From this beginning the succeeding -terms of the progression could be determined mathematically. The -French army melted away and perished at the same rate from Moscow to -Vyazma, from Vyazma to Smolensk, from Smolensk to the Berezina, and -from the Berezina to Vilna--independently of the greater or lesser -intensity of the cold, the pursuit, the barring of the way, or any -other particular conditions. Beyond Vyazma the French army instead -of moving in three columns huddled together into one mass, and so went -on to the end. Berthier wrote to his Emperor (we know how far -commanding officers allow themselves to diverge from the truth in -describing the condition of an army) and this is what he said: - - -I deem it my duty to report to Your Majesty the condition of the -various corps I have had occasion to observe during different stages -of the last two or three days' march. They are almost disbanded. -Scarcely a quarter of the soldiers remain with the standards of -their regiments, the others go off by themselves in different -directions hoping to find food and escape discipline. In general -they regard Smolensk as the place where they hope to recover. During -the last few days many of the men have been seen to throw away their -cartridges and their arms. In such a state of affairs, whatever your -ultimate plans may be, the interest of Your Majesty's service -demands that the army should be rallied at Smolensk and should first -of all be freed from ineffectives, such as dismounted cavalry, -unnecessary baggage, and artillery material that is no longer in -proportion to the present forces. The soldiers, who are worn out -with hunger and fatigue, need these supplies as well as a few days' -rest. Many have died last days on the road or at the bivouacs. This -state of things is continually becoming worse and makes one fear -that unless a prompt remedy is applied the troops will no longer be -under control in case of an engagement. - -November 9: twenty miles from Smolensk. - - -After staggering into Smolensk which seemed to them a promised land, -the French, searching for food, killed one another, sacked their own -stores, and when everything had been plundered fled farther. - -They all went without knowing whither or why they were going. -Still less did that genius, Napoleon, know it, for no one issued any -orders to him. But still he and those about him retained their old -habits: wrote commands, letters, reports, and orders of the day; -called one another sire, mon cousin, prince d'Eckmuhl, roi de -Naples, and so on. But these orders and reports were only on paper, -nothing in them was acted upon for they could not be carried out, -and though they entitled one another Majesties, Highnesses, or -Cousins, they all felt that they were miserable wretches who had -done much evil for which they had now to pay. And though they -pretended to be concerned about the army, each was thinking only of -himself and of how to get away quickly and save himself. - - - - -CHAPTER XVII - - -The movements of the Russian and French armies during the campaign -from Moscow back to the Niemen were like those in a game of Russian -blindman's bluff, in which two players are blindfolded and one of them -occasionally rings a little bell to inform the catcher of his -whereabouts. First he rings his bell fearlessly, but when he gets into -a tight place he runs away as quietly as he can, and often thinking to -escape runs straight into his opponent's arms. - -At first while they were still moving along the Kaluga road, -Napoleon's armies made their presence known, but later when they -reached the Smolensk road they ran holding the clapper of their bell -tight--and often thinking they were escaping ran right into the -Russians. - -Owing to the rapidity of the French flight and the Russian pursuit -and the consequent exhaustion of the horses, the chief means of -approximately ascertaining the enemy's position--by cavalry -scouting--was not available. Besides, as a result of the frequent -and rapid change of position by each army, even what information was -obtained could not be delivered in time. If news was received one -day that the enemy had been in a certain position the day before, by -the third day when something could have been done, that army was -already two days' march farther on and in quite another position. - -One army fled and the other pursued. Beyond Smolensk there were -several different roads available for the French, and one would have -thought that during their stay of four days they might have learned -where the enemy was, might have arranged some more advantageous plan -and undertaken something new. But after a four days' halt the mob, -with no maneuvers or plans, again began running along the beaten -track, neither to the right nor to the left but along the old--the -worst--road, through Krasnoe and Orsha. - -Expecting the enemy from behind and not in front, the French -separated in their flight and spread out over a distance of -twenty-four hours. In front of them all fled the Emperor, then the -kings, then the dukes. The Russian army, expecting Napoleon to take -the road to the right beyond the Dnieper--which was the only -reasonable thing for him to do--themselves turned to the right and -came out onto the highroad at Krasnoe. And here as in a game of -blindman's buff the French ran into our vanguard. Seeing their enemy -unexpectedly the French fell into confusion and stopped short from the -sudden fright, but then they resumed their flight, abandoning their -comrades who were farther behind. Then for three days separate -portions of the French army--first Murat's (the vice-king's), then -Davout's, and then Ney's--ran, as it were, the gauntlet of the Russian -army. They abandoned one another, abandoned all their heavy baggage, -their artillery, and half their men, and fled, getting past the -Russians by night by making semicircles to the right. - -Ney, who came last, had been busying himself blowing up the walls of -Smolensk which were in nobody's way, because despite the unfortunate -plight of the French or because of it, they wished to punish the floor -against which they had hurt themselves. Ney, who had had a corps of -ten thousand men, reached Napoleon at Orsha with only one thousand men -left, having abandoned all the rest and all his cannon, and having -crossed the Dnieper at night by stealth at a wooded spot. - -From Orsha they fled farther along the road to Vilna, still -playing at blindman's buff with the pursuing army. At the Berezina -they again became disorganized, many were drowned and many -surrendered, but those who got across the river fled farther. Their -supreme chief donned a fur coat and, having seated himself in a -sleigh, galloped on alone, abandoning his companions. The others who -could do so drove away too, leaving those who could not to surrender -or die. - - - - - -CHAPTER XVIII - - -This campaign consisted in a flight of the French during which -they did all they could to destroy themselves. From the time they -turned onto the Kaluga road to the day their leader fled from the -army, none of the movements of the crowd had any sense. So one might -have thought that regarding this period of the campaign the -historians, who attributed the actions of the mass to the will of -one man, would have found it impossible to make the story of the -retreat fit their theory. But no! Mountains of books have been written -by the historians about this campaign, and everywhere are described -Napoleon's arrangements, the maneuvers, and his profound plans which -guided the army, as well as the military genius shown by his marshals. - -The retreat from Malo-Yaroslavets when he had a free road into a -well-supplied district and the parallel road was open to him along -which Kutuzov afterwards pursued him--this unnecessary retreat along a -devastated road--is explained to us as being due to profound -considerations. Similarly profound considerations are given for his -retreat from Smolensk to Orsha. Then his heroism at Krasnoe is -described, where he is reported to have been prepared to accept battle -and take personal command, and to have walked about with a birch stick -and said: - -"J'ai assez fait l'empereur; il est temps de faire le general,"* but -nevertheless immediately ran away again, abandoning to its fate the -scattered fragments of the army he left behind. - - -*"I have acted the Emperor long enough; it is time to act the -general." - - -Then we are told of the greatness of soul of the marshals, -especially of Ney--a greatness of soul consisting in this: that he -made his way by night around through the forest and across the Dnieper -and escaped to Orsha, abandoning standards, artillery, and nine tenths -of his men. - -And lastly, the final departure of the great Emperor from his heroic -army is presented to us by the historians as something great and -characteristic of genius. Even that final running away, described in -ordinary language as the lowest depth of baseness which every child is -taught to be ashamed of--even that act finds justification in the -historians' language. - -When it is impossible to stretch the very elastic threads of -historical ratiocination any farther, when actions are clearly -contrary to all that humanity calls right or even just, the historians -produce a saving conception of "greatness." "Greatness," it seems, -excludes the standards of right and wrong. For the "great" man nothing -is wrong, there is no atrocity for which a "great" man can be blamed. - -"C'est grand!"* say the historians, and there no longer exists -either good or evil but only "grand" and "not grand." Grand is good, -not grand is bad. Grand is the characteristic, in their conception, of -some special animals called "heroes." And Napoleon, escaping home in a -warm fur coat and leaving to perish those who were not merely his -comrades but were (in his opinion) men he had brought there, feels que -c'est grand,*[2] and his soul is tranquil. - - -*"It is great." - -*[2] That it is great. - - -"Du sublime (he saw something sublime in himself) au ridicule il n'y -a qu'un pas,"* said he. And the whole world for fifty years has been -repeating: "Sublime! Grand! Napoleon le Grand!" Du sublime au ridicule -il n'y a qu'un pas. - - -*"From the sublime to the ridiculous is but a step." - - -And it occurs to no one that to admit a greatness not -commensurable with the standard of right and wrong is merely to -admit one's own nothingness and immeasurable meanness. - -For us with the standard of good and evil given us by Christ, no -human actions are incommensurable. And there is no greatness where -simplicity, goodness, and truth are absent. - - - - - -CHAPTER XIX - - -What Russian, reading the account of the last part of the campaign -of 1812, has not experienced an uncomfortable feeling of regret, -dissatisfaction, and perplexity? Who has not asked himself how it is -that the French were not all captured or destroyed when our three -armies surrounded them in superior numbers, when the disordered -French, hungry and freezing, surrendered in crowds, and when (as the -historians relate) the aim of the Russians was to stop the French, -to cut them off, and capture them all? - -How was it that the Russian army, which when numerically weaker than -the French had given battle at Borodino, did not achieve its purpose -when it had surrounded the French on three sides and when its aim -was to capture them? Can the French be so enormously superior to us -that when we had surrounded them with superior forces we could not -beat them? How could that happen? - -History (or what is called by that name) replying to these questions -says that this occurred because Kutuzov and Tormasov and Chichagov, -and this man and that man, did not execute such and such maneuvers... - -But why did they not execute those maneuvers? And why if they were -guilty of not carrying out a prearranged plan were they not tried -and punished? But even if we admitted that Kutuzov, Chichagov, and -others were the cause of the Russian failures, it is still -incomprehensible why, the position of the Russian army being what it -was at Krasnoe and at the Berezina (in both cases we had superior -forces), the French army with its marshals, kings, and Emperor was not -captured, if that was what the Russians aimed at. - -The explanation of this strange fact given by Russian military -historians (to the effect that Kutuzov hindered an attack) is -unfounded, for we know that he could not restrain the troops from -attacking at Vyazma and Tarutino. - -Why was the Russian army--which with inferior forces had withstood -the enemy in full strength at Borodino--defeated at Krasnoe and the -Berezina by the disorganized crowds of the French when it was -numerically superior? - -If the aim of the Russians consisted in cutting off and capturing -Napoleon and his marshals--and that aim was not merely frustrated -but all attempts to attain it were most shamefully baffled--then -this last period of the campaign is quite rightly considered by the -French to be a series of victories, and quite wrongly considered -victorious by Russian historians. - -The Russian military historians in so far as they submit to claims -of logic must admit that conclusion, and in spite of their lyrical -rhapsodies about valor, devotion, and so forth, must reluctantly admit -that the French retreat from Moscow was a series of victories for -Napoleon and defeats for Kutuzov. - -But putting national vanity entirely aside one feels that such a -conclusion involves a contradiction, since the series of French -victories brought the French complete destruction, while the series of -Russian defeats led to the total destruction of their enemy and the -liberation of their country. - -The source of this contradiction lies in the fact that the -historians studying the events from the letters of the sovereigns -and the generals, from memoirs, reports, projects, and so forth, -have attributed to this last period of the war of 1812 an aim that -never existed, namely that of cutting off and capturing Napoleon -with his marshals and his army. - -There never was or could have been such an aim, for it would have -been senseless and its attainment quite impossible. - -It would have been senseless, first because Napoleon's -disorganized army was flying from Russia with all possible speed, that -is to say, was doing just what every Russian desired. So what was -the use of performing various operations on the French who were -running away as fast as they possibly could? - -Secondly, it would have been senseless to block the passage of men -whose whole energy was directed to flight. - -Thirdly, it would have been senseless to sacrifice one's own -troops in order to destroy the French army, which without external -interference was destroying itself at such a rate that, though its -path was not blocked, it could not carry across the frontier more than -it actually did in December, namely a hundredth part of the original -army. - -Fourthly, it would have been senseless to wish to take captive the -Emperor, kings, and dukes--whose capture would have been in the -highest degree embarrassing for the Russians, as the most adroit -diplomatists of the time (Joseph de Maistre and others) recognized. -Still more senseless would have been the wish to capture army corps of -the French, when our own army had melted away to half before -reaching Krasnoe and a whole division would have been needed to convoy -the corps of prisoners, and when our men were not always getting -full rations and the prisoners already taken were perishing of hunger. - -All the profound plans about cutting off and capturing Napoleon -and his army were like the plan of a market gardener who, when driving -out of his garden a cow that had trampled down the beds he had -planted, should run to the gate and hit the cow on the head. The -only thing to be said in excuse of that gardener would be that he -was very angry. But not even that could be said for those who drew -up this project, for it was not they who had suffered from the -trampled beds. - -But besides the fact that cutting off Napoleon with his army would -have been senseless, it was impossible. - -It was impossible first because--as experience shows that a -three-mile movement of columns on a battlefield never coincides with -the plans--the probability of Chichagov, Kutuzov, and Wittgenstein -effecting a junction on time at an appointed place was so remote as to -be tantamount to impossibility, as in fact thought Kutuzov, who when -he received the plan remarked that diversions planned over great -distances do not yield the desired results. - -Secondly it was impossible, because to paralyze the momentum with -which Napoleon's army was retiring, incomparably greater forces than -the Russians possessed would have been required. - -Thirdly it was impossible, because the military term "to cut off" -has no meaning. One can cut off a slice of bread, but not an army. -To cut off an army--to bar its road--is quite impossible, for there is -always plenty of room to avoid capture and there is the night when -nothing can be seen, as the military scientists might convince -themselves by the example of Krasnoe and of the Berezina. It is only -possible to capture prisoners if they agree to be captured, just as it -is only possible to catch a swallow if it settles on one's hand. Men -can only be taken prisoners if they surrender according to the rules -of strategy and tactics, as the Germans did. But the French troops -quite rightly did not consider that this suited them, since death by -hunger and cold awaited them in flight or captivity alike. - -Fourthly and chiefly it was impossible, because never since the -world began has a war been fought under such conditions as those -that obtained in 1812, and the Russian army in its pursuit of the -French strained its strength to the utmost and could not have done -more without destroying itself. - -During the movement of the Russian army from Tarutino to Krasnoe -it lost fifty thousand sick or stragglers, that is a number equal to -the population of a large provincial town. Half the men fell out of -the army without a battle. - -And it is of this period of the campaign--when the army lacked boots -and sheepskin coats, was short of provisions and without vodka, and -was camping out at night for months in the snow with fifteen degrees -of frost, when there were only seven or eight hours of daylight and -the rest was night in which the influence of discipline cannot be -maintained, when men were taken into that region of death where -discipline fails, not for a few hours only as in a battle, but for -months, where they were every moment fighting death from hunger and -cold, when half the army perished in a single month--it is of this -period of the campaign that the historians tell us how Miloradovich -should have made a flank march to such and such a place, Tormasov to -another place, and Chichagov should have crossed (more than -knee-deep in snow) to somewhere else, and how so-and-so "routed" and -"cut off" the French and so on and so on. - -The Russians, half of whom died, did all that could and should -have been done to attain an end worthy of the nation, and they are not -to blame because other Russians, sitting in warm rooms, proposed -that they should do what was impossible. - -All that strange contradiction now difficult to understand between -the facts and the historical accounts only arises because the -historians dealing with the matter have written the history of the -beautiful words and sentiments of various generals, and not the -history of the events. - -To them the words of Miloradovich seem very interesting, and so do -their surmises and the rewards this or that general received; but -the question of those fifty thousand men who were left in hospitals -and in graves does not even interest them, for it does not come within -the range of their investigation. - -Yet one need only discard the study of the reports and general plans -and consider the movement of those hundreds of thousands of men who -took a direct part in the events, and all the questions that seemed -insoluble easily and simply receive an immediate and certain solution. - -The aim of cutting off Napoleon and his army never existed except in -the imaginations of a dozen people. It could not exist because it -was senseless and unattainable. - -The people had a single aim: to free their land from invasion. -That aim was attained in the first place of itself, as the French -ran away, and so it was only necessary not to stop their flight. -Secondly it was attained by the guerrilla warfare which was destroying -the French, and thirdly by the fact that a large Russian army was -following the French, ready to use its strength in case their movement -stopped. - -The Russian army had to act like a whip to a running animal. And the -experienced driver knew it was better to hold the whip raised as a -menace than to strike the running animal on the head. - - - - - -BOOK FIFTEEN: 1812 --13 - - - - - -CHAPTER I - - -When seeing a dying animal a man feels a sense of horror: -substance similar to his own is perishing before his eyes. But when it -is a beloved and intimate human being that is dying, besides this -horror at the extinction of life there is a severance, a spiritual -wound, which like a physical wound is sometimes fatal and sometimes -heals, but always aches and shrinks at any external irritating touch. - -After Prince Andrew's death Natasha and Princess Mary alike felt -this. Drooping in spirit and closing their eyes before the menacing -cloud of death that overhung them, they dared not look life in the -face. They carefully guarded their open wounds from any rough and -painful contact. Everything: a carriage passing rapidly in the street, -a summons to dinner, the maid's inquiry what dress to prepare, or -worse still any word of insincere or feeble sympathy, seemed an -insult, painfully irritated the wound, interrupting that necessary -quiet in which they both tried to listen to the stern and dreadful -choir that still resounded in their imagination, and hindered their -gazing into those mysterious limitless vistas that for an instant -had opened out before them. - -Only when alone together were they free from such outrage and -pain. They spoke little even to one another, and when they did it -was of very unimportant matters. - -Both avoided any allusion to the future. To admit the possibility of -a future seemed to them to insult his memory. Still more carefully did -they avoid anything relating to him who was dead. It seemed to them -that what they had lived through and experienced could not be -expressed in words, and that any reference to the details of his -life infringed the majesty and sacredness of the mystery that had been -accomplished before their eyes. - -Continued abstention from speech, and constant avoidance of -everything that might lead up to the subject--this halting on all -sides at the boundary of what they might not mention--brought before -their minds with still greater purity and clearness what they were -both feeling. - -But pure and complete sorrow is as impossible as pure and complete -joy. Princess Mary, in her position as absolute and independent -arbiter of her own fate and guardian and instructor of her nephew, was -the first to be called back to life from that realm of sorrow in which -she had dwelt for the first fortnight. She received letters from her -relations to which she had to reply; the room in which little Nicholas -had been put was damp and he began to cough; Alpatych came to -Yaroslavl with reports on the state of their affairs and with advice -and suggestions that they should return to Moscow to the house on -the Vozdvizhenka Street, which had remained uninjured and needed -only slight repairs. Life did not stand still and it was necessary -to live. Hard as it was for Princess Mary to emerge from the realm -of secluded contemplation in which she had lived till then, and -sorry and almost ashamed as she felt to leave Natasha alone, yet the -cares of life demanded her attention and she involuntarily yielded -to them. She went through the accounts with Alpatych, conferred with -Dessalles about her nephew, and gave orders and made preparations -for the journey to Moscow. - -Natasha remained alone and, from the time Princess Mary began making -preparations for departure, held aloof from her too. - -Princess Mary asked the countess to let Natasha go with her to -Moscow, and both parents gladly accepted this offer, for they saw -their daughter losing strength every day and thought that a change -of scene and the advice of Moscow doctors would be good for her. - -"I am not going anywhere," Natasha replied when this was proposed to -her. "Do please just leave me alone!" And she ran out of the room, -with difficulty refraining from tears of vexation and irritation -rather than of sorrow. - -After she felt herself deserted by Princes Mary and alone in her -grief, Natasha spent most of the time in her room by herself, -sitting huddled up feet and all in the corner of the sofa, tearing and -twisting something with her slender nervous fingers and gazing -intently and fixedly at whatever her eyes chanced to fall on. This -solitude exhausted and tormented her but she was in absolute need of -it. As soon as anyone entered she got up quickly, changed her position -and expression, and picked up a book or some sewing, evidently waiting -impatiently for the intruder to go. - -She felt all the time as if she might at any moment penetrate that -on which--with a terrible questioning too great for her strength- -her spiritual gaze was fixed. - -One day toward the end of December Natasha, pale and thin, dressed -in a black woolen gown, her plaited hair negligently twisted into a -knot, was crouched feet and all in the corner of her sofa, nervously -crumpling and smoothing out the end of her sash while she looked at -a corner of the door. - -She was gazing in the direction in which he had gone--to the other -side of life. And that other side of life, of which she had never -before thought and which had formerly seemed to her so far away and -improbable, was now nearer and more akin and more comprehensible -than this side of life, where everything was either emptiness and -desolation or suffering and indignity. - -She was gazing where she knew him to be; but she could not imagine -him otherwise than as he had been here. She now saw him again as he -had been at Mytishchi, at Troitsa, and at Yaroslavl. - -She saw his face, heard his voice, repeated his words and her own, -and sometimes devised other words they might have spoken. - -There he is lying back in an armchair in his velvet cloak, leaning -his head on his thin pale hand. His chest is dreadfully hollow and his -shoulders raised. His lips are firmly closed, his eyes glitter, and -a wrinkle comes and goes on his pale forehead. One of his legs -twitches just perceptibly, but rapidly. Natasha knows that he is -struggling with terrible pain. "What is that pain like? Why does he -have that pain? What does he feel? How does it hurt him?" thought -Natasha. He noticed her watching him, raised his eyes, and began to -speak seriously: - -"One thing would be terrible," said he: "to bind oneself forever -to a suffering man. It would be continual torture." And he looked -searchingly at her. Natasha as usual answered before she had time to -think what she would say. She said: "This can't go on--it won't. You -will get well--quite well." - -She now saw him from the commencement of that scene and relived what -she had then felt. She recalled his long sad and severe look at -those words and understood the meaning of the rebuke and despair in -that protracted gaze. - -"I agreed," Natasha now said to herself, "that it would be -dreadful if he always continued to suffer. I said it then only because -it would have been dreadful for him, but he understood it differently. -He thought it would be dreadful for me. He then still wished to live -and feared death. And I said it so awkwardly and stupidly! I did not -say what I meant. I thought quite differently. Had I said what I -thought, I should have said: even if he had to go on dying, to die -continually before my eyes, I should have been happy compared with -what I am now. Now there is nothing... nobody. Did he know that? No, -he did not and never will know it. And now it will never, never be -possible to put it right." And now he again seemed to be saying the -same words to her, only in her imagination Natasha this time gave -him a different answer. She stopped him and said: "Terrible for you, -but not for me! You know that for me there is nothing in life but you, -and to suffer with you is the greatest happiness for me," and he -took her hand and pressed it as he had pressed it that terrible -evening four days before his death. And in her imagination she said -other tender and loving words which she might have said then but -only spoke now: "I love thee!... thee! I love, love..." she said, -convulsively pressing her hands and setting her teeth with a desperate -effort... - -She was overcome by sweet sorrow and tears were already rising in -her eyes; then she suddenly asked herself to whom she was saying this. -Again everything was shrouded in hard, dry perplexity, and again -with a strained frown she peered toward the world where he was. And -now, now it seemed to her she was penetrating the mystery.... But at -the instant when it seemed that the incomprehensible was revealing -itself to her a loud rattle of the door handle struck painfully on her -ears. Dunyasha, her maid, entered the room quickly and abruptly with a -frightened look on her face and showing no concern for her mistress. - -"Come to your Papa at once, please!" said she with a strange, -excited look. "A misfortune... about Peter Ilynich... a letter," she -finished with a sob. - - - - - -CHAPTER II - - -Besides a feeling of aloofness from everybody Natasha was feeling -a special estrangement from the members of her own family. All of -them--her father, mother, and Sonya--were so near to her, so familiar, -so commonplace, that all their words and feelings seemed an insult -to the world in which she had been living of late, and she felt not -merely indifferent to them but regarded them with hostility. She heard -Dunyasha's words about Peter Ilynich and a misfortune, but did not -grasp them. - -"What misfortune? What misfortune can happen to them? They just live -their own old, quiet, and commonplace life," thought Natasha. - -As she entered the ballroom her father was hurriedly coming out of -her mother's room. His face was puckered up and wet with tears. He had -evidently run out of that room to give vent to the sobs that were -choking him. When he saw Natasha he waved his arms despairingly and -burst into convulsively painful sobs that distorted his soft round -face. - -"Pe... Petya... Go, go, she... is calling..." and weeping like a -child and quickly shuffling on his feeble legs to a chair, he almost -fell into it, covering his face with his hands. - -Suddenly an electric shock seemed to run through Natasha's whole -being. Terrible anguish struck her heart, she felt a dreadful ache -as if something was being torn inside her and she were dying. But -the pain was immediately followed by a feeling of release from the -oppressive constraint that had prevented her taking part in life. -The sight of her father, the terribly wild cries of her mother that -she heard through the door, made her immediately forget herself and -her own grief. - -She ran to her father, but he feebly waved his arm, pointing to -her mother's door. Princess Mary, pale and with quivering chin, came -out from that room and taking Natasha by the arm said something to -her. Natasha neither saw nor heard her. She went in with rapid -steps, pausing at the door for an instant as if struggling with -herself, and then ran to her mother. - -The countess was lying in an armchair in a strange and awkward -position, stretching out and beating her head against the wall. -Sonya and the maids were holding her arms. - -"Natasha! Natasha!..." cried the countess. "It's not true... it's -not true... He's lying... Natasha!" she shrieked, pushing those around -her away. "Go away, all of you; it's not true! Killed!... ha, ha, -ha!... It's not true!" - -Natasha put one knee on the armchair, stooped over her mother, -embraced her, and with unexpected strength raised her, turned her face -toward herself, and clung to her. - -"Mummy!... darling!... I am here, my dearest Mummy," she kept on -whispering, not pausing an instant. - -She did not let go of her mother but struggled tenderly with her, -demanded a pillow and hot water, and unfastened and tore open her -mother's dress. - -"My dearest darling... Mummy, my precious!..." she whispered -incessantly, kissing her head, her hands, her face, and feeling her -own irrepressible and streaming tears tickling her nose and cheeks. - -The countess pressed her daughter's hand, closed her eyes, and -became quiet for a moment. Suddenly she sat up with unaccustomed -swiftness, glanced vacantly around her, and seeing Natasha began to -press her daughter's head with all her strength. Then she turned -toward her daughter's face which was wincing with pain and gazed -long at it. - -"Natasha, you love me?" she said in a soft trustful whisper. -"Natasha, you would not deceive me? You'll tell me the whole truth?" - -Natasha looked at her with eyes full of tears and in her look -there was nothing but love and an entreaty for forgiveness. - -"My darling Mummy!" she repeated, straining all the power of her -love to find some way of taking on herself the excess of grief that -crushed her mother. - -And again in a futile struggle with reality her mother, refusing -to believe that she could live when her beloved boy was killed in -the bloom of life, escaped from reality into a world of delirium. - -Natasha did not remember how that day passed nor that night, nor the -next day and night. She did not sleep and did not leave her mother. -Her persevering and patient love seemed completely to surround the -countess every moment, not explaining or consoling, but recalling -her to life. - -During the third night the countess kept very quiet for a few -minutes, and Natasha rested her head on the arm of her chair and -closed her eyes, but opened them again on hearing the bedstead -creak. The countess was sitting up in bed and speaking softly. - -"How glad I am you have come. You are tired. Won't you have some -tea?" Natasha went up to her. "You have improved in looks and grown -more manly," continued the countess, taking her daughter's hand. - -"Mamma! What are you saying..." - -"Natasha, he is no more, no more!" - -And embracing her daughter, the countess began to weep for the first -time. - - - - - -CHAPTER III - - -Princess Mary postponed her departure. Sonya and the count tried -to replace Natasha but could not. They saw that she alone was able -to restrain her mother from unreasoning despair. For three weeks -Natasha remained constantly at her mother's side, sleeping on a lounge -chair in her room, making her eat and drink, and talking to her -incessantly because the mere sound of her tender, caressing tones -soothed her mother. - -The mother's wounded spirit could not heal. Petya's -death had torn from her half her life. When the news of Petya's -death had come she had been a fresh and vigorous woman of fifty, but a -month later she left her room a listless old woman taking no -interest in life. But the same blow that almost killed the countess, -this second blow, restored Natasha to life. - -A spiritual wound produced by a rending of the spiritual body is -like a physical wound and, strange as it may seem, just as a deep -wound may heal and its edges join, physical and spiritual wounds alike -can yet heal completely only as the result of a vital force from -within. - -Natasha's wound healed in that way. She thought her life was -ended, but her love for her mother unexpectedly showed her that the -essence of life--love--was still active within her. Love awoke and -so did life. - -Prince Andrew's last days had bound Princess Mary and Natasha -together; this new sorrow brought them still closer to one another. -Princess Mary put off her departure, and for three weeks looked -after Natasha as if she had been a sick child. The last weeks passed -in her mother's bedroom had strained Natasha's physical strength. - -One afternoon noticing Natasha shivering with fever, Princess Mary -took her to her own room and made her lie down on the bed. Natasha lay -down, but when Princess Mary had drawn the blinds and was going away -she called her back. - -"I don't want to sleep, Mary, sit by me a little." - -"You are tired--try to sleep." - -"No, no. Why did you bring me away? She will be asking for me." - -"She is much better. She spoke so well today," said Princess Mary. - -Natasha lay on the bed and in the semidarkness of the room scanned -Princess Mary's face. - -"Is she like him?" thought Natasha. "Yes, like and yet not like. But -she is quite original, strange, new, and unknown. And she loves me. -What is in her heart? All that is good. But how? What is her mind -like? What does she think about me? Yes, she is splendid!" - -"Mary," she said timidly, drawing Princess Mary's hand to herself, -"Mary, you mustn't think me wicked. No? Mary darling, how I love -you! Let us be quite, quite friends." - -And Natasha, embracing her, began kissing her face and hands, making -Princess Mary feel shy but happy by this demonstration of her -feelings. - -From that day a tender and passionate friendship such as exists only -between women was established between Princess Mary and Natasha. -They were continually kissing and saying tender things to one -another and spent most of their time together. When one went out the -other became restless and hastened to rejoin her. Together they felt -more in harmony with one another than either of them felt with herself -when alone. A feeling stronger than friendship sprang up between them; -an exclusive feeling of life being possible only in each other's -presence. - -Sometimes they were silent for hours; sometimes after they were -already in bed they would begin talking and go on till morning. They -spoke most of what was long past. Princess Mary spoke of her -childhood, of her mother, her father, and her daydreams; and -Natasha, who with a passive lack of understanding had formerly -turned away from that life of devotion, submission, and the poetry -of Christian self-sacrifice, now feeling herself bound to Princess -Mary by affection, learned to love her past too and to understand a -side of life previously incomprehensible to her. She did not think -of applying submission and self-abnegation to her own life, for she -was accustomed to seek other joys, but she understood and loved in -another those previously incomprehensible virtues. For Princess -Mary, listening to Natasha's tales of childhood and early youth, there -also opened out a new and hitherto uncomprehended side of life: belief -in life and its enjoyment. - -Just as before, they never mentioned him so as not to lower (as they -thought) their exalted feelings by words; but this silence about him -had the effect of making them gradually begin to forget him without -being conscious of it. - -Natasha had grown thin and pale and physically so weak that they all -talked about her health, and this pleased her. But sometimes she was -suddenly overcome by fear not only of death but of sickness, weakness, -and loss of good looks, and involuntarily she examined her bare arm -carefully, surprised at its thinness, and in the morning noticed her -drawn and, as it seemed to her, piteous face in her glass. It seemed -to her that things must be so, and yet it was dreadfully sad. - -One day she went quickly upstairs and found herself out of breath. -Unconsciously she immediately invented a reason for going down, and -then, testing her strength, ran upstairs again, observing the result. - -Another time when she called Dunyasha her voice trembled, so she -called again--though she could hear Dunyasha coming--called her in the -deep chest tones in which she had been wont to sing, sing, and -listened attentively to herself. - -She did not know and would not have believed it, but beneath the -layer of slime that covered her soul and seemed to her impenetrable, -delicate young shoots of grass were already sprouting, which taking -root would so cover with their living verdure the grief that weighed -her down that it would soon no longer be seen or noticed. The wound -had begun to heal from within. - -At the end of January Princess Mary left for Moscow, and the count -insisted on Natasha's going with her to consult the doctors. - - - - - -CHAPTER IV - - -After the encounter at Vyazma, where Kutuzov had been unable to hold -back his troops in their anxiety to overwhelm and cut off the enemy -and so on, the farther movement of the fleeing French, and of the -Russians who pursued them, continued as far as Krasnoe without a -battle. The flight was so rapid that the Russian army pursuing the -French could not keep up with them; cavalry and artillery horses broke -down, and the information received of the movements of the French -was never reliable. - -The men in the Russian army were so worn out by this continuous -marching at the rate of twenty-seven miles a day that they could not -go any faster. - -To realize the degree of exhaustion of the Russian army it is only -necessary to grasp clearly the meaning of the fact that, while not -losing more than five thousand killed and wounded after Tarutino and -less than a hundred prisoners, the Russian army which left that -place a hundred thousand strong reached Krasnoe with only fifty -thousand. - -The rapidity of the Russian pursuit was just as destructive to our -army as the flight of the French was to theirs. The only difference -was that the Russian army moved voluntarily, with no such threat of -destruction as hung over the French, and that the sick Frenchmen -were left behind in enemy hands while the sick Russians left behind -were among their own people. The chief cause of the wastage of -Napoleon's army was the rapidity of its movement, and a convincing -proof of this is the corresponding decrease of the Russian army. - -Kutuzov as far as was in his power, instead of trying to check the -movement of the French as was desired in Petersburg and by the Russian -army generals, directed his whole activity here, as he had done at -Tarutino and Vyazma, to hastening it on while easing the movement of -our army. - -But besides this, since the exhaustion and enormous diminution of -the army caused by the rapidity of the advance had become evident, -another reason for slackening the pace and delaying presented itself -to Kutuzov. The aim of the Russian army was to pursue the French. -The road the French would take was unknown, and so the closer our -troops trod on their heels the greater distance they had to cover. -Only by following at some distance could one cut across the zigzag -path of the French. All the artful maneuvers suggested by our generals -meant fresh movements of the army and a lengthening of its marches, -whereas the only reasonable aim was to shorten those marches. To -that end Kutuzov's activity was directed during the whole campaign -from Moscow to Vilna--not casually or intermittently but so -consistently that he never once deviated from it. - -Kutuzov felt and knew--not by reasoning or science but with the -whole of his Russian being--what every Russian soldier felt: that -the French were beaten, that the enemy was flying and must be driven -out; but at the same time he like the soldiers realized all the -hardship of this march, the rapidity of which was unparalleled for -such a time of the year. - -But to the generals, especially the foreign ones in the Russian -army, who wished to distinguish themselves, to astonish somebody, -and for some reason to capture a king or a duke--it seemed that now- -when any battle must be horrible and senseless--was the very time to -fight and conquer somebody. Kutuzov merely shrugged his shoulders when -one after another they presented projects of maneuvers to be made with -those soldiers--ill-shod, insufficiently clad, and half starved--who -within a month and without fighting a battle had dwindled to half -their number, and who at the best if the flight continued would have -to go a greater distance than they had already traversed, before -they reached the frontier. - -This longing to distinguish themselves, to maneuver, to overthrow, -and to cut off showed itself particularly whenever the Russians -stumbled on the French army. - -So it was at Krasnoe, where they expected to find one of the three -French columns and stumbled instead on Napoleon himself with sixteen -thousand men. Despite all Kutuzov's efforts to avoid that ruinous -encounter and to preserve his troops, the massacre of the broken mob -of French soldiers by worn-out Russians continued at Krasnoe for three -days. - -Toll wrote a disposition: "The first column will march to so and -so," etc. And as usual nothing happened in accord with the -disposition. Prince Eugene of Wurttemberg fired from a hill over the -French crowds that were running past, and demanded reinforcements -which did not arrive. The French, avoiding the Russians, dispersed and -hid themselves in the forest by night, making their way round as -best they could, and continued their flight. - -Miloradovich, who said he did not want to know anything about the -commissariat affairs of his detachment, and could never be found -when he was wanted--that chevalier sans peur et sans reproche* as he -styled himself--who was fond of parleys with the French, sent envoys -demanding their surrender, wasted time, and did not do what he was -ordered to do. - - -*Knight without fear and without reproach. - - -"I give you that column, lads," he said, riding up to the troops and -pointing out the French to the cavalry. - -And the cavalry, with spurs and sabers urging on horses that could -scarcely move, trotted with much effort to the column presented to -them--that is to say, to a crowd of Frenchmen stark with cold, -frost-bitten, and starving--and the column that had been presented -to them threw down its arms and surrendered as it had long been -anxious to do. - -At Krasnoe they took twenty-six thousand prisoners, several -hundred cannon, and a stick called a "marshal's staff," and disputed -as to who had distinguished himself and were pleased with their -achievement--though they much regretted not having taken Napoleon, -or at least a marshal or a hero of some sort, and reproached one -another and especially Kutuzov for having failed to do so. - -These men, carried away by their passions, were but blind tools of -the most melancholy law of necessity, but considered themselves heroes -and imagined that they were accomplishing a most noble and honorable -deed. They blamed Kutuzov and said that from the very beginning of the -campaign he had prevented their vanquishing Napoleon, that he -thought nothing but satisfying his passions and would not advance from -the Linen Factories because he was comfortable there, that at -Krasnoe he checked the advance because on learning that Napoleon was -there he had quite lost his head, and that it was probable that he had -an understanding with Napoleon and had been bribed by him, and so -on, and so on. - -Not only did his contemporaries, carried away by their passions, -talk in this way, but posterity and history have acclaimed Napoleon as -grand, while Kutuzov is described by foreigners as a crafty, -dissolute, weak old courtier, and by Russians as something indefinite- -a sort of puppet useful only because he had a Russian name. - - - - - -CHAPTER V - - -In 1812 and 1813 Kutuzov was openly accused of blundering. The -Emperor was dissatisfied with him. And in a history recently written -by order of the Highest Authorities it is said that Kutuzov was a -cunning court liar, frightened of the name of Napoleon, and that by -his blunders at Krasnoe and the Berezina he deprived the Russian -army of the glory of complete victory over the French.* - - -*History of the year 1812. The character of Kutuzov and -reflections on the unsatisfactory results of the battles at Krasnoe, -by Bogdanovich. - - -Such is the fate not of great men (grands hommes) whom the Russian -mind does not acknowledge, but of those rare and always solitary -individuals who, discerning the will of Providence, submit their -personal will to it. The hatred and contempt of the crowd punish -such men for discerning the higher laws. - -For Russian historians, strange and terrible to say, Napoleon- -that most insignificant tool of history who never anywhere, even in -exile, showed human dignity--Napoleon is the object of adulation and -enthusiasm; he is grand. But Kutuzov--the man who from the beginning -to the end of his activity in 1812, never once swerving by word or -deed from Borodino to Vilna, presented an example exceptional in -history of self-sacrifice and a present consciousness of the future -importance of what was happening--Kutuzov seems to them something -indefinite and pitiful, and when speaking of him and of the year -1812 they always seem a little ashamed. - -And yet it is difficult to imagine an historical character whose -activity was so unswervingly directed to a single aim; and it would be -difficult to imagine any aim more worthy or more consonant with the -will of the whole people. Still more difficult would it be to find -an instance in history of the aim of an historical personage being -so completely accomplished as that to which all Kutuzov's efforts were -directed in 1812. - -Kutuzov never talked of "forty centuries looking down from the -Pyramids," of the sacrifices he offered for the fatherland, or of what -he intended to accomplish or had accomplished; in general he said -nothing about himself, adopted no prose, always appeared to be the -simplest and most ordinary of men, and said the simplest and most -ordinary things. He wrote letters to his daughters and to Madame de -Stael, read novels, liked the society of pretty women, jested with -generals, officers, and soldiers, and never contradicted those who -tried to prove anything to him. When Count Rostopchin at the Yauza -bridge galloped up to Kutuzov with personal reproaches for having -caused the destruction of Moscow, and said: "How was it you promised -not to abandon Moscow without a battle?" Kutuzov replied: "And I shall -not abandon Moscow without a battle," though Moscow was then already -abandoned. When Arakcheev, coming to him from the Emperor, said that -Ermolov ought to be appointed chief of the artillery, Kutuzov replied: -"Yes, I was just saying so myself," though a moment before he had said -quite the contrary. What did it matter to him--who then alone amid a -senseless crowd understood the whole tremendous significance of what -was happening--what did it matter to him whether Rostopchin attributed -the calamities of Moscow to him or to himself? Still less could it -matter to him who was appointed chief of the artillery. - -Not merely in these cases but continually did that old man--who by -experience of life had reached the conviction that thoughts and the -words serving as their expression are not what move people--use -quite meaningless words that happened to enter his head. - -But that man, so heedless of his words, did not once during the -whole time of his activity utter one word inconsistent with the single -aim toward which he moved throughout the whole war. Obviously in spite -of himself, in very diverse circumstances, he repeatedly expressed his -real thoughts with the bitter conviction that he would not be -understood. Beginning with the battle of Borodino, from which time his -disagreement with those about him began, he alone said that the battle -of Borodino was a victory, and repeated this both verbally and in -his dispatches and reports up to the time of his death. He alone -said that the loss of Moscow is not the loss of Russia. In reply to -Lauriston's proposal of peace, he said: There can be no peace, for -such is the people's will. He alone during the retreat of the French -said that all our maneuvers are useless, everything is being -accomplished of itself better than we could desire; that the enemy -must be offered "a golden bridge"; that neither the Tarutino, the -Vyazma, nor the Krasnoe battles were necessary; that we must keep some -force to reach the frontier with, and that he would not sacrifice a -single Russian for ten Frenchmen. - -And this courtier, as he is described to us, who lies to Arakcheev -to please the Emperor, he alone--incurring thereby the Emperor's -displeasure--said in Vilna that to carry the war beyond the frontier -is useless and harmful. - -Nor do words alone prove that only he understood the meaning of -the events. His actions--without the smallest deviation--were all -directed to one and the same threefold end: (1) to brace all his -strength for conflict with the French, (2) to defeat them, and (3) -to drive them out of Russia, minimizing as far as possible the -sufferings of our people and of our army. - -This procrastinator Kutuzov, whose motto was "Patience and Time," -this enemy of decisive action, gave battle at Borodino, investing -the preparations for it with unparalleled solemnity. This Kutuzov -who before the battle of Austerlitz began said that it would be -lost, he alone, in contradiction to everyone else, declared till his -death that Borodino was a victory, despite the assurance of generals -that the battle was lost and despite the fact that for an army to have -to retire after winning a battle was unprecedented. He alone during -the whole retreat insisted that battles, which were useless then, -should not be fought, and that a new war should not be begun nor the -frontiers of Russia crossed. - -It is easy now to understand the significance of these events--if -only we abstain from attributing to the activity of the mass aims that -existed only in the heads of a dozen individuals--for the events and -results now lie before us. - -But how did that old man, alone, in opposition to the general -opinion, so truly discern the importance of the people's view of the -events that in all his activity he was never once untrue to it? - -The source of that extraordinary power of penetrating the meaning of -the events then occuring lay in the national feeling which he -possessed in full purity and strength. - -Only the recognition of the fact that he possessed this feeling -caused the people in so strange a manner, contrary to the Tsar's wish, -to select him--an old man in disfavor--to be their representative in -the national war. And only that feeling placed him on that highest -human pedestal from which he, the commander in chief, devoted all -his powers not to slaying and destroying men but to saving and showing -pity on them. - -That simple, modest, and therefore truly great, figure could not -be cast in the false mold of a European hero--the supposed ruler of -men--that history has invented. - -To a lackey no man can be great, for a lackey has his own conception -of greatness. - - - - - -CHAPTER VI - - -The fifth of November was the first day of what is called the battle -of Krasnoe. Toward evening--after much disputing and many mistakes -made by generals who did not go to their proper places, and after -adjutants had been sent about with counterorders--when it had become -plain that the enemy was everywhere in flight and that there could and -would be no battle, Kutuzov left Krasnoe and went to Dobroe whither -his headquarters had that day been transferred. - -The day was clear and frosty. Kutuzov rode to Dobroe on his plump -little white horse, followed by an enormous suite of discontented -generals who whispered among themselves behind his back. All along the -road groups of French prisoners captured that day (there were seven -thousand of them) were crowding to warm themselves at campfires. -Near Dobroe an immense crowd of tattered prisoners, buzzing with -talk and wrapped and bandaged in anything they had been able to get -hold of, were standing in the road beside a long row of unharnessed -French guns. At the approach of the commander in chief the buzz of -talk ceased and all eyes were fixed on Kutuzov who, wearing a white -cap with a red band and a padded overcoat that bulged on his round -shoulders, moved slowly along the road on his white horse. One of -the generals was reporting to him where the guns and prisoners had -been captured. - -Kutuzov seemed preoccupied and did not listen to what the general -was saying. He screwed up his eyes with a dissatisfied look as he -gazed attentively and fixedly at these prisoners, who presented a -specially wretched appearance. Most of them were disfigured by -frost-bitten noses and cheeks, and nearly all had red, swollen and -festering eyes. - -One group of the French stood close to the road, and two of them, -one of whom had his face covered with sores, were tearing a piece of -raw flesh with their hands. There was something horrible and bestial -in the fleeting glance they threw at the riders and in the -malevolent expression with which, after a glance at Kutuzov, the -soldier with the sores immediately turned away and went on with what -he was doing. - -Kutuzov looked long and intently at these two soldiers. He -puckered his face, screwed up his eyes, and pensively swayed his head. -At another spot he noticed a Russian soldier laughingly patting a -Frenchman on the shoulder, saying something to him in a friendly -manner, and Kutuzov with the same expression on his face again -swayed his head. - -"What were you saying?" he asked the general, who continuing his -report directed the commander in chief's attention to some standards -captured from the French and standing in front of the Preobrazhensk -regiment. - -"Ah, the standards!" said Kutuzov, evidently detaching himself -with difficulty from the thoughts that preoccupied him. - -He looked about him absently. Thousands of eyes were looking at -him from all sides awaiting a word from him. - -He stopped in front of the Preobrazhensk regiment, sighed deeply, -and closed his eyes. One of his suite beckoned to the soldiers -carrying the standards to advance and surround the commander in -chief with them. Kutuzov was silent for a few seconds and then, -submitting with evident reluctance to the duty imposed by his -position, raised his head and began to speak. A throng of officers -surrounded him. He looked attentively around at the circle of -officers, recognizing several of them. - -"I thank you all!" he said, addressing the soldiers and then again -the officers. In the stillness around him his slowly uttered words -were distinctly heard. "I thank you all for your hard and faithful -service. The victory is complete and Russia will not forget you! Honor -to you forever." - -He paused and looked around. - -"Lower its head, lower it!" he said to a soldier who had -accidentally lowered the French eagle he was holding before the -Preobrazhensk standards. "Lower, lower, that's it. Hurrah lads!" he -added, addressing the men with a rapid movement of his chin. - -"Hur-r-rah!" roared thousands of voices. - -While the soldiers were shouting Kutuzov leaned forward in his -saddle and bowed his head, and his eye lit up with a mild and -apparently ironic gleam. - -"You see, brothers..." said he when the shouts had ceased... and all -at once his voice and the expression of his face changed. It was no -longer the commander in chief speaking but an ordinary old man who -wanted to tell his comrades something very important. - -There was a stir among the throng of officers and in the ranks of -the soldiers, who moved that they might hear better what he was -going to say. - -"You see, brothers, I know it's hard for you, but it can't be -helped! Bear up; it won't be for long now! We'll see our visitors -off and then we'll rest. The Tsar won't forget your service. It is -hard for you, but still you are at home while they--you see what -they have come to," said he, pointing to the prisoners. "Worse off -than our poorest beggars. While they were strong we didn't spare -ourselves, but now we may even pity them. They are human beings too. -Isn't it so, lads?" - -He looked around, and in the direct, respectful, wondering gaze -fixed upon him he read sympathy with what he had said. His face grew -brighter and brighter with an old man's mild smile, which drew the -corners of his lips and eyes into a cluster of wrinkles. He ceased -speaking and bowed his head as if in perplexity. - -"But after all who asked them here? Serves them right, the bloody -bastards!" he cried, suddenly lifting his head. - -And flourishing his whip he rode off at a gallop for the first -time during the whole campaign, and left the broken ranks of the -soldiers laughing joyfully and shouting "Hurrah!" - -Kutuzov's words were hardly understood by the troops. No one could -have repeated the field marshal's address, begun solemnly and then -changing into an old man's simplehearted talk; but the hearty -sincerity of that speech, the feeling of majestic triumph combined -with pity for the foe and consciousness of the justice of our cause, -exactly expressed by that old man's good-natured expletives, was not -merely understood but lay in the soul of every soldier and found -expression in their joyous and long-sustained shouts. Afterwards -when one of the generals addressed Kutuzov asking whether he wished -his caleche to be sent for, Kutuzov in answering unexpectedly gave a -sob, being evidently greatly moved. - - - - - -CHAPTER VII - - -When the troops reached their night's halting place on the eighth of -November, the last day of the Krasnoe battles, it was already -growing dusk. All day it had been calm and frosty with occasional -lightly falling snow and toward evening it began to clear. Through the -falling snow a purple-black and starry sky showed itself and the frost -grew keener. - -An infantry regiment which had left Tarutino three thousand strong -but now numbered only nine hundred was one of the first to arrive that -night at its halting place--a village on the highroad. The -quartermasters who met the regiment announced that all the huts were -full of sick and dead Frenchmen, cavalrymen, and members of the staff. -There was only one hut available for the regimental commander. - -The commander rode up to his hut. The regiment passed through the -village and stacked its arms in front of the last huts. - -Like some huge many-limbed animal, the regiment began to prepare its -lair and its food. One part of it dispersed and waded knee-deep -through the snow into a birch forest to the right of the village, -and immediately the sound of axes and swords, the crashing of -branches, and merry voices could be heard from there. Another -section amid the regimental wagons and horses which were standing in a -group was busy getting out caldrons and rye biscuit, and feeding the -horses. A third section scattered through the village arranging -quarters for the staff officers, carrying out the French corpses -that were in the huts, and dragging away boards, dry wood, and -thatch from the roofs, for the campfires, or wattle fences to serve -for shelter. - -Some fifteen men with merry shouts were shaking down the high wattle -wall of a shed, the roof of which had already been removed. - -"Now then, all together--shove!" cried the voices, and the huge -surface of the wall, sprinkled with snow and creaking with frost, -was seen swaying in the gloom of the night. The lower stakes cracked -more and more and at last the wall fell, and with it the men who had -been pushing it. Loud, coarse laughter and joyous shouts ensued. - -"Now then, catch hold in twos! Hand up the lever! That's it... Where -are you shoving to?" - -"Now, all together! But wait a moment, boys... With a song!" - -All stood silent, and a soft, pleasant velvety voice began to -sing. At the end of the third verse as the last note died away, twenty -voices roared out at once: "Oo-oo-oo-oo! That's it. All together! -Heave away, boys!..." but despite their united efforts the wattle -hardly moved, and in the silence that followed the heavy breathing -of the men was audible. - -"Here, you of the Sixth Company! Devils that you are! Lend a hand... -will you? You may want us one of these days." - -Some twenty men of the Sixth Company who were on their way into -the village joined the haulers, and the wattle wall, which was about -thirty-five feet long and seven feet high, moved forward along the -village street, swaying, pressing upon and cutting the shoulders of -the gasping men. - -"Get along... Falling? What are you stopping for? There now..." - -Merry senseless words of abuse flowed freely. - -"What are you up to?" suddenly came the authoritative voice of a -sergeant major who came upon the men who were hauling their burden. -"There are gentry here; the general himself is in that hut, and you -foul-mouthed devils, you brutes, I'll give it to you!" shouted he, -hitting the first man who came in his way a swinging blow on the back. -"Can't you make less noise?" - -The men became silent. The soldier who had been struck groaned and -wiped his face, which had been scratched till it bled by his falling -against the wattle. - -"There, how that devil hits out! He's made my face all bloody," said -he in a frightened whisper when the sergeant major had passed on. - -"Don't you like it?" said a laughing voice, and moderating their -tones the men moved forward. - -When they were out of the village they began talking again as loud -as before, interlarding their talk with the same aimless expletives. - -In the hut which the men had passed, the chief officers had gathered -and were in animated talk over their tea about the events of the day -and the maneuvers suggested for tomorrow. It was proposed to make a -flank march to the left, cut off the Vice-King (Murat) and capture -him. - -By the time the soldiers had dragged the wattle fence to its place -the campfires were blazing on all sides ready for cooking, the wood -crackled, the snow was melting, and black shadows of soldiers -flitted to and fro all over the occupied space where the snow had been -trodden down. - -Axes and choppers were plied all around. Everything was done without -any orders being given. Stores of wood were brought for the night, -shelters were rigged up for the officers, caldrons were being -boiled, and muskets and accouterments put in order. - -The wattle wall the men had brought was set up in a semicircle by -the Eighth Company as a shelter from the north, propped up by musket -rests, and a campfire was built before it. They beat the tattoo, -called the roll, had supper, and settled down round the fires for -the night--some repairing their footgear, some smoking pipes, and some -stripping themselves naked to steam the lice out of their shirts. - - - - - -CHAPTER VIII - - -One would have thought that under the almost incredibly wretched -conditions the Russian soldiers were in at that time--lacking warm -boots and sheepskin coats, without a roof over their heads, in the -snow with eighteen degrees of frost, and without even full rations -(the commissariat did not always keep up with the troops)--they -would have presented a very sad and depressing spectacle. - -On the contrary, the army had never under the best material -conditions presented a more cheerful and animated aspect. This was -because all who began to grow depressed or who lost strength were -sifted out of the army day by day. All the physically or morally -weak had long since been left behind and only the flower of the -army--physically and mentally--remained. - -More men collected behind the wattle fence of the Eighth Company -than anywhere else. Two sergeants major were sitting with them and -their campfire blazed brighter than others. For leave to sit by -their wattle they demanded contributions of fuel. - -"Eh, Makeev! What has become of you, you son of a bitch? Are you -lost or have the wolves eaten you? Fetch some more wood!" shouted a -red-haired and red-faced man, screwing up his eyes and blinking -because of the smoke but not moving back from the fire. "And you, -Jackdaw, go and fetch some wood!" said he to another soldier. - -This red-haired man was neither a sergeant nor a corporal, but being -robust he ordered about those weaker than himself. The soldier they -called "Jackdaw," a thin little fellow with a sharp nose, rose -obediently and was about to go but at that instant there came into the -light of the fire the slender, handsome figure of a young soldier -carrying a load of wood. - -"Bring it here--that's fine!" - -They split up the wood, pressed it down on the fire, blew at it with -their mouths, and fanned it with the skirts of their greatcoats, -making the flames hiss and crackle. The men drew nearer and lit -their pipes. The handsome young soldier who had brought the wood, -setting his arms akimbo, began stamping his cold feet rapidly and -deftly on the spot where he stood. - -"Mother! The dew is cold but clear.... It's well that I'm a -musketeer..." he sang, pretending to hiccough after each syllable. - -"Look out, your soles will fly off!" shouted the red-haired man, -noticing that the sole of the dancer's boot was hanging loose. "What a -fellow you are for dancing!" - -The dancer stopped, pulled off the loose piece of leather, and threw -it on the fire. - -"Right enough, friend," said he, and, having sat down, took out of -his knapsack a scrap of blue French cloth, and wrapped it round his -foot. "It's the steam that spoils them," he added, stretching out -his feet toward the fire. - -"They'll soon be issuing us new ones. They say that when we've -finished hammering them, we're to receive double kits!" - -"And that son of a bitch Petrov has lagged behind after all, it -seems," said one sergeant major. - -"I've had an eye on him this long while," said the other. - -"Well, he's a poor sort of soldier..." - -"But in the Third Company they say nine men were missing yesterday." - -"Yes, it's all very well, but when a man's feet are frozen how can -he walk?" - -"Eh? Don't talk nonsense!" said a sergeant major. - -"Do you want to be doing the same?" said an old soldier, turning -reproachfully to the man who had spoken of frozen feet. - -"Well, you know," said the sharp-nosed man they called Jackdaw in -a squeaky and unsteady voice, raising himself at the other side of the -fire, "a plump man gets thin, but for a thin one it's death. Take -me, now! I've got no strength left," he added, with sudden -resolution turning to the sergeant major. "Tell them to send me to - -hospital; I'm aching all over; anyway I shan't be able to keep up." - -"That'll do, that'll do!" replied the sergeant major quietly. - -The soldier said no more and the talk went on. - -"What a lot of those Frenchies were taken today, and the fact is -that not one of them had what you might call real boots on," said a -soldier, starting a new theme. "They were no more than make-believes." - -"The Cossacks have taken their boots. They were clearing the hut for -the colonel and carried them out. It was pitiful to see them, boys," -put in the dancer. "As they turned them over one seemed still alive -and, would you believe it, he jabbered something in their lingo." - -"But they're a clean folk, lads," the first man went on; "he was -white--as white as birchbark--and some of them are such fine -fellows, you might think they were nobles." - -"Well, what do you think? They make soldiers of all classes there." - -"But they don't understand our talk at all," said the dancer with -a puzzled smile. "I asked him whose subject he was, and he jabbered in -his own way. A queer lot!" - -"But it's strange, friends," continued the man who had wondered at -their whiteness, "the peasants at Mozhaysk were saying that when -they began burying the dead--where the battle was you know--well, -those dead had been lying there for nearly a month, and says the -peasant, 'they lie as white as paper, clean, and not as much smell -as a puff of powder smoke.'" - -"Was it from the cold?" asked someone. - -"You're a clever fellow! From the cold indeed! Why, it was hot. If -it had been from the cold, ours would not have rotted either. 'But,' -he says, 'go up to ours and they are all rotten and maggoty. So,' he -says, 'we tie our faces up with kerchiefs and turn our heads away as -we drag them off: we can hardly do it. But theirs,' he says, 'are -white as paper and not so much smell as a whiff of gunpowder.'" - -All were silent. - -"It must be from their food," said the sergeant major. "They used to -gobble the same food as the gentry." - -No one contradicted him. - -"That peasant near Mozhaysk where the battle was said the men were -all called up from ten villages around and they carted for twenty days -and still didn't finish carting the dead away. And as for the -wolves, he says..." - -"That was a real battle," said an old soldier. "It's the only one -worth remembering; but since that... it's only been tormenting folk." - -"And do you know, Daddy, the day before yesterday we ran at them -and, my word, they didn't let us get near before they just threw -down their muskets and went on their knees. 'Pardon!' they say. That's -only one case. They say Platov took 'Poleon himself twice. But he -didn't know the right charm. He catches him and catches him--no -good! He turns into a bird in his hands and flies away. And there's no -way of killing him either." - -"You're a first-class liar, Kiselev, when I come to look at you!" - -"Liar, indeed! It's the real truth." - -"If he fell into my hands, when I'd caught him I'd bury him in the -ground with an aspen stake to fix him down. What a lot of men he's -ruined!" - -"Well, anyhow we're going to end it. He won't come here again," -remarked the old soldier, yawning. - -The conversation flagged, and the soldiers began settling down to -sleep. - -"Look at the stars. It's wonderful how they shine! You would think -the women had spread out their linen," said one of the men, gazing -with admiration at the Milky Way. - -"That's a sign of a good harvest next year." - -"We shall want some more wood." - -"You warm your back and your belly gets frozen. That's queer." - -"O Lord!" - -"What are you pushing for? Is the fire only for you? Look how he's -sprawling!" - -In the silence that ensued, the snoring of those who had fallen -asleep could be heard. Others turned over and warmed themselves, now -and again exchanging a few words. From a campfire a hundred paces -off came a sound of general, merry laughter. - -"Hark at them roaring there in the Fifth Company!" said one of the -soldiers, "and what a lot of them there are!" - -One of the men got up and went over to the Fifth Company. - -"They're having such fun," said he, coming back. "Two Frenchies have -turned up. One's quite frozen and the other's an awful swaggerer. He's -singing songs...." - -"Oh, I'll go across and have a look...." - -And several of the men went over to the Fifth Company. - - - - - -CHAPTER IX - - -The fifth company was bivouacking at the very edge of the forest. -A huge campfire was blazing brightly in the midst of the snow, -lighting up the branches of trees heavy with hoarfrost. - -About midnight they heard the sound of steps in the snow of the -forest, and the crackling of dry branches. - -"A bear, lads," said one of the men. - -They all raised their heads to listen, and out of the forest into -the bright firelight stepped two strangely clad human figures clinging -to one another. - -These were two Frenchmen who had been hiding in the forest. They -came up to the fire, hoarsely uttering something in a language our -soldiers did not understand. One was taller than the other; he wore an -officer's hat and seemed quite exhausted. On approaching the fire he -had been going to sit down, but fell. The other, a short sturdy -soldier with a shawl tied round his head, was stronger. He raised -his companion and said something, pointing to his mouth. The -soldiers surrounded the Frenchmen, spread a greatcoat on the ground -for the sick man, and brought some buckwheat porridge and vodka for -both of them. - -The exhausted French officer was Ramballe and the man with his -head wrapped in the shawl was Morel, his orderly. - -When Morel had drunk some vodka and finished his bowl of porridge he -suddenly became unnaturally merry and chattered incessantly to the -soldiers, who could not understand him. Ramballe refused food and -resting his head on his elbow lay silent beside the campfire, -looking at the Russian soldiers with red and vacant eyes. Occasionally -he emitted a long-drawn groan and then again became silent. Morel, -pointing to his shoulders, tried to impress on the soldiers the fact -that Ramballe was an officer and ought to be warmed. A Russian officer -who had come up to the fire sent to ask his colonel whether he would -not take a French officer into his hut to warm him, and when the -messenger returned and said that the colonel wished the officer to -be brought to him, Ramballe was told to go. He rose and tried to walk, -but staggered and would have fallen had not a soldier standing by held -him up. - -"You won't do it again, eh?" said one of the soldiers, winking and -turning mockingly to Ramballe. - -"Oh, you fool! Why talk rubbish, lout that you are--a real peasant!" -came rebukes from all sides addressed to the jesting soldier. - -They surrounded Ramballe, lifted him on the crossed arms of two -soldiers, and carried him to the hut. Ramballe put his arms around -their necks while they carried him and began wailing plaintively: - -"Oh, you fine fellows, my kind, kind friends! These are men! Oh, -my brave, kind friends," and he leaned his head against the shoulder -of one of the men like a child. - -Meanwhile Morel was sitting in the best place by the fire, -surrounded by the soldiers. - -Morel, a short sturdy Frenchman with inflamed and streaming eyes, -was wearing a woman's cloak and had a shawl tied woman fashion round -his head over his cap. He was evidently tipsy, and was singing a -French song in a hoarse broken voice, with an arm thrown round the -nearest soldier. The soldiers simply held their sides as they -watched him. - -"Now then, now then, teach us how it goes! I'll soon pick it up. How -is it?" said the man--a singer and a wag--whom Morel was embracing. - -"Vive Henri Quatre! Vive ce roi valiant!" sang Morel, winking. "Ce -diable a quatre..."* - - -*"Long live Henry the Fourth, that valiant king! That rowdy devil." - - -"Vivarika! Vif-seruvaru! Sedyablyaka!" repeated the soldier, -flourishing his arm and really catching the tune. - -"Bravo! Ha, ha, ha!" rose their rough, joyous laughter from all -sides. - -Morel, wrinkling up his face, laughed too. - -"Well, go on, go on!" - - "Qui eut le triple talent, - De boire, de battre, - Et d'etre un vert galant."* - - -*Who had a triple talent - - For drinking, for fighting, - - And for being a gallant old boy... - - -"It goes smoothly, too. Well, now, Zaletaev!" - -"Ke..." Zaletaev, brought out with effort: "ke-e-e-e," he drawled, -laboriously pursing his lips, "le-trip-ta-la-de-bu-de-ba, e -de-tra-va-ga-la" he sang. - -"Fine! Just like the Frenchie! Oh, ho ho! Do you want some more to -eat?" - -"Give him some porridge: it takes a long time to get filled up after -starving." - -They gave him some more porridge and Morel with a laugh set to -work on his third bowl. All the young soldiers smiled gaily as they -watched him. The older men, who thought it undignified to amuse -themselves with such nonsense, continued to lie at the opposite side -of the fire, but one would occasionally raise himself on an elbow -and glance at Morel with a smile. - -"They are men too," said one of them as he wrapped himself up in his -coat. "Even wormwood grows on its own root." - -"O Lord, O Lord! How starry it is! Tremendous! That means a hard -frost...." - -They all grew silent. The stars, as if knowing that no one was -looking at them, began to disport themselves in the dark sky: now -flaring up, now vanishing, now trembling, they were busy whispering -something gladsome and mysterious to one another. - - - - - -CHAPTER X - - -The French army melted away at the uniform rate of a mathematical -progression; and that crossing of the Berezina about which so much has -been written was only one intermediate stage in its destruction, and -not at all the decisive episode of the campaign. If so much has been -and still is written about the Berezina, on the French side this is -only because at the broken bridge across that river the calamities -their army had been previously enduring were suddenly concentrated -at one moment into a tragic spectacle that remained in every memory, -and on the Russian side merely because in Petersburg--far from the -seat of war--a plan (again one of Pfuel's) had been devised to catch -Napoleon in a strategic trap at the Berezina River. Everyone assured -himself that all would happen according to plan, and therefore -insisted that it was just the crossing of the Berezina that -destroyed the French army. In reality the results of the crossing were -much less disastrous to the French--in guns and men lost--than Krasnoe -had been, as the figures show. - -The sole importance of the crossing of the Berezina lies in the fact -that it plainly and indubitably proved the fallacy of all the plans -for cutting off the enemy's retreat and the soundness of the only -possible line of action--the one Kutuzov and the general mass of the -army demanded--namely, simply to follow the enemy up. The French crowd -fled at a continually increasing speed and all its energy was directed -to reaching its goal. It fled like a wounded animal and it was -impossible to block its path. This was shown not so much by the -arrangements it made for crossing as by what took place at the -bridges. When the bridges broke down, unarmed soldiers, people from -Moscow and women with children who were with the French transport, -all--carried on by vis inertiae--pressed forward into boats and into -the ice-covered water and did not, surrender. - -That impulse was reasonable. The condition of fugitives and of -pursuers was equally bad. As long as they remained with their own -people each might hope for help from his fellows and the definite -place he held among them. But those who surrendered, while remaining -in the same pitiful plight, would be on a lower level to claim a share -in the necessities of life. The French did not need to be informed -of the fact that half the prisoners--with whom the Russians did not -know what to do--perished of cold and hunger despite their captors' -desire to save them; they felt that it could not be otherwise. The -most compassionate Russian commanders, those favorable to the -French--and even the Frenchmen in the Russian service--could do -nothing for the prisoners. The French perished from the conditions -to which the Russian army was itself exposed. It was impossible to -take bread and clothes from our hungry and indispensable soldiers to -give to the French who, though not harmful, or hated, or guilty, -were simply unnecessary. Some Russians even did that, but they were -exceptions. - -Certain destruction lay behind the French but in front there was -hope. Their ships had been burned, there was no salvation save in -collective flight, and on that the whole strength of the French was -concentrated. - -The farther they fled the more wretched became the plight of the -remnant, especially after the Berezina, on which (in consequence of -the Petersburg plan) special hopes had been placed by the Russians, -and the keener grew the passions of the Russian commanders, blamed one -another and Kutuzov most of all. Anticipation that the failure of -the Petersburg Berezina plan would be attributed to Kutuzov led to -dissatisfaction, contempt, and ridicule, more and more strongly -expressed. The ridicule and contempt were of course expressed in a -respectful form, making it impossible for him to ask wherein he was to -blame. They did not talk seriously to him; when reporting to him or -asking for his sanction they appeared to be fulfilling a regrettable -formality, but they winked behind his back and tried to mislead him at -every turn. - -Because they could not understand him all these people assumed -that it was useless to talk to the old man; that he would never -grasp the profundity of their plans, that he would answer with his -phrases (which they thought were mere phrases) about a "golden -bridge," about the impossibility of crossing the frontier with a crowd -of tatterdemalions, and so forth. They had heard all that before. -And all he said--that it was necessary to await provisions, or that -the men had no boots--was so simple, while what they proposed was so -complicated and clever, that it was evident that he was old and stupid -and that they, though not in power, were commanders of genius. - -After the junction with the army of the brilliant admiral and -Petersburg hero Wittgenstein, this mood and the gossip of the staff -reached their maximum. Kutuzov saw this and merely sighed and shrugged -his shoulders. Only once, after the affair of the Berezina, did he get -angry and write to Bennigsen (who reported separately to the -Emperor) the following letter: - -"On account of your spells of ill health, will your excellency -please be so good as to set off for Kaluga on receipt of this, and -there await further commands and appointments from His Imperial -Majesty." - -But after Bennigsen's departure, the Grand Duke Tsarevich -Constantine Pavlovich joined the army. He had taken part in the -beginning of the campaign but had subsequently been removed from the -army by Kutuzov. Now having come to the army, he informed Kutuzov of -the Emperor's displeasure at the poor success of our forces and the -slowness of their advance. The Emperor intended to join the army -personally in a few days' time. - -The old man, experienced in court as well as in military affairs- -this same Kutuzov who in August had been chosen commander in chief -against the sovereign's wishes and who had removed the Grand Duke -and heir--apparent from the army--who on his own authority and -contrary to the Emperor's will had decided on the abandonment of -Moscow, now realized at once that his day was over, that his part -was played, and that the power he was supposed to hold was no longer -his. And he understood this not merely from the attitude of the court. -He saw on the one hand that the military business in which he had -played his part was ended and felt that his mission was -accomplished; and at the same time he began to be conscious of the -physical weariness of his aged body and of the necessity of physical -rest. - -On the twenty-ninth of November Kutuzov entered Vilna--his "dear -Vilna" as he called it. Twice during his career Kutuzov had been -governor of Vilna. In that wealthy town, which had not been injured, -he found old friends and associations, besides the comforts of life of -which he had so long been deprived. And he suddenly turned from the -cares of army and state and, as far as the passions that seethed -around him allowed, immersed himself in the quiet life to which he had -formerly been accustomed, as if all that was taking place and all that -had still to be done in the realm of history did not concern him at -all. - -Chichagov, one of the most zealous "cutters-off" and -"breakers-up," who had first wanted to effect a diversion in Greece -and then in Warsaw but never wished to go where he was sent: -Chichagov, noted for the boldness with which he spoke to the -Emperor, and who considered Kutuzov to be under an obligation to him -because when he was sent to make peace with Turkey in 1811 -independently of Kutuzov, and found that peace had already been -concluded, he admitted to the Emperor that the merit of securing -that peace was really Kutuzov's; this Chichagov was the first to -meet Kutuzov at the castle where the latter was to stay. In undress -naval uniform, with a dirk, and holding his cap under his arm, he -handed Kutuzov a garrison report and the keys of the town. The -contemptuously respectful attitude of the younger men to the old man -in his dotage was expressed in the highest degree by the behavior of -Chichagov, who knew of the accusations that were being directed -against Kutuzov. - -When speaking to Chichagov, Kutuzov incidentally mentioned that -the vehicles packed with china that had been captured from him at -Borisov had been recovered and would be restored to him. - -"You mean to imply that I have nothing to eat out of.... On the -contrary, I can supply you with everything even if you want to give -dinner parties," warmly replied Chichagov, who tried by every word -he spoke to prove his own rectitude and therefore imagined Kutuzov -to be animated by the same desire. - -Kutuzov, shrugging his shoulders, replied with his subtle -penetrating smile: "I meant merely to say what I said." - -Contrary to the Emperor's wish Kutuzov detained the greater part -of the army at Vilna. Those about him said that he became -extraordinarily slack and physically feeble during his stay in that -town. He attended to army affairs reluctantly, left everything to -his generals, and while awaiting the Emperor's arrival led a -dissipated life. - -Having left Petersburg on the seventh of December with his suite- -Count Tolstoy, Prince Volkonski, Arakcheev, and others--the Emperor -reached Vilna on the eleventh, and in his traveling sleigh drove -straight to the castle. In spite of the severe frost some hundred -generals and staff officers in full parade uniform stood in front of -the castle, as well as a guard of honor of the Semenov regiment. - -A courier who galloped to the castle in advance, in a troyka with -three foam-flecked horses, shouted "Coming!" and Konovnitsyn rushed -into the vestibule to inform Kutuzov, who was waiting in the hall -porter's little lodge. - -A minute later the old man's large stout figure in full-dress -uniform, his chest covered with orders and a scarf drawn round his -stomach, waddled out into the porch. He put on his hat with its -peaks to the sides and, holding his gloves in his hand and walking -with an effort sideways down the steps to the level of the street, -took in his hand the report he had prepared for the Emperor. - -There was running to and fro and whispering; another troyka -furiously up, and then all eyes were turned on an approaching sleigh -in which the figures of the Emperor and Volkonski could already be -descried. - -From the habit of fifty years all this had a physically agitating -effect on the old general. He carefully and hastily felt himself all -over, readjusted his hat, and pulling himself together drew himself up -and, at the very moment when the Emperor, having alighted from the -sleigh, lifted his eyes to him, handed him the report and began -speaking in his smooth, ingratiating voice. - -The Emperor with a rapid glance scanned Kutuzov from head to foot, -frowned for an instant, but immediately mastering himself went up to -the old man, extended his arms and embraced him. And this embrace too, -owing to a long-standing impression related to his innermost feelings, -had its usual effect on Kutuzov and he gave a sob. - -The Emperor greeted the officers and the Semenov guard, and again -pressing the old man's hand went with him into the castle. - -When alone with the field marshal the Emperor expressed his -dissatisfaction at the slowness of the pursuit and at the mistakes -made at Krasnoe and the Berezina, and informed him of his intentions -for a future campaign abroad. Kutuzov made no rejoinder or remark. The -same submissive, expressionless look with which he had listened to the -Emperor's commands on the field of Austerlitz seven years before -settled on his face now. - -When Kutuzov came out of the study and with lowered head was -crossing the ballroom with his heavy waddling gait, he was arrested by -someone's voice saying: - -"Your Serene Highness!" - -Kutuzov raised his head and looked for a long while into the eyes of -Count Tolstoy, who stood before him holding a silver salver on which -lay a small object. Kutuzov seemed not to understand what was expected -of him. - -Suddenly he seemed to remember; a scarcely perceptible smile flashed -across his puffy face, and bowing low and respectfully he took the -object that lay on the salver. It was the Order of St. George of the -First Class. - - - - - -CHAPTER XI - - -Next day the field marshal gave a dinner and ball which the -Emperor honored by his presence. Kutuzov had received the Order of St. -George of the First Class and the Emperor showed him the highest -honors, but everyone knew of the imperial dissatisfaction with him. -The proprieties were observed and the Emperor was the first to set -that example, but everybody understood that the old man was -blameworthy and good-for-nothing. When Kutuzov, conforming to a custom -of Catherine's day, ordered the standards that had been captured to be -lowered at the Emperor's feet on his entering the ballroom, the -Emperor made a wry face and muttered something in which some people -caught the words, "the old comedian." - -The Emperor's displeasure with Kutuzov was specially increased at -Vilna by the fact that Kutuzov evidently could not or would not -understand the importance of the coming campaign. - -When on the following morning the Emperor said to the officers -assembled about him: "You have not only saved Russia, you have saved -Europe!" they all understood that the war was not ended. - -Kutuzov alone would not see this and openly expressed his opinion -that no fresh war could improve the position or add to the glory of -Russia, but could only spoil and lower the glorious position that -Russia had gained. He tried to prove to the Emperor the -impossibility of levying fresh troops, spoke of the hardships -already endured by the people, of the possibility of failure and so -forth. - -This being the field marshal's frame of mind he was naturally -regarded as merely a hindrance and obstacle to the impending war. - -To avoid unpleasant encounters with the old man, the natural -method was to do what had been done with him at Austerlitz and with -Barclay at the beginning of the Russian campaign--to transfer the -authority to the Emperor himself, thus cutting the ground from under -the commander in chief's feet without upsetting the old man by -informing him of the change. - -With this object his staff was gradually reconstructed and its -real strength removed and transferred to the Emperor. Toll, -Konovnitsyn, and Ermolov received fresh appointments. Everyone spoke -loudly of the field marshal's great weakness and failing health. - -His health had to be bad for his place to be taken away and given to -another. And in fact his health was poor. - -So naturally, simply, and gradually--just as he had come from Turkey -to the Treasury in Petersburg to recruit the militia, and then to -the army when he was needed there--now when his part was played out, -Kutuzov's place was taken by a new and necessary performer. - -The war 1812, besides its national significance dear to every -Russian heart, was now to assume another, a European, significance. - -The movement of peoples from west to east was to be succeeded by a -movement of peoples from east to west, and for this fresh war -another leader was necessary, having qualities and views differing -from Kutuzov's and animated by different motives. - -Alexander I was as necessary for the movement of the peoples from -east to west and for the refixing of national frontiers as Kutuzov had -been for the salvation and glory of Russia. - -Kutuzov did not understand what Europe, the balance of power, or -Napoleon meant. He could not understand it. For the representative -of the Russian people, after the enemy had been destroyed and Russia -had been liberated and raised to the summit of her glory, there was -nothing left to do as a Russian. Nothing remained for the -representative of the national war but to die, and Kutuzov died. - - - - - -CHAPTER XII - - -As generally happens, Pierre did not feel the full effects of the -physical privation and strain he had suffered as prisoner until -after they were over. After his liberation he reached Orel, and on the -third day there, when preparing to go to Kiev, he fell ill and was -laid up for three months. He had what the doctors termed "bilious -fever." But despite the fact that the doctors treated him, bled him, -and gave him medicines to drink, he recovered. - -Scarcely any impression was left on Pierre's mind by all that -happened to him from the time of his rescue till his illness. He -remembered only the dull gray weather now rainy and now snowy, -internal physical distress, and pains in his feet and side. He -remembered a general impression of the misfortunes and sufferings of -people and of being worried by the curiosity of officers and -generals who questioned him, he also remembered his difficulty in -procuring a conveyance and horses, and above all he remembered his -incapacity to think and feel all that time. On the day of his rescue -he had seen the body of Petya Rostov. That same day he had learned -that Prince Andrew, after surviving the battle of Borodino for more -than a month had recently died in the Rostovs' house at Yaroslavl, and -Denisov who told him this news also mentioned Helene's death, -supposing that Pierre had heard of it long before. All this at the -time seemed merely strange to Pierre: he felt he could not grasp its -significance. Just then he was only anxious to get away as quickly -as possible from places where people were killing one another, to some -peaceful refuge where he could recover himself, rest, and think over -all the strange new facts he had learned; but on reaching Orel he -immediately fell ill. When he came to himself after his illness he saw -in attendance on him two of his servants, Terenty and Vaska, who had -come from Moscow; and also his cousin the eldest princess, who had -been living on his estate at Elets and hearing of his rescue and -illness had come to look after him. - -It was only gradually during his convalescence that Pierre lost -the impressions he had become accustomed to during the last few months -and got used to the idea that no one would oblige him to go anywhere -tomorrow, that no one would deprive him of his warm bed, and that he -would be sure to get his dinner, tea, and supper. But for a long -time in his dreams he still saw himself in the conditions of -captivity. In the same way little by little he came to understand -the news he had been told after his rescue, about the death of -Prince Andrew, the death of his wife, and the destruction of the -French. - -A joyous feeling of freedom--that complete inalienable freedom -natural to man which he had first experienced at the first halt -outside Moscow--filled Pierre's soul during his convalescence. He -was surprised to find that this inner freedom, which was independent -of external conditions, now had as it were an additional setting of -external liberty. He was alone in a strange town, without -acquaintances. No one demanded anything of him or sent him anywhere. -He had all he wanted: the thought of his wife which had been a -continual torment to him was no longer there, since she was no more. - -"Oh, how good! How splendid!" said he to himself when a cleanly laid -table was moved up to him with savory beef tea, or when he lay down -for the night on a soft clean bed, or when he remembered that the -French had gone and that his wife was no more. "Oh, how good, how -splendid!" - -And by old habit he asked himself the question: "Well, and what -then? What am I going to do?" And he immediately gave himself the -answer: "Well, I shall live. Ah, how splendid!" - -The very question that had formerly tormented him, the thing he -had continually sought to find--the aim of life--no longer existed for -him now. That search for the aim of life had not merely disappeared -temporarily--he felt that it no longer existed for him and could not -present itself again. And this very absence of an aim gave him the -complete, joyous sense of freedom which constituted his happiness at -this time. - -He could not see an aim, for he now had faith--not faith in any kind -of rule, or words, or ideas, but faith in an ever-living, -ever-manifest God. Formerly he had sought Him in aims he set -himself. That search for an aim had been simply a search for God, -and suddenly in his captivity he had learned not by words or reasoning -but by direct feeling what his nurse had told him long ago: that God -is here and everywhere. In his captivity he had learned that in -Karataev God was greater, more infinite and unfathomable than in the -Architect of the Universe recognized by the Freemasons. He felt like a -man who after straining his eyes to see into the far distance finds -what he sought at his very feet. All his life he had looked over the -heads of the men around him, when he should have merely looked in -front of him without straining his eyes. - -In the past he had never been able to find that great inscrutable -infinite something. He had only felt that it must exist somewhere -and had looked for it. In everything near and comprehensible he had -only what was limited, petty, commonplace, and senseless. He had -equipped himself with a mental telescope and looked into remote space, -where petty worldliness hiding itself in misty distance had seemed -to him great and infinite merely because it was not clearly seen. -And such had European life, politics, Freemasonry, philosophy, and -philanthropy seemed to him. But even then, at moments of weakness as -he had accounted them, his mind had penetrated to those distances -and he had there seen the same pettiness, worldliness, and -senselessness. Now, however, he had learned to see the great, eternal, -and infinite in everything, and therefore--to see it and enjoy its -contemplation--he naturally threw away the telescope through which -he had till now gazed over men's heads, and gladly regarded the -ever-changing, eternally great, unfathomable, and infinite life around -him. And the closer he looked the more tranquil and happy he became. -That dreadful question, "What for?" which had formerly destroyed all -his mental edifices, no longer existed for him. To that question, -"What for?" a simple answer was now always ready in his soul: "Because -there is a God, that God without whose will not one hair falls from -a man's head." - - - - - -CHAPTER XIII - - -In external ways Pierre had hardly changed at all. In appearance -he was just what he used to be. As before he was absent-minded and -seemed occupied not with what was before his eyes but with something -special of his own. The difference between his former and present self -was that formerly when he did not grasp what lay before him or was -said to him, he had puckered his forehead painfully as if vainly -seeking to distinguish something at a distance. At present he still -forgot what was said to him and still did not see what was before -his eyes, but he now looked with a scarcely perceptible and -seemingly ironic smile at what was before him and listened to what was -said, though evidently seeing and hearing something quite different. -Formerly he had appeared to be a kindhearted but unhappy man, and so -people had been inclined to avoid him. Now a smile at the joy of -life always played round his lips, and sympathy for others, shone in -his eyes with a questioning look as to whether they were as -contented as he was, and people felt pleased by his presence. - -Previously he had talked a great deal, grew excited when he -talked, and seldom listened; now he was seldom carried away in -conversation and knew how to listen so that people readily told him -their most intimate secrets. - -The princess, who had never liked Pierre and had been particularly -hostile to him since she had felt herself under obligations to him -after the old count's death, now after staying a short time in Orel- -where she had come intending to show Pierre that in spite of his -ingratitude she considered it her duty to nurse him--felt to her -surprise and vexation that she had become fond of him. Pierre did -not in any way seek her approval, he merely studied her with interest. -Formerly she had felt that he regarded her with indifference and -irony, and so had shrunk into herself as she did with others and had -shown him only the combative side of her nature; but now he seemed -to be trying to understand the most intimate places of her heart, and, -mistrustfully at first but afterwards gratefully, she let him see -the hidden, kindly sides of her character. - -The most cunning man could not have crept into her confidence more -successfully, evoking memories of the best times of her youth and -showing sympathy with them. Yet Pierre's cunning consisted simply in -finding pleasure in drawing out the human qualities of the embittered, -hard, and (in her own way) proud princess. - -"Yes, he is a very, very kind man when he is not under the influence -of bad people but of people such as myself," thought she. - -His servants too--Terenty and Vaska--in their own way noticed the -change that had taken place in Pierre. They considered that he had -become much "simpler." Terenty, when he had helped him undress and -wished him good night, often lingered with his master's boots in his -hands and clothes over his arm, to see whether he would not start a -talk. And Pierre, noticing that Terenty wanted a chat, generally -kept him there. - -"Well, tell me... now, how did you get food?" he would ask. - -And Terenty would begin talking of the destruction of Moscow, and of -the old count, and would stand for a long time holding the clothes and -talking, or sometimes listening to Pierre's stories, and then would go -out into the hall with a pleasant sense of intimacy with his master -and affection for him. - -The doctor who attended Pierre and visited him every day, though -he considered it his duty as a doctor to pose as a man whose every -moment was of value to suffering humanity, would sit for hours with -Pierre telling him his favorite anecdotes and his observations on -the characters of his patients in general, and especially of the -ladies. - -"It's a pleasure to talk to a man like that; he is not like our -provincials," he would say. - -There were several prisoners from the French army in Orel, and the -doctor brought one of them, a young Italian, to see Pierre. - -This officer began visiting Pierre, and the princess used to make -fun of the tenderness the Italian expressed for him. - -The Italian seemed happy only when he could come to see Pierre, talk -with him, tell him about his past, his life at home, and his love, and -pour out to him his indignation against the French and especially -against Napoleon. - -"If all Russians are in the least like you, it is sacrilege to fight -such a nation," he said to Pierre. "You, who have suffered so from the -French, do not even feel animosity toward them." - -Pierre had evoked the passionate affection of the Italian merely -by evoking the best side of his nature and taking a pleasure in so -doing. - -During the last days of Pierre's stay in Orel his old Masonic -acquaintance Count Willarski, who had introduced him to the lodge in -1807, came to see him. Willarski was married to a Russian heiress -who had a large estate in Orel province, and he occupied a temporary -post in the commissariat department in that town. - -Hearing that Bezukhov was in Orel, Willarski, though they had -never been intimate, came to him with the professions of friendship -and intimacy that people who meet in a desert generally express for -one another. Willarski felt dull in Orel and was pleased to meet a man -of his own circle and, as he supposed, of similar interests. - -But to his surprise Willarski soon noticed that Pierre had lagged -much behind the times, and had sunk, as he expressed it to himself, -into apathy and egotism. - -"You are letting yourself go, my dear fellow," he said. - -But for all that Willarski found it pleasanter now than it had -been formerly to be with Pierre, and came to see him every day. To -Pierre as he looked at and listened to Willarski, it seemed strange to -think that he had been like that himself but a short time before. - -Willarski was a married man with a family, busy with his family -affairs, his wife's affairs, and his official duties. He regarded -all these occupations as hindrances to life, and considered that -they were all contemptible because their aim was the welfare of -himself and his family. Military, administrative, political, and -Masonic interests continually absorbed his attention. And Pierre, -without trying to change the other's views and without condemning him, -but with the quiet, joyful, and amused smile now habitual to him, -was interested in this strange though very familiar phenomenon. - -There was a new feature in Pierre's relations with Willarski, with -the princess, with the doctor, and with all the people he now met, -which gained for him the general good will. This was his -acknowledgment of the impossibility of changing a man's convictions by -words, and his recognition of the possibility of everyone thinking, -feeling, and seeing things each from his own point of view. This -legitimate peculiarity of each individual which used to excite and -irritate Pierre now became a basis of the sympathy he felt for, and -the interest he took in, other people. The difference, and sometimes -complete contradiction, between men's opinions and their lives, and -between one man and another, pleased him and drew from him an amused -and gentle smile. - -In practical matters Pierre unexpectedly felt within himself a -center of gravity he had previously lacked. Formerly all pecuniary -questions, especially requests for money to which, as an extremely -wealthy man, he was very exposed, produced in him a state of -hopeless agitation and perplexity. "To give or not to give?" he had -asked himself. "I have it and he needs it. But someone else needs it -still more. Who needs it most? And perhaps they are both impostors?" -In the old days he had been unable to find a way out of all these -surmises and had given to all who asked as long as he had anything -to give. Formerly he had been in a similar state of perplexity with -regard to every question concerning his property, when one person -advised one thing and another something else. - -Now to his surprise he found that he no longer felt either doubt -or perplexity about these questions. There was now within him a -judge who by some rule unknown to him decided what should or should -not be done. - -He was as indifferent as heretofore to money matters, but now he -felt certain of what ought and what ought not to be done. The first -time he had recourse to his new judge was when a French prisoner, a -colonel, came to him and, after talking a great deal about his -exploits, concluded by making what amounted to a demand that Pierre -should give him four thousand francs to send to his wife and children. -Pierre refused without the least difficulty or effort, and was -afterwards surprised how simple and easy had been what used to -appear so insurmountably difficult. At the same time that he refused -the colonel's demand he made up his mind that he must have recourse to -artifice when leaving Orel, to induce the Italian officer to accept -some money of which he was evidently in need. A further proof to -Pierre of his own more settled outlook on practical matters was -furnished by his decision with regard to his wife's debts and to the -rebuilding of his houses in and near Moscow. - -His head steward came to him at Orel and Pierre reckoned up with him -his diminished income. The burning of Moscow had cost him, according -to the head steward's calculation, about two million rubles. - -To console Pierre for these losses the head steward gave him an -estimate showing that despite these losses his income would not be -diminished but would even be increased if he refused to pay his wife's -debts which he was under no obligation to meet, and did not rebuild -his Moscow house and the country house on his Moscow estate, which had -cost him eighty thousand rubles a year and brought in nothing. - -"Yes, of course that's true," said Pierre with a cheerful smile. -"I don't need all that at all. By being ruined I have become much -richer." - -But in January Savelich came from Moscow and gave him an account -of the state of things there, and spoke of the estimate an architect -had made of the cost of rebuilding the town and country houses, -speaking of this as of a settled matter. About the same time he -received letters from Prince Vasili and other Petersburg acquaintances -speaking of his wife's debts. And Pierre decided that the steward's -proposals which had so pleased him were wrong and that he must go to -Petersburg and settle his wife's affairs and must rebuild in Moscow. -Why this was necessary he did not know, but he knew for certain that -it was necessary. His income would be reduced by three fourths, but he -felt it must be done. - -Willarski was going to Moscow and they agreed to travel together. - -During the whole time of his convalescence in Orel Pierre had -experienced a feeling of joy, freedom, and life; but when during his -journey he found himself in the open world and saw hundreds of new -faces, that feeling was intensified. Throughout his journey he felt -like a schoolboy on holiday. Everyone--the stagecoach driver, the -post-house overseers, the peasants on the roads and in the villages- -had a new significance for him. The presence and remarks of -Willarski who continually deplored the ignorance and poverty of Russia -and its backwardness compared with Europe only heightened Pierre's -pleasure. Where Willarski saw deadness Pierre saw an extraordinary -strength and vitality--the strength which in that vast space amid -the snows maintained the life of this original, peculiar, and unique -people. He did not contradict Willarski and even seemed to agree -with him--an apparent agreement being the simplest way to avoid -discussions that could lead to nothing--and he smiled joyfully as he -listened to him. - - - - - -CHAPTER XIV - - -It would be difficult to explain why and whither ants whose heap has -been destroyed are hurrying: some from the heap dragging bits of -rubbish, larvae, and corpses, others back to the heap, or why they -jostle, overtake one another, and fight, and it would be equally -difficult to explain what caused the Russians after the departure of -the French to throng to the place that had formerly been Moscow. But -when we watch the ants round their ruined heap, the tenacity, -energy, and immense number of the delving insects prove that despite -the destruction of the heap, something indestructible, which though -intangible is the real strength of the colony, still exists; and -similarly, though in Moscow in the month of October there was no -government no churches, shrines, riches, or houses--it was still the -Moscow it had been in August. All was destroyed, except something -intangible yet powerful and indestructible. - -The motives of those who thronged from all sides to Moscow after -it had been cleared of the enemy were most diverse and personal, and -at first for the most part savage and brutal. One motive only they all -had in common: a desire to get to the place that had been called -Moscow, to apply their activities there. - -Within a week Moscow already had fifteen thousand inhabitants, in -a fortnight twenty-five thousand, and so on. By the autumn of 1813 the -number, ever increasing and increasing, exceeded what it had been in -1812. - -The first Russians to enter Moscow were the Cossacks of -Wintzingerode's detachment, peasants from the adjacent villages, and -residents who had fled from Moscow and had been hiding in its -vicinity. The Russians who entered Moscow, finding it plundered, -plundered it in their turn. They continued what the French had -begun. Trains of peasant carts came to Moscow to carry off to the -villages what had been abandoned in the ruined houses and the streets. -The Cossacks carried off what they could to their camps, and the -householders seized all they could find in other houses and moved it -to their own, pretending that it was their property. - -But the first plunderers were followed by a second and a third -contingent, and with increasing numbers plundering became more and -more difficult and assumed more definite forms. - -The French found Moscow abandoned but with all the organizations -of regular life, with diverse branches of commerce and -craftsmanship, with luxury, and governmental and religious -institutions. These forms were lifeless but still existed. There -were bazaars, shops, warehouses, market stalls, granaries--for the -most part still stocked with goods--and there were factories and -workshops, palaces and wealthy houses filled with luxuries, hospitals, -prisons, government offices, churches, and cathedrals. The longer -the French remained the more these forms of town life perished, -until finally all was merged into one confused, lifeless scene of -plunder. - -The more the plundering by the French continued, the more both the -wealth of Moscow and the strength of its plunderers was destroyed. But -plundering by the Russians, with which the reoccupation of the city -began, had an opposite effect: the longer it continued and the greater -the number of people taking part in it the more rapidly was the wealth -of the city and its regular life restored. - -Besides the plunderers, very various people, some drawn by -curiosity, some by official duties, some by self-interest--house -owners, clergy, officials of all kinds, tradesmen, artisans, and -peasants--streamed into Moscow as blood flows to the heart. - -Within a week the peasants who came with empty carts to carry off -plunder were stopped by the authorities and made to cart the corpses -out of the town. Other peasants, having heard of their comrades' -discomfiture, came to town bringing rye, oats, and hay, and beat -down one another's prices to below what they had been in former -days. Gangs of carpenters hoping for high pay arrived in Moscow -every day, and on all sides logs were being hewn, new houses built, -and old, charred ones repaired. Tradesmen began trading in booths. -Cookshops and taverns were opened in partially burned houses. The -clergy resumed the services in many churches that had not been burned. -Donors contributed Church property that had been stolen. Government -clerks set up their baize-covered tables and their pigeonholes of -documents in small rooms. The higher authorities and the police -organized the distribution of goods left behind by the French. The -owners of houses in which much property had been left, brought there -from other houses, complained of the injustice of taking everything to -the Faceted Palace in the Kremlin; others insisted that as the -French had gathered things from different houses into this or that -house, it would be unfair to allow its owner to keep all that was -found there. They abused the police and bribed them, made out -estimates at ten times their value for government stores that had -perished in the fire, and demanded relief. And Count Rostopchin -wrote proclamations. - - - - - -CHAPTER XV - - -At the end of January Pierre went to Moscow and stayed in an annex -of his house which had not been burned. He called on Count -Rostopchin and on some acquaintances who were back in Moscow, and he -intended to leave for Petersburg two days later. Everybody was -celebrating the victory, everything was bubbling with life in the -ruined but reviving city. Everyone was pleased to see Pierre, everyone -wished to meet him, and everyone questioned him about what he had -seen. Pierre felt particularly well disposed toward them all, but -was now instinctively on his guard for fear of binding himself in -any way. To all questions put to him--whether important or quite -trifling--such as: Where would he live? Was he going to rebuild? -When was he going to Petersburg and would he mind taking a parcel -for someone?--he replied: "Yes, perhaps," or, "I think so," and so on. - -He had heard that the Rostovs were at Kostroma but the thought of -Natasha seldom occurred to him. If it did it was only as a pleasant -memory of the distant past. He felt himself not only free from -social obligations but also from that feeling which, it seemed to him, -he had aroused in himself. - -On the third day after his arrival he heard from the Drubetskoys -that Princess Mary was in Moscow. The death, sufferings, and last days -of Prince Andrew had often occupied Pierre's thoughts and now recurred -to him with fresh vividness. Having heard at dinner that Princess Mary -was in Moscow and living in her house--which had not been burned--in -Vozdvizhenka Street, he drove that same evening to see her. - -On his way to the house Pierre kept thinking of Prince Andrew, of -their friendship, of his various meetings with him, and especially -of the last one at Borodino. - -"Is it possible that he died in the bitter frame of mind he was then -in? Is it possible that the meaning of life was not disclosed to him -before he died?" thought Pierre. He recalled Karataev and his death -and involuntarily began to compare these two men, so different, and -yet so similar in that they had both lived and both died and in the -love he felt for both of them. - -Pierre drove up to the house of the old prince in a most serious -mood. The house had escaped the fire; it showed signs of damage but -its general aspect was unchanged. The old footman, who met Pierre with -a stern face as if wishing to make the visitor feel that the absence -of the old prince had not disturbed the order of things in the -house, informed him that the princess had gone to her own -apartments, and that she received on Sundays. - -"Announce me. Perhaps she will see me," said Pierre. - -"Yes, sir," said the man. "Please step into the portrait gallery." - -A few minutes later the footman returned with Dessalles, who brought -word from the princess that she would be very glad to see Pierre if he -would excuse her want of ceremony and come upstairs to her apartment. - -In a rather low room lit by one candle sat the princess and with her -another person dressed in black. Pierre remembered that the princess -always had lady companions, but who they were and what they were -like he never knew or remembered. "This must be one of her -companions," he thought, glancing at the lady in the black dress. - -The princess rose quickly to meet him and held out her hand. - -"Yes," she said, looking at his altered face after he had kissed her -hand, "so this is how we meet again. He spoke of you even at the -very last," she went on, turning her eyes from Pierre to her companion -with a shyness that surprised him for an instant. - -"I was so glad to hear of your safety. It was the first piece of -good news we had received for a long time." - -Again the princess glanced round at her companion with even more -uneasiness in her manner and was about to add something, but Pierre -interrupted her. - -"Just imagine--I knew nothing about him!" said he. "I thought he had -been killed. All I know I heard at second hand from others. I only -know that he fell in with the Rostovs.... What a strange coincidence!" - -Pierre spoke rapidly and with animation. He glanced once at the -companion's face, saw her attentive and kindly gaze fixed on him, and, -as often happens when one is talking, felt somehow that this companion -in the black dress was a good, kind, excellent creature who would -not hinder his conversing freely with Princess Mary. - -But when he mentioned the Rostovs, Princess Mary's face expressed -still greater embarrassment. She again glanced rapidly from Pierre's -face to that of the lady in the black dress and said: - -"Do you really not recognize her?" - -Pierre looked again at the companion's pale, delicate face with -its black eyes and peculiar mouth, and something near to him, long -forgotten and more than sweet, looked at him from those attentive -eyes. - -"But no, it can't be!" he thought. "This stern, thin, pale face that -looks so much older! It cannot be she. It merely reminds me of her." -But at that moment Princess Mary said, "Natasha!" And with difficulty, -effort, and stress, like the opening of a door grown rusty on its -hinges, a smile appeared on the face with the attentive eyes, and from -that opening door came a breath of fragrance which suffused Pierre -with a happiness he had long forgotten and of which he had not even -been thinking--especially at that moment. It suffused him, seized him, -and enveloped him completely. When she smiled doubt was no longer -possible, it was Natasha and he loved her. - -At that moment Pierre involuntarily betrayed to her, to Princess -Mary, and above all to himself, a secret of which he himself had -been unaware. He flushed joyfully yet with painful distress. He -tried to hide his agitation. But the more he tried to hide it the more -clearly--clearer than any words could have done--did he betray to -himself, to her, and to Princess Mary that he loved her. - -"No, it's only the unexpectedness of it," thought Pierre. But as -soon as he tried to continue the conversation he had begun with -Princess Mary he again glanced at Natasha, and a still-deeper flush -suffused his face and a still-stronger agitation of mingled joy and -fear seized his soul. He became confused in his speech and stopped -in the middle of what he was saying. - -Pierre had failed to notice Natasha because he did not at all expect -to see her there, but he had failed to recognize her because the -change in her since he last saw her was immense. She had grown thin -and pale, but that was not what made her unrecognizable; she was -unrecognizable at the moment he entered because on that face whose -eyes had always shone with a suppressed smile of the joy of life, -now when he first entered and glanced at her there was not the least -shadow of a smile: only her eyes were kindly attentive and sadly -interrogative. - -Pierre's confusion was not reflected by any confusion on Natasha's -part, but only by the pleasure that just perceptibly lit up her -whole face. - - - - - -CHAPTER XVI - - -"She has come to stay with me," said Princess Mary. "The count and -countess will be here in a few days. The countess is in a dreadful -state; but it was necessary for Natasha herself to see a doctor. -They insisted on her coming with me." - -"Yes, is there a family free from sorrow now?" said Pierre, -addressing Natasha. "You know it happened the very day we were -rescued. I saw him. What a delightful boy he was!" - -Natasha looked at him, and by way of answer to his words her eyes -widened and lit up. - -"What can one say or think of as a consolation?" said Pierre. -"Nothing! Why had such a splendid boy, so full of life, to die?" - -"Yes, in these days it would be hard to live without faith..." -remarked Princess Mary. - -"Yes, yes, that is really true," Pierre hastily interrupted her. - -"Why is it true?" Natasha asked, looking attentively into Pierre's -eyes. - -"How can you ask why?" said Princess Mary. "The thought alone of -what awaits..." - -Natasha without waiting for Princess Mary to finish again looked -inquiringly at Pierre. - -"And because," Pierre continued, "only one who believes that there -is a God ruling us can bear a loss such as hers and... yours." - -Natasha had already opened her mouth to speak but suddenly -stopped. Pierre hurriedly turned away from her and again addressed -Princess Mary, asking about his friend's last days. - -Pierre's confusion had now almost vanished, but at the same time -he felt that his freedom had also completely gone. He felt that -there was now a judge of his every word and action whose judgment -mattered more to him than that of all the rest of the world. As he -spoke now he was considering what impression his words would make on -Natasha. He did not purposely say things to please her, but whatever -he was saying he regarded from her standpoint. - -Princess Mary--reluctantly as is usual in such cases--began -telling of the condition in which she had found Prince Andrew. But -Pierre's face quivering with emotion, his questions and his eager -restless expression, gradually compelled her to go into details -which she feared to recall for her own sake. - -"Yes, yes, and so...?" Pierre kept saying as he leaned toward her -with his whole body and eagerly listened to her story. "Yes, yes... so -he grew tranquil and softened? With all his soul he had always -sought one thing--to be perfectly good--so he could not be afraid of -death. The faults he had--if he had any--were not of his making. So he -did soften?... What a happy thing that he saw you again," he added, -suddenly turning to Natasha and looking at her with eyes full of -tears. - -Natasha's face twitched. She frowned and lowered her eyes for a -moment. She hesitated for an instant whether to speak or not. - -"Yes, that was happiness," she then said in her quiet voice with its -deep chest notes. "For me it certainly was happiness." She paused. -"And he... he... he said he was wishing for it at the very moment I -entered the room...." - -Natasha's voice broke. She blushed, pressed her clasped hands on her -knees, and then controlling herself with an evident effort lifted -her head and began to speak rapidly. - -"We knew nothing of it when we started from Moscow. I did not dare -to ask about him. Then suddenly Sonya told me he was traveling with -us. I had no idea and could not imagine what state he was in, all I -wanted was to see him and be with him," she said, trembling, and -breathing quickly. - -And not letting them interrupt her she went on to tell what she -had never yet mentioned to anyone--all she had lived through during -those three weeks of their journey and life at Yaroslavl. - -Pierre listened to her with lips parted and eyes fixed upon her full -of tears. As he listened he did not think of Prince Andrew, nor of -death, nor of what she was telling. He listened to her and felt only -pity for her, for what she was suffering now while she was speaking. - -Princess Mary, frowning in her effort to hold back her tears, sat -beside Natasha, and heard for the first time the story of those last -days of her brother's and Natasha's love. - -Evidently Natasha needed to tell that painful yet joyful tale. - -She spoke, mingling most trifling details with the intimate -secrets of her soul, and it seemed as if she could never finish. -Several times she repeated the same thing twice. - -Dessalles' voice was heard outside the door asking whether little -Nicholas might come in to say good night. - -"Well, that's all--everything," said Natasha. - -She got up quickly just as Nicholas entered, almost ran to the -door which was hidden by curtains, struck her head against it, and -rushed from the room with a moan either of pain or sorrow. - -Pierre gazed at the door through which she had disappeared and did -not understand why he suddenly felt all alone in the world. - -Princess Mary roused him from his abstraction by drawing his -attention to her nephew who had entered the room. - -At that moment of emotional tenderness young Nicholas' face, which -resembled his father's, affected Pierre so much that when he had -kissed the boy he got up quickly, took out his handkerchief, and -went to the window. He wished to take leave of Princess Mary, but -she would not let him go. - -"No, Natasha and I sometimes don't go to sleep till after two, so -please don't go. I will order supper. Go downstairs, we will come -immediately." - -Before Pierre left the room Princess Mary told him: "This is the -first time she has talked of him like that." - - - - - -CHAPTER XVII - - -Pierre was shown into the large, brightly lit dining room; a few -minutes later he heard footsteps and Princess Mary entered with -Natasha. Natasha was calm, though a severe and grave expression had -again settled on her face. They all three of them now experienced that -feeling of awkwardness which usually follows after a serious and -heartfelt talk. It is impossible to go back to the same -conversation, to talk of trifles is awkward, and yet the desire to -speak is there and silence seems like affectation. They went -silently to table. The footmen drew back the chairs and pushed them up -again. Pierre unfolded his cold table napkin and, resolving to break -the silence, looked at Natasha and at Princess Mary. They had -evidently both formed the same resolution; the eyes of both shone with -satisfaction and a confession that besides sorrow life also has joy. - -"Do you take vodka, Count?" asked Princess Mary, and those words -suddenly banished the shadows of the past. "Now tell us about -yourself," said she. "One hears such improbable wonders about you." - -"Yes," replied Pierre with the smile of mild irony now habitual to -him. "They even tell me wonders I myself never dreamed of! Mary -Abramovna invited me to her house and kept telling me what had -happened, or ought to have happened, to me. Stepan Stepanych also -instructed me how I ought to tell of my experiences. In general I have -noticed that it is very easy to be an interesting man (I am an -interesting man now); people invite me out and tell me all about -myself." - -Natasha smiled and was on the point of speaking. - -"We have been told," Princess Mary interrupted her, "that you lost -two millions in Moscow. Is that true?" - -"But I am three times as rich as before," returned Pierre. - -Though the position was now altered by his decision to pay his -wife's debts and to rebuild his houses, Pierre still maintained that -he had become three times as rich as before. - -"What I have certainly gained is freedom," he began seriously, but -did not continue, noticing that this theme was too egotistic. - -"And are you building?" - -"Yes. Savelich says I must!" - -"Tell me, you did not know of the countess' death when you decided -to remain in Moscow?" asked Princess Mary and immediately blushed, -noticing that her question, following his mention of freedom, ascribed -to his words a meaning he had perhaps not intended. - -"No," answered Pierre, evidently not considering awkward the meaning -Princess Mary had given to his words. "I heard of it in Orel and you -cannot imagine how it shocked me. We were not an exemplary couple," he -added quickly, glancing at Natasha and noticing on her face -curiosity as to how he would speak of his wife, "but her death shocked -me terribly. When two people quarrel they are always both in fault, -and one's own guilt suddenly becomes terribly serious when the other -is no longer alive. And then such a death... without friends and -without consolation! I am very, very sorry for her," he concluded, and -was pleased to notice a look of glad approval on Natasha's face. - -"Yes, and so you are once more an eligible bachelor," said -Princess Mary. - -Pierre suddenly flushed crimson and for a long time tried not to -look at Natasha. When he ventured to glance her way again her face was -cold, stern, and he fancied even contemptuous. - -"And did you really see and speak to Napoleon, as we have been -told?" said Princess Mary. - -Pierre laughed. - -"No, not once! Everybody seems to imagine that being taken -prisoner means being Napoleon's guest. Not only did I never see him -but I heard nothing about him--I was in much lower company!" - -Supper was over, and Pierre who at first declined to speak about his -captivity was gradually led on to do so. - -"But it's true that you remained in Moscow to kill Napoleon?" -Natasha asked with a slight smile. "I guessed it then when we met at -the Sukharev tower, do you remember?" - -Pierre admitted that it was true, and from that was gradually led by -Princess Mary's questions and especially by Natasha's into giving a -detailed account of his adventures. - -At first he spoke with the amused and mild irony now customary -with him toward everybody and especially toward himself, but when he -came to describe the horrors and sufferings he had witnessed he was -unconsciously carried away and began speaking with the suppressed -emotion of a man re-experiencing in recollection strong impressions he -has lived through. - -Princess Mary with a gentle smile looked now at Pierre and now at -Natasha. In the whole narrative she saw only Pierre and his -goodness. Natasha, leaning on her elbow, the expression of her face -constantly changing with the narrative, watched Pierre with an -attention that never wandered--evidently herself experiencing all that -he described. Not only her look, but her exclamations and the brief -questions she put, showed Pierre that she understood just what he -wished to convey. It was clear that she understood not only what he -said but also what he wished to, but could not, express in words. -The account Pierre gave of the incident with the child and the woman -for protecting whom he was arrested was this: "It was an awful -sight--children abandoned, some in the flames... One was snatched -out before my eyes... and there were women who had their things -snatched off and their earrings torn out..." he flushed and grew -confused. "Then a patrol arrived and all the men--all those who were - -not looting, that is--were arrested, and I among them." - -"I am sure you're not telling us everything; I am sure you did -something..." said Natasha and pausing added, "something fine?" - -Pierre continued. When he spoke of the execution he wanted to pass -over the horrible details, but Natasha insisted that he should not -omit anything. - -Pierre began to tell about Karataev, but paused. By this time he had -risen from the table and was pacing the room, Natasha following him -with her eyes. Then he added: - -"No, you can't understand what I learned from that illiterate man- -that simple fellow." - -"Yes, yes, go on!" said Natasha. "Where is he?" - -"They killed him almost before my eyes." - -And Pierre, his voice trembling continually, went on to tell of -the last days of their retreat, of Karataev's illness and his death. - -He told of his adventures as he had never yet recalled them. He now, -as it were, saw a new meaning in all he had gone through. Now that -he was telling it all to Natasha he experienced that pleasure which -a man has when women listen to him--not clever women who when -listening either try to remember what they hear to enrich their -minds and when opportunity offers to retell it, or who wish to adopt -it to some thought of their own and promptly contribute their own -clever comments prepared in their little mental workshop--but the -pleasure given by real women gifted with a capacity to select and -absorb the very best a man shows of himself. Natasha without knowing -it was all attention: she did not lose a word, no single quiver in -Pierre's voice, no look, no twitch of a muscle in his face, nor a -single gesture. She caught the unfinished word in its flight and -took it straight into her open heart, divining the secret meaning of -all Pierre's mental travail. - -Princess Mary understood his story and sympathized with him, but she -now saw something else that absorbed all her attention. She saw the -possibility of love and happiness between Natasha and Pierre, and -the first thought of this filled her heart with gladness. - -It was three o'clock in the morning. The footmen came in with sad -and stern faces to change the candles, but no one noticed them. - -Pierre finished his story. Natasha continued to look at him intently -with bright, attentive, and animated eyes, as if trying to -understand something more which he had perhaps left untold. Pierre -in shamefaced and happy confusion glanced occasionally at her, and -tried to think what to say next to introduce a fresh subject. Princess -Mary was silent. It occurred to none of them that it was three o'clock -and time to go to bed. - -"People speak of misfortunes and sufferings," remarked Pierre, -"but if at this moment I were asked: 'Would you rather be what you -were before you were taken prisoner, or go through all this again?' -then for heaven's sake let me again have captivity and horseflesh! -We imagine that when we are thrown out of our usual ruts all is -lost, but it is only then that what is new and good begins. While -there is life there is happiness. There is much, much before us. I say -this to you," he added, turning to Natasha. - -"Yes, yes," she said, answering something quite different. "I too -should wish nothing but to relive it all from the beginning." - -Pierre looked intently at her. - -"Yes, and nothing more." said Natasha. - -"It's not true, not true!" cried Pierre. "I am not to blame for -being alive and wishing to live--nor you either." - -Suddenly Natasha bent her head, covered her face with her hands, and -began to cry. - -"What is it, Natasha?" said Princess Mary. - -"Nothing, nothing." She smiled at Pierre through her tears. "Good -night! It is time for bed." - -Pierre rose and took his leave. - - -Princess Mary and Natasha met as usual in the bedroom. They talked -of what Pierre had told them. Princess Mary did not express her -opinion of Pierre nor did Natasha speak of him. - -"Well, good night, Mary!" said Natasha. "Do you know, I am often -afraid that by not speaking of him" (she meant Prince Andrew) "for -fear of not doing justice to our feelings, we forget him." - -Princess Mary sighed deeply and thereby acknowledged the justice -of Natasha's remark, but she did not express agreement in words. - -"Is it possible to forget?" said she. - -"It did me so much good to tell all about it today. It was hard -and painful, but good, very good!" said Natasha. "I am sure he -really loved him. That is why I told him... Was it all right?" she -added, suddenly blushing. - -"To tell Pierre? Oh, yes. What a splendid man he is!" said -Princess Mary. - -"Do you know, Mary..." Natasha suddenly said with a mischievous -smile such as Princess Mary had not seen on her face for a long -time, "he has somehow grown so clean, smooth, and fresh--as if he -had just come out of a Russian bath; do you understand? Out of a moral -bath. Isn't it true?" - -"Yes," replied Princess Mary. "He has greatly improved." - -"With a short coat and his hair cropped; just as if, well, just as -if he had come straight from the bath... Papa used to..." - -"I understand why he" (Prince Andrew) "liked no one so much as him," -said Princess Mary. - -"Yes, and yet he is quite different. They say men are friends when -they are quite different. That must be true. Really he is quite unlike -him--in everything." - -"Yes, but he's wonderful." - -"Well, good night," said Natasha. - -And the same mischievous smile lingered for a long time on her -face as if it had been forgotten there. - - - - -CHAPTER XVIII - - -It was a long time before Pierre could fall asleep that night. He -paced up and down his room, now turning his thoughts on a difficult -problem and frowning, now suddenly shrugging his shoulders and -wincing, and now smiling happily. - -He was thinking of Prince Andrew, of Natasha, and of their love, -at one moment jealous of her past, then reproaching himself for that -feeling. It was already six in the morning and he still paced up and -down the room. - -"Well, what's to be done if it cannot be avoided? What's to be done? -Evidently it has to be so," said he to himself, and hastily undressing -he got into bed, happy and agitated but free from hesitation or -indecision. - -"Strange and impossible as such happiness seems, I must do -everything that she and I may be man and wife," he told himself. - -A few days previously Pierre had decided to go to Petersburg on -the Friday. When he awoke on the Thursday, Savelich came to ask him -about packing for the journey. - -"What, to Petersburg? What is Petersburg? Who is there in -Petersburg?" he asked involuntarily, though only to himself. "Oh, yes, -long ago before this happened I did for some reason mean to go to -Petersburg," he reflected. "Why? But perhaps I shall go. What a good -fellow he is and how attentive, and how he remembers everything," he -thought, looking at Savelich's old face, "and what a pleasant smile he -has!" - -"Well, Savelich, do you still not wish to accept your freedom?" -Pierre asked him. - -"What's the good of freedom to me, your excellency? We lived under -the late count--the kingdom of heaven be his!--and we have lived under -you too, without ever being wronged." - -"And your children?" - -"The children will live just the same. With such masters one can -live." - -"But what about my heirs?" said Pierre. "Supposing I suddenly -marry... it might happen," he added with an involuntary smile. - -"If I may take the liberty, your excellency, it would be a good -thing." - -"How easy he thinks it," thought Pierre. "He doesn't know how -terrible it is and how dangerous. Too soon or too late... it is -terrible!" - -"So what are your orders? Are you starting tomorrow?" asked -Savelich. - -"No, I'll put it off for a bit. I'll tell you later. You must -forgive the trouble I have put you to," said Pierre, and seeing -Savelich smile, he thought: "But how strange it is that he should -not know that now there is no Petersburg for me, and that that must be -settled first of all! But probably he knows it well enough and is only -pretending. Shall I have a talk with him and see what he thinks?" -Pierre reflected. "No, another time." - -At breakfast Pierre told the princess, his cousin, that he had -been to see Princess Mary the day before and had there met--"Whom do -you think? Natasha Rostova!" - -The princess seemed to see nothing more extraordinary in that than -if he had seen Anna Semenovna. - -"Do you know her?" asked Pierre. - -"I have seen the princess," she replied. "I heard that they were -arranging a match for her with young Rostov. It would be a very good -thing for the Rostovs, they are said to be utterly ruined." - -"No; I mean do you know Natasha Rostova?" - -"I heard about that affair of hers at the time. It was a great -pity." - -"No, she either doesn't understand or is pretending," thought -Pierre. "Better not say anything to her either." - -The princess too had prepared provisions for Pierre's journey. - -"How kind they all are," thought Pierre. "What is surprising is that -they should trouble about these things now when it can no longer be of -interest to them. And all for me!" - -On the same day the Chief of Police came to Pierre, inviting him -to send a representative to the Faceted Palace to recover things -that were to be returned to their owners that day. - -"And this man too," thought Pierre, looking into the face of the -Chief of Police. "What a fine, good-looking officer and how kind. -Fancy bothering about such trifies now! And they actually say he is -not honest and takes bribes. What nonsense! Besides, why shouldn't -he take bribes? That's the way he was brought up, and everybody does -it. But what a kind, pleasant face and how he smiles as he looks at -me." - -Pierre went to Princess Mary's to dinner. - -As he drove through the streets past the houses that had been burned -down, he was surprised by the beauty of those ruins. The -picturesqueness of the chimney stacks and tumble-down walls of the -burned-out quarters of the town, stretching out and concealing one -another, reminded him of the Rhine and the Colosseum. The cabmen he -met and their passengers, the carpenters cutting the timber for new -houses with axes, the women hawkers, and the shopkeepers, all looked -at him with cheerful beaming eyes that seemed to say: "Ah, there he -is! Let's see what will come of it!" - -At the entrance to Princess Mary's house Pierre felt doubtful -whether he had really been there the night before and really seen -Natasha and talked to her. "Perhaps I imagined it; perhaps I shall -go in and find no one there." But he had hardly entered the room -before he felt her presence with his whole being by the loss of his -sense of freedom. She was in the same black dress with soft folds -and her hair was done the same way as the day before, yet she was -quite different. Had she been like this when he entered the day before -he could not for a moment have failed to recognize her. - -She was as he had known her almost as a child and later on as Prince -Andrew's fiancee. A bright questioning light shone in her eyes, and on -her face was a friendly and strangely roguish expression. - -Pierre dined with them and would have spent the whole evening there, -but Princess Mary was going to vespers and Pierre left the house -with her. - -Next day he came early, dined, and stayed the whole evening. -Though Princess Mary and Natasha were evidently glad to see their -visitor and though all Pierre's interest was now centered in that -house, by the evening they had talked over everything and the -conversation passed from one trivial topic to another and repeatedly -broke off. He stayed so long that Princess Mary and Natasha -exchanged glances, evidently wondering when he would go. Pierre -noticed this but could not go. He felt uneasy and embarrassed, but sat -on because he simply could not get up and take his leave. - -Princess Mary, foreseeing no end to this, rose first, and -complaining of a headache began to say good night. - -"So you are going to Petersburg tomorrow?" she asked. - -"No, I am not going," Pierre replied hastily, in a surprised tone -and as though offended. "Yes... no... to Petersburg? Tomorrow--but I -won't say good-by yet. I will call round in case you have any -commissions for me," said he, standing before Princess Mary and -turning red, but not taking his departure. - -Natasha gave him her hand and went out. Princess Mary on the other -hand instead of going away sank into an armchair, and looked sternly -and intently at him with her deep, radiant eyes. The weariness she had -plainly shown before had now quite passed off. With a deep and -long-drawn sigh she seemed to be prepared for a lengthy talk. - -When Natasha left the room Pierre's confusion and awkwardness -immediately vanished and were replaced by eager excitement. He quickly -moved an armchair toward Princess Mary. - -"Yes, I wanted to tell you," said he, answering her look as if she -had spoken. "Princess, help me! What am I to do? Can I hope? Princess, -my dear friend, listen! I know it all. I know I am not worthy of -her, I know it's impossible to speak of it now. But I want to be a -brother to her. No, not that, I don't, I can't..." - -He paused and rubbed his face and eyes with his hands. - -"Well," he went on with an evident effort at self-control and -coherence. "I don't know when I began to love her, but I have loved -her and her alone all my life, and I love her so that I cannot imagine -life without her. I cannot propose to her at present, but the -thought that perhaps she might someday be my wife and that I may be -missing that possibility... that possibility... is terrible. Tell -me, can I hope? Tell me what I am to do, dear princess!" he added -after a pause, and touched her hand as she did not reply. - -"I am thinking of what you have told me," answered Princess Mary. -"This is what I will say. You are right that to speak to her of love -at present..." - -Princess Mary stopped. She was going to say that to speak of love -was impossible, but she stopped because she had seen by the sudden -change in Natasha two days before that she would not only not be -hurt if Pierre spoke of his love, but that it was the very thing she -wished for. - -"To speak to her now wouldn't do," said the princess all the same. - -"But what am I to do?" - -"Leave it to me," said Princess Mary. "I know..." - -Pierre was looking into Princess Mary's eyes. - -"Well?... Well?..." he said. - -"I know that she loves... will love you," Princess Mary corrected -herself. - -Before her words were out, Pierre had sprung up and with a -frightened expression seized Princess Mary's hand. - -"What makes you think so? You think I may hope? You think...?" - -"Yes, I think so," said Princess Mary with a smile. "Write to her -parents, and leave it to me. I will tell her when I can. I wish it -to happen and my heart tells me it will." - -"No, it cannot be! How happy I am! But it can't be.... How happy I -am! No, it can't be!" Pierre kept saying as he kissed Princess -Mary's hands. - -"Go to Petersburg, that will be best. And I will write to you," -she said. - -"To Petersburg? Go there? Very well, I'll go. But I may come again -tomorrow?" - -Next day Pierre came to say good-by. Natasha was less animated -than she had been the day before; but that day as he looked at her -Pierre sometimes felt as if he was vanishing and that neither he nor -she existed any longer, that nothing existed but happiness. "Is it -possible? No, it can't be," he told himself at every look, gesture, -and word that filled his soul with joy. - -When on saying good-by he took her thin, slender hand, he could -not help holding it a little longer in his own. - -"Is it possible that this hand, that face, those eyes, all this -treasure of feminine charm so strange to me now, is it possible that -it will one day be mine forever, as familiar to me as I am to -myself?... No, that's impossible!..." - -"Good-by, Count," she said aloud. "I shall look forward very much to -your return," she added in a whisper. - -And these simple words, her look, and the expression on her face -which accompanied them, formed for two months the subject of -inexhaustible memories, interpretations, and happy meditations for -Pierre. "'I shall look forward very much to your return....' Yes, yes, -how did she say it? Yes, 'I shall look forward very much to your -return.' Oh, how happy I am! What is happening to me? How happy I am!" -said Pierre to himself. - - - - - -CHAPTER XIX - - -There was nothing in Pierre's soul now at all like what had troubled -it during his courtship of Helene. - -He did not repeat to himself with a sickening feeling of shame the -words he had spoken, or say: "Oh, why did I not say that?" and, -"Whatever made me say 'Je vous aime'?" On the contrary, he now -repeated in imagination every word that he or Natasha had spoken and -pictured every detail of her face and smile, and did not wish to -diminish or add anything, but only to repeat it again and again. There -was now not a shadow of doubt in his mind as to whether what he had -undertaken was right or wrong. Only one terrible doubt sometimes -crossed his mind: "Wasn't it all a dream? Isn't Princess Mary -mistaken? Am I not too conceited and self-confident? I believe all -this--and suddenly Princess Mary will tell her, and she will be sure -to smile and say: 'How strange! He must be deluding himself. Doesn't -he know that he is a man, just a man, while I...? I am something -altogether different and higher.'" - -That was the only doubt often troubling Pierre. He did not now -make any plans. The happiness before him appeared so inconceivable -that if only he could attain it, it would be the end of all things. -Everything ended with that. - -A joyful, unexpected frenzy, of which he had thought himself -incapable, possessed him. The whole meaning of life--not for him alone -but for the whole world--seemed to him centered in his love and the -possibility of being loved by her. At times everybody seemed to him to -be occupied with one thing only--his future happiness. Sometimes it -seemed to him that other people were all as pleased as he was -himself and merely tried to hide that pleasure by pretending to be -busy with other interests. In every word and gesture he saw -allusions to his happiness. He often surprised those he met by his -significantly happy looks and smiles which seemed to express a -secret understanding between him and them. And when he realized that -people might not be aware of his happiness, he pitied them with his -whole heart and felt a desire somehow to explain to them that all that -occupied them was a mere frivolous trifle unworthy of attention. - -When it was suggested to him that he should enter the civil service, -or when the war or any general political affairs were discussed on the -assumption that everybody's welfare depended on this or that issue -of events, he would listen with a mild and pitying smile and -surprise people by his strange comments. But at this time he saw -everybody--both those who, as he imagined, understood the real meaning -of life (that is, what he was feeling) and those unfortunates who -evidently did not understand it--in the bright light of the emotion -that shone within himself, and at once without any effort saw in -everyone he met everything that was good and worthy of being loved. - -When dealing with the affairs and papers of his dead wife, her -memory aroused in him no feeling but pity that she had not known the -bliss he now knew. Prince Vasili, who having obtained a new post and -some fresh decorations was particularly proud at this time, seemed -to him a pathetic, kindly old man much to be pitied. - -Often in afterlife Pierre recalled this period of blissful insanity. -All the views he formed of men and circumstances at this time remained -true for him always. He not only did not renounce them subsequently, -but when he was in doubt or inwardly at variance, he referred to the -views he had held at this time of his madness and they always proved -correct. - -"I may have appeared strange and queer then," he thought, "but I was -not so mad as I seemed. On the contrary I was then wiser and had -more insight than at any other time, and understood all that is -worth understanding in life, because... because I was happy." - -Pierre's insanity consisted in not waiting, as he used to do, to -discover personal attributes which he termed "good qualities" in -people before loving them; his heart was now overflowing with love, -and by loving people without cause he discovered indubitable causes -for loving them. - - - - - -CHAPTER XX - - -After Pierre's departure that first evening, when Natasha had said -to Princess Mary with a gaily mocking smile: "He looks just, yes, just -as if he had come out of a Russian bath--in a short coat and with -his hair cropped," something hidden and unknown to herself, but -irrepressible, awoke in Natasha's soul. - -Everything: her face, walk, look, and voice, was suddenly altered. -To her own surprise a power of life and hope of happiness rose to -the surface and demanded satisfaction. From that evening she seemed to -have forgotten all that had happened to her. She no longer -complained of her position, did not say a word about the past, and -no longer feared to make happy plans for the future. She spoke -little of Pierre, but when Princess Mary mentioned him a -long-extinguished light once more kindled in her eyes and her lips -curved with a strange smile. - -The change that took place in Natasha at first surprised Princess -Mary; but when she understood its meaning it grieved her. "Can she -have loved my brother so little as to be able to forget him so -soon?" she thought when she reflected on the change. But when she -was with Natasha she was not vexed with her and did not reproach -her. The reawakened power of life that had seized Natasha was so -evidently irrepressible and unexpected by her that in her presence -Princess Mary felt that she had no right to reproach her even in her -heart. - - Natasha gave herself up so fully and frankly to this new feeling -that she did not try to hide the fact that she was no longer sad, -but bright and cheerful. - -When Princess Mary returned to her room after her nocturnal talk -with Pierre, Natasha met her on the threshold. - -"He has spoken? Yes? He has spoken?" she repeated. - -And a joyful yet pathetic expression which seemed to beg forgiveness -for her joy settled on Natasha's face. - -"I wanted to listen at the door, but I knew you would tell me." - -Understandable and touching as the look with which Natasha gazed -at her seemed to Princess Mary, and sorry as she was to see her -agitation, these words pained her for a moment. She remembered her -brother and his love. - -"But what's to be done? She can't help it," thought the princess. - -And with a sad and rather stern look she told Natasha all that -Pierre had said. On hearing that he was going to Petersburg Natasha -was astounded. - -"To Petersburg!" she repeated as if unable to understand. - -But noticing the grieved expression on Princess Mary's face she -guessed the reason of that sadness and suddenly began to cry. - -"Mary," said she, "tell me what I should do! I am afraid of being -bad. Whatever you tell me, I will do. Tell me...." - -"You love him?" - -"Yes," whispered Natasha. - -"Then why are you crying? I am happy for your sake," said Princess -Mary, who because of those tears quite forgave Natasha's joy. - -"It won't be just yet--someday. Think what fun it will be when I -am his wife and you marry Nicholas!" - -"Natasha, I have asked you not to speak of that. Let us talk about -you." - -They were silent awhile. - -"But why go to Petersburg?" Natasha suddenly asked, and hastily -replied to her own question. "But no, no, he must... Yes, Mary, He -must...." - - - - - - -FIRST EPILOGUE: 1813 --20 - - - - - -CHAPTER I - - -Seven years had passed. The storm-tossed sea of European history had -subsided within its shores and seemed to have become calm. But the -mysterious forces that move humanity (mysterious because the laws of -their motion are unknown to us) continued to operate. - -Though the surface of the sea of history seemed motionless, the -movement of humanity went on as unceasingly as the flow of time. -Various groups of people formed and dissolved, the coming formation -and dissolution of kingdoms and displacement of peoples was in -course of preparation. - -The sea of history was not driven spasmodically from shore to -shore as previously. It was seething in its depths. Historic figures -were not borne by the waves from one shore to another as before. -They now seemed to rotate on one spot. The historical figures at the -head of armies, who formerly reflected the movement of the masses by -ordering wars, campaigns, and battles, now reflected the restless -movement by political and diplomatic combinations, laws, and treaties. - -The historians call this activity of the historical figures "the -reaction." - -In dealing with this period they sternly condemn the historical -personages who, in their opinion, caused what they describe as the -reaction. All the well-known people of that period, from Alexander and -Napoleon to Madame de Stael, Photius, Schelling, Fichte, -Chateaubriand, and the rest, pass before their stern judgment seat and -are acquitted or condemned according to whether they conduced to -progress or to reaction. - -According to their accounts a reaction took place at that time in -Russia also, and the chief culprit was Alexander I, the same man who -according to them was the chief cause of the liberal movement at the -commencement of his reign, being the savior of Russia. - -There is no one in Russian literature now, from schoolboy essayist -to learned historian, who does not throw his little stone at Alexander -for things he did wrong at this period of his reign. - -"He ought to have acted in this way and in that way. In this case he -did well and in that case badly. He behaved admirably at the beginning -of his reign and during 1812, but acted badly by giving a constitution -to Poland, forming the Holy Alliance, entrusting power to Arakcheev, -favoring Golitsyn and mysticism, and afterwards Shishkov and -Photius. He also acted badly by concerning himself with the active -army and disbanding the Semenov regiment." - -It would take a dozen pages to enumerate all the reproaches the -historians address to him, based on their knowledge of what is good -for humanity. - -What do these reproaches mean? - -Do not the very actions for which the historians praise Alexander -I (the liberal attempts at the beginning of his reign, his struggle -with Napoleon, the firmness he displayed in 1812 and the campaign of -1813) flow from the same sources--the circumstances of his birth, -education, and life--that made his personality what it was and from -which the actions for which \ No newline at end of file diff --git a/node_modules/readline/test/fixtures/file-in-win1251.txt b/node_modules/readline/test/fixtures/file-in-win1251.txt deleted file mode 100644 index 9094c9c..0000000 --- a/node_modules/readline/test/fixtures/file-in-win1251.txt +++ /dev/null @@ -1,14 +0,0 @@ -file n (folder for keeping information) -I have a file that I keep all my telephone bills in. - , . -file n (tool) -He used a file to smooth the corner of the wood. - . -file n (computer file) -Can you send me the file as an attachment in an email? - ? -I file all my telephone bills together. - . -file vtr (smooth with a file) , + -He filed the wood. - . \ No newline at end of file diff --git a/node_modules/readline/test/fixtures/nmbr.txt b/node_modules/readline/test/fixtures/nmbr.txt deleted file mode 100644 index 0bce9e3..0000000 --- a/node_modules/readline/test/fixtures/nmbr.txt +++ /dev/null @@ -1,7 +0,0 @@ -1 -2 -3 -4 -5 -6 -7 \ No newline at end of file diff --git a/node_modules/readline/test/test_readline.js b/node_modules/readline/test/test_readline.js deleted file mode 100644 index 807cf72..0000000 --- a/node_modules/readline/test/test_readline.js +++ /dev/null @@ -1,138 +0,0 @@ -var fs = require('fs'); -var readLine = require('../readline.js'); -var test = require("tap").test; - -test("test reading lines",function(t){ - console.error("reading large file line by line asserts may take a while"); - var rl = readLine('./fixtures/afile.txt'); - rl.on("line", function (line,linecount){ - t.ok(null !== line && undefined !== line); - }); - rl.on("end",function (){ - t.end(); - }); - -}); - -test("numbers", function (t){ - var rl = readLine('./fixtures/nmbr.txt'); - var answer = 28; - var i=0; - rl.on("line", function (line){ - var num = Number(line); - console.error(num); - i+=num; - - }); - rl.on("end", function (){ - console.error(i,answer); - t.ok(answer === i, "answered"); - t.end(); - }); -}); - - -test("errors", function (t){ - var rl = readLine("./Idontexist"); - rl.on('error', function (e){ - t.ok(e); - t.end(); - }); - rl.on('end', function (){ - t.end(); - }); - rl.on('close', function(){ - t.end(); - }); -}); - - -test("line count", function(t){ - var rl = readLine('./fixtures/nmbr.txt'); - var expect = 7; - var actual = 0; - rl.on("line", function (line, ln){ - console.log("line",line,ln); - actual=ln; - }); - rl.on("end", function (){ - t.ok(actual === expect,"line count is correct"); - t.end(); - }); -}); - -test("byte count after first line", function(t){ - var rl = readLine('./fixtures/nmbr.txt'); - var actual = 0; - var expect; - rl.on("line", function (line, ln, byteCount){ - if (expect === undefined) { - expect = line.length; - console.log("byte count",byteCount); - actual=byteCount; - - t.ok(actual === expect,"byte count is correct"); - t.end(); - } - }); -}); - -test("byte count", function(t){ - var rl = readLine('./fixtures/nmbr.txt'); - var expect = fs.statSync('./fixtures/nmbr.txt').size; - var actual = 0; - rl.on("line", function (line, ln, byteCount){ - console.log("byte count",byteCount); - actual=byteCount; - }); - rl.on("end", function (){ - t.ok(actual === expect,"byte count is correct"); - t.end(); - }); -}); - -test("processing error passed on", function(t){ - var rl = readLine('./fixtures/nmbr.txt'); - var lastError; - var lineCalls = 0; - - rl.on("line", function (line, ln, byteCount){ - lineCalls++; - if (ln === 7) { - throw new Error('fake error'); - } - }); - rl.on("error", function (err){ - if (!lastError) { - lastError = err; - } - }); - - rl.on("end", function (){ - t.ok(lastError.message === 'fake error','error is passed on'); - t.ok(lineCalls === 7, 'line count ok'); - t.end(); - }); -}); - -test("test ascii file reading",function(t){ - var iconv = require('iconv-lite'); - var testFileValidationKeywords = { - 1: 'папка', - 3: 'телефон', - 11: 'электричество', - 14: 'дерево' - }; - - var rl = readLine('./fixtures/file-in-win1251.txt', { - retainBuffer: true - }); - rl.on("line", function (data,linecount){ - var line = iconv.decode(data, 'win1251'); - t.ok(!testFileValidationKeywords[linecount] || line.indexOf(testFileValidationKeywords[linecount]) > -1); - }); - rl.on("end",function (){ - t.end(); - }); - -}); \ No newline at end of file diff --git a/node_modules/resolve/.eslintignore b/node_modules/resolve/.eslintignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/resolve/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc deleted file mode 100644 index a22863c..0000000 --- a/node_modules/resolve/.eslintrc +++ /dev/null @@ -1,39 +0,0 @@ -{ - "extends": "@ljharb", - "root": true, - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "indent": [2, 4], - "strict": 0, - "complexity": 0, - "consistent-return": 0, - "curly": 0, - "dot-notation": [2, { "allowKeywords": true }], - "func-name-matching": 0, - "func-style": 0, - "global-require": 0, - "id-length": [2, { "min": 1, "max": 30 }], - "max-lines-per-function": 0, - "max-nested-callbacks": 0, - "max-params": 0, - "max-statements-per-line": [2, { "max": 2 }], - "max-statements": 0, - "no-magic-numbers": 0, - "no-console": 0, - "no-shadow": 0, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-use-before-define": 0, - "object-curly-newline": 0, - "operator-linebreak": [2, "before"], - "sort-keys": 0, - }, - "overrides": [ - { - "files": "test/resolver/nested_symlinks/mylib/*.js", - "rules": { - "no-throw-literal": 0, - }, - }, - ], -} diff --git a/node_modules/resolve/.travis.yml b/node_modules/resolve/.travis.yml deleted file mode 100644 index 5ed0fa5..0000000 --- a/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE deleted file mode 100644 index ff4fce2..0000000 --- a/node_modules/resolve/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/resolve/appveyor.yml b/node_modules/resolve/appveyor.yml deleted file mode 100644 index 729e8ea..0000000 --- a/node_modules/resolve/appveyor.yml +++ /dev/null @@ -1,53 +0,0 @@ -version: 1.0.{build} -skip_branch_with_pr: true -build: off - -environment: - matrix: - - nodejs_version: "12" - - nodejs_version: "11" - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "7" - - nodejs_version: "6" - - nodejs_version: "5" - - nodejs_version: "4" - - nodejs_version: "3" - - nodejs_version: "2" - - nodejs_version: "1" - - nodejs_version: "0.12" - - nodejs_version: "0.10" - - nodejs_version: "0.8" - - nodejs_version: "0.6" -matrix: - # fast_finish: true - allow_failures: - - nodejs_version: "0.8" - - nodejs_version: "0.6" - -platform: - - x86 - - x64 - -# Install scripts. (runs after repo cloning) -install: - # Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef - - git config core.symlinks true - - git reset --hard - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version $env:platform - - IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3 - - IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5 - - set PATH=%APPDATA%\npm;%PATH% - #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm - # install modules - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # run tests - - npm run tests-only diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js deleted file mode 100644 index 20e65dc..0000000 --- a/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err); - else console.log(res); -}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc1..0000000 --- a/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js deleted file mode 100644 index b7c9bf3..0000000 --- a/node_modules/resolve/index.js +++ /dev/null @@ -1,7 +0,0 @@ -var async = require('./lib/async'); -async.core = require('./lib/core'); -async.isCore = require('./lib/is-core'); -async.sync = require('./lib/sync'); - -exports = async; -module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js deleted file mode 100644 index 4ea2573..0000000 --- a/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,277 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var normalizeOptions = require('./normalize-options.js'); -var isCore = require('./is-core'); - -var defaultIsFile = function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var defaultIsDir = function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) { - if (opts && opts.preserveSymlinks === false) { - fs.realpath(x, function (realPathErr, realPath) { - if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); - else cb(null, realPathErr ? x : realPath); - }); - } else { - cb(null, x); - } -}; - -module.exports = function resolve(x, options, callback) { - var cb = callback; - var opts = options; - if (typeof options === 'function') { - cb = opts; - opts = {}; - } - if (typeof x !== 'string') { - var err = new TypeError('Path must be a string.'); - return process.nextTick(function () { - cb(err); - }); - } - - opts = normalizeOptions(x, opts); - - var isFile = opts.isFile || defaultIsFile; - var isDirectory = opts.isDirectory || defaultIsDir; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || ['.js']; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || []; - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = path.resolve(basedir); - - maybeUnwrapSymlink( - absoluteStart, - opts, - function (err, realStart) { - if (err) cb(err); - else init(realStart); - } - ); - - var res; - function init(basedir) { - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - res = path.resolve(basedir, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - if ((/\/$/).test(x) && res === basedir) { - loadAsDirectory(res, opts.package, onfile); - } else loadAsFile(res, opts.package, onfile); - } else loadNodeModules(x, basedir, function (err, n, pkg) { - if (err) cb(err); - else if (isCore(x)) return cb(null, x); - else if (n) { - return maybeUnwrapSymlink(n, opts, function (err, realN) { - if (err) { - cb(err); - } else { - cb(null, realN, pkg); - } - }); - } else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function onfile(err, m, pkg) { - if (err) cb(err); - else if (m) cb(null, m, pkg); - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err); - else if (d) { - maybeUnwrapSymlink(d, opts, function (err, realD) { - if (err) { - cb(err); - } else { - cb(null, realD, pkg); - } - }); - } else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function loadAsFile(x, thePackage, callback) { - var loadAsFilePackage = thePackage; - var cb = callback; - if (typeof loadAsFilePackage === 'function') { - cb = loadAsFilePackage; - loadAsFilePackage = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, loadAsFilePackage); - - function load(exts, x, loadPackage) { - if (exts.length === 0) return cb(null, undefined, loadPackage); - var file = x + exts[0]; - - var pkg = loadPackage; - if (pkg) onpkg(null, pkg); - else loadpkg(path.dirname(file), onpkg); - - function onpkg(err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err); - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex(err, ex) { - if (err) return cb(err); - if (ex) return cb(null, file, pkg); - load(exts.slice(1), x, pkg); - } - } - } - - function loadpkg(dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return cb(null); - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); - - maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) { - if (unwrapErr) return loadpkg(path.dirname(dir), cb); - var pkgfile = path.join(pkgdir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg(path.dirname(dir), cb); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body); } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - }); - } - - function loadAsDirectory(x, loadAsDirectoryPackage, callback) { - var cb = callback; - var fpkg = loadAsDirectoryPackage; - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) { - if (unwrapErr) return cb(unwrapErr); - var pkgfile = path.join(pkgdir, 'package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg && pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - return cb(mainError); - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, 'index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - }); - } - - function processDirs(cb, dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - isDirectory(dir, isdir); - - function isdir(err, isdir) { - if (err) return cb(err); - if (!isdir) return processDirs(cb, dirs.slice(1)); - var file = path.join(dir, x); - loadAsFile(file, opts.package, onfile); - } - - function onfile(err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, x), opts.package, ondir); - } - - function ondir(err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - processDirs(cb, dirs.slice(1)); - } - } - function loadNodeModules(x, start, cb) { - processDirs(cb, nodeModulesPaths(start, opts, x)); - } -}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js deleted file mode 100644 index b14a280..0000000 --- a/node_modules/resolve/lib/caller.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js deleted file mode 100644 index 0877650..0000000 --- a/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,53 +0,0 @@ -var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; - -function specifierIncluded(specifier) { - var parts = specifier.split(' '); - var op = parts.length > 1 ? parts[0] : '='; - var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); - - for (var i = 0; i < 3; ++i) { - var cur = Number(current[i] || 0); - var ver = Number(versionParts[i] || 0); - if (cur === ver) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - if (op === '<') { - return cur < ver; - } else if (op === '>=') { - return cur >= ver; - } else { - return false; - } - } - return op === '>='; -} - -function matchesRange(range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { return false; } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(specifiers[i])) { return false; } - } - return true; -} - -function versionIncluded(specifierValue) { - if (typeof specifierValue === 'boolean') { return specifierValue; } - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(specifierValue[i])) { return true; } - } - return false; - } - return matchesRange(specifierValue); -} - -var data = require('./core.json'); - -var core = {}; -for (var mod in data) { // eslint-disable-line no-restricted-syntax - if (Object.prototype.hasOwnProperty.call(data, mod)) { - core[mod] = versionIncluded(data[mod]); - } -} -module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json deleted file mode 100644 index 12a6ac7..0000000 --- a/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "assert": true, - "async_hooks": ">= 8", - "buffer_ieee754": "< 0.9.7", - "buffer": true, - "child_process": true, - "cluster": true, - "console": true, - "constants": true, - "crypto": true, - "_debug_agent": ">= 1 && < 8", - "_debugger": "< 8", - "dgram": true, - "dns": true, - "domain": true, - "events": true, - "freelist": "< 6", - "fs": true, - "fs/promises": ">= 10 && < 10.1", - "_http_agent": ">= 0.11.1", - "_http_client": ">= 0.11.1", - "_http_common": ">= 0.11.1", - "_http_incoming": ">= 0.11.1", - "_http_outgoing": ">= 0.11.1", - "_http_server": ">= 0.11.1", - "http": true, - "http2": ">= 8.8", - "https": true, - "inspector": ">= 8.0.0", - "_linklist": "< 8", - "module": true, - "net": true, - "node-inspect/lib/_inspect": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12", - "os": true, - "path": true, - "perf_hooks": ">= 8.5", - "process": ">= 1", - "punycode": true, - "querystring": true, - "readline": true, - "repl": true, - "smalloc": ">= 0.11.5 && < 3", - "_stream_duplex": ">= 0.9.4", - "_stream_transform": ">= 0.9.4", - "_stream_wrap": ">= 1.4.1", - "_stream_passthrough": ">= 0.9.4", - "_stream_readable": ">= 0.9.4", - "_stream_writable": ">= 0.9.4", - "stream": true, - "string_decoder": true, - "sys": true, - "timers": true, - "_tls_common": ">= 0.11.13", - "_tls_legacy": ">= 0.11.3 && < 10", - "_tls_wrap": ">= 0.11.3", - "tls": true, - "trace_events": ">= 10", - "tty": true, - "url": true, - "util": true, - "v8/tools/arguments": ">= 10 && < 12", - "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8": ">= 1", - "vm": true, - "worker_threads": ">= 11.7", - "zlib": true -} diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js deleted file mode 100644 index 48bc96c..0000000 --- a/node_modules/resolve/lib/is-core.js +++ /dev/null @@ -1,5 +0,0 @@ -var core = require('./core'); - -module.exports = function isCore(x) { - return Object.prototype.hasOwnProperty.call(core, x); -}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js deleted file mode 100644 index 2b43813..0000000 --- a/node_modules/resolve/lib/node-modules-paths.js +++ /dev/null @@ -1,42 +0,0 @@ -var path = require('path'); -var parse = path.parse || require('path-parse'); - -var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { - var prefix = '/'; - if ((/^([A-Za-z]:)/).test(absoluteStart)) { - prefix = ''; - } else if ((/^\\\\/).test(absoluteStart)) { - prefix = '\\\\'; - } - - var paths = [absoluteStart]; - var parsed = parse(absoluteStart); - while (parsed.dir !== paths[paths.length - 1]) { - paths.push(parsed.dir); - parsed = parse(parsed.dir); - } - - return paths.reduce(function (dirs, aPath) { - return dirs.concat(modules.map(function (moduleDir) { - return path.resolve(prefix, aPath, moduleDir); - })); - }, []); -}; - -module.exports = function nodeModulesPaths(start, opts, request) { - var modules = opts && opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules']; - - if (opts && typeof opts.paths === 'function') { - return opts.paths( - request, - start, - function () { return getNodeModulesDirs(start, modules); }, - opts - ); - } - - var dirs = getNodeModulesDirs(start, modules); - return opts && opts.paths ? dirs.concat(opts.paths) : dirs; -}; diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js deleted file mode 100644 index 4b56904..0000000 --- a/node_modules/resolve/lib/normalize-options.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function (x, opts) { - /** - * This file is purposefully a passthrough. It's expected that third-party - * environments will override it at runtime in order to inject special logic - * into `resolve` (by manipulating the options). One such example is the PnP - * code path in Yarn. - */ - - return opts || {}; -}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js deleted file mode 100644 index 350fd1d..0000000 --- a/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,174 +0,0 @@ -var isCore = require('./is-core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var normalizeOptions = require('./normalize-options.js'); - -var defaultIsFile = function isFile(file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); -}; - -var defaultIsDir = function isDirectory(dir) { - try { - var stat = fs.statSync(dir); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isDirectory(); -}; - -var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts) { - if (opts && opts.preserveSymlinks === false) { - try { - return fs.realpathSync(x); - } catch (realPathErr) { - if (realPathErr.code !== 'ENOENT') { - throw realPathErr; - } - } - } - return x; -}; - -module.exports = function (x, options) { - if (typeof x !== 'string') { - throw new TypeError('Path must be a string.'); - } - var opts = normalizeOptions(x, options); - - var isFile = opts.isFile || defaultIsFile; - var readFileSync = opts.readFileSync || fs.readFileSync; - var isDirectory = opts.isDirectory || defaultIsDir; - - var extensions = opts.extensions || ['.js']; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || []; - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = maybeUnwrapSymlink(path.resolve(basedir), opts); - - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - var res = path.resolve(absoluteStart, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return maybeUnwrapSymlink(m, opts); - } else if (isCore(x)) { - return x; - } else { - var n = loadNodeModulesSync(x, absoluteStart); - if (n) return maybeUnwrapSymlink(n, opts); - } - - if (isCore(x)) return x; - - var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - - function loadAsFileSync(x) { - var pkg = loadpkg(path.dirname(x)); - - if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { - var rfile = path.relative(pkg.dir, x); - var r = opts.pathFilter(pkg.pkg, x, rfile); - if (r) { - x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign - } - } - - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadpkg(dir) { - if (dir === '' || dir === '/') return; - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return; - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; - - var pkgfile = path.join(maybeUnwrapSymlink(dir, opts), 'package.json'); - - if (!isFile(pkgfile)) { - return loadpkg(path.dirname(dir)); - } - - var body = readFileSync(pkgfile); - - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - // v2 will pass pkgfile - pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment - } - - return { pkg: pkg, dir: dir }; - } - - function loadAsDirectorySync(x) { - var pkgfile = path.join(maybeUnwrapSymlink(x, opts), '/package.json'); - if (isFile(pkgfile)) { - try { - var body = readFileSync(pkgfile, 'UTF8'); - var pkg = JSON.parse(body); - } catch (e) {} - - if (pkg && opts.packageFilter) { - // v2 will pass pkgfile - pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment - } - - if (pkg && pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - throw mainError; - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - try { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } catch (e) {} - } - } - - return loadAsFileSync(path.join(x, '/index')); - } - - function loadNodeModulesSync(x, start) { - var dirs = nodeModulesPaths(start, opts, x); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - if (isDirectory(dir)) { - var m = loadAsFileSync(path.join(dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join(dir, '/', x)); - if (n) return n; - } - } - } -}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json deleted file mode 100644 index d157c9b..0000000 --- a/node_modules/resolve/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "resolve@^1.1.4", - "_id": "resolve@1.13.1", - "_inBundle": false, - "_integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", - "_location": "/resolve", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "resolve@^1.1.4", - "name": "resolve", - "escapedName": "resolve", - "rawSpec": "^1.1.4", - "saveSpec": null, - "fetchSpec": "^1.1.4" - }, - "_requiredBy": [ - "/browserify", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", - "_shasum": "be0aa4c06acd53083505abb35f4d66932ab35d16", - "_spec": "resolve@^1.1.4", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/browserify/resolve/issues" - }, - "bundleDependencies": false, - "dependencies": { - "path-parse": "^1.0.6" - }, - "deprecated": false, - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.2", - "array.prototype.map": "^1.0.1", - "eslint": "^6.7.1", - "object-keys": "^1.1.1", - "safe-publish-latest": "^1.1.4", - "tap": "0.4.13", - "tape": "^4.11.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/browserify/resolve#readme", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "license": "MIT", - "main": "index.js", - "name": "resolve", - "repository": { - "type": "git", - "url": "git://github.com/browserify/resolve.git" - }, - "scripts": { - "lint": "eslint .", - "posttest": "npm run test:multirepo", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", - "test": "npm run --silent tests-only", - "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test", - "tests-only": "tape test/*.js" - }, - "version": "1.13.1" -} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown deleted file mode 100644 index 68da041..0000000 --- a/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,202 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](https://nodejs.org/api/modules.html#modules_all_together) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve) - -# example - -asynchronously resolve: - -```js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err); - else console.log(res); -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -```js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -```js -var resolve = require('resolve'); -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.isDirectory - function to asynchronously test whether a directory exists - -* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field - * pkg - package data - * pkgfile - path to package.json - * dir - directory for package.json - -* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) - - For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function - * request - the import specifier being resolved - * start - lookup path - * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution - * opts - the resolution options - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -```js -{ - paths: [], - basedir: __dirname, - extensions: ['.js'], - readFile: fs.readFile, - isFile: function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }, - isDirectory: function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* opts.isDirectory - function to synchronously test whether a directory exists - -* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field - * pkg - package data - * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2) - -* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -```js -{ - paths: [], - basedir: __dirname, - extensions: ['.js'], - readFileSync: fs.readFileSync, - isFile: function isFile(file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); - }, - isDirectory: function isDirectory(dir) { - try { - var stat = fs.statSync(dir); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isDirectory(); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -```sh -npm install resolve -``` - -# license - -MIT diff --git a/node_modules/resolve/test/.eslintrc b/node_modules/resolve/test/.eslintrc deleted file mode 100644 index ddd262d..0000000 --- a/node_modules/resolve/test/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "max-lines": 0 - } -} diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js deleted file mode 100644 index 4c111e1..0000000 --- a/node_modules/resolve/test/core.js +++ /dev/null @@ -1,85 +0,0 @@ -var test = require('tape'); -var keys = require('object-keys'); -var resolve = require('../'); - -test('core modules', function (t) { - t.test('isCore()', function (st) { - st.ok(resolve.isCore('fs')); - st.ok(resolve.isCore('net')); - st.ok(resolve.isCore('http')); - - st.ok(!resolve.isCore('seq')); - st.ok(!resolve.isCore('../')); - - st.ok(!resolve.isCore('toString')); - - st.end(); - }); - - t.test('core list', function (st) { - var cores = keys(resolve.core); - st.plan(cores.length); - - for (var i = 0; i < cores.length; ++i) { - var mod = cores[i]; - if (resolve.core[mod]) { - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - mod + ' supported; requiring does not throw' - ); - } else { - st.throws( - function () { require(mod); }, // eslint-disable-line no-loop-func - mod + ' not supported; requiring throws' - ); - } - } - - st.end(); - }); - - t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { - var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle - if (!libs) { - st.skip('module.builtinModules does not exist'); - return st.end(); - } - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - st.ok(resolve.core[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - } - st.end(); - }); - - t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { - var libs = require('module').builtinModules; - if (!libs) { - st.skip('module.builtinModules does not exist'); - return st.end(); - } - var blacklist = [ - '_debug_agent', - 'v8/tools/tickprocessor-driver', - 'v8/tools/SourceMap', - 'v8/tools/tickprocessor', - 'v8/tools/profile' - ]; - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - if (blacklist.indexOf(mod) === -1) { - st.ok(resolve.core[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - } - } - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js deleted file mode 100644 index 3080665..0000000 --- a/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = path.join(__dirname, '/dotdot/abc'); - - resolve('..', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'dotdot/index.js')); - }); - - resolve('.', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = path.join(__dirname, '/dotdot/abc'); - - var a = resolve.sync('..', { basedir: dir }); - t.equal(a, path.join(__dirname, 'dotdot/index.js')); - - var b = resolve.sync('.', { basedir: dir }); - t.equal(b, path.join(dir, 'index.js')); -}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534..0000000 --- a/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index 643f9fc..0000000 --- a/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index 5f2141a..0000000 --- a/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tape'); -var path = require('path'); -var resolve = require('../'); - -test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { - t.equal(!!err, true); - }); -}); - -test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { - t.plan(2); - - var opts = { - basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), - preserveSymlinks: false - }; - - var module = './dotdot/abc'; - - resolve(module, opts, function (err, res) { - t.equal(err.code, 'MODULE_NOT_FOUND'); - t.equal(res, undefined); - }); -}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js deleted file mode 100644 index 8f8cccd..0000000 --- a/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,34 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'resolver'); - var packageFilterArgs; - resolve('./baz', { - basedir: dir, - packageFilter: function (pkg, pkgfile) { - pkg.main = 'doom'; // eslint-disable-line no-param-reassign - packageFilterArgs = [pkg, pkgfile]; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); - - var packageData = packageFilterArgs[0]; - t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); - t.equal(packageData.main, 'doom', 'package "main" was altered'); - - var packageFile = packageFilterArgs[1]; - t.equal( - packageFile, - path.join(dir, 'baz/package.json'), - 'second packageFilter argument is "pkgfile"' - ); - - t.end(); - }); -}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index 8a43b98..0000000 --- a/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,33 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = path.join(__dirname, 'resolver'); - var packageFilterArgs; - var res = resolve.sync('./baz', { - basedir: dir, - // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility - packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment - pkg.main = 'doom'; // eslint-disable-line no-param-reassign - packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef - return pkg; - } - }); - - t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); - - var packageData = packageFilterArgs[0]; - t.equal(packageData.main, 'doom', 'package "main" was altered'); - - if (!'is 1.x') { // eslint-disable-line no-constant-condition - var packageFile = packageFilterArgs[1]; - t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); - } - - var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition - // eslint-disable-next-line no-constant-condition - t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); - - t.end(); -}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js deleted file mode 100644 index d4f57a3..0000000 --- a/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,169 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(8); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - var dirs = {}; - dirs[path.resolve('/foo/bar')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mock from package', function (t) { - t.plan(8); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - var dirs = {}; - dirs[path.resolve('/foo/bar')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, file)); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - 'package': { main: 'bar' }, - readFile: function (file, cb) { - cb(null, files[file]); - } - }; - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg && pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg && pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - var dirs = {}; - dirs[path.resolve('/foo')] = true; - dirs[path.resolve('/foo/node_modules')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); - t.equal(pkg && pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - var dirs = {}; - dirs[path.resolve('/foo')] = true; - dirs[path.resolve('/foo/node_modules')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - 'package': { main: 'bar' }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); - t.equal(pkg && pkg.main, './baz.js'); - }); -}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index af06ae1..0000000 --- a/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,80 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - var dirs = {}; - dirs[path.resolve('/foo/bar')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file) { - return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); - }, - isDirectory: function (dir) { - return !!dirs[path.resolve(dir)]; - }, - readFileSync: function (file) { - return files[path.resolve(file)]; - } - }; - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - path.resolve('/foo/bar/baz.js') - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - path.resolve('/foo/bar/baz.js') - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - var dirs = {}; - dirs[path.resolve('/foo')] = true; - dirs[path.resolve('/foo/node_modules')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file) { - return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); - }, - isDirectory: function (dir) { - return !!dirs[path.resolve(dir)]; - }, - readFileSync: function (file) { - return files[path.resolve(file)]; - } - }; - } - - t.equal( - resolve.sync('bar', opts('/foo')), - path.resolve('/foo/node_modules/bar/baz.js') - ); -}); diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js deleted file mode 100644 index b50e5bb..0000000 --- a/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'module_dir'); - var xopts = { - basedir: dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); - }); - - var yopts = { - basedir: dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = path.join(__dirname, 'module_dir'); - var aopts = { - basedir: dir, - moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); - }); - - var bopts = { - basedir: dir, - moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); - }); - - var copts = { - basedir: dir, - moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); - }); -}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index dd7cf7b..0000000 --- a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index ef2d4d4..0000000 --- a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index e8ba629..0000000 --- a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf..0000000 --- a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js deleted file mode 100644 index 675441d..0000000 --- a/node_modules/resolve/test/node-modules-paths.js +++ /dev/null @@ -1,143 +0,0 @@ -var test = require('tape'); -var path = require('path'); -var parse = path.parse || require('path-parse'); -var keys = require('object-keys'); - -var nodeModulesPaths = require('../lib/node-modules-paths'); - -var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { - var moduleDirs = [].concat(moduleDirectories || 'node_modules'); - if (paths) { - for (var k = 0; k < paths.length; ++k) { - moduleDirs.push(path.basename(paths[k])); - } - } - - var foundModuleDirs = {}; - var uniqueDirs = {}; - var parsedDirs = {}; - for (var i = 0; i < dirs.length; ++i) { - var parsed = parse(dirs[i]); - if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } - foundModuleDirs[parsed.base] += 1; - parsedDirs[parsed.dir] = true; - uniqueDirs[dirs[i]] = true; - } - t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); - var foundModuleDirNames = keys(foundModuleDirs); - t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); - t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); - - var counts = {}; - for (var j = 0; j < foundModuleDirNames.length; ++j) { - counts[foundModuleDirs[j]] = true; - } - t.equal(keys(counts).length, 1, 'all found module directories had the same count'); -}; - -test('node-modules-paths', function (t) { - t.test('no options', function (t) { - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start); - - verifyDirs(t, start, dirs); - - t.end(); - }); - - t.test('empty options', function (t) { - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, {}); - - verifyDirs(t, start, dirs); - - t.end(); - }); - - t.test('with paths=array option', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var dirs = nodeModulesPaths(start, { paths: paths }); - - verifyDirs(t, start, dirs, null, paths); - - t.end(); - }); - - t.test('with paths=function option', function (t) { - var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { - return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); - }; - - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); - - verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); - - t.end(); - }); - - t.test('with paths=function skipping node modules resolution', function (t) { - var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { - return []; - }; - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, { paths: paths }); - t.deepEqual(dirs, [], 'no node_modules was computed'); - t.end(); - }); - - t.test('with moduleDirectory option', function (t) { - var start = path.join(__dirname, 'resolver'); - var moduleDirectory = 'not node modules'; - var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); - - verifyDirs(t, start, dirs, moduleDirectory); - - t.end(); - }); - - t.test('with 1 moduleDirectory and paths options', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var moduleDirectory = 'not node modules'; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); - - verifyDirs(t, start, dirs, moduleDirectory, paths); - - t.end(); - }); - - t.test('with 1+ moduleDirectory and paths options', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var moduleDirectories = ['not node modules', 'other modules']; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - verifyDirs(t, start, dirs, moduleDirectories, paths); - - t.end(); - }); - - t.test('combine paths correctly on Windows', function (t) { - var start = 'C:\\Users\\username\\myProject\\src'; - var paths = []; - var moduleDirectories = ['node_modules', start]; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); - - t.end(); - }); - - t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { - var start = '/Users/username/git/myProject/src'; - var paths = []; - var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); - - t.end(); - }); -}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js deleted file mode 100644 index d06aa4e..0000000 --- a/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,70 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(8); - - var isDir = function (dir, cb) { - if (dir === '/node_path' || dir === 'node_path/x') { - return cb(null, true); - } - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }; - - resolve('aaa', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname, - isDirectory: isDir - }, function (err, res) { - t.error(err); - t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); - }); - - resolve('bbb', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname, - isDirectory: isDir - }, function (err, res) { - t.error(err); - t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); - }); - - resolve('ccc', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname, - isDirectory: isDir - }, function (err, res) { - t.error(err); - t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); - }); - - // ensure that relative paths still resolve against the regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path' - ], - basedir: path.join(__dirname, 'node_path/x'), - isDirectory: isDir - }, function (err, res) { - var root = require('tap/package.json').main; - t.error(err); - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); - }); -}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index ad70d0b..0000000 --- a/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index a64132e..0000000 --- a/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index 4d0f32e..0000000 --- a/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index 793315e..0000000 --- a/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40..0000000 --- a/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 16519ae..0000000 --- a/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,75 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); - -var pathFilterFactory = function (t) { - return function (pkg, x, remainder) { - t.equal(pkg.version, '1.2.3'); - t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); - t.equal(remainder, 'ref'); - return 'alt'; - }; -}; - -test('#62: deep module references and the pathFilter', function (t) { - t.test('deep/ref.js', function (st) { - st.plan(3); - - resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { - if (err) st.fail(err); - - st.equal(pkg.version, '1.2.3'); - st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); - }); - - var res = resolve.sync('deep/ref', { basedir: resolverDir }); - st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); - }); - - t.test('deep/deeper/ref', function (st) { - st.plan(4); - - resolve( - 'deep/deeper/ref', - { basedir: resolverDir }, - function (err, res, pkg) { - if (err) t.fail(err); - st.notEqual(pkg, undefined); - st.equal(pkg.version, '1.2.3'); - st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); - } - ); - - var res = resolve.sync( - 'deep/deeper/ref', - { basedir: resolverDir } - ); - st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); - }); - - t.test('deep/ref alt', function (st) { - st.plan(8); - - var pathFilter = pathFilterFactory(st); - - var res = resolve.sync( - 'deep/ref', - { basedir: resolverDir, pathFilter: pathFilter } - ); - st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); - - resolve( - 'deep/ref', - { basedir: resolverDir, pathFilter: pathFilter }, - function (err, res, pkg) { - if (err) st.fail(err); - st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); - st.end(); - } - ); - }); - - t.end(); -}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js deleted file mode 100644 index 2febb59..0000000 --- a/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir: dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index b83a3e7..0000000 --- a/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index e0f8f6a..0000000 --- a/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index 93542a9..0000000 --- a/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index 2298f47..0000000 --- a/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d..0000000 --- a/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js deleted file mode 100644 index ecbf6a1..0000000 --- a/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,418 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(12); - var dir = path.join(__dirname, 'resolver'); - - resolve('./foo', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg.main, 'resolver'); - }); - - resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - }); - - resolve('foo', { basedir: dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - // Test that filename is reported as the "from" value when passed. - resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = path.join(__dirname, 'resolver'); - - resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg.main, 'bar'); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'resolver'); - - resolve('./baz', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/quux.js')); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/quux.js')); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - - resolve('./grux', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg.main, 'grux'); - }); - - resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg.main, 'tiv'); - }); - - resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver/quux'); - - resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo/index.js')); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - - resolve('../grux', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(5); - var dir = path.join(__dirname, 'resolver'); - - resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'cup.coffee')); - }); - - resolve('./cup.coffee', { basedir: dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'cup.coffee')); - }); - - resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - // Test that filename is reported as the "from" value when passed. - resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'resolver'); - - resolve('./mug', { basedir: dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'mug.js')); - }); - - resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, '/mug.coffee')); - }); - - resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { - t.equal(res, path.join(dir, '/mug.js')); - }); -}); - -test('other path', function (t) { - t.plan(6); - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'other_path/root.js')); - }); - - resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); - }); - - resolve('root', { basedir: dir }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('incorrect main', function (t) { - t.plan(1); - - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'index.js')); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = path.join(__dirname, 'resolver/without_basedir'); - var tester = require(path.join(dir, 'main.js')); - - tester(t, function (err, res, pkg) { - if (err) { - t.fail(err); - } else { - t.equal(res, path.join(dir, 'node_modules/mymodule.js')); - } - }); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - t.plan(2); - - var dir = path.join(__dirname, 'resolver'); - - resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'same_names/foo.js')); - }); - - resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'same_names/foo/index.js')); - }); -}); - -test('async: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.plan(1); - resolve('./' + testFile, function (err, res, pkg) { - if (err) t.fail(err); - st.equal(res, __filename, 'sanity check'); - }); - }); - - t.test('with a fake directory', function (st) { - st.plan(4); - - resolve('./' + testFile + '/blah', function (err, res, pkg) { - st.ok(err, 'there is an error'); - st.notOk(res, 'no result'); - - st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - err && err.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - st.end(); - }); - }); - - t.end(); -}); - -test('async dot main', function (t) { - var start = new Date(); - t.plan(3); - resolve('./resolver/dot_main', function (err, ret) { - t.notOk(err); - t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); - }); -}); - -test('async dot slash main', function (t) { - var start = new Date(); - t.plan(3); - resolve('./resolver/dot_slash_main', function (err, ret) { - t.notOk(err); - t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); - }); -}); - -test('not a directory', function (t) { - t.plan(6); - var path = './foo'; - resolve(path, { basedir: __filename }, function (err, res, pkg) { - t.ok(err, 'a non-directory errors'); - t.equal(arguments.length, 1); - t.equal(res, undefined); - t.equal(pkg, undefined); - - t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); - t.equal(err && err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('non-string "main" field in package.json', function (t) { - t.plan(5); - - var dir = path.join(__dirname, 'resolver'); - resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - t.equal(res, undefined, 'res is undefined'); - t.equal(pkg, undefined, 'pkg is undefined'); - }); -}); - -test('non-string "main" field in package.json', function (t) { - t.plan(5); - - var dir = path.join(__dirname, 'resolver'); - resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - t.equal(res, undefined, 'res is undefined'); - t.equal(pkg, undefined, 'pkg is undefined'); - }); -}); - -test('browser field in package.json', function (t) { - t.plan(3); - - var dir = path.join(__dirname, 'resolver'); - resolve( - './browser_field', - { - basedir: dir, - packageFilter: function packageFilter(pkg) { - if (pkg.browser) { - pkg.main = pkg.browser; // eslint-disable-line no-param-reassign - delete pkg.browser; // eslint-disable-line no-param-reassign - } - return pkg; - } - }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'browser_field', 'b.js')); - t.equal(pkg && pkg.main, 'b'); - t.equal(pkg && pkg.browser, undefined); - } - ); -}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index c41e4db..0000000 --- a/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "quux.js" -} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json deleted file mode 100644 index bf406f0..0000000 --- a/node_modules/resolve/test/resolver/browser_field/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "browser_field", - "main": "a", - "browser": "b" -} diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b13789..0000000 --- a/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/resolve/test/resolver/dot_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json deleted file mode 100644 index d7f4fc8..0000000 --- a/node_modules/resolve/test/resolver/dot_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "." -} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/resolve/test/resolver/dot_slash_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json deleted file mode 100644 index f51287b..0000000 --- a/node_modules/resolve/test/resolver/dot_slash_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "./" -} diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a..0000000 --- a/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index b718804..0000000 --- a/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "wrong.js" -} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json deleted file mode 100644 index 0cf8279..0000000 --- a/node_modules/resolve/test/resolver/invalid_main/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "invalid main", - "main": [ - "why is this a thing", - "srsly omg wtf" - ] -} diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json deleted file mode 100644 index 8508f9d..0000000 --- a/node_modules/resolve/test/resolver/multirepo/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "monorepo-symlink-test", - "private": true, - "version": "0.0.0", - "description": "", - "main": "index.js", - "scripts": { - "postinstall": "lerna bootstrap", - "test": "node packages/package-a" - }, - "author": "", - "license": "MIT", - "dependencies": { - "jquery": "^3.3.1", - "resolve": "../../../" - }, - "devDependencies": { - "lerna": "^3.4.3" - } -} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js deleted file mode 100644 index 8875a32..0000000 --- a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var assert = require('assert'); -var path = require('path'); -var resolve = require('resolve'); - -var basedir = __dirname + '/node_modules/@my-scope/package-b'; - -var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); - -/* - * preserveSymlinks === false - * will search NPM package from - * - packages/package-b/node_modules - * - packages/node_modules - * - node_modules - */ -assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); -assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); - -/* - * preserveSymlinks === true - * will search NPM package from - * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules - * - packages/package-a/node_modules/@my-scope/packages/node_modules - * - packages/package-a/node_modules/@my-scope/node_modules - * - packages/package-a/node_modules/node_modules - * - packages/package-a/node_modules - * - packages/node_modules - * - node_modules - */ -assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); -assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); - -console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json deleted file mode 100644 index 204de51..0000000 --- a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@my-scope/package-a", - "version": "0.0.0", - "private": true, - "description": "", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@my-scope/package-b": "^0.0.0" - } -} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json deleted file mode 100644 index f57c3b5..0000000 --- a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@my-scope/package-b", - "private": true, - "version": "0.0.0", - "description": "", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@my-scope/package-a": "^0.0.0" - } -} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js deleted file mode 100644 index 9b4846a..0000000 --- a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +++ /dev/null @@ -1,26 +0,0 @@ -var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); -var b; -var c; - -var test = function test() { - console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); - console.log(b, ': preserveSymlinks true'); - console.log(c, ': preserveSymlinks false'); - - if (a !== b && a !== c) { - throw 'async: no match'; - } - console.log('async: success! a matched either b or c\n'); -}; - -require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { - if (err) { throw err; } - b = result.replace(process.cwd(), '$CWD'); - if (b && c) { test(); } -}); -require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { - if (err) { throw err; } - c = result.replace(process.cwd(), '$CWD'); - if (b && c) { test(); } -}); - diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json deleted file mode 100644 index acfe9e9..0000000 --- a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "mylib", - "version": "0.0.0", - "description": "", - "private": true, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "buffer": "*" - } -} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js deleted file mode 100644 index 3283efc..0000000 --- a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +++ /dev/null @@ -1,12 +0,0 @@ -var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); -var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); -var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); - -console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); -console.log(b, ': preserveSymlinks true'); -console.log(c, ': preserveSymlinks false'); - -if (a !== b && a !== c) { - throw 'sync: no match'; -} -console.log('sync: success! a matched either b or c\n'); diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js deleted file mode 100644 index 888cae3..0000000 --- a/node_modules/resolve/test/resolver/same_names/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/resolve/test/resolver/same_names/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js deleted file mode 100644 index cb1c2c0..0000000 --- a/node_modules/resolve/test/resolver/symlinked/package/bar.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'bar'; diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json deleted file mode 100644 index 8e1b585..0000000 --- a/node_modules/resolve/test/resolver/symlinked/package/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "bar.js" -} \ No newline at end of file diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5b31975..0000000 --- a/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../../../'); - -module.exports = function (t, cb) { - resolve('mymodule', null, cb); -}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index c21b875..0000000 --- a/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,329 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: dir }), - path.join(dir, 'foo.js') - ); - - t.equal( - resolve.sync('./foo.js', { basedir: dir }), - path.join(dir, 'foo.js') - ); - - t.equal( - resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), - path.join(dir, 'foo.js') - ); - - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }); - - // Test that filename is reported as the "from" value when passed. - t.throws( - function () { - resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); - }, - { - name: 'Error', - message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" - } - ); - - t.end(); -}); - -test('bar', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('foo', { basedir: path.join(dir, 'bar') }), - path.join(dir, 'bar/node_modules/foo/index.js') - ); - t.end(); -}); - -test('baz', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./baz', { basedir: dir }), - path.join(dir, 'baz/quux.js') - ); - t.end(); -}); - -test('biz', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - t.equal( - resolve.sync('./grux', { basedir: dir }), - path.join(dir, 'grux/index.js') - ); - - t.equal( - resolve.sync('tiv', { basedir: path.join(dir, 'grux') }), - path.join(dir, 'tiv/index.js') - ); - - t.equal( - resolve.sync('grux', { basedir: path.join(dir, 'tiv') }), - path.join(dir, 'grux/index.js') - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - t.equal( - resolve.sync('../grux', { basedir: dir }), - path.join(dir, 'index.js') - ); - t.end(); -}); - -test('cup', function (t) { - var dir = path.join(__dirname, 'resolver'); - t.equal( - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'cup.coffee') - ); - - t.equal( - resolve.sync('./cup.coffee', { basedir: dir }), - path.join(dir, 'cup.coffee') - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js'] - }); - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = path.join(__dirname, 'resolver'); - t.equal( - resolve.sync('./mug', { basedir: dir }), - path.join(dir, 'mug.js') - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.coffee', '.js'] - }), - path.join(dir, 'mug.coffee') - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'mug.js') - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - t.equal( - resolve.sync('root', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/root.js') - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/lib/other-lib.js') - ); - - t.throws(function () { - resolve.sync('root', { basedir: dir }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir: dir, - paths: [otherDir] - }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - t.equal( - resolve.sync('./incorrect_main', { basedir: resolverDir }), - path.join(dir, 'index.js') - ); - - t.end(); -}); - -var stubStatSync = function stubStatSync(fn) { - var fs = require('fs'); - var statSync = fs.statSync; - try { - fs.statSync = function () { - throw new EvalError('Unknown Error'); - }; - return fn(); - } finally { - fs.statSync = statSync; - } -}; - -test('#79 - re-throw non ENOENT errors from stat', function (t) { - var dir = path.join(__dirname, 'resolver'); - - stubStatSync(function () { - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }, /Unknown Error/); - }); - - t.end(); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }), - path.join(dir, 'same_names/foo.js') - ); - t.equal( - resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }), - path.join(dir, 'same_names/foo/index.js') - ); - t.end(); -}); - -test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.equal( - resolve.sync('./' + testFile), - __filename, - 'sanity check' - ); - st.end(); - }); - - t.test('with a fake directory', function (st) { - function run() { return resolve.sync('./' + testFile + '/blah'); } - - st.throws(run, 'throws an error'); - - try { - run(); - } catch (e) { - st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - e.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - } - - st.end(); - }); - - t.end(); -}); - -test('sync dot main', function (t) { - var start = new Date(); - t.equal(resolve.sync('./resolver/dot_main'), path.join(__dirname, 'resolver/dot_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync dot slash main', function (t) { - var start = new Date(); - t.equal(resolve.sync('./resolver/dot_slash_main'), path.join(__dirname, 'resolver/dot_slash_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('not a directory', function (t) { - var path = './foo'; - try { - resolve.sync(path, { basedir: __filename }); - t.fail(); - } catch (err) { - t.ok(err, 'a non-directory errors'); - t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); - t.equal(err && err.code, 'MODULE_NOT_FOUND'); - } - t.end(); -}); - -test('non-string "main" field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - try { - var result = resolve.sync('./invalid_main', { basedir: dir }); - t.equal(result, undefined, 'result should not exist'); - t.fail('should not get here'); - } catch (err) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - } - t.end(); -}); - -test('non-string "main" field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - try { - var result = resolve.sync('./invalid_main', { basedir: dir }); - t.equal(result, undefined, 'result should not exist'); - t.fail('should not get here'); - } catch (err) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - } - t.end(); -}); - -test('browser field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - var res = resolve.sync('./browser_field', { - basedir: dir, - packageFilter: function packageFilter(pkg) { - if (pkg.browser) { - pkg.main = pkg.browser; // eslint-disable-line no-param-reassign - delete pkg.browser; // eslint-disable-line no-param-reassign - } - return pkg; - } - }); - t.equal(res, path.join(dir, 'browser_field', 'b.js')); - t.end(); -}); diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js deleted file mode 100644 index 98c52a7..0000000 --- a/node_modules/resolve/test/shadowed_core.js +++ /dev/null @@ -1,38 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('shadowed core modules still return core module', function (t) { - t.plan(2); - - resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { - t.ifError(err); - t.equal(res, 'util'); - }); -}); - -test('shadowed core modules still return core module [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); - - t.equal(res, 'util'); -}); - -test('shadowed core modules return shadow when appending `/`', function (t) { - t.plan(2); - - resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); - }); -}); - -test('shadowed core modules return shadow when appending `/` [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); - - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); -}); - diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js deleted file mode 100644 index b7b8450..0000000 --- a/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js deleted file mode 100644 index 152d14e..0000000 --- a/node_modules/resolve/test/symlinks.js +++ /dev/null @@ -1,173 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var test = require('tape'); -var map = require('array.prototype.map'); -var resolve = require('../'); - -var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); -var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); -var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a'); -var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a'); -try { - fs.unlinkSync(symlinkDir); -} catch (err) {} -try { - fs.unlinkSync(packageDir); -} catch (err) {} -try { - fs.unlinkSync(modADir); -} catch (err) {} -try { - fs.unlinkSync(symlinkModADir); -} catch (err) {} - -try { - fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); -} -try { - fs.symlinkSync('../../package', packageDir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); -} -try { - fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction'); -} - -test('symlink', function (t) { - t.plan(2); - - resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { - t.error(err); - t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - }); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.plan(4); - - resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { - t.ok(err, 'there is an error'); - t.notOk(res, 'no result'); - - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - t.equal( - err && err.message, - 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', - 'can not find nonexistent module' - ); - }); -}); - -test('sync symlink', function (t) { - var start = new Date(); - t.doesNotThrow(function () { - t.equal(resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - }); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.throws(function () { - resolve.sync('foo', { basedir: symlinkDir }); - }, /Cannot find module 'foo'/); - t.end(); -}); - -test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { - var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); - var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); - - t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); - t.end(); -}); - -test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { - t.plan(2); - var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); - resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { - t.notOk(err, 'no error'); - t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); - }); -}); - -test('packageFilter', function (t) { - function relative(x) { - return path.relative(__dirname, x); - } - - function testPackageFilter(preserveSymlinks) { - return function (st) { - st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition - - var destMain = 'symlinks/dest/node_modules/mod-a/index.js'; - var destPkg = 'symlinks/dest/node_modules/mod-a/package.json'; - var sourceMain = 'symlinks/source/node_modules/mod-a/index.js'; - var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json'; - var destDir = path.join(__dirname, 'symlinks', 'dest'); - - /* eslint multiline-comment-style: 0 */ - /* v2.x will restore these tests - var packageFilterPath = []; - var actualPath = resolve.sync('mod-a', { - basedir: destDir, - preserveSymlinks: preserveSymlinks, - packageFilter: function (pkg, pkgfile, dir) { - packageFilterPath.push(pkgfile); - } - }); - st.equal( - relative(actualPath), - path.normalize(preserveSymlinks ? destMain : sourceMain), - 'sync: actual path is correct' - ); - st.deepEqual( - map(packageFilterPath, relative), - map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize), - 'sync: packageFilter pkgfile arg is correct' - ); - */ - - var asyncPackageFilterPath = []; - resolve( - 'mod-a', - { - basedir: destDir, - preserveSymlinks: preserveSymlinks, - packageFilter: function (pkg, pkgfile) { - asyncPackageFilterPath.push(pkgfile); - } - }, - function (err, actualPath) { - st.error(err, 'no error'); - st.equal( - relative(actualPath), - path.normalize(preserveSymlinks ? destMain : sourceMain), - 'async: actual path is correct' - ); - st.deepEqual( - map(asyncPackageFilterPath, relative), - map( - preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg], - path.normalize - ), - 'async: packageFilter pkgfile arg is correct' - ); - } - ); - }; - } - - t.test('preserveSymlinks: false', testPackageFilter(false)); - - t.test('preserveSymlinks: true', testPackageFilter(true)); - - t.end(); -}); diff --git a/node_modules/resumer/.travis.yml b/node_modules/resumer/.travis.yml deleted file mode 100644 index cc4dba2..0000000 --- a/node_modules/resumer/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/resumer/LICENSE b/node_modules/resumer/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/resumer/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/resumer/example/resume.js b/node_modules/resumer/example/resume.js deleted file mode 100644 index d04e61a..0000000 --- a/node_modules/resumer/example/resume.js +++ /dev/null @@ -1,8 +0,0 @@ -var resumer = require('../'); -createStream().pipe(process.stdout); - -function createStream () { - var stream = resumer(); - stream.queue('beep boop\n'); - return stream; -} diff --git a/node_modules/resumer/index.js b/node_modules/resumer/index.js deleted file mode 100644 index 14de798..0000000 --- a/node_modules/resumer/index.js +++ /dev/null @@ -1,29 +0,0 @@ -var through = require('through'); -var nextTick = typeof setImmediate !== 'undefined' - ? setImmediate - : process.nextTick -; - -module.exports = function (write, end) { - var tr = through(write, end); - tr.pause(); - var resume = tr.resume; - var pause = tr.pause; - var paused = false; - - tr.pause = function () { - paused = true; - return pause.apply(this, arguments); - }; - - tr.resume = function () { - paused = false; - return resume.apply(this, arguments); - }; - - nextTick(function () { - if (!paused) tr.resume(); - }); - - return tr; -}; diff --git a/node_modules/resumer/package.json b/node_modules/resumer/package.json deleted file mode 100644 index 5f2be13..0000000 --- a/node_modules/resumer/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "resumer@~0.0.0", - "_id": "resumer@0.0.0", - "_inBundle": false, - "_integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "_location": "/resumer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "resumer@~0.0.0", - "name": "resumer", - "escapedName": "resumer", - "rawSpec": "~0.0.0", - "saveSpec": null, - "fetchSpec": "~0.0.0" - }, - "_requiredBy": [ - "/tape" - ], - "_resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "_shasum": "f1e8f461e4064ba39e82af3cdc2a8c893d076759", - "_spec": "resumer@~0.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/tape", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/resumer/issues" - }, - "bundleDependencies": false, - "dependencies": { - "through": "~2.3.4" - }, - "deprecated": false, - "description": "a through stream that starts paused and resumes on the next tick", - "devDependencies": { - "concat-stream": "~0.1.1", - "tap": "~0.4.0", - "tape": "~1.0.2" - }, - "homepage": "https://github.com/substack/resumer", - "keywords": [ - "through", - "stream", - "pause", - "resume" - ], - "license": "MIT", - "main": "index.js", - "name": "resumer", - "repository": { - "type": "git", - "url": "git://github.com/substack/resumer.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "chrome/20..latest", - "firefox/10..latest", - "safari/latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6" - ] - }, - "version": "0.0.0" -} diff --git a/node_modules/resumer/readme.markdown b/node_modules/resumer/readme.markdown deleted file mode 100644 index 5d9df66..0000000 --- a/node_modules/resumer/readme.markdown +++ /dev/null @@ -1,59 +0,0 @@ -# resumer - -Return a through stream that starts out paused and resumes on the next tick, -unless somebody called `.pause()`. - -This module has the same signature as -[through](https://npmjs.com/package/through). - -[![browser support](https://ci.testling.com/substack/resumer.png)](http://ci.testling.com/substack/resumer) - -[![build status](https://secure.travis-ci.org/substack/resumer.png)](http://travis-ci.org/substack/resumer) - -# example - -``` js -var resumer = require('resumer'); -var s = createStream(); -s.pipe(process.stdout); - -function createStream () { - var stream = resumer(); - stream.queue('beep boop\n'); - return stream; -} -``` - -``` -$ node example/resume.js -beep boop -``` - -# methods - -``` js -var resumer = require('resumer') -``` - -## resumer(write, end) - -Return a new through stream from `write` and `end`, which default to -pass-through `.queue()` functions if not specified. - -The stream starts out paused and will be resumed on the next tick unless you -call `.pause()` first. - -`write` and `end` get passed directly through to -[through](https://npmjs.com/package/through). - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install resumer -``` - -# license - -MIT diff --git a/node_modules/resumer/test/resume.js b/node_modules/resumer/test/resume.js deleted file mode 100644 index 1eaecac..0000000 --- a/node_modules/resumer/test/resume.js +++ /dev/null @@ -1,37 +0,0 @@ -var test = require('tape'); -var resumer = require('../'); -var concat = require('concat-stream'); - -test('implicit resume', function (t) { - t.plan(1); - - var s = createStream(); - s.pipe(concat(function (err, body) { - t.equal(body, 'beep boop\n'); - })); -}); - -test('pause/resume', function (t) { - t.plan(2); - - var s = createStream(); - s.pause(); - - var paused = true; - setTimeout(function () { - paused = false; - s.resume(); - }, 100); - - s.pipe(concat(function (err, body) { - t.equal(paused, false); - t.equal(body, 'beep boop\n'); - })); -}); - -function createStream () { - var stream = resumer(); - stream.queue('beep boop\n'); - stream.queue(null); - return stream; -} diff --git a/node_modules/resumer/test/through.js b/node_modules/resumer/test/through.js deleted file mode 100644 index ddcaf48..0000000 --- a/node_modules/resumer/test/through.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape'); -var resumer = require('../'); -var concat = require('concat-stream'); - -test('through write/end', function (t) { - t.plan(2); - - var s = createStream(); - - s.on('okok', function () { - t.ok(true); - }); - - s.pipe(concat(function (err, body) { - t.equal(body, 'BEGIN\nRAWR\nEND\n'); - })); - - setTimeout(function () { - s.end('rawr\n'); - }, 50); -}); - -function createStream () { - var stream = resumer(write, end); - stream.queue('BEGIN\n'); - return stream; - - function write (x) { - this.queue(String(x).toUpperCase()); - } - function end () { - this.emit('okok'); - this.queue('END\n'); - this.queue(null); - } -} diff --git a/node_modules/ripemd160/CHANGELOG.md b/node_modules/ripemd160/CHANGELOG.md deleted file mode 100644 index 91ba912..0000000 --- a/node_modules/ripemd160/CHANGELOG.md +++ /dev/null @@ -1,72 +0,0 @@ -2.0.1 / 2016-06-22 ------------------- -- added LICENSE file. - -2.0.0 / 2016-04-11 ------------------- -- rewritten, license change BSD-3 to MIT. [#13][#13] -- stream support [#13][#13] - -1.0.1 / 2015-05-05 ------------------- -- standard formatting - -1.0.0 / 2015-01-14 ------------------- -- updated dev deps -- added more test fixtures -- updated readme with usage, testing, etc -- moved from https://github.com/cryptocoinjs/ripemd160 to https://github.com/crypto-browserify/ripemd160 - -0.2.1 / 2014-12-31 ------------------- -- made license clear in `package.json` -- deleted `Makefile`, moved targets to `package.json` -- removed `terst` for `assert` - -0.2.0 / 2014-03-09 ------------------- -* removed bower.json and component.json -* changed 4 spacing to 2 -* returns `Buffer` type now, input must be Array, Uint8Array, Buffer, or string -* remove deps: `convert-hex` and `convert-string` - -0.1.0 / 2013-11-20 ------------------- -* changed package name -* removed AMD support - -0.0.2 / 2013-11-06 ------------------- -* fixed component.json file - -0.0.1 / 2013-11-03 ------------------- -* initial release - - -[#13]: https://github.com/crypto-browserify/ripemd160/pull/13 - -[#12]: https://github.com/crypto-browserify/ripemd160/pull/12 - -[#11]: https://github.com/crypto-browserify/ripemd160/pull/11 - -[#10]: https://github.com/crypto-browserify/ripemd160/pull/10 - -[#9]: https://github.com/crypto-browserify/ripemd160/pull/9 - -[#8]: https://github.com/crypto-browserify/ripemd160/issues/8 - -[#7]: https://github.com/crypto-browserify/ripemd160/pull/7 - -[#6]: https://github.com/crypto-browserify/ripemd160/pull/6 - -[#5]: https://github.com/crypto-browserify/ripemd160/issues/5 - -[#4]: https://github.com/crypto-browserify/ripemd160/pull/4 - -[#3]: https://github.com/crypto-browserify/ripemd160/pull/3 - -[#2]: https://github.com/crypto-browserify/ripemd160/pull/2 - -[#1]: https://github.com/crypto-browserify/ripemd160/pull/1 diff --git a/node_modules/ripemd160/LICENSE b/node_modules/ripemd160/LICENSE deleted file mode 100644 index cbe3544..0000000 --- a/node_modules/ripemd160/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/ripemd160/README.md b/node_modules/ripemd160/README.md deleted file mode 100644 index 056c6a2..0000000 --- a/node_modules/ripemd160/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# ripemd160 - -[![NPM Package](https://img.shields.io/npm/v/ripemd160.svg?style=flat-square)](https://www.npmjs.org/package/ripemd160) -[![Build Status](https://img.shields.io/travis/crypto-browserify/ripemd160.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/ripemd160) -[![Dependency status](https://img.shields.io/david/crypto-browserify/ripemd160.svg?style=flat-square)](https://david-dm.org/crypto-browserify/ripemd160#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -Node style `ripemd160` on pure JavaScript. - -## Example - -```js -var RIPEMD160 = require('ripemd160') - -console.log(new RIPEMD160().update('42').digest('hex')) -// => 0df020ba32aa9b8b904471ff582ce6b579bf8bc8 - -var ripemd160stream = new RIPEMD160() -ripemd160stream.end('42') -console.log(ripemd160stream.read().toString('hex')) -// => 0df020ba32aa9b8b904471ff582ce6b579bf8bc8 -``` - -## LICENSE - -MIT diff --git a/node_modules/ripemd160/index.js b/node_modules/ripemd160/index.js deleted file mode 100644 index 870de9c..0000000 --- a/node_modules/ripemd160/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict' -var Buffer = require('buffer').Buffer -var inherits = require('inherits') -var HashBase = require('hash-base') - -var ARRAY16 = new Array(16) - -var zl = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -] - -var zr = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -] - -var sl = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -] - -var sr = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -] - -var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e] -var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000] - -function RIPEMD160 () { - HashBase.call(this, 64) - - // state - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 -} - -inherits(RIPEMD160, HashBase) - -RIPEMD160.prototype._update = function () { - var words = ARRAY16 - for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4) - - var al = this._a | 0 - var bl = this._b | 0 - var cl = this._c | 0 - var dl = this._d | 0 - var el = this._e | 0 - - var ar = this._a | 0 - var br = this._b | 0 - var cr = this._c | 0 - var dr = this._d | 0 - var er = this._e | 0 - - // computation - for (var i = 0; i < 80; i += 1) { - var tl - var tr - if (i < 16) { - tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i]) - tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i]) - } else if (i < 32) { - tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i]) - tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i]) - } else if (i < 48) { - tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i]) - tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i]) - } else if (i < 64) { - tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i]) - tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i]) - } else { // if (i<80) { - tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i]) - tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i]) - } - - al = el - el = dl - dl = rotl(cl, 10) - cl = bl - bl = tl - - ar = er - er = dr - dr = rotl(cr, 10) - cr = br - br = tr - } - - // update state - var t = (this._b + cl + dr) | 0 - this._b = (this._c + dl + er) | 0 - this._c = (this._d + el + ar) | 0 - this._d = (this._e + al + br) | 0 - this._e = (this._a + bl + cr) | 0 - this._a = t -} - -RIPEMD160.prototype._digest = function () { - // create padding and handle blocks - this._block[this._blockOffset++] = 0x80 - if (this._blockOffset > 56) { - this._block.fill(0, this._blockOffset, 64) - this._update() - this._blockOffset = 0 - } - - this._block.fill(0, this._blockOffset, 56) - this._block.writeUInt32LE(this._length[0], 56) - this._block.writeUInt32LE(this._length[1], 60) - this._update() - - // produce result - var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20) - buffer.writeInt32LE(this._a, 0) - buffer.writeInt32LE(this._b, 4) - buffer.writeInt32LE(this._c, 8) - buffer.writeInt32LE(this._d, 12) - buffer.writeInt32LE(this._e, 16) - return buffer -} - -function rotl (x, n) { - return (x << n) | (x >>> (32 - n)) -} - -function fn1 (a, b, c, d, e, m, k, s) { - return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0 -} - -function fn2 (a, b, c, d, e, m, k, s) { - return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0 -} - -function fn3 (a, b, c, d, e, m, k, s) { - return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0 -} - -function fn4 (a, b, c, d, e, m, k, s) { - return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0 -} - -function fn5 (a, b, c, d, e, m, k, s) { - return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0 -} - -module.exports = RIPEMD160 diff --git a/node_modules/ripemd160/package.json b/node_modules/ripemd160/package.json deleted file mode 100644 index 7236ec9..0000000 --- a/node_modules/ripemd160/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "ripemd160@^2.0.1", - "_id": "ripemd160@2.0.2", - "_inBundle": false, - "_integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "_location": "/ripemd160", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ripemd160@^2.0.1", - "name": "ripemd160", - "escapedName": "ripemd160", - "rawSpec": "^2.0.1", - "saveSpec": null, - "fetchSpec": "^2.0.1" - }, - "_requiredBy": [ - "/create-hash", - "/create-hmac", - "/pbkdf2" - ], - "_resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "_shasum": "a1c1a6f624751577ba5d07914cbc92850585890c", - "_spec": "ripemd160@^2.0.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/create-hash", - "bugs": { - "url": "https://github.com/crypto-browserify/ripemd160/issues" - }, - "bundleDependencies": false, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - }, - "deprecated": false, - "description": "Compute ripemd160 of bytes or strings.", - "devDependencies": { - "hash-test-vectors": "^1.3.2", - "standard": "^6.0.7", - "tape": "^4.5.1" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/crypto-browserify/ripemd160#readme", - "keywords": [ - "string", - "strings", - "ripemd160", - "ripe160", - "bitcoin", - "bytes", - "cryptography" - ], - "license": "MIT", - "main": "./index", - "name": "ripemd160", - "repository": { - "url": "git+https://github.com/crypto-browserify/ripemd160.git", - "type": "git" - }, - "scripts": { - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "node test/*.js" - }, - "version": "2.0.2" -} diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md deleted file mode 100644 index 356e351..0000000 --- a/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,586 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -[Get supported safe-buffer with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-safe-buffer?utm_source=npm-safe-buffer&utm_medium=referral&utm_campaign=readme) - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed80..0000000 --- a/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js deleted file mode 100644 index 054c8d3..0000000 --- a/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,64 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json deleted file mode 100644 index f964300..0000000 --- a/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "safe-buffer@^5.1.1", - "_id": "safe-buffer@5.2.0", - "_inBundle": false, - "_integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", - "_location": "/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@^5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "^5.1.1", - "saveSpec": null, - "fetchSpec": "^5.1.1" - }, - "_requiredBy": [ - "/browser-pack", - "/browserify-aes", - "/browserify-des", - "/cipher-base", - "/create-hmac", - "/evp_bytestokey", - "/hash-base", - "/md5.js", - "/parse-asn1", - "/pbkdf2", - "/public-encrypt", - "/randombytes", - "/randomfill", - "/sha.js", - "/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "_shasum": "b74daec49b1148f88c64b68d49b1e815c1f2f519", - "_spec": "safe-buffer@^5.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browser-pack", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.2.0" -} diff --git a/node_modules/sha.js/.travis.yml b/node_modules/sha.js/.travis.yml deleted file mode 100644 index 0b606eb..0000000 --- a/node_modules/sha.js/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false -os: - - linux -language: node_js -node_js: - - "4" - - "5" - - "6" - - "7" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "7" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/sha.js/LICENSE b/node_modules/sha.js/LICENSE deleted file mode 100644 index 11888c1..0000000 --- a/node_modules/sha.js/LICENSE +++ /dev/null @@ -1,49 +0,0 @@ -Copyright (c) 2013-2018 sha.js contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 1998 - 2009, Paul Johnston & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the author nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/node_modules/sha.js/README.md b/node_modules/sha.js/README.md deleted file mode 100644 index 1cc3db5..0000000 --- a/node_modules/sha.js/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# sha.js -[![NPM Package](https://img.shields.io/npm/v/sha.js.svg?style=flat-square)](https://www.npmjs.org/package/sha.js) -[![Build Status](https://img.shields.io/travis/crypto-browserify/sha.js.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/sha.js) -[![Dependency status](https://img.shields.io/david/crypto-browserify/sha.js.svg?style=flat-square)](https://david-dm.org/crypto-browserify/sha.js#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -Node style `SHA` on pure JavaScript. - -```js -var shajs = require('sha.js') - -console.log(shajs('sha256').update('42').digest('hex')) -// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 -console.log(new shajs.sha256().update('42').digest('hex')) -// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 - -var sha256stream = shajs('sha256') -sha256stream.end('42') -console.log(sha256stream.read().toString('hex')) -// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 -``` - -## supported hashes -`sha.js` currently implements: - - - SHA (SHA-0) -- **legacy, do not use in new systems** - - SHA-1 -- **legacy, do not use in new systems** - - SHA-224 - - SHA-256 - - SHA-384 - - SHA-512 - - -## Not an actual stream -Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial. -It does update incrementally, so you can hash things larger than RAM, as it uses a constant amount of memory (except when using base64 or utf8 encoding, see code comments). - - -## Acknowledgements -This work is derived from Paul Johnston's [A JavaScript implementation of the Secure Hash Algorithm](http://pajhome.org.uk/crypt/md5/sha1.html). - - -## LICENSE [MIT](LICENSE) diff --git a/node_modules/sha.js/bin.js b/node_modules/sha.js/bin.js deleted file mode 100755 index 5a7ac83..0000000 --- a/node_modules/sha.js/bin.js +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/env node - -var createHash = require('./browserify') -var argv = process.argv.slice(2) - -function pipe (algorithm, s) { - var start = Date.now() - var hash = createHash(algorithm || 'sha1') - - s.on('data', function (data) { - hash.update(data) - }) - - s.on('end', function () { - if (process.env.DEBUG) { - return console.log(hash.digest('hex'), Date.now() - start) - } - - console.log(hash.digest('hex')) - }) -} - -function usage () { - console.error('sha.js [algorithm=sha1] [filename] # hash filename with algorithm') - console.error('input | sha.js [algorithm=sha1] # hash stdin with algorithm') - console.error('sha.js --help # display this message') -} - -if (!process.stdin.isTTY) { - pipe(argv[0], process.stdin) -} else if (argv.length) { - if (/--help|-h/.test(argv[0])) { - usage() - } else { - var filename = argv.pop() - var algorithm = argv.pop() - pipe(algorithm, require('fs').createReadStream(filename)) - } -} else { - usage() -} diff --git a/node_modules/sha.js/hash.js b/node_modules/sha.js/hash.js deleted file mode 100644 index 013537a..0000000 --- a/node_modules/sha.js/hash.js +++ /dev/null @@ -1,81 +0,0 @@ -var Buffer = require('safe-buffer').Buffer - -// prototype class for hash functions -function Hash (blockSize, finalSize) { - this._block = Buffer.alloc(blockSize) - this._finalSize = finalSize - this._blockSize = blockSize - this._len = 0 -} - -Hash.prototype.update = function (data, enc) { - if (typeof data === 'string') { - enc = enc || 'utf8' - data = Buffer.from(data, enc) - } - - var block = this._block - var blockSize = this._blockSize - var length = data.length - var accum = this._len - - for (var offset = 0; offset < length;) { - var assigned = accum % blockSize - var remainder = Math.min(length - offset, blockSize - assigned) - - for (var i = 0; i < remainder; i++) { - block[assigned + i] = data[offset + i] - } - - accum += remainder - offset += remainder - - if ((accum % blockSize) === 0) { - this._update(block) - } - } - - this._len += length - return this -} - -Hash.prototype.digest = function (enc) { - var rem = this._len % this._blockSize - - this._block[rem] = 0x80 - - // zero (rem + 1) trailing bits, where (rem + 1) is the smallest - // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize - this._block.fill(0, rem + 1) - - if (rem >= this._finalSize) { - this._update(this._block) - this._block.fill(0) - } - - var bits = this._len * 8 - - // uint32 - if (bits <= 0xffffffff) { - this._block.writeUInt32BE(bits, this._blockSize - 4) - - // uint64 - } else { - var lowBits = (bits & 0xffffffff) >>> 0 - var highBits = (bits - lowBits) / 0x100000000 - - this._block.writeUInt32BE(highBits, this._blockSize - 8) - this._block.writeUInt32BE(lowBits, this._blockSize - 4) - } - - this._update(this._block) - var hash = this._hash() - - return enc ? hash.toString(enc) : hash -} - -Hash.prototype._update = function () { - throw new Error('_update must be implemented by subclass') -} - -module.exports = Hash diff --git a/node_modules/sha.js/index.js b/node_modules/sha.js/index.js deleted file mode 100644 index 87cdf49..0000000 --- a/node_modules/sha.js/index.js +++ /dev/null @@ -1,15 +0,0 @@ -var exports = module.exports = function SHA (algorithm) { - algorithm = algorithm.toLowerCase() - - var Algorithm = exports[algorithm] - if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') - - return new Algorithm() -} - -exports.sha = require('./sha') -exports.sha1 = require('./sha1') -exports.sha224 = require('./sha224') -exports.sha256 = require('./sha256') -exports.sha384 = require('./sha384') -exports.sha512 = require('./sha512') diff --git a/node_modules/sha.js/package.json b/node_modules/sha.js/package.json deleted file mode 100644 index 9db1539..0000000 --- a/node_modules/sha.js/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "sha.js@^2.4.0", - "_id": "sha.js@2.4.11", - "_inBundle": false, - "_integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "_location": "/sha.js", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "sha.js@^2.4.0", - "name": "sha.js", - "escapedName": "sha.js", - "rawSpec": "^2.4.0", - "saveSpec": null, - "fetchSpec": "^2.4.0" - }, - "_requiredBy": [ - "/create-hash", - "/create-hmac", - "/pbkdf2", - "/shasum" - ], - "_resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "_shasum": "37a5cf0b81ecbc6943de109ba2960d1b26584ae7", - "_spec": "sha.js@^2.4.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/create-hash", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "bin": { - "sha.js": "./bin.js" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/sha.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "deprecated": false, - "description": "Streamable SHA hashes in pure javascript", - "devDependencies": { - "buffer": "~2.3.2", - "hash-test-vectors": "^1.3.1", - "standard": "^10.0.2", - "tape": "~2.3.2", - "typedarray": "0.0.6" - }, - "homepage": "https://github.com/crypto-browserify/sha.js", - "license": "(MIT AND BSD-3-Clause)", - "name": "sha.js", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/sha.js.git" - }, - "scripts": { - "lint": "standard", - "prepublish": "npm ls && npm run unit", - "test": "npm run lint && npm run unit", - "unit": "set -e; for t in test/*.js; do node $t; done;" - }, - "version": "2.4.11" -} diff --git a/node_modules/sha.js/sha.js b/node_modules/sha.js/sha.js deleted file mode 100644 index 50c4fa8..0000000 --- a/node_modules/sha.js/sha.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined - * in FIPS PUB 180-1 - * This source code is derived from sha1.js of the same repository. - * The difference between SHA-0 and SHA-1 is just a bitwise rotate left - * operation was added. - */ - -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha, Hash) - -Sha.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha.prototype._hash = function () { - var H = Buffer.allocUnsafe(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha diff --git a/node_modules/sha.js/sha1.js b/node_modules/sha.js/sha1.js deleted file mode 100644 index cabd747..0000000 --- a/node_modules/sha.js/sha1.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined - * in FIPS PUB 180-1 - * Version 2.1a Copyright Paul Johnston 2000 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for details. - */ - -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha1 () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha1, Hash) - -Sha1.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl1 (num) { - return (num << 1) | (num >>> 31) -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha1.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha1.prototype._hash = function () { - var H = Buffer.allocUnsafe(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha1 diff --git a/node_modules/sha.js/sha224.js b/node_modules/sha.js/sha224.js deleted file mode 100644 index 35541e5..0000000 --- a/node_modules/sha.js/sha224.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Sha256 = require('./sha256') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var W = new Array(64) - -function Sha224 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha224, Sha256) - -Sha224.prototype.init = function () { - this._a = 0xc1059ed8 - this._b = 0x367cd507 - this._c = 0x3070dd17 - this._d = 0xf70e5939 - this._e = 0xffc00b31 - this._f = 0x68581511 - this._g = 0x64f98fa7 - this._h = 0xbefa4fa4 - - return this -} - -Sha224.prototype._hash = function () { - var H = Buffer.allocUnsafe(28) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - - return H -} - -module.exports = Sha224 diff --git a/node_modules/sha.js/sha256.js b/node_modules/sha.js/sha256.js deleted file mode 100644 index 342e48a..0000000 --- a/node_modules/sha.js/sha256.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, - 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, - 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, - 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, - 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, - 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, - 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, - 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, - 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, - 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, - 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, - 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, - 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, - 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, - 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, - 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -] - -var W = new Array(64) - -function Sha256 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha256, Hash) - -Sha256.prototype.init = function () { - this._a = 0x6a09e667 - this._b = 0xbb67ae85 - this._c = 0x3c6ef372 - this._d = 0xa54ff53a - this._e = 0x510e527f - this._f = 0x9b05688c - this._g = 0x1f83d9ab - this._h = 0x5be0cd19 - - return this -} - -function ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x) { - return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) -} - -function sigma1 (x) { - return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) -} - -function gamma0 (x) { - return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) -} - -function gamma1 (x) { - return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) -} - -Sha256.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - var f = this._f | 0 - var g = this._g | 0 - var h = this._h | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 - - for (var j = 0; j < 64; ++j) { - var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 - var T2 = (sigma0(a) + maj(a, b, c)) | 0 - - h = g - g = f - f = e - e = (d + T1) | 0 - d = c - c = b - b = a - a = (T1 + T2) | 0 - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 - this._f = (f + this._f) | 0 - this._g = (g + this._g) | 0 - this._h = (h + this._h) | 0 -} - -Sha256.prototype._hash = function () { - var H = Buffer.allocUnsafe(32) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - H.writeInt32BE(this._h, 28) - - return H -} - -module.exports = Sha256 diff --git a/node_modules/sha.js/sha384.js b/node_modules/sha.js/sha384.js deleted file mode 100644 index afc85e5..0000000 --- a/node_modules/sha.js/sha384.js +++ /dev/null @@ -1,57 +0,0 @@ -var inherits = require('inherits') -var SHA512 = require('./sha512') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var W = new Array(160) - -function Sha384 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha384, SHA512) - -Sha384.prototype.init = function () { - this._ah = 0xcbbb9d5d - this._bh = 0x629a292a - this._ch = 0x9159015a - this._dh = 0x152fecd8 - this._eh = 0x67332667 - this._fh = 0x8eb44a87 - this._gh = 0xdb0c2e0d - this._hh = 0x47b5481d - - this._al = 0xc1059ed8 - this._bl = 0x367cd507 - this._cl = 0x3070dd17 - this._dl = 0xf70e5939 - this._el = 0xffc00b31 - this._fl = 0x68581511 - this._gl = 0x64f98fa7 - this._hl = 0xbefa4fa4 - - return this -} - -Sha384.prototype._hash = function () { - var H = Buffer.allocUnsafe(48) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - - return H -} - -module.exports = Sha384 diff --git a/node_modules/sha.js/sha512.js b/node_modules/sha.js/sha512.js deleted file mode 100644 index fb28f2f..0000000 --- a/node_modules/sha.js/sha512.js +++ /dev/null @@ -1,260 +0,0 @@ -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -] - -var W = new Array(160) - -function Sha512 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha512, Hash) - -Sha512.prototype.init = function () { - this._ah = 0x6a09e667 - this._bh = 0xbb67ae85 - this._ch = 0x3c6ef372 - this._dh = 0xa54ff53a - this._eh = 0x510e527f - this._fh = 0x9b05688c - this._gh = 0x1f83d9ab - this._hh = 0x5be0cd19 - - this._al = 0xf3bcc908 - this._bl = 0x84caa73b - this._cl = 0xfe94f82b - this._dl = 0x5f1d36f1 - this._el = 0xade682d1 - this._fl = 0x2b3e6c1f - this._gl = 0xfb41bd6b - this._hl = 0x137e2179 - - return this -} - -function Ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x, xl) { - return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) -} - -function sigma1 (x, xl) { - return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) -} - -function Gamma0 (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) -} - -function Gamma0l (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) -} - -function Gamma1 (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) -} - -function Gamma1l (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) -} - -function getCarry (a, b) { - return (a >>> 0) < (b >>> 0) ? 1 : 0 -} - -Sha512.prototype._update = function (M) { - var W = this._w - - var ah = this._ah | 0 - var bh = this._bh | 0 - var ch = this._ch | 0 - var dh = this._dh | 0 - var eh = this._eh | 0 - var fh = this._fh | 0 - var gh = this._gh | 0 - var hh = this._hh | 0 - - var al = this._al | 0 - var bl = this._bl | 0 - var cl = this._cl | 0 - var dl = this._dl | 0 - var el = this._el | 0 - var fl = this._fl | 0 - var gl = this._gl | 0 - var hl = this._hl | 0 - - for (var i = 0; i < 32; i += 2) { - W[i] = M.readInt32BE(i * 4) - W[i + 1] = M.readInt32BE(i * 4 + 4) - } - for (; i < 160; i += 2) { - var xh = W[i - 15 * 2] - var xl = W[i - 15 * 2 + 1] - var gamma0 = Gamma0(xh, xl) - var gamma0l = Gamma0l(xl, xh) - - xh = W[i - 2 * 2] - xl = W[i - 2 * 2 + 1] - var gamma1 = Gamma1(xh, xl) - var gamma1l = Gamma1l(xl, xh) - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7h = W[i - 7 * 2] - var Wi7l = W[i - 7 * 2 + 1] - - var Wi16h = W[i - 16 * 2] - var Wi16l = W[i - 16 * 2 + 1] - - var Wil = (gamma0l + Wi7l) | 0 - var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 - Wil = (Wil + gamma1l) | 0 - Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 - Wil = (Wil + Wi16l) | 0 - Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 - - W[i] = Wih - W[i + 1] = Wil - } - - for (var j = 0; j < 160; j += 2) { - Wih = W[j] - Wil = W[j + 1] - - var majh = maj(ah, bh, ch) - var majl = maj(al, bl, cl) - - var sigma0h = sigma0(ah, al) - var sigma0l = sigma0(al, ah) - var sigma1h = sigma1(eh, el) - var sigma1l = sigma1(el, eh) - - // t1 = h + sigma1 + ch + K[j] + W[j] - var Kih = K[j] - var Kil = K[j + 1] - - var chh = Ch(eh, fh, gh) - var chl = Ch(el, fl, gl) - - var t1l = (hl + sigma1l) | 0 - var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 - t1l = (t1l + chl) | 0 - t1h = (t1h + chh + getCarry(t1l, chl)) | 0 - t1l = (t1l + Kil) | 0 - t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 - t1l = (t1l + Wil) | 0 - t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 - - // t2 = sigma0 + maj - var t2l = (sigma0l + majl) | 0 - var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 - - hh = gh - hl = gl - gh = fh - gl = fl - fh = eh - fl = el - el = (dl + t1l) | 0 - eh = (dh + t1h + getCarry(el, dl)) | 0 - dh = ch - dl = cl - ch = bh - cl = bl - bh = ah - bl = al - al = (t1l + t2l) | 0 - ah = (t1h + t2h + getCarry(al, t1l)) | 0 - } - - this._al = (this._al + al) | 0 - this._bl = (this._bl + bl) | 0 - this._cl = (this._cl + cl) | 0 - this._dl = (this._dl + dl) | 0 - this._el = (this._el + el) | 0 - this._fl = (this._fl + fl) | 0 - this._gl = (this._gl + gl) | 0 - this._hl = (this._hl + hl) | 0 - - this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 - this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 - this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 - this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 - this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 - this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 - this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 - this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 -} - -Sha512.prototype._hash = function () { - var H = Buffer.allocUnsafe(64) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - writeInt64BE(this._gh, this._gl, 48) - writeInt64BE(this._hh, this._hl, 56) - - return H -} - -module.exports = Sha512 diff --git a/node_modules/sha.js/test/hash.js b/node_modules/sha.js/test/hash.js deleted file mode 100644 index 5fa000d..0000000 --- a/node_modules/sha.js/test/hash.js +++ /dev/null @@ -1,75 +0,0 @@ -var tape = require('tape') -var Hash = require('../hash') -var hex = '0A1B2C3D4E5F6G7H' - -function equal (t, a, b) { - t.equal(a.length, b.length) - t.equal(a.toString('hex'), b.toString('hex')) -} - -var hexBuf = Buffer.from('0A1B2C3D4E5F6G7H', 'utf8') -var count16 = { - strings: ['0A1B2C3D4E5F6G7H'], - buffers: [ - hexBuf, - Buffer.from('80000000000000000000000000000080', 'hex') - ] -} - -var empty = { - strings: [''], - buffers: [ - Buffer.from('80000000000000000000000000000000', 'hex') - ] -} - -var multi = { - strings: ['abcd', 'efhijk', 'lmnopq'], - buffers: [ - Buffer.from('abcdefhijklmnopq', 'ascii'), - Buffer.from('80000000000000000000000000000080', 'hex') - ] -} - -var long = { - strings: [hex + hex], - buffers: [ - hexBuf, - hexBuf, - Buffer.from('80000000000000000000000000000100', 'hex') - ] -} - -function makeTest (name, data) { - tape(name, function (t) { - var h = new Hash(16, 8) - var hash = Buffer.alloc(20) - var n = 2 - var expected = data.buffers.slice() - // t.plan(expected.length + 1) - - h._update = function (block) { - var e = expected.shift() - equal(t, block, e) - - if (n < 0) { - throw new Error('expecting only 2 calls to _update') - } - } - h._hash = function () { - return hash - } - - data.strings.forEach(function (string) { - h.update(string, 'ascii') - }) - - equal(t, h.digest(), hash) - t.end() - }) -} - -makeTest('Hash#update 1 in 1', count16) -makeTest('empty Hash#update', empty) -makeTest('Hash#update 1 in 3', multi) -makeTest('Hash#update 2 in 1', long) diff --git a/node_modules/sha.js/test/test.js b/node_modules/sha.js/test/test.js deleted file mode 100644 index dac8580..0000000 --- a/node_modules/sha.js/test/test.js +++ /dev/null @@ -1,100 +0,0 @@ -var crypto = require('crypto') -var tape = require('tape') -var Sha1 = require('../').sha1 - -var inputs = [ - ['', 'ascii'], - ['abc', 'ascii'], - ['123', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abc', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789ab', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'ascii'], - ['foobarbaz', 'ascii'] -] - -tape("hash is the same as node's crypto", function (t) { - inputs.forEach(function (v) { - var a = new Sha1().update(v[0], v[1]).digest('hex') - var e = crypto.createHash('sha1').update(v[0], v[1]).digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) - -tape('call update multiple times', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(s, v[1]) - _hash.update(s, v[1]) - } - - var a = hash.digest('hex') - var e = _hash.digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - t.end() -}) - -tape('call update twice', function (t) { - var _hash = crypto.createHash('sha1') - var hash = new Sha1() - - _hash.update('foo', 'ascii') - hash.update('foo', 'ascii') - - _hash.update('bar', 'ascii') - hash.update('bar', 'ascii') - - _hash.update('baz', 'ascii') - hash.update('baz', 'ascii') - - var a = hash.digest('hex') - var e = _hash.digest('hex') - - t.equal(a, e) - t.end() -}) - -tape('hex encoding', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(Buffer.from(s, 'ascii').toString('hex'), 'hex') - _hash.update(Buffer.from(s, 'ascii').toString('hex'), 'hex') - } - var a = hash.digest('hex') - var e = _hash.digest('hex') - - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) - -tape('call digest for more than MAX_UINT32 bits of data', function (t) { - var _hash = crypto.createHash('sha1') - var hash = new Sha1() - var bigData = Buffer.alloc(0x1ffffffff / 8) - - hash.update(bigData) - _hash.update(bigData) - - var a = hash.digest('hex') - var e = _hash.digest('hex') - - t.equal(a, e) - t.end() -}) diff --git a/node_modules/sha.js/test/vectors.js b/node_modules/sha.js/test/vectors.js deleted file mode 100644 index 48a646e..0000000 --- a/node_modules/sha.js/test/vectors.js +++ /dev/null @@ -1,72 +0,0 @@ -var tape = require('tape') -var vectors = require('hash-test-vectors') -// var from = require('bops/typedarray/from') -var Buffer = require('safe-buffer').Buffer - -var createHash = require('../') - -function makeTest (alg, i, verbose) { - var v = vectors[i] - - tape(alg + ': NIST vector ' + i, function (t) { - if (verbose) { - console.log(v) - console.log('VECTOR', i) - console.log('INPUT', v.input) - console.log(Buffer.from(v.input, 'base64').toString('hex')) - } - - var buf = Buffer.from(v.input, 'base64') - t.equal(createHash(alg).update(buf).digest('hex'), v[alg]) - - i = ~~(buf.length / 2) - var buf1 = buf.slice(0, i) - var buf2 = buf.slice(i, buf.length) - - console.log(buf1.length, buf2.length, buf.length) - console.log(createHash(alg)._block.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .digest('hex'), - v[alg] - ) - - var j, buf3 - - i = ~~(buf.length / 3) - j = ~~(buf.length * 2 / 3) - buf1 = buf.slice(0, i) - buf2 = buf.slice(i, j) - buf3 = buf.slice(j, buf.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .update(buf3) - .digest('hex'), - v[alg] - ) - - setTimeout(function () { - // avoid "too much recursion" errors in tape in firefox - t.end() - }) - }) -} - -if (process.argv[2]) { - makeTest(process.argv[2], parseInt(process.argv[3], 10), true) -} else { - vectors.forEach(function (v, i) { - makeTest('sha', i) - makeTest('sha1', i) - makeTest('sha224', i) - makeTest('sha256', i) - makeTest('sha384', i) - makeTest('sha512', i) - }) -} diff --git a/node_modules/shasum-object/.travis.yml b/node_modules/shasum-object/.travis.yml deleted file mode 100644 index 9491b87..0000000 --- a/node_modules/shasum-object/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: node_js -node_js: - - '0.8' - - '0.10' - - '0.12' - - '4' - - '6' - - '8' - - '10' - - '12' - - 'stable' -before_install: - - 'nvm install-latest-npm' diff --git a/node_modules/shasum-object/CHANGELOG.md b/node_modules/shasum-object/CHANGELOG.md deleted file mode 100644 index c14ca7c..0000000 --- a/node_modules/shasum-object/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# shasum-object change log - -All notable changes to this project will be documented in this file. - -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.0.0 -* Initial release. diff --git a/node_modules/shasum-object/CODE_OF_CONDUCT.md b/node_modules/shasum-object/CODE_OF_CONDUCT.md deleted file mode 100644 index 2ebc9b4..0000000 --- a/node_modules/shasum-object/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at renee@kooi.me. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [https://contributor-covenant.org/version/1/4][version] - -[homepage]: https://contributor-covenant.org -[version]: https://contributor-covenant.org/version/1/4/ diff --git a/node_modules/shasum-object/LICENSE.md b/node_modules/shasum-object/LICENSE.md deleted file mode 100644 index 6a9a147..0000000 --- a/node_modules/shasum-object/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -# [Apache License 2.0](https://spdx.org/licenses/Apache-2.0) - -Copyright 2019 Renée Kooi - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -> http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/shasum-object/README.md b/node_modules/shasum-object/README.md deleted file mode 100644 index 2267fce..0000000 --- a/node_modules/shasum-object/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# shasum-object - -get the shasum of a buffer or object - -[Install](#install) - [Usage](#usage) - [License: Apache-2.0](#license) - -[![npm][npm-image]][npm-url] -[![travis][travis-image]][travis-url] -[![standard][standard-image]][standard-url] - -[npm-image]: https://img.shields.io/npm/v/shasum-object.svg?style=flat-square -[npm-url]: https://www.npmjs.com/package/shasum-object -[travis-image]: https://img.shields.io/travis/com/goto-bus-stop/shasum-object.svg?style=flat-square -[travis-url]: https://travis-ci.com/goto-bus-stop/shasum-object -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square -[standard-url]: http://npm.im/standard - -## Install - -``` -npm install shasum-object -``` - -## Usage - -```js -var fs = require('fs') -var shasum = require('shasum-object') - -shasum('of a string') -shasum(fs.readFileSync('of-a-file.txt')) - -shasum({ - of: ['an', 'object'] -}) -``` - -## API -### `shasum(input, algorithm = 'sha1', encoding = 'hex')` - -Compute the hash for the given input. -- `input` - a string, buffer or JSON object. objects are stringified using [`fast-safe-stringify`](https://github.com/davidmarkclements/fast-safe-stringify). -- `algorithm` - the hash algorithm to use. see [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options). -- `encoding` - how to encode the hash result. see [`hash.digest`](https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding). - -## License - -[Apache-2.0](LICENSE.md) diff --git a/node_modules/shasum-object/bin.js b/node_modules/shasum-object/bin.js deleted file mode 100755 index 8af41b5..0000000 --- a/node_modules/shasum-object/bin.js +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs') -var shasum = require('.') - -var input = process.argv[2] -if (input && input !== '-') { - console.log(shasum(fs.readFileSync(input))) -} else { - var buffers = [] - process.stdin.on('data', function (chunk) { buffers.push(chunk) }) - process.stdin.on('end', function () { - console.log(shasum(Buffer.concat(buffers))) - }) -} diff --git a/node_modules/shasum-object/index.js b/node_modules/shasum-object/index.js deleted file mode 100644 index 55e8754..0000000 --- a/node_modules/shasum-object/index.js +++ /dev/null @@ -1,12 +0,0 @@ -var createHash = require('crypto').createHash -var stringify = require('fast-safe-stringify') - -module.exports = function shasum (input, hash, digest) { - if (!hash) hash = 'sha1' - if (!digest) digest = 'hex' - if (typeof input !== 'string' && !Buffer.isBuffer(input)) input = stringify.stable(input) - - return createHash(hash) - .update(input, typeof input === 'string' ? 'utf8' : undefined) - .digest(digest) -} diff --git a/node_modules/shasum-object/package.json b/node_modules/shasum-object/package.json deleted file mode 100644 index 2a37cb7..0000000 --- a/node_modules/shasum-object/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "shasum-object@^1.0.0", - "_id": "shasum-object@1.0.0", - "_inBundle": false, - "_integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", - "_location": "/shasum-object", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "shasum-object@^1.0.0", - "name": "shasum-object", - "escapedName": "shasum-object", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/deps-sort" - ], - "_resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "_shasum": "0b7b74ff5b66ecf9035475522fa05090ac47e29e", - "_spec": "shasum-object@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/deps-sort", - "author": { - "name": "Renée Kooi", - "email": "renee@kooi.me" - }, - "bugs": { - "url": "https://github.com/goto-bus-stop/shasum-object/issues" - }, - "bundleDependencies": false, - "dependencies": { - "fast-safe-stringify": "^2.0.7" - }, - "deprecated": false, - "description": "get the shasum of a buffer or object", - "devDependencies": { - "safe-buffer": "^5.2.0", - "standard": "^14.3.1", - "tape": "^4.10.0" - }, - "homepage": "https://github.com/goto-bus-stop/shasum-object", - "keywords": [ - "buffer", - "hash", - "object", - "sha1", - "shasum" - ], - "license": "Apache-2.0", - "main": "index.js", - "name": "shasum-object", - "repository": { - "type": "git", - "url": "git+https://github.com/goto-bus-stop/shasum-object.git" - }, - "scripts": { - "test": "standard && node test" - }, - "version": "1.0.0" -} diff --git a/node_modules/shasum-object/test/index.js b/node_modules/shasum-object/test/index.js deleted file mode 100644 index c13e9e6..0000000 --- a/node_modules/shasum-object/test/index.js +++ /dev/null @@ -1,39 +0,0 @@ -var tape = require('tape') -var Buffer = require('safe-buffer').Buffer -var shasum = require('..') - -tape('strings', function (t) { - t.plan(3) - t.strictEqual(shasum('abc'), 'a9993e364706816aba3e25717850c26c9cd0d89d') - t.strictEqual(shasum('abce'), '0a431a7631cabf6b11b984a943127b5e0aa9d687') - t.strictEqual(shasum('ab\xff'), 'ba5142a8207bd61baddf325088732e71cbfe8eb6') -}) - -tape('json values', function (t) { - t.plan(2) - t.strictEqual(shasum({}), 'bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f') - t.strictEqual(shasum([]), '97d170e1550eee4afc0af065b78cda302a97674c') -}) - -tape('buffers', function (t) { - t.plan(2) - t.strictEqual(shasum(Buffer.from('abc')), - 'a9993e364706816aba3e25717850c26c9cd0d89d') - t.strictEqual(shasum(Buffer.from('ab\xff').toString()), - 'ba5142a8207bd61baddf325088732e71cbfe8eb6') -}) - -tape('circular json', function (t) { - t.plan(1) - var a = { b: 1 } - a.a = a - t.strictEqual(shasum(a), 'a22ca7ba0fe6144501fe50d9c8a9ba889057db3b') -}) - -tape('stability', function (t) { - t.plan(4) - t.strictEqual(shasum({ a: 1, b: 2, c: 3 }), shasum({ c: 3, b: 2, a: 1 })) - t.strictEqual(shasum({ a: 1, b: 2, c: 3 }), shasum({ c: 3, b: 2, a: 1 })) - t.strictEqual(shasum({ a: 1, b: [2, 3], c: 4 }), shasum({ c: 4, b: [2, 3], a: 1 })) - t.strictEqual(shasum({ a: 1, b: [2, { c: 3, d: 4 }], e: 5 }), shasum({ e: 5, b: [2, { d: 4, c: 3 }], a: 1 })) -}) diff --git a/node_modules/shasum/.npmignore b/node_modules/shasum/.npmignore deleted file mode 100644 index 13abef4..0000000 --- a/node_modules/shasum/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/shasum/.travis.yml b/node_modules/shasum/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/node_modules/shasum/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/shasum/LICENSE b/node_modules/shasum/LICENSE deleted file mode 100644 index 6d03581..0000000 --- a/node_modules/shasum/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/shasum/README.md b/node_modules/shasum/README.md deleted file mode 100644 index e0a187d..0000000 --- a/node_modules/shasum/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# shasum - -Single function that return the sha1sum. -Installing this is just a little bit quicker than reading the crypto documentation. - -``` js -var shasum = require('shasum') -shasum(string || buffer || object) -``` - -Oh yeah, it works in the browser too, with [browserify](https://npmjs.org/package/browserify) - -## License - -MIT diff --git a/node_modules/shasum/browser.js b/node_modules/shasum/browser.js deleted file mode 100644 index 848a1dd..0000000 --- a/node_modules/shasum/browser.js +++ /dev/null @@ -1,13 +0,0 @@ - -var createHash = require('sha.js') -var Buffer = require('buffer').Buffer -var stringify = require('json-stable-stringify') - -module.exports = function hash (str, alg, format) { - str = 'string' === typeof str ? str - : Buffer.isBuffer(str) ? str - : stringify(str) - return createHash(alg || 'sha1') - .update(str, Buffer.isBuffer(str) ? null : 'utf8').digest(format || 'hex') -} - diff --git a/node_modules/shasum/index.js b/node_modules/shasum/index.js deleted file mode 100644 index 4cf08e5..0000000 --- a/node_modules/shasum/index.js +++ /dev/null @@ -1,13 +0,0 @@ - -var createHash = require('crypto').createHash -var Buffer = require('buffer').Buffer -var stringify = require('json-stable-stringify') - -module.exports = function hash (str, alg, format) { - str = 'string' === typeof str ? str - : Buffer.isBuffer(str) ? str - : stringify(str) - return createHash(alg || 'sha1') - .update(str, Buffer.isBuffer(str) ? null : 'utf8').digest(format || 'hex') -} - diff --git a/node_modules/shasum/package.json b/node_modules/shasum/package.json deleted file mode 100644 index 4754bd3..0000000 --- a/node_modules/shasum/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "shasum@^1.0.0", - "_id": "shasum@1.0.2", - "_inBundle": false, - "_integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "_location": "/shasum", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "shasum@^1.0.0", - "name": "shasum", - "escapedName": "shasum", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "_shasum": "e7012310d8f417f4deb5712150e5678b87ae565f", - "_spec": "shasum@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "browser": { - "./index.js": "./browser.js" - }, - "bugs": { - "url": "https://github.com/dominictarr/shasum/issues" - }, - "bundleDependencies": false, - "dependencies": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - }, - "deprecated": false, - "description": "Single function that return the sha1sum. Installing this is just a little bit quicker than reading the crypto documentation.", - "devDependencies": {}, - "homepage": "https://github.com/dominictarr/shasum", - "license": "MIT", - "name": "shasum", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/shasum.git" - }, - "scripts": { - "test": "node test/index.js && node test/index.js browser" - }, - "version": "1.0.2" -} diff --git a/node_modules/shasum/test/index.js b/node_modules/shasum/test/index.js deleted file mode 100644 index 990e7b2..0000000 --- a/node_modules/shasum/test/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var equal = require('assert').equal -var hash = require(process.argv[2] === 'browser' ? '../browser.js' : '..') - - -equal(hash('abc'), 'a9993e364706816aba3e25717850c26c9cd0d89d') -equal(hash('abce'), '0a431a7631cabf6b11b984a943127b5e0aa9d687') -equal(hash({}), 'bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f') -equal(hash([]), '97d170e1550eee4afc0af065b78cda302a97674c') -equal(hash(new Buffer('abc')), - 'a9993e364706816aba3e25717850c26c9cd0d89d') -equal(hash('ab\xff'),'ba5142a8207bd61baddf325088732e71cbfe8eb6') -equal(hash(new Buffer('ab\xff').toString()), - 'ba5142a8207bd61baddf325088732e71cbfe8eb6') -equal(hash({a:1,b:2,c:3}), hash({c:3,b:2,a:1})) -equal(hash({a:1,b:2,c:3}), hash({c:3,b:2,a:1})) -equal(hash({a:1,b:[2,3],c:4}), hash({c:4,b:[2,3],a:1})) -equal(hash({a:1,b:[2,{c:3,d:4}],e:5}), hash({e:5,b:[2,{d:4,c:3}],a:1})) - diff --git a/node_modules/shell-quote/.travis.yml b/node_modules/shell-quote/.travis.yml deleted file mode 100644 index 72a6882..0000000 --- a/node_modules/shell-quote/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: node_js -os: - - linux - - osx - - windows -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" - - "4" - - "5" - - "6" - - "7" - - "8" - - "9" - - "10" - - "11" - - "12" -matrix: - exclude: - - os: windows - node_js: "0.8" - - os: windows - node_js: "iojs" -before_install: - - 'if [ $TRAVIS_NODE_VERSION == 0.8 ]; then nvm install-latest-npm; fi' diff --git a/node_modules/shell-quote/CHANGELOG.md b/node_modules/shell-quote/CHANGELOG.md deleted file mode 100644 index b045252..0000000 --- a/node_modules/shell-quote/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# acorn-node change log - -All notable changes to this project will be documented in this file. - -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.7.2 -* Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. ([144e1c2](https://github.com/substack/node-shell-quote/commit/144e1c20cd57549a414c827fb3032e60b7b8721c)) - -## 1.7.1 -* Fix `$` being removed when not part of an environment variable name. ([@Adman](https://github.com/Admin) in [#32](https://github.com/substack/node-shell-quote/pull/32)) - -## 1.7.0 -* Add support for parsing `>>` and `>&` redirection operators. ([@forivall](https://github.com/forivall) in [#16](https://github.com/substack/node-shell-quote/pull/16)) -* Add support for parsing `<(` process substitution operator. ([@cuonglm](https://github.com/cuonglm) in [#15](https://github.com/substack/node-shell-quote/pull/15)) - -## 1.6.3 -* Fix Windows path quoting problems. ([@dy](https://github.com/dy) in [#34](https://github.com/substack/node-shell-quote/pull/34)) - -## 1.6.2 -* Remove dependencies in favour of native methods. ([@zertosh](https://github.com/zertosh) in [#21](https://github.com/substack/node-shell-quote/pull/21)) diff --git a/node_modules/shell-quote/LICENSE b/node_modules/shell-quote/LICENSE deleted file mode 100644 index 3d59c73..0000000 --- a/node_modules/shell-quote/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2013 James Halliday (mail@substack.net) - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/shell-quote/example/env.js b/node_modules/shell-quote/example/env.js deleted file mode 100644 index 3608a58..0000000 --- a/node_modules/shell-quote/example/env.js +++ /dev/null @@ -1,3 +0,0 @@ -var parse = require('../').parse; -var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }); -console.dir(xs); diff --git a/node_modules/shell-quote/example/op.js b/node_modules/shell-quote/example/op.js deleted file mode 100644 index d8d9064..0000000 --- a/node_modules/shell-quote/example/op.js +++ /dev/null @@ -1,3 +0,0 @@ -var parse = require('../').parse; -var xs = parse('beep || boop > /byte'); -console.dir(xs); diff --git a/node_modules/shell-quote/example/parse.js b/node_modules/shell-quote/example/parse.js deleted file mode 100644 index 4b3be5f..0000000 --- a/node_modules/shell-quote/example/parse.js +++ /dev/null @@ -1,3 +0,0 @@ -var parse = require('../').parse; -var xs = parse('a "b c" \\$def \'it\\\'s great\''); -console.dir(xs); diff --git a/node_modules/shell-quote/example/quote.js b/node_modules/shell-quote/example/quote.js deleted file mode 100644 index 434bf8a..0000000 --- a/node_modules/shell-quote/example/quote.js +++ /dev/null @@ -1,3 +0,0 @@ -var quote = require('../').quote; -var s = quote([ 'a', 'b c d', '$f', '"g"' ]); -console.log(s); diff --git a/node_modules/shell-quote/index.js b/node_modules/shell-quote/index.js deleted file mode 100644 index fac79be..0000000 --- a/node_modules/shell-quote/index.js +++ /dev/null @@ -1,199 +0,0 @@ -exports.quote = function (xs) { - return xs.map(function (s) { - if (s && typeof s === 'object') { - return s.op.replace(/(.)/g, '\\$1'); - } - else if (/["\s]/.test(s) && !/'/.test(s)) { - return "'" + s.replace(/(['\\])/g, '\\$1') + "'"; - } - else if (/["'\s]/.test(s)) { - return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"'; - } - else { - return String(s).replace(/([A-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2'); - } - }).join(' '); -}; - -// '<(' is process substitution operator and -// can be parsed the same as control operator -var CONTROL = '(?:' + [ - '\\|\\|', '\\&\\&', ';;', '\\|\\&', '\\<\\(', '>>', '>\\&', '[&;()|<>]' -].join('|') + ')'; -var META = '|&;()<> \\t'; -var BAREWORD = '(\\\\[\'"' + META + ']|[^\\s\'"' + META + '])+'; -var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"'; -var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\''; - -var TOKEN = ''; -for (var i = 0; i < 4; i++) { - TOKEN += (Math.pow(16,8)*Math.random()).toString(16); -} - -exports.parse = function (s, env, opts) { - var mapped = parse(s, env, opts); - if (typeof env !== 'function') return mapped; - return mapped.reduce(function (acc, s) { - if (typeof s === 'object') return acc.concat(s); - var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g')); - if (xs.length === 1) return acc.concat(xs[0]); - return acc.concat(xs.filter(Boolean).map(function (x) { - if (RegExp('^' + TOKEN).test(x)) { - return JSON.parse(x.split(TOKEN)[1]); - } - else return x; - })); - }, []); -}; - -function parse (s, env, opts) { - var chunker = new RegExp([ - '(' + CONTROL + ')', // control chars - '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')*' - ].join('|'), 'g'); - var match = s.match(chunker).filter(Boolean); - var commented = false; - - if (!match) return []; - if (!env) env = {}; - if (!opts) opts = {}; - return match.map(function (s, j) { - if (commented) { - return; - } - if (RegExp('^' + CONTROL + '$').test(s)) { - return { op: s }; - } - - // Hand-written scanner/parser for Bash quoting rules: - // - // 1. inside single quotes, all characters are printed literally. - // 2. inside double quotes, all characters are printed literally - // except variables prefixed by '$' and backslashes followed by - // either a double quote or another backslash. - // 3. outside of any quotes, backslashes are treated as escape - // characters and not printed (unless they are themselves escaped) - // 4. quote context can switch mid-token if there is no whitespace - // between the two quote contexts (e.g. all'one'"token" parses as - // "allonetoken") - var SQ = "'"; - var DQ = '"'; - var DS = '$'; - var BS = opts.escape || '\\'; - var quote = false; - var esc = false; - var out = ''; - var isGlob = false; - - for (var i = 0, len = s.length; i < len; i++) { - var c = s.charAt(i); - isGlob = isGlob || (!quote && (c === '*' || c === '?')); - if (esc) { - out += c; - esc = false; - } - else if (quote) { - if (c === quote) { - quote = false; - } - else if (quote == SQ) { - out += c; - } - else { // Double quote - if (c === BS) { - i += 1; - c = s.charAt(i); - if (c === DQ || c === BS || c === DS) { - out += c; - } else { - out += BS + c; - } - } - else if (c === DS) { - out += parseEnvVar(); - } - else { - out += c; - } - } - } - else if (c === DQ || c === SQ) { - quote = c; - } - else if (RegExp('^' + CONTROL + '$').test(c)) { - return { op: s }; - } - else if (RegExp('^#$').test(c)) { - commented = true; - if (out.length){ - return [out, { comment: s.slice(i+1) + match.slice(j+1).join(' ') }]; - } - return [{ comment: s.slice(i+1) + match.slice(j+1).join(' ') }]; - } - else if (c === BS) { - esc = true; - } - else if (c === DS) { - out += parseEnvVar(); - } - else out += c; - } - - if (isGlob) return {op: 'glob', pattern: out}; - - return out; - - function parseEnvVar() { - i += 1; - var varend, varname; - //debugger - if (s.charAt(i) === '{') { - i += 1; - if (s.charAt(i) === '}') { - throw new Error("Bad substitution: " + s.substr(i - 2, 3)); - } - varend = s.indexOf('}', i); - if (varend < 0) { - throw new Error("Bad substitution: " + s.substr(i)); - } - varname = s.substr(i, varend - i); - i = varend; - } - else if (/[*@#?$!_\-]/.test(s.charAt(i))) { - varname = s.charAt(i); - i += 1; - } - else { - varend = s.substr(i).match(/[^\w\d_]/); - if (!varend) { - varname = s.substr(i); - i = s.length; - } else { - varname = s.substr(i, varend.index); - i += varend.index - 1; - } - } - return getVar(null, '', varname); - } - }) - // finalize parsed aruments - .reduce(function(prev, arg){ - if (arg === undefined){ - return prev; - } - return prev.concat(arg); - },[]); - - function getVar (_, pre, key) { - var r = typeof env === 'function' ? env(key) : env[key]; - if (r === undefined && key != '') - r = ''; - else if (r === undefined) - r = '$'; - - if (typeof r === 'object') { - return pre + TOKEN + JSON.stringify(r) + TOKEN; - } - else return pre + r; - } -} diff --git a/node_modules/shell-quote/package.json b/node_modules/shell-quote/package.json deleted file mode 100644 index 2f5d9c7..0000000 --- a/node_modules/shell-quote/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "shell-quote@^1.6.1", - "_id": "shell-quote@1.7.2", - "_inBundle": false, - "_integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "_location": "/shell-quote", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "shell-quote@^1.6.1", - "name": "shell-quote", - "escapedName": "shell-quote", - "rawSpec": "^1.6.1", - "saveSpec": null, - "fetchSpec": "^1.6.1" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "_shasum": "67a7d02c76c9da24f99d20808fcaded0e0e04be2", - "_spec": "shell-quote@^1.6.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-shell-quote/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "quote and parse shell commands", - "devDependencies": { - "tape": "4" - }, - "homepage": "https://github.com/substack/node-shell-quote", - "keywords": [ - "command", - "parse", - "quote", - "shell" - ], - "license": "MIT", - "main": "index.js", - "name": "shell-quote", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/substack/node-shell-quote.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "1.7.2" -} diff --git a/node_modules/shell-quote/readme.markdown b/node_modules/shell-quote/readme.markdown deleted file mode 100644 index 85d9439..0000000 --- a/node_modules/shell-quote/readme.markdown +++ /dev/null @@ -1,138 +0,0 @@ -# shell-quote - -Parse and quote shell commands. - -# example - -## quote - -``` js -var quote = require('shell-quote').quote; -var s = quote([ 'a', 'b c d', '$f', '"g"' ]); -console.log(s); -``` - -output - -``` -a 'b c d' \$f '"g"' -``` - -## parse - -``` js -var parse = require('shell-quote').parse; -var xs = parse('a "b c" \\$def \'it\\\'s great\''); -console.dir(xs); -``` - -output - -``` -[ 'a', 'b c', '\\$def', 'it\'s great' ] -``` - -## parse with an environment variable - -``` js -var parse = require('shell-quote').parse; -var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }); -console.dir(xs); -``` - -output - -``` -[ 'beep', '--boop=/home/robot' ] -``` - -## parse with custom escape charcter - -``` js -var parse = require('shell-quote').parse; -var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }, { escape: '^' }); -console.dir(xs); -``` - -output - -``` -[ 'beep', '--boop=/home/robot' ] -``` - -## parsing shell operators - -``` js -var parse = require('shell-quote').parse; -var xs = parse('beep || boop > /byte'); -console.dir(xs); -``` - -output: - -``` -[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ] -``` - -## parsing shell comment - -``` js -var parse = require('shell-quote').parse; -var xs = parse('beep > boop # > kaboom'); -console.dir(xs); -``` - -output: - -``` -[ 'beep', { op: '>' }, 'boop', { comment: '> kaboom' } ] -``` - -# methods - -``` js -var quote = require('shell-quote').quote; -var parse = require('shell-quote').parse; -``` - -## quote(args) - -Return a quoted string for the array `args` suitable for using in shell -commands. - -## parse(cmd, env={}) - -Return an array of arguments from the quoted string `cmd`. - -Interpolate embedded bash-style `$VARNAME` and `${VARNAME}` variables with -the `env` object which like bash will replace undefined variables with `""`. - -`env` is usually an object but it can also be a function to perform lookups. -When `env(key)` returns a string, its result will be output just like `env[key]` -would. When `env(key)` returns an object, it will be inserted into the result -array like the operator objects. - -When a bash operator is encountered, the element in the array with be an object -with an `"op"` key set to the operator string. For example: - -``` -'beep || boop > /byte' -``` - -parses as: - -``` -[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ] -``` - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install shell-quote -``` - -# license - -MIT diff --git a/node_modules/shell-quote/test/comment.js b/node_modules/shell-quote/test/comment.js deleted file mode 100644 index bc6fbf2..0000000 --- a/node_modules/shell-quote/test/comment.js +++ /dev/null @@ -1,14 +0,0 @@ -var test = require('tape'); -var parse = require('../').parse; - -test('comment', function (t) { - t.same(parse('beep#boop'), [ 'beep', { comment: 'boop' } ]); - t.same(parse('beep #boop'), [ 'beep', { comment: 'boop' } ]); - t.same(parse('beep # boop'), [ 'beep', { comment: 'boop' } ]); - t.same(parse('beep # > boop'), [ 'beep', { comment: '> boop' } ]); - t.same(parse('beep # "> boop"'), [ 'beep', { comment: '"> boop"' } ]); - t.same(parse('beep "#"'), [ 'beep', '#' ]); - t.same(parse('beep #"#"#'), [ 'beep', { comment: '"#"#' } ]); - t.same(parse('beep > boop # > foo'), [ 'beep', {op: '>'}, 'boop', { comment: '> foo' } ]); - t.end(); -}); diff --git a/node_modules/shell-quote/test/env.js b/node_modules/shell-quote/test/env.js deleted file mode 100644 index b3faeb0..0000000 --- a/node_modules/shell-quote/test/env.js +++ /dev/null @@ -1,41 +0,0 @@ -var test = require('tape'); -var parse = require('../').parse; - -test('expand environment variables', function (t) { - t.same(parse('a $XYZ c', { XYZ: 'b' }), [ 'a', 'b', 'c' ]); - t.same(parse('a${XYZ}c', { XYZ: 'b' }), [ 'abc' ]); - t.same(parse('a${XYZ}c $XYZ', { XYZ: 'b' }), [ 'abc', 'b' ]); - t.same(parse('"-$X-$Y-"', { X: 'a', Y: 'b' }), [ '-a-b-' ]); - t.same(parse("'-$X-$Y-'", { X: 'a', Y: 'b' }), [ '-$X-$Y-' ]); - t.same(parse('qrs"$zzz"wxy', { zzz: 'tuv' }), [ 'qrstuvwxy' ]); - t.same(parse("qrs'$zzz'wxy", { zzz: 'tuv' }), [ 'qrs$zzzwxy' ]); - t.same(parse("qrs${zzz}wxy"), [ 'qrswxy' ]); - t.same(parse("qrs$wxy $"), [ 'qrs', '$' ]); - t.same(parse('grep "xy$"'), [ 'grep', 'xy$' ]); - t.same(parse("ab$x", { x: 'c' }), [ 'abc' ]); - t.same(parse("ab\\$x", { x: 'c' }), [ 'ab$x' ]); - t.same(parse("ab${x}def", { x: 'c' }), [ 'abcdef' ]); - t.same(parse("ab\\${x}def", { x: 'c' }), [ 'ab${x}def' ]); - t.same(parse('"ab\\${x}def"', { x: 'c' }), [ 'ab${x}def' ]); - - t.end(); -}); - -test('environment variables with metacharacters', function (t) { - t.same(parse('a $XYZ c', { XYZ: '"b"' }), [ 'a', '"b"', 'c' ]); - t.same(parse('a $XYZ c', { XYZ: '$X', X: 5 }), [ 'a', '$X', 'c' ]); - t.same(parse('a"$XYZ"c', { XYZ: "'xyz'" }), [ "a'xyz'c" ]); - - t.end(); -}); - -test('special shell parameters', function (t) { - var chars = '*@#?-$!0_'.split(''); - t.plan(chars.length); - - chars.forEach(function (c) { - var env = {}; - env[c] = 'xxx'; - t.same(parse('a $' + c + ' c', env), [ 'a', 'xxx', 'c' ]); - }); -}); diff --git a/node_modules/shell-quote/test/env_fn.js b/node_modules/shell-quote/test/env_fn.js deleted file mode 100644 index b9f3c20..0000000 --- a/node_modules/shell-quote/test/env_fn.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape'); -var parse = require('../').parse; - -test('functional env expansion', function (t) { - t.plan(4); - - t.same(parse('a $XYZ c', getEnv), [ 'a', 'xxx', 'c' ]); - t.same(parse('a $XYZ c', getEnvObj), [ 'a', { op: '@@' }, 'c' ]); - t.same(parse('a${XYZ}c', getEnvObj), [ 'a', { op: '@@' }, 'c' ]); - t.same(parse('"a $XYZ c"', getEnvObj), [ 'a ', { op: '@@' }, ' c' ]); - - function getEnv (key) { - return 'xxx'; - } - - function getEnvObj (key) { - return { op: '@@' }; - } -}); diff --git a/node_modules/shell-quote/test/op.js b/node_modules/shell-quote/test/op.js deleted file mode 100644 index 7aa9b49..0000000 --- a/node_modules/shell-quote/test/op.js +++ /dev/null @@ -1,78 +0,0 @@ -var test = require('tape'); -var parse = require('../').parse; - -test('single operators', function (t) { - t.same(parse('beep | boop'), [ 'beep', { op: '|' }, 'boop' ]); - t.same(parse('beep|boop'), [ 'beep', { op: '|' }, 'boop' ]); - t.same(parse('beep \\| boop'), [ 'beep', '|', 'boop' ]); - t.same(parse('beep "|boop"'), [ 'beep', '|boop' ]); - - t.same(parse('echo zing &'), [ 'echo', 'zing', { op: '&' } ]); - t.same(parse('echo zing&'), [ 'echo', 'zing', { op: '&' } ]); - t.same(parse('echo zing\\&'), [ 'echo', 'zing&' ]); - t.same(parse('echo "zing\\&"'), [ 'echo', 'zing\\&' ]); - - t.same(parse('beep;boop'), [ 'beep', { op: ';' }, 'boop' ]); - t.same(parse('(beep;boop)'), [ - { op: '(' }, 'beep', { op: ';' }, 'boop', { op: ')' } - ]); - - t.same(parse('beep>boop'), [ 'beep', { op: '>' }, 'boop' ]); - t.same(parse('beep 2>boop'), [ 'beep', '2', { op: '>' }, 'boop' ]); - t.same(parse('beep>blip'), - [ 'beep', { op: ';;' }, 'boop', { op: '|&' }, 'byte', { op: '>>' }, 'blip' ] - ); - - t.same(parse('beep 2>&1'), [ 'beep', '2', { op: '>&' }, '1' ]); - - t.same( - parse('beep<(boop)'), - [ 'beep', { op: '<(' }, 'boop', { op: ')' } ] - ); - t.same( - parse('beep<<(boop)'), - [ 'beep', { op: '<' }, { op: '<(' }, 'boop', { op: ')' } ] - ); - - t.end(); -}); - -test('glob patterns', function (t) { - t.same( - parse('tap test/*.test.js'), - [ 'tap', { op: 'glob', pattern: 'test/*.test.js' } ] - ); - - t.same(parse('tap "test/*.test.js"'), ['tap', 'test/*.test.js']); - t.end(); -}) diff --git a/node_modules/shell-quote/test/parse.js b/node_modules/shell-quote/test/parse.js deleted file mode 100644 index 2df4419..0000000 --- a/node_modules/shell-quote/test/parse.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require('tape'); -var parse = require('../').parse; - -test('parse shell commands', function (t) { - t.same(parse('a \'b\' "c"'), [ 'a', 'b', 'c' ]); - t.same( - parse('beep "boop" \'foo bar baz\' "it\'s \\"so\\" groovy"'), - [ 'beep', 'boop', 'foo bar baz', 'it\'s "so" groovy' ] - ); - t.same(parse('a b\\ c d'), [ 'a', 'b c', 'd' ]); - t.same(parse('\\$beep bo\\`op'), [ '$beep', 'bo`op' ]); - t.same(parse('echo "foo = \\"foo\\""'), [ 'echo', 'foo = "foo"' ]); - t.same(parse(''), []); - t.same(parse(' '), []); - t.same(parse("\t"), []); - t.same(parse('a"b c d"e'), [ 'ab c de' ]); - t.same(parse('a\\ b"c d"\\ e f'), [ 'a bc d e', 'f' ]); - t.same(parse('a\\ b"c d"\\ e\'f g\' h'), [ 'a bc d ef g', 'h' ]); - t.same(parse("x \"bl'a\"'h'"), ['x', "bl'ah"]) - t.same(parse("x bl^'a^'h'", {}, { escape: '^'}), ['x', "bl'a'h"]); - - t.end(); -}); diff --git a/node_modules/shell-quote/test/quote.js b/node_modules/shell-quote/test/quote.js deleted file mode 100644 index 7c31f01..0000000 --- a/node_modules/shell-quote/test/quote.js +++ /dev/null @@ -1,42 +0,0 @@ -var test = require('tape'); -var quote = require('../').quote; - -test('quote', function (t) { - t.equal(quote([ 'a', 'b', 'c d' ]), 'a b \'c d\''); - t.equal( - quote([ 'a', 'b', "it's a \"neat thing\"" ]), - 'a b "it\'s a \\"neat thing\\""' - ); - t.equal( - quote([ '$', '`', '\'' ]), - '\\$ \\` "\'"' - ); - t.equal(quote([]), ''); - t.equal(quote(["a\nb"]), "'a\nb'"); - t.equal(quote([' #(){}*|][!']), "' #(){}*|][!'"); - t.equal(quote(["'#(){}*|][!"]), '"\'#(){}*|][\\!"'); - t.equal(quote(["X#(){}*|][!"]), "X\\#\\(\\)\\{\\}\\*\\|\\]\\[\\!"); - t.equal(quote(["a\n#\nb"]), "'a\n#\nb'"); - t.equal(quote(['><;{}']), '\\>\\<\\;\\{\\}'); - t.equal(quote([ 'a', 1, true, false ]), 'a 1 true false'); - t.equal(quote([ 'a', 1, null, undefined ]), 'a 1 null undefined'); - t.equal(quote([ 'a\\x' ]), 'a\\\\x'); - t.end(); -}); - -test('quote ops', function (t) { - t.equal(quote([ 'a', { op: '|' }, 'b' ]), 'a \\| b'); - t.equal( - quote([ 'a', { op: '&&' }, 'b', { op: ';' }, 'c' ]), - 'a \\&\\& b \\; c' - ); - t.end(); -}); - -test('quote windows paths', { skip: 'breaking change, disabled until 2.x' }, function (t) { - var path = 'C:\\projects\\node-shell-quote\\index.js' - - t.equal(quote([path, 'b', 'c d']), 'C:\\projects\\node-shell-quote\\index.js b \'c d\'') - - t.end() -}) diff --git a/node_modules/shell-quote/test/set.js b/node_modules/shell-quote/test/set.js deleted file mode 100644 index ac45cf1..0000000 --- a/node_modules/shell-quote/test/set.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tape'); -var parse = require('../').parse; - -test('set env vars', function (t) { - t.same( - parse('ABC=444 x y z'), - [ 'ABC=444', 'x', 'y', 'z' ] - ); - t.same( - parse('ABC=3\\ 4\\ 5 x y z'), - [ 'ABC=3 4 5', 'x', 'y', 'z' ] - ); - t.same( - parse('X="7 8 9" printx'), - [ 'X=7 8 9', 'printx' ] - ); - t.same( - parse('X="7 8 9"; printx'), - [ 'X=7 8 9', { op: ';' }, 'printx' ] - ); - t.same( - parse('X="7 8 9"; printx', function (key) { - t.fail('should not have matched any keys'); - }), - [ 'X=7 8 9', { op: ';' }, 'printx' ] - ); - - t.end(); -}); diff --git a/node_modules/simple-concat/.travis.yml b/node_modules/simple-concat/.travis.yml deleted file mode 100644 index f178ec0..0000000 --- a/node_modules/simple-concat/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 'node' diff --git a/node_modules/simple-concat/LICENSE b/node_modules/simple-concat/LICENSE deleted file mode 100644 index c7e6852..0000000 --- a/node_modules/simple-concat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/simple-concat/README.md b/node_modules/simple-concat/README.md deleted file mode 100644 index 572e99c..0000000 --- a/node_modules/simple-concat/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# simple-concat [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] - -[travis-image]: https://img.shields.io/travis/feross/simple-concat/master.svg -[travis-url]: https://travis-ci.org/feross/simple-concat -[npm-image]: https://img.shields.io/npm/v/simple-concat.svg -[npm-url]: https://npmjs.org/package/simple-concat -[downloads-image]: https://img.shields.io/npm/dm/simple-concat.svg -[downloads-url]: https://npmjs.org/package/simple-concat - -### Super-minimalist version of `concat-stream`. Less than 15 lines! - -## install - -``` -npm install simple-concat -``` - -## usage - -This example is longer than the implementation. - -```js -var s = new stream.PassThrough() -concat(s, function (err, buf) { - if (err) throw err - console.error(buf) -}) -s.write('abc') -setTimeout(function () { - s.write('123') -}, 10) -setTimeout(function () { - s.write('456') -}, 20) -setTimeout(function () { - s.end('789') -}, 30) -``` - -## license - -MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/simple-concat/index.js b/node_modules/simple-concat/index.js deleted file mode 100644 index c2d8860..0000000 --- a/node_modules/simple-concat/index.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = function (stream, cb) { - var chunks = [] - stream.on('data', function (chunk) { - chunks.push(chunk) - }) - stream.once('end', function () { - if (cb) cb(null, Buffer.concat(chunks)) - cb = null - }) - stream.once('error', function (err) { - if (cb) cb(err) - cb = null - }) -} diff --git a/node_modules/simple-concat/package.json b/node_modules/simple-concat/package.json deleted file mode 100644 index f2430d6..0000000 --- a/node_modules/simple-concat/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "simple-concat@^1.0.0", - "_id": "simple-concat@1.0.0", - "_inBundle": false, - "_integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "_location": "/simple-concat", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "simple-concat@^1.0.0", - "name": "simple-concat", - "escapedName": "simple-concat", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/undeclared-identifiers" - ], - "_resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "_shasum": "7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6", - "_spec": "simple-concat@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/undeclared-identifiers", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/simple-concat/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Super-minimalist version of `concat-stream`. Less than 15 lines!", - "devDependencies": { - "standard": "^6.0.8", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/simple-concat", - "keywords": [ - "concat", - "concat-stream", - "concat stream" - ], - "license": "MIT", - "main": "index.js", - "name": "simple-concat", - "repository": { - "type": "git", - "url": "git://github.com/feross/simple-concat.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/simple-concat/test/basic.js b/node_modules/simple-concat/test/basic.js deleted file mode 100644 index f781294..0000000 --- a/node_modules/simple-concat/test/basic.js +++ /dev/null @@ -1,41 +0,0 @@ -var concat = require('../') -var stream = require('stream') -var test = require('tape') - -test('basic', function (t) { - t.plan(2) - var s = new stream.PassThrough() - concat(s, function (err, buf) { - t.error(err) - t.deepEqual(buf, new Buffer('abc123456789')) - }) - s.write('abc') - setTimeout(function () { - s.write('123') - }, 10) - setTimeout(function () { - s.write('456') - }, 20) - setTimeout(function () { - s.end('789') - }, 30) -}) - -test('error', function (t) { - t.plan(2) - var s = new stream.PassThrough() - concat(s, function (err, buf) { - t.ok(err, 'got expected error') - t.ok(!buf) - }) - s.write('abc') - setTimeout(function () { - s.write('123') - }, 10) - setTimeout(function () { - s.write('456') - }, 20) - setTimeout(function () { - s.emit('error', new Error('error')) - }, 30) -}) diff --git a/node_modules/source-map/CHANGELOG.md b/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066..0000000 --- a/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/source-map/LICENSE b/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf..0000000 --- a/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map/README.md b/node_modules/source-map/README.md deleted file mode 100644 index 3281339..0000000 --- a/node_modules/source-map/README.md +++ /dev/null @@ -1,729 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/source-map/dist/source-map.debug.js b/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab638..0000000 --- a/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3091 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.js b/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e2..0000000 --- a/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3090 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.min.js b/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd..0000000 --- a/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/source-map/lib/array-set.js b/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81..0000000 --- a/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/source-map/lib/base64-vlq.js b/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b404..0000000 --- a/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/source-map/lib/base64.js b/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b3..0000000 --- a/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/source-map/lib/binary-search.js b/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac94..0000000 --- a/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/source-map/lib/mapping-list.js b/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274..0000000 --- a/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/source-map/lib/quick-sort.js b/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caad..0000000 --- a/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/source-map/lib/source-map-consumer.js b/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc28..0000000 --- a/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1082 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map/lib/source-map-generator.js b/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7f..0000000 --- a/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,416 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map/lib/source-node.js b/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53..0000000 --- a/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/source-map/lib/util.js b/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e45..0000000 --- a/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,417 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/source-map/package.json b/node_modules/source-map/package.json deleted file mode 100644 index 6c6b3ef..0000000 --- a/node_modules/source-map/package.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "_from": "source-map@~0.5.3", - "_id": "source-map@0.5.7", - "_inBundle": false, - "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "_location": "/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "source-map@~0.5.3", - "name": "source-map", - "escapedName": "source-map", - "rawSpec": "~0.5.3", - "saveSpec": null, - "fetchSpec": "~0.5.3" - }, - "_requiredBy": [ - "/combine-source-map", - "/inline-source-map" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "_shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc", - "_spec": "source-map@~0.5.3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/combine-source-map", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "deprecated": false, - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} diff --git a/node_modules/source-map/source-map.js b/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe8..0000000 --- a/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/stream-browserify/.travis.yml b/node_modules/stream-browserify/.travis.yml deleted file mode 100644 index 8e536f4..0000000 --- a/node_modules/stream-browserify/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -sudo: false -language: node_js -node_js: - - 'stable' - - '10' - - '9' - - '8' - - '6' - - '4' - - '0.12' - - '0.10' - - '0.8' -before_install: - # Old npm certs are untrusted https://github.com/npm/npm/issues/20191 - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.8" ]; then export NPM_CONFIG_STRICT_SSL=false; fi' - - 'nvm install-latest-npm' diff --git a/node_modules/stream-browserify/LICENSE b/node_modules/stream-browserify/LICENSE deleted file mode 100644 index e45bc69..0000000 --- a/node_modules/stream-browserify/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -This software is released under the MIT license: - -Copyright (c) James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/stream-browserify/index.js b/node_modules/stream-browserify/index.js deleted file mode 100644 index 8d6a13a..0000000 --- a/node_modules/stream-browserify/index.js +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Stream; - -var EE = require('events').EventEmitter; -var inherits = require('inherits'); - -inherits(Stream, EE); -Stream.Readable = require('readable-stream/readable.js'); -Stream.Writable = require('readable-stream/writable.js'); -Stream.Duplex = require('readable-stream/duplex.js'); -Stream.Transform = require('readable-stream/transform.js'); -Stream.PassThrough = require('readable-stream/passthrough.js'); - -// Backwards-compat with node 0.4.x -Stream.Stream = Stream; - - - -// old-style streams. Note that the pipe method (the only relevant -// part of this class) is overridden in the Readable class. - -function Stream() { - EE.call(this); -} - -Stream.prototype.pipe = function(dest, options) { - var source = this; - - function ondata(chunk) { - if (dest.writable) { - if (false === dest.write(chunk) && source.pause) { - source.pause(); - } - } - } - - source.on('data', ondata); - - function ondrain() { - if (source.readable && source.resume) { - source.resume(); - } - } - - dest.on('drain', ondrain); - - // If the 'end' option is not supplied, dest.end() will be called when - // source gets the 'end' or 'close' events. Only dest.end() once. - if (!dest._isStdio && (!options || options.end !== false)) { - source.on('end', onend); - source.on('close', onclose); - } - - var didOnEnd = false; - function onend() { - if (didOnEnd) return; - didOnEnd = true; - - dest.end(); - } - - - function onclose() { - if (didOnEnd) return; - didOnEnd = true; - - if (typeof dest.destroy === 'function') dest.destroy(); - } - - // don't leave dangling pipes when there are errors. - function onerror(er) { - cleanup(); - if (EE.listenerCount(this, 'error') === 0) { - throw er; // Unhandled stream error in pipe. - } - } - - source.on('error', onerror); - dest.on('error', onerror); - - // remove all the event listeners that were added. - function cleanup() { - source.removeListener('data', ondata); - dest.removeListener('drain', ondrain); - - source.removeListener('end', onend); - source.removeListener('close', onclose); - - source.removeListener('error', onerror); - dest.removeListener('error', onerror); - - source.removeListener('end', cleanup); - source.removeListener('close', cleanup); - - dest.removeListener('close', cleanup); - } - - source.on('end', cleanup); - source.on('close', cleanup); - - dest.on('close', cleanup); - - dest.emit('pipe', source); - - // Allow for unix-like usage: A.pipe(B).pipe(C) - return dest; -}; diff --git a/node_modules/stream-browserify/package.json b/node_modules/stream-browserify/package.json deleted file mode 100644 index 0f8b048..0000000 --- a/node_modules/stream-browserify/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "stream-browserify@^2.0.0", - "_id": "stream-browserify@2.0.2", - "_inBundle": false, - "_integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "_location": "/stream-browserify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "stream-browserify@^2.0.0", - "name": "stream-browserify", - "escapedName": "stream-browserify", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "_shasum": "87521d38a44aa7ee91ce1cd2a47df0cb49dd660b", - "_spec": "stream-browserify@^2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/browserify/stream-browserify/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - }, - "deprecated": false, - "description": "the stream module from node core for browsers", - "devDependencies": { - "safe-buffer": "^5.1.2", - "tape": "^4.2.0", - "typedarray": "~0.0.6" - }, - "homepage": "https://github.com/browserify/stream-browserify", - "keywords": [ - "stream", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "name": "stream-browserify", - "repository": { - "type": "git", - "url": "git://github.com/browserify/stream-browserify.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/3.5", - "firefox/10", - "firefox/nightly", - "chrome/10", - "chrome/latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "2.0.2" -} diff --git a/node_modules/stream-browserify/readme.markdown b/node_modules/stream-browserify/readme.markdown deleted file mode 100644 index f89dd73..0000000 --- a/node_modules/stream-browserify/readme.markdown +++ /dev/null @@ -1,25 +0,0 @@ -# stream-browserify - -the stream module from node core, for browsers! - -[![build status](https://secure.travis-ci.org/browserify/stream-browserify.svg)](http://travis-ci.org/browserify/stream-browserify) - -# methods - -Consult the node core -[documentation on streams](http://nodejs.org/docs/latest/api/stream.html). - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install stream-browserify -``` - -but if you are using browserify you will get this module automatically when you -do `require('stream')`. - -# license - -MIT diff --git a/node_modules/stream-browserify/test/buf.js b/node_modules/stream-browserify/test/buf.js deleted file mode 100644 index 95f7772..0000000 --- a/node_modules/stream-browserify/test/buf.js +++ /dev/null @@ -1,33 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var Buffer = require('safe-buffer').Buffer; - -var Writable = require('../').Writable; -var inherits = require('inherits'); - -inherits(TestWritable, Writable); - -function TestWritable(opt) { - if (!(this instanceof TestWritable)) - return new TestWritable(opt); - Writable.call(this, opt); - this._written = []; -} - -TestWritable.prototype._write = function(chunk, encoding, cb) { - this._written.push(chunk); - cb(); -}; - -var buf = Buffer.from([ 88 ]); - -test('.writable writing ArrayBuffer', function(t) { - var writable = new TestWritable(); - - writable.write(buf); - writable.end(); - - t.equal(writable._written.length, 1); - t.equal(writable._written[0].toString(), 'X') - t.end() -}); diff --git a/node_modules/stream-combiner2/.npmignore b/node_modules/stream-combiner2/.npmignore deleted file mode 100644 index 13abef4..0000000 --- a/node_modules/stream-combiner2/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/stream-combiner2/.travis.yml b/node_modules/stream-combiner2/.travis.yml deleted file mode 100644 index 51fea83..0000000 --- a/node_modules/stream-combiner2/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - - 0.12 - - 4 diff --git a/node_modules/stream-combiner2/LICENSE b/node_modules/stream-combiner2/LICENSE deleted file mode 100644 index 6d03581..0000000 --- a/node_modules/stream-combiner2/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/stream-combiner2/README.md b/node_modules/stream-combiner2/README.md deleted file mode 100644 index 1fc19b0..0000000 --- a/node_modules/stream-combiner2/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# stream-combiner2 - -This is a sequel to -[stream-combiner](https://npmjs.org/package/stream-combiner) -for streams3. - -``` js -var combine = require('stream-combiner2') -``` - -## Combine (stream1,...,streamN) - -Turn a pipeline into a single stream. `Combine` returns a stream that writes to the first stream -and reads from the last stream. - -Streams1 streams are automatically upgraded to be streams3 streams. - -Listening for 'error' will recieve errors from all streams inside the pipe. - -```js -var Combine = require('stream-combiner') -var es = require('event-stream') - -Combine( // connect streams together with `pipe` - process.openStdin(), // open stdin - es.split(), // split stream to break on newlines - es.map(function (data, callback) { // turn this async function into a stream - var repr = inspect(JSON.parse(data)) // render it nicely - callback(null, repr) - }), - process.stdout // pipe it to stdout ! -) -``` - -## License - -MIT diff --git a/node_modules/stream-combiner2/index.js b/node_modules/stream-combiner2/index.js deleted file mode 100644 index 1a279a3..0000000 --- a/node_modules/stream-combiner2/index.js +++ /dev/null @@ -1,68 +0,0 @@ -var PassThrough = require('readable-stream').PassThrough -var Readable = require('readable-stream').Readable -var duplexer = require('duplexer2') - -module.exports = function () { - var streams - if(arguments.length == 1 && Array.isArray(arguments[0])) { - streams = arguments[0] - } else { - streams = [].slice.call(arguments) - } - return combine(streams) -} - -module.exports.obj = function () { - var streams - if(arguments.length == 1 && Array.isArray(arguments[0])) { - streams = arguments[0] - } else { - streams = [].slice.call(arguments) - } - return combine(streams, { objectMode: true }) -} - - -function combine (streams, opts) { - - for (var i = 0; i < streams.length; i++) - streams[i] = wrap(streams[i], opts) - - if(streams.length == 0) - return new PassThrough(opts) - else if(streams.length == 1) - return streams[0] - - var first = streams[0] - , last = streams[streams.length - 1] - , thepipe = duplexer(opts, first, last) - - //pipe all the streams together - - function recurse (streams) { - if(streams.length < 2) - return - streams[0].pipe(streams[1]) - recurse(streams.slice(1)) - } - - recurse(streams) - - function onerror () { - var args = [].slice.call(arguments) - args.unshift('error') - thepipe.emit.apply(thepipe, args) - } - - //es.duplex already reemits the error from the first and last stream. - //add a listener for the inner streams in the pipeline. - for(var i = 1; i < streams.length - 1; i ++) - streams[i].on('error', onerror) - - return thepipe -} - -function wrap (tr, opts) { - if (typeof tr.read === 'function') return tr - return new Readable(opts).wrap(tr) -} diff --git a/node_modules/stream-combiner2/package.json b/node_modules/stream-combiner2/package.json deleted file mode 100644 index 54f1a48..0000000 --- a/node_modules/stream-combiner2/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "stream-combiner2@^1.1.1", - "_id": "stream-combiner2@1.1.1", - "_inBundle": false, - "_integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "_location": "/stream-combiner2", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "stream-combiner2@^1.1.1", - "name": "stream-combiner2", - "escapedName": "stream-combiner2", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "_shasum": "fb4d8a1420ea362764e21ad4780397bebcb41cbe", - "_spec": "stream-combiner2@^1.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/module-deps", - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "bugs": { - "url": "https://github.com/substack/stream-combiner2/issues" - }, - "bundleDependencies": false, - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - }, - "deprecated": false, - "description": "This is a sequel to [stream-combiner](https://npmjs.org/package/stream-combiner) for streams3.", - "devDependencies": { - "event-stream": "~3.0.7", - "tape": "~2.3.0", - "through2": "^2.0.0" - }, - "homepage": "https://github.com/substack/stream-combiner2", - "license": "MIT", - "name": "stream-combiner2", - "repository": { - "type": "git", - "url": "git://github.com/substack/stream-combiner2.git" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "version": "1.1.1" -} diff --git a/node_modules/stream-combiner2/test/index.js b/node_modules/stream-combiner2/test/index.js deleted file mode 100644 index 79ee38a..0000000 --- a/node_modules/stream-combiner2/test/index.js +++ /dev/null @@ -1,98 +0,0 @@ -var es = require('event-stream') -var through = require('through2') -var combine = require('..') -var test = require('tape') - -test('re-emit error object for old streams', function (test) { - test.plan(1) - - var expectedErr = new Error('asplode') - - var pipe = combine( - es.through(function(data) { - return this.emit('error', expectedErr) - }) - ) - - pipe.on('error', function (err) { - test.equal(err, expectedErr) - }) - - pipe.write('pow') -}) - -test('do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); -}) - -test('3 pipe do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); - -}) - -test('0 argument through stream', function (test) { - test.plan(3) - var pipe = combine() - , expected = [ 'beep', 'boop', 'robots' ] - - pipe.pipe(es.through(function(data) { - test.equal(data.toString('utf8'), expected.shift()) - })) - pipe.write('beep') - pipe.write('boop') - pipe.end('robots') -}) - -test('object mode', function (test) { - test.plan(2) - var pipe = combine.obj() - , expected = [ [4,5,6], {x:5} ] - - pipe.pipe(through.obj(function(data, enc, next) { - test.deepEqual(data, expected.shift()) - next() - })) - pipe.write([4,5,6]) - pipe.write({x:5}) - pipe.end() -}) - diff --git a/node_modules/stream-http/LICENSE b/node_modules/stream-http/LICENSE deleted file mode 100644 index 7267465..0000000 --- a/node_modules/stream-http/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2015 John Hiesey - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/stream-http/README.md b/node_modules/stream-http/README.md deleted file mode 100644 index d4aeda2..0000000 --- a/node_modules/stream-http/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# stream-http [![Build Status](https://travis-ci.org/jhiesey/stream-http.svg?branch=master)](https://travis-ci.org/jhiesey/stream-http) - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/stream-http.svg)](https://saucelabs.com/u/stream-http) - -This module is an implementation of Node's native `http` module for the browser. -It tries to match Node's API and behavior as closely as possible, but some features -aren't available, since browsers don't give nearly as much control over requests. - -This is heavily inspired by, and intended to replace, [http-browserify](https://github.com/substack/http-browserify). - -## What does it do? - -In accordance with its name, `stream-http` tries to provide data to its caller before -the request has completed whenever possible. - -Backpressure, allowing the browser to only pull data from the server as fast as it is -consumed, is supported in: -* Chrome >= 58 (using `fetch` and `WritableStream`) - -The following browsers support true streaming, where only a small amount of the request -has to be held in memory at once: -* Chrome >= 43 (using the `fetch` API) -* Firefox >= 9 (using `moz-chunked-arraybuffer` responseType with xhr) - -All other supported browsers support pseudo-streaming, where the data is available before -the request finishes, but the entire response must be held in memory. This works for both -text and binary data. - -### IE note: -As of version 3.0.0, IE10 and below are no longer supported. IE11 support will remain for -now. - -## How do you use it? - -The intent is to have the same API as the client part of the -[Node HTTP module](https://nodejs.org/api/http.html). The interfaces are the same wherever -practical, although limitations in browsers make an exact clone of the Node API impossible. - -This module implements `http.request`, `http.get`, and most of `http.ClientRequest` -and `http.IncomingMessage` in addition to `http.METHODS` and `http.STATUS_CODES`. See the -Node docs for how these work. - -### Extra features compared to Node - -* The `message.url` property provides access to the final URL after all redirects. This -is useful since the browser follows all redirects silently, unlike Node. It is available -in Chrome 37 and newer, Firefox 32 and newer, and Safari 9 and newer. - -* The `options.withCredentials` boolean flag, used to indicate if the browser should send -cookies or authentication information with a CORS request. Default false. - -This module has to make some tradeoffs to support binary data and/or streaming. Generally, -the module can make a fairly good decision about which underlying browser features to use, -but sometimes it helps to get a little input from the developer. - -* The `options.mode` field passed into `http.request` or `http.get` can take on one of the -following values: - * 'default' (or any falsy value, including `undefined`): Try to provide partial data before -the request completes, but not at the cost of correctness for binary data or correctness of -the 'content-type' response header. This mode will also avoid slower code paths whenever -possible, which is particularly useful when making large requests in a browser like Safari -that has a weaker JavaScript engine. - * 'allow-wrong-content-type': Provides partial data in more cases than 'default', but -at the expense of causing the 'content-type' response header to be incorrectly reported -(as 'text/plain; charset=x-user-defined') in some browsers, notably Safari and Chrome 42 -and older. Preserves binary data whenever possible. In some cases the implementation may -also be a bit slow. This was the default in versions of this module before 1.5. - * 'prefer-stream': Provide data before the request completes even if binary data (anything -that isn't a single-byte ASCII or UTF8 character) will be corrupted. Of course, this option -is only safe for text data. May also cause the 'content-type' response header to be -incorrectly reported (as 'text/plain; charset=x-user-defined'). - * 'disable-fetch': Force the use of plain XHR regardless of the browser declaring a fetch -capability. Preserves the correctness of binary data and the 'content-type' response header. - * 'prefer-fast': Deprecated; now a synonym for 'default', which has the same performance -characteristics as this mode did in versions before 1.5. - -* `options.requestTimeout` allows setting a timeout in millisecionds for XHR and fetch (if -supported by the browser). This is a limit on how long the entire process takes from -beginning to end. Note that this is not the same as the node `setTimeout` functions, -which apply to pauses in data transfer over the underlying socket, or the node `timeout` -option, which applies to opening the connection. - -### Features missing compared to Node - -* `http.Agent` is only a stub -* The 'socket', 'connect', 'upgrade', and 'continue' events on `http.ClientRequest`. -* Any operations, including `request.setTimeout`, that operate directly on the underlying -socket. -* Any options that are disallowed for security reasons. This includes setting or getting -certain headers. -* `message.httpVersion` -* `message.rawHeaders` is modified by the browser, and may not quite match what is sent by -the server. -* `message.trailers` and `message.rawTrailers` will remain empty. -* Redirects are followed silently by the browser, so it isn't possible to access the 301/302 -redirect pages. -* The `timeout` event/option and `setTimeout` functions, which operate on the underlying -socket, are not available. However, see `options.requestTimeout` above. - -## Example - -``` js -http.get('/bundle.js', function (res) { - var div = document.getElementById('result'); - div.innerHTML += 'GET /beep
'; - - res.on('data', function (buf) { - div.innerHTML += buf; - }); - - res.on('end', function () { - div.innerHTML += '
__END__'; - }); -}) -``` - -## Running tests - -There are two sets of tests: the tests that run in Node (found in `test/node`) and the tests -that run in the browser (found in `test/browser`). Normally the browser tests run on -[Sauce Labs](http://saucelabs.com/). - -Running `npm test` will run both sets of tests, but in order for the Sauce Labs tests to run -you will need to sign up for an account (free for open source projects) and put the -credentials in a [`.airtaprc` file](https://github.com/airtap/airtap/blob/master/doc/airtaprc.md). -You will also need to run a [Sauce Connect Proxy](https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy) -with the same credentials. - -To run just the Node tests, run `npm run test-node`. - -To run the browser tests locally, run `npm run test-browser-local` and point your browser to -the link shown in your terminal. - -## License - -MIT. Copyright (C) John Hiesey and other contributors. diff --git a/node_modules/stream-http/index.js b/node_modules/stream-http/index.js deleted file mode 100644 index 84bfe51..0000000 --- a/node_modules/stream-http/index.js +++ /dev/null @@ -1,85 +0,0 @@ -var ClientRequest = require('./lib/request') -var response = require('./lib/response') -var extend = require('xtend') -var statusCodes = require('builtin-status-codes') -var url = require('url') - -var http = exports - -http.request = function (opts, cb) { - if (typeof opts === 'string') - opts = url.parse(opts) - else - opts = extend(opts) - - // Normally, the page is loaded from http or https, so not specifying a protocol - // will result in a (valid) protocol-relative url. However, this won't work if - // the protocol is something else, like 'file:' - var defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : '' - - var protocol = opts.protocol || defaultProtocol - var host = opts.hostname || opts.host - var port = opts.port - var path = opts.path || '/' - - // Necessary for IPv6 addresses - if (host && host.indexOf(':') !== -1) - host = '[' + host + ']' - - // This may be a relative url. The browser should always be able to interpret it correctly. - opts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path - opts.method = (opts.method || 'GET').toUpperCase() - opts.headers = opts.headers || {} - - // Also valid opts.auth, opts.mode - - var req = new ClientRequest(opts) - if (cb) - req.on('response', cb) - return req -} - -http.get = function get (opts, cb) { - var req = http.request(opts, cb) - req.end() - return req -} - -http.ClientRequest = ClientRequest -http.IncomingMessage = response.IncomingMessage - -http.Agent = function () {} -http.Agent.defaultMaxSockets = 4 - -http.globalAgent = new http.Agent() - -http.STATUS_CODES = statusCodes - -http.METHODS = [ - 'CHECKOUT', - 'CONNECT', - 'COPY', - 'DELETE', - 'GET', - 'HEAD', - 'LOCK', - 'M-SEARCH', - 'MERGE', - 'MKACTIVITY', - 'MKCOL', - 'MOVE', - 'NOTIFY', - 'OPTIONS', - 'PATCH', - 'POST', - 'PROPFIND', - 'PROPPATCH', - 'PURGE', - 'PUT', - 'REPORT', - 'SEARCH', - 'SUBSCRIBE', - 'TRACE', - 'UNLOCK', - 'UNSUBSCRIBE' -] \ No newline at end of file diff --git a/node_modules/stream-http/lib/capability.js b/node_modules/stream-http/lib/capability.js deleted file mode 100644 index eca7635..0000000 --- a/node_modules/stream-http/lib/capability.js +++ /dev/null @@ -1,59 +0,0 @@ -exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream) - -exports.writableStream = isFunction(global.WritableStream) - -exports.abortController = isFunction(global.AbortController) - -// The xhr request to example.com may violate some restrictive CSP configurations, -// so if we're running in a browser that supports `fetch`, avoid calling getXHR() -// and assume support for certain features below. -var xhr -function getXHR () { - // Cache the xhr value - if (xhr !== undefined) return xhr - - if (global.XMLHttpRequest) { - xhr = new global.XMLHttpRequest() - // If XDomainRequest is available (ie only, where xhr might not work - // cross domain), use the page location. Otherwise use example.com - // Note: this doesn't actually make an http request. - try { - xhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com') - } catch(e) { - xhr = null - } - } else { - // Service workers don't have XHR - xhr = null - } - return xhr -} - -function checkTypeSupport (type) { - var xhr = getXHR() - if (!xhr) return false - try { - xhr.responseType = type - return xhr.responseType === type - } catch (e) {} - return false -} - -// If fetch is supported, then arraybuffer will be supported too. Skip calling -// checkTypeSupport(), since that calls getXHR(). -exports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer') - -// These next two tests unavoidably show warnings in Chrome. Since fetch will always -// be used if it's available, just return false for these to avoid the warnings. -exports.msstream = !exports.fetch && checkTypeSupport('ms-stream') -exports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer') - -// If fetch is supported, then overrideMimeType will be supported too. Skip calling -// getXHR(). -exports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false) - -function isFunction (value) { - return typeof value === 'function' -} - -xhr = null // Help gc diff --git a/node_modules/stream-http/lib/request.js b/node_modules/stream-http/lib/request.js deleted file mode 100644 index e6c15d1..0000000 --- a/node_modules/stream-http/lib/request.js +++ /dev/null @@ -1,315 +0,0 @@ -var capability = require('./capability') -var inherits = require('inherits') -var response = require('./response') -var stream = require('readable-stream') - -var IncomingMessage = response.IncomingMessage -var rStates = response.readyStates - -function decideMode (preferBinary, useFetch) { - if (capability.fetch && useFetch) { - return 'fetch' - } else if (capability.mozchunkedarraybuffer) { - return 'moz-chunked-arraybuffer' - } else if (capability.msstream) { - return 'ms-stream' - } else if (capability.arraybuffer && preferBinary) { - return 'arraybuffer' - } else { - return 'text' - } -} - -var ClientRequest = module.exports = function (opts) { - var self = this - stream.Writable.call(self) - - self._opts = opts - self._body = [] - self._headers = {} - if (opts.auth) - self.setHeader('Authorization', 'Basic ' + Buffer.from(opts.auth).toString('base64')) - Object.keys(opts.headers).forEach(function (name) { - self.setHeader(name, opts.headers[name]) - }) - - var preferBinary - var useFetch = true - if (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) { - // If the use of XHR should be preferred. Not typically needed. - useFetch = false - preferBinary = true - } else if (opts.mode === 'prefer-streaming') { - // If streaming is a high priority but binary compatibility and - // the accuracy of the 'content-type' header aren't - preferBinary = false - } else if (opts.mode === 'allow-wrong-content-type') { - // If streaming is more important than preserving the 'content-type' header - preferBinary = !capability.overrideMimeType - } else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') { - // Use binary if text streaming may corrupt data or the content-type header, or for speed - preferBinary = true - } else { - throw new Error('Invalid value for opts.mode') - } - self._mode = decideMode(preferBinary, useFetch) - self._fetchTimer = null - - self.on('finish', function () { - self._onFinish() - }) -} - -inherits(ClientRequest, stream.Writable) - -ClientRequest.prototype.setHeader = function (name, value) { - var self = this - var lowerName = name.toLowerCase() - // This check is not necessary, but it prevents warnings from browsers about setting unsafe - // headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but - // http-browserify did it, so I will too. - if (unsafeHeaders.indexOf(lowerName) !== -1) - return - - self._headers[lowerName] = { - name: name, - value: value - } -} - -ClientRequest.prototype.getHeader = function (name) { - var header = this._headers[name.toLowerCase()] - if (header) - return header.value - return null -} - -ClientRequest.prototype.removeHeader = function (name) { - var self = this - delete self._headers[name.toLowerCase()] -} - -ClientRequest.prototype._onFinish = function () { - var self = this - - if (self._destroyed) - return - var opts = self._opts - - var headersObj = self._headers - var body = null - if (opts.method !== 'GET' && opts.method !== 'HEAD') { - body = new Blob(self._body, { - type: (headersObj['content-type'] || {}).value || '' - }); - } - - // create flattened list of headers - var headersList = [] - Object.keys(headersObj).forEach(function (keyName) { - var name = headersObj[keyName].name - var value = headersObj[keyName].value - if (Array.isArray(value)) { - value.forEach(function (v) { - headersList.push([name, v]) - }) - } else { - headersList.push([name, value]) - } - }) - - if (self._mode === 'fetch') { - var signal = null - var fetchTimer = null - if (capability.abortController) { - var controller = new AbortController() - signal = controller.signal - self._fetchAbortController = controller - - if ('requestTimeout' in opts && opts.requestTimeout !== 0) { - self._fetchTimer = global.setTimeout(function () { - self.emit('requestTimeout') - if (self._fetchAbortController) - self._fetchAbortController.abort() - }, opts.requestTimeout) - } - } - - global.fetch(self._opts.url, { - method: self._opts.method, - headers: headersList, - body: body || undefined, - mode: 'cors', - credentials: opts.withCredentials ? 'include' : 'same-origin', - signal: signal - }).then(function (response) { - self._fetchResponse = response - self._connect() - }, function (reason) { - global.clearTimeout(self._fetchTimer) - if (!self._destroyed) - self.emit('error', reason) - }) - } else { - var xhr = self._xhr = new global.XMLHttpRequest() - try { - xhr.open(self._opts.method, self._opts.url, true) - } catch (err) { - process.nextTick(function () { - self.emit('error', err) - }) - return - } - - // Can't set responseType on really old browsers - if ('responseType' in xhr) - xhr.responseType = self._mode - - if ('withCredentials' in xhr) - xhr.withCredentials = !!opts.withCredentials - - if (self._mode === 'text' && 'overrideMimeType' in xhr) - xhr.overrideMimeType('text/plain; charset=x-user-defined') - - if ('requestTimeout' in opts) { - xhr.timeout = opts.requestTimeout - xhr.ontimeout = function () { - self.emit('requestTimeout') - } - } - - headersList.forEach(function (header) { - xhr.setRequestHeader(header[0], header[1]) - }) - - self._response = null - xhr.onreadystatechange = function () { - switch (xhr.readyState) { - case rStates.LOADING: - case rStates.DONE: - self._onXHRProgress() - break - } - } - // Necessary for streaming in Firefox, since xhr.response is ONLY defined - // in onprogress, not in onreadystatechange with xhr.readyState = 3 - if (self._mode === 'moz-chunked-arraybuffer') { - xhr.onprogress = function () { - self._onXHRProgress() - } - } - - xhr.onerror = function () { - if (self._destroyed) - return - self.emit('error', new Error('XHR error')) - } - - try { - xhr.send(body) - } catch (err) { - process.nextTick(function () { - self.emit('error', err) - }) - return - } - } -} - -/** - * Checks if xhr.status is readable and non-zero, indicating no error. - * Even though the spec says it should be available in readyState 3, - * accessing it throws an exception in IE8 - */ -function statusValid (xhr) { - try { - var status = xhr.status - return (status !== null && status !== 0) - } catch (e) { - return false - } -} - -ClientRequest.prototype._onXHRProgress = function () { - var self = this - - if (!statusValid(self._xhr) || self._destroyed) - return - - if (!self._response) - self._connect() - - self._response._onXHRProgress() -} - -ClientRequest.prototype._connect = function () { - var self = this - - if (self._destroyed) - return - - self._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._fetchTimer) - self._response.on('error', function(err) { - self.emit('error', err) - }) - - self.emit('response', self._response) -} - -ClientRequest.prototype._write = function (chunk, encoding, cb) { - var self = this - - self._body.push(chunk) - cb() -} - -ClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () { - var self = this - self._destroyed = true - global.clearTimeout(self._fetchTimer) - if (self._response) - self._response._destroyed = true - if (self._xhr) - self._xhr.abort() - else if (self._fetchAbortController) - self._fetchAbortController.abort() -} - -ClientRequest.prototype.end = function (data, encoding, cb) { - var self = this - if (typeof data === 'function') { - cb = data - data = undefined - } - - stream.Writable.prototype.end.call(self, data, encoding, cb) -} - -ClientRequest.prototype.flushHeaders = function () {} -ClientRequest.prototype.setTimeout = function () {} -ClientRequest.prototype.setNoDelay = function () {} -ClientRequest.prototype.setSocketKeepAlive = function () {} - -// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method -var unsafeHeaders = [ - 'accept-charset', - 'accept-encoding', - 'access-control-request-headers', - 'access-control-request-method', - 'connection', - 'content-length', - 'cookie', - 'cookie2', - 'date', - 'dnt', - 'expect', - 'host', - 'keep-alive', - 'origin', - 'referer', - 'te', - 'trailer', - 'transfer-encoding', - 'upgrade', - 'via' -] diff --git a/node_modules/stream-http/lib/response.js b/node_modules/stream-http/lib/response.js deleted file mode 100644 index 398993a..0000000 --- a/node_modules/stream-http/lib/response.js +++ /dev/null @@ -1,207 +0,0 @@ -var capability = require('./capability') -var inherits = require('inherits') -var stream = require('readable-stream') - -var rStates = exports.readyStates = { - UNSENT: 0, - OPENED: 1, - HEADERS_RECEIVED: 2, - LOADING: 3, - DONE: 4 -} - -var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, fetchTimer) { - var self = this - stream.Readable.call(self) - - self._mode = mode - self.headers = {} - self.rawHeaders = [] - self.trailers = {} - self.rawTrailers = [] - - // Fake the 'close' event, but only once 'end' fires - self.on('end', function () { - // The nextTick is necessary to prevent the 'request' module from causing an infinite loop - process.nextTick(function () { - self.emit('close') - }) - }) - - if (mode === 'fetch') { - self._fetchResponse = response - - self.url = response.url - self.statusCode = response.status - self.statusMessage = response.statusText - - response.headers.forEach(function (header, key){ - self.headers[key.toLowerCase()] = header - self.rawHeaders.push(key, header) - }) - - if (capability.writableStream) { - var writable = new WritableStream({ - write: function (chunk) { - return new Promise(function (resolve, reject) { - if (self._destroyed) { - reject() - } else if(self.push(Buffer.from(chunk))) { - resolve() - } else { - self._resumeFetch = resolve - } - }) - }, - close: function () { - global.clearTimeout(fetchTimer) - if (!self._destroyed) - self.push(null) - }, - abort: function (err) { - if (!self._destroyed) - self.emit('error', err) - } - }) - - try { - response.body.pipeTo(writable).catch(function (err) { - global.clearTimeout(fetchTimer) - if (!self._destroyed) - self.emit('error', err) - }) - return - } catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this - } - // fallback for when writableStream or pipeTo aren't available - var reader = response.body.getReader() - function read () { - reader.read().then(function (result) { - if (self._destroyed) - return - if (result.done) { - global.clearTimeout(fetchTimer) - self.push(null) - return - } - self.push(Buffer.from(result.value)) - read() - }).catch(function (err) { - global.clearTimeout(fetchTimer) - if (!self._destroyed) - self.emit('error', err) - }) - } - read() - } else { - self._xhr = xhr - self._pos = 0 - - self.url = xhr.responseURL - self.statusCode = xhr.status - self.statusMessage = xhr.statusText - var headers = xhr.getAllResponseHeaders().split(/\r?\n/) - headers.forEach(function (header) { - var matches = header.match(/^([^:]+):\s*(.*)/) - if (matches) { - var key = matches[1].toLowerCase() - if (key === 'set-cookie') { - if (self.headers[key] === undefined) { - self.headers[key] = [] - } - self.headers[key].push(matches[2]) - } else if (self.headers[key] !== undefined) { - self.headers[key] += ', ' + matches[2] - } else { - self.headers[key] = matches[2] - } - self.rawHeaders.push(matches[1], matches[2]) - } - }) - - self._charset = 'x-user-defined' - if (!capability.overrideMimeType) { - var mimeType = self.rawHeaders['mime-type'] - if (mimeType) { - var charsetMatch = mimeType.match(/;\s*charset=([^;])(;|$)/) - if (charsetMatch) { - self._charset = charsetMatch[1].toLowerCase() - } - } - if (!self._charset) - self._charset = 'utf-8' // best guess - } - } -} - -inherits(IncomingMessage, stream.Readable) - -IncomingMessage.prototype._read = function () { - var self = this - - var resolve = self._resumeFetch - if (resolve) { - self._resumeFetch = null - resolve() - } -} - -IncomingMessage.prototype._onXHRProgress = function () { - var self = this - - var xhr = self._xhr - - var response = null - switch (self._mode) { - case 'text': - response = xhr.responseText - if (response.length > self._pos) { - var newData = response.substr(self._pos) - if (self._charset === 'x-user-defined') { - var buffer = Buffer.alloc(newData.length) - for (var i = 0; i < newData.length; i++) - buffer[i] = newData.charCodeAt(i) & 0xff - - self.push(buffer) - } else { - self.push(newData, self._charset) - } - self._pos = response.length - } - break - case 'arraybuffer': - if (xhr.readyState !== rStates.DONE || !xhr.response) - break - response = xhr.response - self.push(Buffer.from(new Uint8Array(response))) - break - case 'moz-chunked-arraybuffer': // take whole - response = xhr.response - if (xhr.readyState !== rStates.LOADING || !response) - break - self.push(Buffer.from(new Uint8Array(response))) - break - case 'ms-stream': - response = xhr.response - if (xhr.readyState !== rStates.LOADING) - break - var reader = new global.MSStreamReader() - reader.onprogress = function () { - if (reader.result.byteLength > self._pos) { - self.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos)))) - self._pos = reader.result.byteLength - } - } - reader.onload = function () { - self.push(null) - } - // reader.onerror = ??? // TODO: this - reader.readAsArrayBuffer(response) - break - } - - // The ms-stream case handles end separately in reader.onload() - if (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') { - self.push(null) - } -} diff --git a/node_modules/stream-http/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/stream-http/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/stream-http/node_modules/readable-stream/GOVERNANCE.md b/node_modules/stream-http/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/stream-http/node_modules/readable-stream/LICENSE b/node_modules/stream-http/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/stream-http/node_modules/readable-stream/README.md b/node_modules/stream-http/node_modules/readable-stream/README.md deleted file mode 100644 index 28ccae1..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# readable-stream - -***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream) - -```bash -npm install --save readable-stream -``` - -This package is a mirror of the streams implementations in Node.js. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.15.3/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -## Version 3.x.x - -v3.x.x of `readable-stream` supports Node 6, 8, and 10, as well as -evergreen browsers, IE 11 and latest Safari. The breaking changes -introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) -and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: - -1. Error codes: https://github.com/nodejs/node/pull/13310, - https://github.com/nodejs/node/pull/13291, - https://github.com/nodejs/node/pull/16589, - https://github.com/nodejs/node/pull/15042, - https://github.com/nodejs/node/pull/15665, - https://github.com/nodejs/readable-stream/pull/344 -2. 'readable' have precedence over flowing - https://github.com/nodejs/node/pull/18994 -3. make virtual methods errors consistent - https://github.com/nodejs/node/pull/18813 -4. updated streams error handling - https://github.com/nodejs/node/pull/18438 -5. writable.end should return this. - https://github.com/nodejs/node/pull/18780 -6. readable continues to read when push('') - https://github.com/nodejs/node/pull/18211 -7. add custom inspect to BufferList - https://github.com/nodejs/node/pull/17907 -8. always defer 'readable' with nextTick - https://github.com/nodejs/node/pull/17979 - -## Version 2.x.x - -v2.x.x of `readable-stream` supports all Node.js version from 0.8, as well as -evergreen browsers and IE 10 & 11. - -### Big Thanks - -Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce] - -# Usage - -You can swap your `require('stream')` with `require('readable-stream')` -without any changes, if you are just using one of the main classes and -functions. - -```js -const { - Readable, - Writable, - Transform, - Duplex, - pipeline, - finished -} = require('readable-stream') -```` - -Note that `require('stream')` will return `Stream`, while -`require('readable-stream')` will return `Readable`. We discourage using -whatever is exported directly, but rather use one of the properties as -shown in the example above. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> -* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com> - -[sauce]: https://saucelabs.com diff --git a/node_modules/stream-http/node_modules/readable-stream/errors-browser.js b/node_modules/stream-http/node_modules/readable-stream/errors-browser.js deleted file mode 100644 index fb8e73e..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/errors-browser.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } - -var codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error; - } - - function getMessage(arg1, arg2, arg3) { - if (typeof message === 'string') { - return message; - } else { - return message(arg1, arg2, arg3); - } - } - - var NodeError = - /*#__PURE__*/ - function (_Base) { - _inheritsLoose(NodeError, _Base); - - function NodeError(arg1, arg2, arg3) { - return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; - } - - return NodeError; - }(Base); - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - codes[code] = NodeError; -} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js - - -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - var len = expected.length; - expected = expected.map(function (i) { - return String(i); - }); - - if (len > 2) { - return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; - } else if (len === 2) { - return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); - } else { - return "of ".concat(thing, " ").concat(expected[0]); - } - } else { - return "of ".concat(thing, " ").concat(String(expected)); - } -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith - - -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith - - -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - - return str.substring(this_len - search.length, this_len) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes - - -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"'; -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - var determiner; - - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - var msg; - - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } else { - var type = includes(name, '.') ? 'property' : 'argument'; - msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } - - msg += ". Received type ".concat(typeof actual); - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented'; -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg; -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); -module.exports.codes = codes; diff --git a/node_modules/stream-http/node_modules/readable-stream/errors.js b/node_modules/stream-http/node_modules/readable-stream/errors.js deleted file mode 100644 index 8471526..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/errors.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } - - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } - } - - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - - codes[code] = NodeError; -} - -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; - } - - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); - -module.exports.codes = codes; diff --git a/node_modules/stream-http/node_modules/readable-stream/experimentalWarning.js b/node_modules/stream-http/node_modules/readable-stream/experimentalWarning.js deleted file mode 100644 index 78e8414..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/experimentalWarning.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -var experimentalWarnings = new Set(); - -function emitExperimentalWarning(feature) { - if (experimentalWarnings.has(feature)) return; - var msg = feature + ' is an experimental feature. This feature could ' + - 'change at any time'; - experimentalWarnings.add(feature); - process.emitWarning(msg, 'ExperimentalWarning'); -} - -function noop() {} - -module.exports.emitExperimentalWarning = process.emitWarning - ? emitExperimentalWarning - : noop; diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 6752519..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. -'use strict'; -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - - for (var key in obj) { - keys.push(key); - } - - return keys; -}; -/**/ - - -module.exports = Duplex; - -var Readable = require('./_stream_readable'); - -var Writable = require('./_stream_writable'); - -require('inherits')(Duplex, Readable); - -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); // the no-half-open enforcer - -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; // no more data can be written. - // But allow more writes to happen in this tick. - - process.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 32e7414..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -require('inherits')(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 33f478d..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1087 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -'use strict'; - -module.exports = Readable; -/**/ - -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; -/**/ - -var EE = require('events').EventEmitter; - -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ - - -var Stream = require('./internal/streams/stream'); -/**/ - - -var Buffer = require('buffer').Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -/**/ - - -var debugUtil = require('util'); - -var debug; - -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ - - -var BufferList = require('./internal/streams/buffer_list'); - -var destroyImpl = require('./internal/streams/destroy'); - -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - -var _require2 = require('../experimentalWarning'), - emitExperimentalWarning = _require2.emitExperimentalWarning; // Lazy loaded to improve the startup performance. - - -var StringDecoder; -var createReadableStreamAsyncIterator; - -require('inherits')(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - - this.sync = true; // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // has it been destroyed - - this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s - - this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled - - this.readingMore = false; - this.decoder = null; - this.encoding = null; - - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); // legacy - - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; - -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; // Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. - - -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; // Unshift should *always* be something directly out of read() - - -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); - } - } // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - - - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - - return er; -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; // backwards compatibility. - - -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); // if setEncoding(null), decoder.encoding equals utf8 - - this._readableState.encoding = this._readableState.decoder.encoding; - return this; -}; // Don't raise the hwm > 8MB - - -var MAX_HWM = 0x800000; - -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - - return n; -} // This function is designed to be inlinable, so please take care when making -// changes to the function body. - - -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } // If we're asking for more than the current hwm, then raise the hwm. - - - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; // Don't have enough - - if (!state.ended) { - state.needReadable = true; - return 0; - } - - return state.length; -} // you can override either this method, or the async _read(n) below. - - -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. - - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - // if we need a readable event, then we need to do some reading. - - - var doRead = state.needReadable; - debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some - - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - - - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; // if the length is currently zero, then we *need* a readable event. - - if (state.length === 0) state.needReadable = true; // call internal read method - - this._read(state.highWaterMark); - - state.sync = false; // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. - - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - - if (state.decoder) { - var chunk = state.decoder.end(); - - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - - state.ended = true; - - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } -} // Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. - - -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} - -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - } // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - - - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} // at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. - - -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) // didn't get any data, stop spinning. - break; - } - - state.readingMore = false; -} // abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. - - -Readable.prototype._read = function (n) { - this.emit('error', new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - - case 1: - state.pipes = [state.pipes, dest]; - break; - - default: - state.pipes.push(dest); - break; - } - - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - - - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - - function cleanup() { - debug('cleanup'); // cleanup event handlers once the pipe is broken - - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - - src.pause(); - } - } // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - - - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } // Make sure our error handler is attached before userland ones. - - - prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. - - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - - dest.once('close', onclose); - - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } // tell the dest that it's being piped to - - - dest.emit('pipe', src); // start the flow if it hasn't been started already. - - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; // if we're not piping anywhere, then do nothing. - - if (state.pipesCount === 0) return this; // just one destination. most common case. - - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; // got a match. - - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } // slow case. multiple pipe destinations. - - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - } - - return this; - } // try to find the right one. - - - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; // set up data events if they are asked for -// Ensure readable listeners eventually get something - - -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused - - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } - } - } - - return res; -}; - -Readable.prototype.addListener = Readable.prototype.on; - -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} // pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. - - -Readable.prototype.resume = function () { - var state = this._readableState; - - if (!state.flowing) { - debug('resume'); // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - - state.flowing = !state.readableListening; - resume(this, state); - } - - state.paused = false; - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - debug('resume', state.reading); - - if (!state.reading) { - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - - this._readableState.paused = true; - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - - while (state.flowing && stream.read() !== null) { - ; - } -} // wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. - - -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode - - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - - if (!ret) { - paused = true; - stream.pause(); - } - }); // proxy all the other methods. - // important when wrapping filters and duplexes. - - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } // proxy certain important events. - - - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } // when we try to consume some more bytes, simply unpause the - // underlying stream. - - - this._read = function (n) { - debug('wrapped _read', n); - - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - emitExperimentalWarning('Readable[Symbol.asyncIterator]'); - - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); - } - - return createReadableStreamAsyncIterator(this); - }; -} - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); // exposed for testing purposes only. - -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); // Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. - -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. - - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - - return -1; -} \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 41a738c..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. -'use strict'; - -module.exports = Transform; - -var _require$codes = require('../errors').codes, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; - -var Duplex = require('./_stream_duplex'); - -require('inherits')(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - - ts.writechunk = null; - ts.writecb = null; - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; // start out asking for a readable event once data is transformed. - - this._readableState.needReadable = true; // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } // When the writable side finishes, then flush out anything remaining. - - - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; // This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. - - -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; // Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. - - -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b35447a..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,683 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. -'use strict'; - -module.exports = Writable; -/* */ - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} // It seems a linked list but it is not -// there will be only 2 of these for each stream - - -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ - - -var Duplex; -/**/ - -Writable.WritableState = WritableState; -/**/ - -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ - -var Stream = require('./internal/streams/stream'); -/**/ - - -var Buffer = require('buffer').Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -var destroyImpl = require('./internal/streams/destroy'); - -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; - -require('inherits')(Writable, Stream); - -function nop() {} - -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream - // contains buffers or objects. - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called - - this.finalCalled = false; // drain event flag. - - this.needDrain = false; // at the start of calling end() - - this.ending = false; // when end() has been called, and returned - - this.ended = false; // when 'finish' is emitted - - this.finished = false; // has it been destroyed - - this.destroyed = false; // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - - this.length = 0; // a flag to see when we're in the middle of a write. - - this.writing = false; // when true all writes will be buffered until .uncork() call - - this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - - this.sync = true; // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - - this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) - - this.onwrite = function (er) { - onwrite(stream, er); - }; // the callback that the user supplies to write(chunk,encoding,cb) - - - this.writecb = null; // the amount that is being written when _write is called. - - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - - this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - - this.prefinished = false; // True if the error was already emitted and should not be thrown again - - this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // count buffered requests - - this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - - while (current) { - out.push(current); - current = current.next; - } - - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); // Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. - - -var realHasInstance; - -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); // legacy. - - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} // Otherwise people can pipe Writable streams, which is just wrong. - - -Writable.prototype.pipe = function () { - this.emit('error', new ERR_STREAM_CANNOT_PIPE()); -}; - -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb - - stream.emit('error', er); - process.nextTick(cb, er); -} // Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. - - -function validChunk(stream, state, chunk, cb) { - var er; - - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - - if (er) { - stream.emit('error', er); - process.nextTick(cb, er); - return false; - } - - return true; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; - -Writable.prototype.cork = function () { - this._writableState.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); // if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. - -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. - - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); // this can emit finish, and it will always happen - // after error - - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); // this can emit finish, but finish must - // always follow error - - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} // Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. - - -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} // if there's something in the buffer waiting, then process it - - -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - - state.pendingcb++; - state.lastBufferedRequest = null; - - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks - - if (state.corked) { - state.corked = 1; - this.uncork(); - } // ignore unnecessary end() calls. - - - if (!state.ending) endWritable(this, state, cb); - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - - if (err) { - stream.emit('error', err); - } - - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} - -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - - if (need) { - prefinish(stream, state); - - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } - - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } // reuse the free corkReq. - - - state.corkedRequestsFree.next = corkReq; -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; - -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js deleted file mode 100644 index 9fb615a..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; - -var _Object$setPrototypeO; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var finished = require('./end-of-stream'); - -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); - -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} - -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - - if (resolve !== null) { - var data = iter[kStream].read(); // we defer if data is null - // we can be expecting either 'end' or - // 'error' - - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} - -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} - -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} - -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - - next: function next() { - var _this = this; - - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - - if (error !== null) { - return Promise.reject(error); - } - - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - - - var lastPromise = this[kLastPromise]; - var promise; - - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - - promise = new Promise(this[kHandlePromise]); - } - - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); - -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise - // returned by next() and store the error - - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - - iterator[kError] = err; - return; - } - - var resolve = iterator[kLastResolve]; - - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; - -module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js deleted file mode 100644 index ebaf5c7..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js +++ /dev/null @@ -1,189 +0,0 @@ -'use strict'; - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var _require = require('buffer'), - Buffer = _require.Buffer; - -var _require2 = require('util'), - inspect = _require2.inspect; - -var custom = inspect && inspect.custom || 'inspect'; - -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} - -module.exports = -/*#__PURE__*/ -function () { - function BufferList() { - this.head = null; - this.tail = null; - this.length = 0; - } - - var _proto = BufferList.prototype; - - _proto.push = function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - _proto.unshift = function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - _proto.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - _proto.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - _proto.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - - while (p = p.next) { - ret += s + p.data; - } - - return ret; - }; - - _proto.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - - return ret; - } // Consumes a specified amount of bytes or characters from the buffered data. - ; - - _proto.consume = function consume(n, hasStrings) { - var ret; - - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - - return ret; - }; - - _proto.first = function first() { - return this.head.data; - } // Consumes a specified amount of characters from the buffered data. - ; - - _proto._getString = function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - - break; - } - - ++c; - } - - this.length -= c; - return ret; - } // Consumes a specified amount of bytes from the buffered data. - ; - - _proto._getBuffer = function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - - break; - } - - ++c; - } - - this.length -= c; - return ret; - } // Make sure the linked list only shows the minimal necessary information. - ; - - _proto[custom] = function (_, options) { - return inspect(this, _objectSpread({}, options, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - }; - - return BufferList; -}(); \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 63ae499..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; // undocumented cb() API, needed for core, not for public API - -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - process.nextTick(emitErrorNT, this, err); - } - - return this; - } // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - - if (this._readableState) { - this._readableState.destroyed = true; - } // if this is a duplex stream mark the writable part as destroyed as well - - - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - process.nextTick(emitErrorAndCloseNT, _this, err); - - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - - return this; -} - -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} - -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js deleted file mode 100644 index 831f286..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ /dev/null @@ -1,104 +0,0 @@ -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). -'use strict'; - -var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - callback.apply(this, args); - }; -} - -function noop() {} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - - var writableEnded = stream._writableState && stream._writableState.finished; - - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - - var readableEnded = stream._readableState && stream._readableState.endEmitted; - - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - - var onerror = function onerror(err) { - callback.call(stream, err); - }; - - var onclose = function onclose() { - var err; - - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} - -module.exports = eos; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js deleted file mode 100644 index 6589909..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js +++ /dev/null @@ -1,97 +0,0 @@ -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). -'use strict'; - -var eos; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} - -var _require$codes = require('../../../errors').codes, - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; - -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = require('./end-of-stream'); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; // request.destroy just do .end - .abort is what we want - - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} - -function call(fn) { - fn(); -} - -function pipe(from, to) { - return from.pipe(to); -} - -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} - -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} - -module.exports = pipeline; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js deleted file mode 100644 index 19887eb..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; - -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} - -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - - return Math.floor(hwm); - } // Default value - - - return state.objectMode ? 16 : 16 * 1024; -} - -module.exports = { - getHighWaterMark: getHighWaterMark -}; \ No newline at end of file diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3f..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/stream-http/node_modules/readable-stream/package.json b/node_modules/stream-http/node_modules/readable-stream/package.json deleted file mode 100644 index bbcf551..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_from": "readable-stream@^3.0.6", - "_id": "readable-stream@3.4.0", - "_inBundle": false, - "_integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "_location": "/stream-http/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^3.0.6", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^3.0.6", - "saveSpec": null, - "fetchSpec": "^3.0.6" - }, - "_requiredBy": [ - "/stream-http" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "_shasum": "a51c26754658e0a3c21dbf59163bd45ba6f447fc", - "_spec": "readable-stream@^3.0.6", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/stream-http", - "browser": { - "util": false, - "worker_threads": false, - "./errors": "./errors-browser.js", - "./readable.js": "./readable-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "@babel/cli": "^7.2.0", - "@babel/core": "^7.2.0", - "@babel/polyfill": "^7.0.0", - "@babel/preset-env": "^7.2.0", - "airtap": "0.0.9", - "assert": "^1.4.0", - "bl": "^2.0.0", - "deep-strict-equal": "^0.2.0", - "glob": "^7.1.2", - "gunzip-maybe": "^1.4.1", - "hyperquest": "^2.1.3", - "lolex": "^2.6.0", - "nyc": "^11.0.0", - "pump": "^3.0.0", - "rimraf": "^2.6.2", - "tap": "^12.0.0", - "tape": "^4.9.0", - "tar-fs": "^1.16.2", - "util-promisify": "^2.1.0" - }, - "engines": { - "node": ">= 6" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", - "test-browser-local": "airtap --open --local -- test/browser.js", - "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", - "update-browser-errors": "babel -o errors-browser.js errors.js" - }, - "version": "3.4.0" -} diff --git a/node_modules/stream-http/node_modules/readable-stream/readable-browser.js b/node_modules/stream-http/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index adbf60d..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,9 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -exports.finished = require('./lib/internal/streams/end-of-stream.js'); -exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/node_modules/stream-http/node_modules/readable-stream/readable.js b/node_modules/stream-http/node_modules/readable-stream/readable.js deleted file mode 100644 index 9e0ca12..0000000 --- a/node_modules/stream-http/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); - exports.finished = require('./lib/internal/streams/end-of-stream.js'); - exports.pipeline = require('./lib/internal/streams/pipeline.js'); -} diff --git a/node_modules/stream-http/package.json b/node_modules/stream-http/package.json deleted file mode 100644 index 4dd6efb..0000000 --- a/node_modules/stream-http/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "stream-http@^3.0.0", - "_id": "stream-http@3.1.0", - "_inBundle": false, - "_integrity": "sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==", - "_location": "/stream-http", - "_phantomChildren": { - "inherits": "2.0.4", - "string_decoder": "1.3.0", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "stream-http@^3.0.0", - "name": "stream-http", - "escapedName": "stream-http", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.0.tgz", - "_shasum": "22fb33fe9b4056b4eccf58bd8f400c4b993ffe57", - "_spec": "stream-http@^3.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "John Hiesey" - }, - "bugs": { - "url": "https://github.com/jhiesey/stream-http/issues" - }, - "bundleDependencies": false, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^3.0.6", - "xtend": "^4.0.0" - }, - "deprecated": false, - "description": "Streaming http in the browser", - "devDependencies": { - "airtap": "^2.0.3", - "basic-auth": "^2.0.1", - "brfs": "^2.0.1", - "cookie-parser": "^1.4.3", - "express": "^4.16.3", - "tape": "^4.9.0", - "ua-parser-js": "^0.7.18", - "webworkify": "^1.5.0" - }, - "homepage": "https://github.com/jhiesey/stream-http#readme", - "keywords": [ - "http", - "stream", - "streaming", - "xhr", - "http-browserify" - ], - "license": "MIT", - "main": "index.js", - "name": "stream-http", - "repository": { - "type": "git", - "url": "git://github.com/jhiesey/stream-http.git" - }, - "scripts": { - "test": "npm run test-node && ([ -n \"${TRAVIS_PULL_REQUEST}\" -a \"${TRAVIS_PULL_REQUEST}\" != 'false' ] || npm run test-browser)", - "test-browser": "airtap --loopback airtap.local -- test/browser/*.js", - "test-browser-local": "airtap --no-instrument --local 8080 -- test/browser/*.js", - "test-node": "tape test/node/*.js" - }, - "version": "3.1.0" -} diff --git a/node_modules/stream-splicer/.travis.yml b/node_modules/stream-splicer/.travis.yml deleted file mode 100644 index 21ab102..0000000 --- a/node_modules/stream-splicer/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js -node_js: - - "12" - - "11" - - "10" - - "8" - - "6" - - "4" - - "iojs" - - "0.12" - - "0.10" - - "0.8" -before_install: - # Old npm certs are untrusted https://github.com/npm/npm/issues/20191 - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.8" ]; then export NPM_CONFIG_STRICT_SSL=false; fi' - - 'nvm install-latest-npm' diff --git a/node_modules/stream-splicer/LICENSE b/node_modules/stream-splicer/LICENSE deleted file mode 100644 index c1bc618..0000000 --- a/node_modules/stream-splicer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) James Halliday and browserify contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/stream-splicer/example/header.js b/node_modules/stream-splicer/example/header.js deleted file mode 100644 index 6597f3b..0000000 --- a/node_modules/stream-splicer/example/header.js +++ /dev/null @@ -1,22 +0,0 @@ -var splicer = require('../'); -var through = require('through2'); -var JSONStream = require('JSONStream'); -var split = require('split'); - -var headerData = {}; -var headers = through.obj(function (buf, enc, next) { - var line = buf.toString('utf8'); - if (line === '') { - this.push(headerData); - pipeline.splice(1, 1, JSONStream.parse([ 'rows', true ])); - } - else { - var m = /^(\S+):(.+)/.exec(line); - var key = m && m[1].trim(); - var value = m && m[2].trim(); - if (m) headerData[key] = value; - } - next(); -}); -var pipeline = splicer([ split(), headers, JSONStream.stringify() ]); -process.stdin.pipe(pipeline).pipe(process.stdout); diff --git a/node_modules/stream-splicer/index.js b/node_modules/stream-splicer/index.js deleted file mode 100644 index ce386c8..0000000 --- a/node_modules/stream-splicer/index.js +++ /dev/null @@ -1,196 +0,0 @@ -var Duplex = require('readable-stream').Duplex; -var PassThrough = require('readable-stream').PassThrough; -var Readable = require('readable-stream').Readable; -var inherits = require('inherits'); - -var nextTick = typeof setImmediate !== 'undefined' - ? setImmediate : process.nextTick -; - -module.exports = Pipeline; -inherits(Pipeline, Duplex); - -module.exports.obj = function (streams, opts) { - if (!opts && !Array.isArray(streams)) { - opts = streams; - streams = []; - } - if (!streams) streams = []; - if (!opts) opts = {}; - opts.objectMode = true; - return new Pipeline(streams, opts); -}; - -function Pipeline (streams, opts) { - if (!(this instanceof Pipeline)) return new Pipeline(streams, opts); - if (!opts && !Array.isArray(streams)) { - opts = streams; - streams = []; - } - if (!streams) streams = []; - if (!opts) opts = {}; - Duplex.call(this, opts); - - var self = this; - this._options = opts; - this._wrapOptions = { objectMode: opts.objectMode !== false }; - this._streams = []; - - this.splice.apply(this, [ 0, 0 ].concat(streams)); - - this.once('finish', function () { - self._notEmpty(); - self._streams[0].end(); - }); -} - -Pipeline.prototype._read = function () { - var self = this; - this._notEmpty(); - - var r = this._streams[this._streams.length-1]; - var buf, reads = 0; - while ((buf = r.read()) !== null) { - Duplex.prototype.push.call(this, buf); - reads ++; - } - if (reads === 0) { - var onreadable = function () { - r.removeListener('readable', onreadable); - self.removeListener('_mutate', onreadable); - self._read() - }; - r.once('readable', onreadable); - self.once('_mutate', onreadable); - } -}; - -Pipeline.prototype._write = function (buf, enc, next) { - this._notEmpty(); - this._streams[0]._write(buf, enc, next); -}; - -Pipeline.prototype._notEmpty = function () { - var self = this; - if (this._streams.length > 0) return; - var stream = new PassThrough(this._options); - stream.once('end', function () { - var ix = self._streams.indexOf(stream); - if (ix >= 0 && ix === self._streams.length - 1) { - Duplex.prototype.push.call(self, null); - } - }); - this._streams.push(stream); - this.length = this._streams.length; -}; - -Pipeline.prototype.push = function (stream) { - var args = [ this._streams.length, 0 ].concat([].slice.call(arguments)); - this.splice.apply(this, args); - return this._streams.length; -}; - -Pipeline.prototype.pop = function () { - return this.splice(this._streams.length-1,1)[0]; -}; - -Pipeline.prototype.shift = function () { - return this.splice(0,1)[0]; -}; - -Pipeline.prototype.unshift = function () { - this.splice.apply(this, [0,0].concat([].slice.call(arguments))); - return this._streams.length; -}; - -Pipeline.prototype.splice = function (start, removeLen) { - var self = this; - var len = this._streams.length; - start = start < 0 ? len - start : start; - if (removeLen === undefined) removeLen = len - start; - removeLen = Math.max(0, Math.min(len - start, removeLen)); - - for (var i = start; i < start + removeLen; i++) { - if (self._streams[i-1]) { - self._streams[i-1].unpipe(self._streams[i]); - } - } - if (self._streams[i-1] && self._streams[i]) { - self._streams[i-1].unpipe(self._streams[i]); - } - var end = i; - - var reps = [], args = arguments; - for (var j = 2; j < args.length; j++) (function (stream) { - if (Array.isArray(stream)) { - stream = new Pipeline(stream, self._options); - } - stream.on('error', function (err) { - err.stream = this; - self.emit('error', err); - }); - stream = self._wrapStream(stream); - stream.once('end', function () { - var ix = self._streams.indexOf(stream); - if (ix >= 0 && ix === self._streams.length - 1) { - Duplex.prototype.push.call(self, null); - } - }); - reps.push(stream); - })(arguments[j]); - - for (var i = 0; i < reps.length - 1; i++) { - reps[i].pipe(reps[i+1]); - } - - if (reps.length && self._streams[end]) { - reps[reps.length-1].pipe(self._streams[end]); - } - if (reps[0] && self._streams[start-1]) { - self._streams[start-1].pipe(reps[0]); - } - - var sargs = [start,removeLen].concat(reps); - var removed = self._streams.splice.apply(self._streams, sargs); - - for (var i = 0; i < reps.length; i++) { - reps[i].read(0); - } - - this.emit('_mutate'); - this.length = this._streams.length; - return removed; -}; - -Pipeline.prototype.get = function () { - if (arguments.length === 0) return undefined; - - var base = this; - for (var i = 0; i < arguments.length; i++) { - var index = arguments[i]; - if (index < 0) { - base = base._streams[base._streams.length + index]; - } - else { - base = base._streams[index]; - } - if (!base) return undefined; - } - return base; -}; - -Pipeline.prototype.indexOf = function (stream) { - return this._streams.indexOf(stream); -}; - -Pipeline.prototype._wrapStream = function (stream) { - if (typeof stream.read === 'function') return stream; - var w = new Readable(this._wrapOptions).wrap(stream); - w._write = function (buf, enc, next) { - if (stream.write(buf) === false) { - stream.once('drain', next); - } - else nextTick(next); - }; - return w; -}; diff --git a/node_modules/stream-splicer/package.json b/node_modules/stream-splicer/package.json deleted file mode 100644 index cc64b23..0000000 --- a/node_modules/stream-splicer/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "stream-splicer@^2.0.0", - "_id": "stream-splicer@2.0.1", - "_inBundle": false, - "_integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "_location": "/stream-splicer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "stream-splicer@^2.0.0", - "name": "stream-splicer", - "escapedName": "stream-splicer", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/labeled-stream-splicer" - ], - "_resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "_shasum": "0b13b7ee2b5ac7e0609a7463d83899589a363fcd", - "_spec": "stream-splicer@^2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/labeled-stream-splicer", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/browserify/stream-splicer/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - }, - "deprecated": false, - "description": "streaming pipeline with a mutable configuration", - "devDependencies": { - "JSONStream": "^1.0.4", - "concat-stream": "^1.4.6", - "split": "^1.0.0", - "tape": "^4.2.0", - "through2": "^2.0.0" - }, - "homepage": "https://github.com/browserify/stream-splicer", - "keywords": [ - "stream", - "mutable", - "pipeline" - ], - "license": "MIT", - "main": "index.js", - "name": "stream-splicer", - "repository": { - "type": "git", - "url": "git://github.com/browserify/stream-splicer.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/stream-splicer/readme.markdown b/node_modules/stream-splicer/readme.markdown deleted file mode 100644 index 43875df..0000000 --- a/node_modules/stream-splicer/readme.markdown +++ /dev/null @@ -1,139 +0,0 @@ -# stream-splicer - -streaming pipeline with a mutable configuration - -This module is similar to -[stream-combiner](https://npmjs.org/package/stream-combiner), -but with a pipeline configuration that can be changed at runtime. - -[![build status](https://travis-ci.org/browserify/stream-splicer.png?branch=master)](http://travis-ci.org/browserify/stream-splicer) - -# example - -This example begins with an HTTP header parser that waits for an empty line to -signify the end of the header. At that point, it switches to a streaming json -parser to operate on the HTTP body. - -``` js -var splicer = require('stream-splicer'); -var through = require('through2'); -var jsonStream = require('jsonstream2'); -var split = require('split2'); - -var headerData = {}; -var headers = through.obj(function (buf, enc, next) { - var line = buf.toString('utf8'); - if (line === '') { - this.push(headerData); - pipeline.splice(1, 1, jsonStream.parse([ 'rows', true ])); - } - else { - var m = /^(\S+):(.+)/.exec(line); - var key = m && m[1].trim(); - var value = m && m[2].trim(); - if (m) headerData[key] = value; - } - next(); -}); -var pipeline = splicer([ split(), headers, jsonStream.stringify() ]); -process.stdin.pipe(pipeline).pipe(process.stdout); -``` - -intput: - -``` -GET / HTTP/1.1 -Host: substack.net -User-Agent: echo - -{"rows":["beep","boop"]} -``` - -output: - -``` -$ echo -ne 'GET / HTTP/1.1\nHost: substack.net\nUser-Agent: echo\n\n{"rows":["beep","boop"]}\n' | node example/header.js -[ -{"Host":"substack.net","User-Agent":"echo"} -, -"beep" -, -"boop" -] -``` - -# methods - -``` js -var splicer = require('stream-splicer') -``` - -## var pipeline = splicer(streams, opts) - -Create a `pipeline` duplex stream given an array of `streams`. Each `stream` -will be piped to the next. Writes to `pipeline` get written to the first stream -and data for reads from `pipeline` come from the last stream. - -For example, for streams `[ a, b, c, d ]`, this pipeline is constructed -internally: - -``` -a.pipe(b).pipe(c).pipe(d) -``` - -Input will get written into `a`. Output will be read from `d`. - -If any of the elements in `streams` are arrays, they will be converted into -nested pipelines. This is useful if you want to expose a hookable pipeline with -grouped insertion points. - -## var pipeline = splicer.obj(streams, opts) - -Create a `pipeline` with `opts.objectMode` set to true for convenience. - -## var removed = pipeline.splice(index, howMany, stream, ...) - -Splice the pipeline starting at `index`, removing `howMany` streams and -replacing them with each additional `stream` argument provided. - -The streams that were removed from the splice and returned. - -## pipeline.push(stream, ...) - -Push one or more streams to the end of the pipeline. - -## var stream = pipeline.pop() - -Pop a stream from the end of the pipeline. - -## pipeline.unshift(stream, ...) - -Unshift one or more streams to the begining of the pipeline. - -## var stream = pipeline.shift() - -Shift a stream from the begining of the pipeline. - -## var stream = pipeline.get(index, ...) - -Return the stream at index `index, ...`. Indexes can be negative. - -Multiple indexes will traverse into nested pipelines. - -# attributes - -## pipeline.length - -The number of streams in the pipeline - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install stream-splicer -``` - -# license - -MIT diff --git a/node_modules/stream-splicer/test/combiner.js b/node_modules/stream-splicer/test/combiner.js deleted file mode 100644 index fa32f68..0000000 --- a/node_modules/stream-splicer/test/combiner.js +++ /dev/null @@ -1,31 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var stringify = require('JSONStream').stringify; -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('combiner', function (t) { - t.plan(1); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { this.push(row.x); next() }); - var d = through.obj(function (x, enc, next) { this.push(x * 111); next() }); - var e = stringify(); - - var input = through(); - var output = through(); - output.pipe(concat(function (body) { - t.deepEqual(body.toString(), '[\n333\n,\n444\n,\n555\n]\n'); - })); - pipeline([ input, a, b, c, d, e, output ]); - - input.write('{"x":3}\n'); - input.write('{"x":4}\n'); - input.write('{"x":5}'); - input.end(); -}); diff --git a/node_modules/stream-splicer/test/combiner_stream.js b/node_modules/stream-splicer/test/combiner_stream.js deleted file mode 100644 index bfe08f6..0000000 --- a/node_modules/stream-splicer/test/combiner_stream.js +++ /dev/null @@ -1,29 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var stringify = require('JSONStream').stringify; -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('combiner returned stream', function (t) { - t.plan(1); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { this.push(row.x); next() }); - var d = through.obj(function (x, enc, next) { this.push(x * 111); next() }); - var e = stringify(); - - var stream = pipeline([ a, b, c, d, e ]); - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), '[\n333\n,\n444\n,\n555\n]\n'); - })); - - stream.write('{"x":3}\n'); - stream.write('{"x":4}\n'); - stream.write('{"x":5}'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/empty.js b/node_modules/stream-splicer/test/empty.js deleted file mode 100644 index 5ee1ccb..0000000 --- a/node_modules/stream-splicer/test/empty.js +++ /dev/null @@ -1,17 +0,0 @@ -var pipeline = require('../'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('empty passthrough stream', function (t) { - t.plan(1); - - var stream = pipeline([]); - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), 'abc'); - })); - - stream.write('a'); - stream.write('b'); - stream.write('c'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/empty_no_data.js b/node_modules/stream-splicer/test/empty_no_data.js deleted file mode 100644 index 1acf078..0000000 --- a/node_modules/stream-splicer/test/empty_no_data.js +++ /dev/null @@ -1,13 +0,0 @@ -var pipeline = require('../'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('empty with no data', function (t) { - t.plan(1); - - var stream = pipeline([]); - stream.end(); - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), ''); - })); -}); diff --git a/node_modules/stream-splicer/test/get.js b/node_modules/stream-splicer/test/get.js deleted file mode 100644 index fdb5369..0000000 --- a/node_modules/stream-splicer/test/get.js +++ /dev/null @@ -1,41 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var test = require('tape'); - -test('get', function (t) { - var a = through.obj(); - var b = through.obj(); - var c = through.obj(); - - var pipe = pipeline([ a, b, c ]); - t.equal(pipe.get(0), a, '0'); - t.equal(pipe.get(1), b, '1'); - t.equal(pipe.get(2), c, '2'); - t.equal(pipe.get(3), undefined, '3'); - t.equal(pipe.get(4), undefined, '4'); - t.equal(pipe.get(5), undefined, '5'); - t.equal(pipe.get(-1), c, '-1'); - t.equal(pipe.get(-1), c, '-1'); - t.equal(pipe.get(-2), b, '-2'); - t.equal(pipe.get(-3), a, '-3'); - t.equal(pipe.get(-4), undefined, '-4'); - t.equal(pipe.get(-5), undefined, '-5'); - t.end(); -}); - -test('nested get', function (t) { - var a = through.obj(); - var b = through.obj(); - var c = through.obj(); - var d = through.obj(); - var e = through.obj(); - var f = through.obj(); - var g = through.obj(); - - var pipe = pipeline([ a, [ b, c, [ d, [ e ], f ] ], g ]); - t.equal(pipe.get(0), a); - t.equal(pipe.get(1, -1, 1, 0), e); - t.equal(pipe.get(1, 3), undefined); - t.equal(pipe.get(4, 3), undefined); - t.end(); -}); diff --git a/node_modules/stream-splicer/test/multipush.js b/node_modules/stream-splicer/test/multipush.js deleted file mode 100644 index 079c6a0..0000000 --- a/node_modules/stream-splicer/test/multipush.js +++ /dev/null @@ -1,31 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var stringify = require('JSONStream').stringify; -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('multipush', function (t) { - t.plan(1); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { this.push(row.x); next() }); - var d = through.obj(function (x, enc, next) { this.push(x * 111); next() }); - var e = stringify(); - - var stream = pipeline(); - stream.push(a, b, c); - stream.push(d, e); - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), '[\n333\n,\n444\n,\n555\n]\n'); - })); - - stream.write('{"x":3}\n'); - stream.write('{"x":4}\n'); - stream.write('{"x":5}'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/multiunshift.js b/node_modules/stream-splicer/test/multiunshift.js deleted file mode 100644 index e408fc3..0000000 --- a/node_modules/stream-splicer/test/multiunshift.js +++ /dev/null @@ -1,31 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var stringify = require('JSONStream').stringify; -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('multiunshift', function (t) { - t.plan(1); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { this.push(row.x); next() }); - var d = through.obj(function (x, enc, next) { this.push(x * 111); next() }); - var e = stringify(); - - var stream = pipeline(); - stream.unshift(d, e); - stream.unshift(a, b, c); - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), '[\n333\n,\n444\n,\n555\n]\n'); - })); - - stream.write('{"x":3}\n'); - stream.write('{"x":4}\n'); - stream.write('{"x":5}'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/nested.js b/node_modules/stream-splicer/test/nested.js deleted file mode 100644 index fa293b7..0000000 --- a/node_modules/stream-splicer/test/nested.js +++ /dev/null @@ -1,36 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('nested splicer', function (t) { - t.plan(1); - - var addNewLines = through(function (buf, enc, next) { - this.push(buf + '\n'); - next(); - }); - - var stream = pipeline.obj([ - [ split(), addNewLines ], - through(function (buf, enc, next) { - this.push('> ' + buf); - next() - }) - ]); - - stream.get(0).unshift(through(function (buf, enc, next) { - this.push(buf.toString('utf8').toUpperCase()); - next(); - })); - - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), '> A\n> B\n> C\n'); - })); - - stream.write('a\n'); - stream.write('b\n'); - stream.write('c'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/nested_middle.js b/node_modules/stream-splicer/test/nested_middle.js deleted file mode 100644 index 488fa6a..0000000 --- a/node_modules/stream-splicer/test/nested_middle.js +++ /dev/null @@ -1,42 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('nested middle splicer', function (t) { - t.plan(1); - - var addNewLines = through(function (buf, enc, next) { - this.push(buf + '\n'); - next(); - }); - - var stream = pipeline.obj([ - through.obj(function (str, enc, next) { - this.push(str.replace(/^./, function (c) { - return String.fromCharCode(c.charCodeAt(0) + 5); - })); - next(); - }), - [ split(), addNewLines ], - through(function (buf, enc, next) { - this.push('> ' + buf); - next() - }) - ]); - - stream.get(1).unshift(through(function (buf, enc, next) { - this.push(buf.toString('utf8').toUpperCase()); - next(); - })); - - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), '> F\n> G\n> H\n'); - })); - - stream.write('a\n'); - stream.write('b\n'); - stream.write('c'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/pop.js b/node_modules/stream-splicer/test/pop.js deleted file mode 100644 index 5de62fe..0000000 --- a/node_modules/stream-splicer/test/pop.js +++ /dev/null @@ -1,46 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('pop', function (t) { - var expected = {}; - expected.replacer = [ '333', '444' ]; - - t.plan(3); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { - this.push(row.x); - next(); - }); - var d = through.obj(function (x, enc, next) { - this.push(String(x * 111)); - next(); - }); - var replacer = through(function (buf, enc, next) { - var ex = expected.replacer.shift(); - t.equal(buf.toString(), ex); - this.push(buf.toString('hex') + '\n'); - if (expected.replacer.length === 0) { - stream.pop(); - } - next(); - }); - - var stream = pipeline([ a, b, c, d, replacer ]); - stream.pipe(concat(function (body) { - t.deepEqual(body.toString(), '333333\n343434\n555666'); - })); - - stream.write('{"x":3}\n'); - stream.write('{"x":4}\n'); - stream.write('{"x":5}\n'); - stream.write('{"x":6}'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/push.js b/node_modules/stream-splicer/test/push.js deleted file mode 100644 index acc35e7..0000000 --- a/node_modules/stream-splicer/test/push.js +++ /dev/null @@ -1,57 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var split = require('split'); -var test = require('tape'); - -test('push', function (t) { - var expected = {}; - expected.first = [ 333, 444, 555, 666, 777 ]; - expected.second = [ 6.66, 7.77 ]; - expected.output = [ 3.33, 4.44, 5.55, 3, 2 ]; - - t.plan(5 + 2 + 5 + 3); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { this.push(row.x); next() }); - var d = through.obj(function (x, enc, next) { this.push(x * 111); next() }); - - var first = through.obj(function (row, enc, next) { - if (expected.first.length === 2) { - t.equal(p.length, 5); - p.push(second); - t.equal(p.length, 6); - } - - var ex = expected.first.shift(); - t.deepEqual(row, ex); - - this.push(row / 100); - next(); - }); - var second = through.obj(function (row, enc, next) { - var ex = expected.second.shift(); - t.deepEqual(row, ex); - this.push(Math.floor(10 - row)); - next(); - }); - - var p = pipeline.obj([ a, b, c, d, first ]); - t.equal(p.length, 5); - - p.pipe(through.obj(function (row, enc, next) { - var ex = expected.output.shift(); - t.deepEqual(row, ex); - next(); - })); - - p.write('{"x":3}\n'); - p.write('{"x":4}\n'); - p.write('{"x":5}\n'); - p.write('{"x":6}\n'); - p.write('{"x":7}'); - p.end(); -}); diff --git a/node_modules/stream-splicer/test/shift.js b/node_modules/stream-splicer/test/shift.js deleted file mode 100644 index 188f243..0000000 --- a/node_modules/stream-splicer/test/shift.js +++ /dev/null @@ -1,46 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var test = require('tape'); - -test('shift', function (t) { - var expected = {}; - expected.a = [ 3, 4 ]; - expected.b = [ 300, 400, 5, 6 ]; - expected.c = [ 310, 410, 15, 16 ]; - expected.output = [ 155, 205, 15/2, 8 ]; - - t.plan(2 + 4 + 4 + 4); - - var a = through.obj(function (x, enc, next) { - var ex = expected.a.shift(); - t.equal(x, ex, 'a'); - this.push(x * 100); - next(); - }); - var b = through.obj(function (x, enc, next) { - var ex = expected.b.shift(); - t.equal(x, ex, 'b'); - if (expected.b.length === 2) p.shift() - this.push(x + 10); - next(); - }); - var c = through.obj(function (x, enc, next) { - var ex = expected.c.shift(); - t.equal(x, ex, 'c'); - this.push(x / 2); - next(); - }); - - var p = pipeline.obj([ a, b, c ]); - p.pipe(through.obj(function (x, enc, next) { - var ex = expected.output.shift(); - t.equal(x, ex); - next(); - })); - - p.write(3); - p.write(4); - p.write(5); - p.write(6); - p.end(); -}); diff --git a/node_modules/stream-splicer/test/splice.js b/node_modules/stream-splicer/test/splice.js deleted file mode 100644 index cc00718..0000000 --- a/node_modules/stream-splicer/test/splice.js +++ /dev/null @@ -1,58 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var split = require('split'); -var concat = require('concat-stream'); -var test = require('tape'); - -test('splice', function (t) { - var expected = {}; - expected.replacer = [ '333', '444', '5000', '6000' ]; - expected.d = [ 3, 4 ]; - expected.thousander = [ 5, 6 ]; - - t.plan(4 + 2 + 2 + 1); - - var a = split(); - var b = through.obj(function (row, enc, next) { - this.push(JSON.parse(row)); - next(); - }); - var c = through.obj(function (row, enc, next) { - this.push(row.x); - next(); - }); - var d = through.obj(function (x, enc, next) { - t.equal(x, expected.d.shift(), 'd'); - this.push(String(x * 111)); - next(); - }); - var thousander = through.obj(function (x, enc, next) { - t.equal(x, expected.thousander.shift(), 'thousander'); - this.push(String(x * 1000)); - next(); - }); - - var replacer = through(function (buf, enc, next) { - var ex = expected.replacer.shift(); - t.equal(buf.toString(), ex); - if (expected.replacer.length === 2) { - stream.splice(3, 1, thousander); - } - this.push(buf.toString('hex') + '\n'); - next(); - }); - - var stream = pipeline([ a, b, c, d, replacer ]); - stream.pipe(concat(function (body) { - t.deepEqual( - body.toString(), - '333333\n343434\n35303030\n36303030\n' - ); - })); - - stream.write('{"x":3}\n'); - stream.write('{"x":4}\n'); - stream.write('{"x":5}\n'); - stream.write('{"x":6}'); - stream.end(); -}); diff --git a/node_modules/stream-splicer/test/unshift.js b/node_modules/stream-splicer/test/unshift.js deleted file mode 100644 index 5fac97d..0000000 --- a/node_modules/stream-splicer/test/unshift.js +++ /dev/null @@ -1,46 +0,0 @@ -var pipeline = require('../'); -var through = require('through2'); -var test = require('tape'); - -test('unshift', function (t) { - var expected = {}; - expected.a = [ 5, 6 ]; - expected.b = [ 3, 4, 500, 600 ]; - expected.c = [ 13, 14, 510, 610 ]; - expected.output = [ 13/2, 7, 255, 305 ]; - - t.plan(2 + 4 + 4 + 4); - - var a = through.obj(function (x, enc, next) { - var ex = expected.a.shift(); - t.equal(x, ex, 'a'); - this.push(x * 100); - next(); - }); - var b = through.obj(function (x, enc, next) { - var ex = expected.b.shift(); - t.equal(x, ex, 'b'); - if (expected.b.length === 2) p.unshift(a) - this.push(x + 10); - next(); - }); - var c = through.obj(function (x, enc, next) { - var ex = expected.c.shift(); - t.equal(x, ex, 'c'); - this.push(x / 2); - next(); - }); - - var p = pipeline.obj([ b, c ]); - p.pipe(through.obj(function (x, enc, next) { - var ex = expected.output.shift(); - t.equal(x, ex); - next(); - })); - - p.write(3); - p.write(4); - p.write(5); - p.write(6); - p.end(); -}); diff --git a/node_modules/string.prototype.trim/.eslintrc b/node_modules/string.prototype.trim/.eslintrc deleted file mode 100644 index b80719c..0000000 --- a/node_modules/string.prototype.trim/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-nested-callbacks": [2, 3], - "new-cap": [2, { "capIsNewExceptions": ["CheckObjectCoercible", "ToString"] }], - "no-invalid-this": [1] - } -} diff --git a/node_modules/string.prototype.trim/.jscs.json b/node_modules/string.prototype.trim/.jscs.json deleted file mode 100644 index d0d49f7..0000000 --- a/node_modules/string.prototype.trim/.jscs.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": "allButReserved", - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - } -} - diff --git a/node_modules/string.prototype.trim/.npmignore b/node_modules/string.prototype.trim/.npmignore deleted file mode 100644 index 123ae94..0000000 --- a/node_modules/string.prototype.trim/.npmignore +++ /dev/null @@ -1,27 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules diff --git a/node_modules/string.prototype.trim/.travis.yml b/node_modules/string.prototype.trim/.travis.yml deleted file mode 100644 index 9569baa..0000000 --- a/node_modules/string.prototype.trim/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -language: node_js -node_js: - - "5.5" - - "5.4" - - "5.3" - - "5.2" - - "5.1" - - "5.0" - - "4.2" - - "4.1" - - "4.0" - - "iojs-v3.3" - - "iojs-v3.2" - - "iojs-v3.1" - - "iojs-v3.0" - - "iojs-v2.5" - - "iojs-v2.4" - - "iojs-v2.3" - - "iojs-v2.2" - - "iojs-v2.1" - - "iojs-v2.0" - - "iojs-v1.8" - - "iojs-v1.7" - - "iojs-v1.6" - - "iojs-v1.5" - - "iojs-v1.4" - - "iojs-v1.3" - - "iojs-v1.2" - - "iojs-v1.1" - - "iojs-v1.0" - - "0.12" - - "0.11" - - "0.10" - - "0.9" - - "0.8" - - "0.6" - - "0.4" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' -script: - - 'if [ "${TRAVIS_NODE_VERSION}" != "4.2" ]; then npm run tests-only ; else npm test ; fi' -sudo: false -matrix: - fast_finish: true - allow_failures: - - node_js: "5.4" - - node_js: "5.3" - - node_js: "5.2" - - node_js: "5.1" - - node_js: "5.0" - - node_js: "4.1" - - node_js: "4.0" - - node_js: "iojs-v3.2" - - node_js: "iojs-v3.1" - - node_js: "iojs-v3.0" - - node_js: "iojs-v2.4" - - node_js: "iojs-v2.3" - - node_js: "iojs-v2.2" - - node_js: "iojs-v2.1" - - node_js: "iojs-v2.0" - - node_js: "iojs-v1.7" - - node_js: "iojs-v1.6" - - node_js: "iojs-v1.5" - - node_js: "iojs-v1.4" - - node_js: "iojs-v1.3" - - node_js: "iojs-v1.2" - - node_js: "iojs-v1.1" - - node_js: "iojs-v1.0" - - node_js: "0.11" - - node_js: "0.9" - - node_js: "0.6" - - node_js: "0.4" diff --git a/node_modules/string.prototype.trim/CHANGELOG.md b/node_modules/string.prototype.trim/CHANGELOG.md deleted file mode 100644 index b4251b0..0000000 --- a/node_modules/string.prototype.trim/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -1.1.2 / 2016-02-06 -================= - * Use the polyfill, not the implementation, as the default export. - * package.json: use object form of "authors", add "contributors" - * [Deps] update `define-properties`, `es-abstract` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` - * [Tests] fix npm upgrades for older nodes - * [Tests] up to `node` `v5.5`, don’t allow `0.8` to fail - -1.1.1 / 2015-08-16 -================= - * [Docs] remove "if" around `.shim` call in example - -1.1.0 / 2015-08-16 -================= - * [New] Implement the [es-shim API](es-shims/api). - * [Refactor] Move implementation to `implementation.js` - * [Deps] update `es-abstract` - * [Dev Deps] update `jscs`, `tape` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - -1.0.0 / 2015-08-08 -================= - * Initial release diff --git a/node_modules/string.prototype.trim/LICENSE b/node_modules/string.prototype.trim/LICENSE deleted file mode 100644 index fcf5754..0000000 --- a/node_modules/string.prototype.trim/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/string.prototype.trim/Makefile b/node_modules/string.prototype.trim/Makefile deleted file mode 100644 index b9e4fe1..0000000 --- a/node_modules/string.prototype.trim/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. -$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) - - # The files that need updating when incrementing the version number. -VERSIONED_FILES := *.js *.json README* - - -# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. -# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment -# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. -export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") -UTILS := semver -# Make sure that all required utilities can be located. -UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) - -# Default target (by virtue of being the first non '.'-prefixed in the file). -.PHONY: _no-target-specified -_no-target-specified: - $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) - -# Lists all targets defined in this makefile. -.PHONY: list -list: - @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort - -# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). -.PHONY: test -test: - @npm test - -.PHONY: _ensure-tag -_ensure-tag: -ifndef TAG - $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) -endif - -CHANGELOG_ERROR = $(error No CHANGELOG specified) -.PHONY: _ensure-changelog -_ensure-changelog: - @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) - -# Ensures that the git workspace is clean. -.PHONY: _ensure-clean -_ensure-clean: - @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } - -# Makes a release; invoke with `make TAG= release`. -.PHONY: release -release: _ensure-tag _ensure-changelog _ensure-clean - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | command grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ - git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/string.prototype.trim/README.md b/node_modules/string.prototype.trim/README.md deleted file mode 100644 index 256595e..0000000 --- a/node_modules/string.prototype.trim/README.md +++ /dev/null @@ -1,50 +0,0 @@ -String.prototype.trim [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -An ES5 spec-compliant `String.prototype.trim` shim. Invoke its "shim" method to shim `String.prototype.trim` if it is unavailable. - -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.20). - -Most common usage: - -```js -var assert = require('assert'); -var trim = require('string.prototype.trim'); - -assert(trim(' \t\na \t\n') === 'a'); - -trim.shim(); // will be a no-op if not needed - -assert(trim(' \t\na \t\n') === ' \t\na \t\n'.trim()); -``` - -## Engine Bugs -Some implementations of `String#trim` incorrectly trim zero-width spaces. This shim detects and corrects this behavior. - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.com/package/string.prototype.trim -[npm-version-svg]: http://versionbadg.es/es-shims/String.prototype.trim.svg -[travis-svg]: https://travis-ci.org/es-shims/String.prototype.trim.svg -[travis-url]: https://travis-ci.org/es-shims/String.prototype.trim -[deps-svg]: https://david-dm.org/es-shims/String.prototype.trim.svg -[deps-url]: https://david-dm.org/es-shims/String.prototype.trim -[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trim/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trim#info=devDependencies -[testling-svg]: https://ci.testling.com/es-shims/String.prototype.trim.png -[testling-url]: https://ci.testling.com/es-shims/String.prototype.trim -[npm-badge-png]: https://nodei.co/npm/string.prototype.trim.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/string.prototype.trim.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/string.prototype.trim.svg -[downloads-url]: http://npm-stat.com/charts.html?package=string.prototype.trim diff --git a/node_modules/string.prototype.trim/implementation.js b/node_modules/string.prototype.trim/implementation.js deleted file mode 100644 index 304246c..0000000 --- a/node_modules/string.prototype.trim/implementation.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var ES = require('es-abstract/es5'); -var replace = bind.call(Function.call, String.prototype.replace); - -var leftWhitespace = /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; -var rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; - -module.exports = function trim() { - var S = ES.ToString(ES.CheckObjectCoercible(this)); - return replace(replace(S, leftWhitespace, ''), rightWhitespace, ''); -}; diff --git a/node_modules/string.prototype.trim/index.js b/node_modules/string.prototype.trim/index.js deleted file mode 100644 index 4040ba9..0000000 --- a/node_modules/string.prototype.trim/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var define = require('define-properties'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -var boundTrim = bind.call(Function.call, getPolyfill()); - -define(boundTrim, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = boundTrim; diff --git a/node_modules/string.prototype.trim/package.json b/node_modules/string.prototype.trim/package.json deleted file mode 100644 index aa36865..0000000 --- a/node_modules/string.prototype.trim/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "_from": "string.prototype.trim@~1.1.2", - "_id": "string.prototype.trim@1.1.2", - "_inBundle": false, - "_integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", - "_location": "/string.prototype.trim", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string.prototype.trim@~1.1.2", - "name": "string.prototype.trim", - "escapedName": "string.prototype.trim", - "rawSpec": "~1.1.2", - "saveSpec": null, - "fetchSpec": "~1.1.2" - }, - "_requiredBy": [ - "/tape" - ], - "_resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "_shasum": "d04de2c89e137f4d7d206f086b5ed2fae6be8cea", - "_spec": "string.prototype.trim@~1.1.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/tape", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/es-shims/String.prototype.trim/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.0", - "function-bind": "^1.0.2" - }, - "deprecated": false, - "description": "ES5 spec-compliant shim for String.prototype.trim", - "devDependencies": { - "@es-shims/api": "^1.0.0", - "@ljharb/eslint-config": "^1.6.1", - "covert": "^1.1.0", - "eslint": "^1.10.3", - "jscs": "^2.9.0", - "nsp": "^2.2.0", - "replace": "^0.3.0", - "semver": "^5.1.0", - "tape": "^4.4.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/es-shims/String.prototype.trim#readme", - "keywords": [ - "String.prototype.trim", - "string", - "ES5", - "shim", - "trim", - "polyfill", - "es-shim API" - ], - "license": "MIT", - "main": "index.js", - "name": "string.prototype.trim", - "repository": { - "type": "git", - "url": "git://github.com/es-shims/String.prototype.trim.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "eslint": "eslint test/*.js *.js", - "jscs": "jscs test/*.js *.js", - "lint": "npm run jscs && npm run eslint", - "security": "nsp check", - "test": "npm run lint && es-shim-api --bound && npm run tests-only && npm run security", - "test:module": "node test/index.js", - "test:shimmed": "node test/shimmed.js", - "tests-only": "npm run test:shimmed && npm run test:module" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/9.0..latest", - "firefox/4.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/11.6..latest", - "opera/next", - "safari/5.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.2" -} diff --git a/node_modules/string.prototype.trim/polyfill.js b/node_modules/string.prototype.trim/polyfill.js deleted file mode 100644 index afdb6f5..0000000 --- a/node_modules/string.prototype.trim/polyfill.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -var zeroWidthSpace = '\u200b'; - -module.exports = function getPolyfill() { - if (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace) { - return String.prototype.trim; - } - return implementation; -}; diff --git a/node_modules/string.prototype.trim/shim.js b/node_modules/string.prototype.trim/shim.js deleted file mode 100644 index 477025c..0000000 --- a/node_modules/string.prototype.trim/shim.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimStringTrim() { - var polyfill = getPolyfill(); - define(String.prototype, { trim: polyfill }, { trim: function () { return String.prototype.trim !== polyfill; } }); - return polyfill; -}; diff --git a/node_modules/string.prototype.trim/test/index.js b/node_modules/string.prototype.trim/test/index.js deleted file mode 100644 index a735984..0000000 --- a/node_modules/string.prototype.trim/test/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var trim = require('../'); -var test = require('tape'); -var runTests = require('./tests'); - -test('as a function', function (t) { - t.test('bad array/this value', function (st) { - st.throws(function () { trim(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st.throws(function () { trim(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(trim, t); - - t.end(); -}); diff --git a/node_modules/string.prototype.trim/test/shimmed.js b/node_modules/string.prototype.trim/test/shimmed.js deleted file mode 100644 index 95d9b2d..0000000 --- a/node_modules/string.prototype.trim/test/shimmed.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var trim = require('../'); -trim.shim(); - -var test = require('tape'); -var defineProperties = require('define-properties'); -var bind = require('function-bind'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = function f() {}.name === 'f'; - -var runTests = require('./tests'); - -test('shimmed', function (t) { - t.equal(String.prototype.trim.length, 0, 'String#trim has a length of 0'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal(String.prototype.trim.name, 'trim', 'String#trim has name "trim"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(String.prototype, 'trim'), 'String#trim is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { - st.throws(function () { return trim(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st.throws(function () { return trim(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(bind.call(Function.call, String.prototype.trim), t); - - t.end(); -}); diff --git a/node_modules/string.prototype.trim/test/tests.js b/node_modules/string.prototype.trim/test/tests.js deleted file mode 100644 index 6e3889c..0000000 --- a/node_modules/string.prototype.trim/test/tests.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -module.exports = function (trim, t) { - t.test('normal cases', function (st) { - st.equal(trim(' \t\na \t\n'), 'a', 'strips whitespace off left and right sides'); - st.equal(trim('a'), 'a', 'noop when no whitespace'); - - var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - st.equal(trim(allWhitespaceChars + 'a' + allWhitespaceChars), 'a', 'all expected whitespace chars are trimmed'); - - st.end(); - }); - - t.test('zero-width spaces', function (st) { - var zeroWidth = '\u200b'; - st.equal(trim(zeroWidth), zeroWidth, 'zero width space does not trim'); - st.end(); - }); -}; diff --git a/node_modules/string.prototype.trimleft/.editorconfig b/node_modules/string.prototype.trimleft/.editorconfig deleted file mode 100644 index bc228f8..0000000 --- a/node_modules/string.prototype.trimleft/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/string.prototype.trimleft/.eslintrc b/node_modules/string.prototype.trimleft/.eslintrc deleted file mode 100644 index 1fa9542..0000000 --- a/node_modules/string.prototype.trimleft/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "overrides": [ - { - "files": "test/*", - "rules": { - "id-length": 0, - "no-invalid-this": 1, - }, - }, - ], -} diff --git a/node_modules/string.prototype.trimleft/.travis.yml b/node_modules/string.prototype.trimleft/.travis.yml deleted file mode 100644 index 87a3b02..0000000 --- a/node_modules/string.prototype.trimleft/.travis.yml +++ /dev/null @@ -1,317 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "12.10" - - "11.15" - - "10.16" - - "9.11" - - "8.16" - - "7.10" - - "6.17" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "12.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.16" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/string.prototype.trimleft/CHANGELOG.md b/node_modules/string.prototype.trimleft/CHANGELOG.md deleted file mode 100644 index 535068f..0000000 --- a/node_modules/string.prototype.trimleft/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ -2.1.0 / 2019-09-09 -================= - * [New] add `auto` entry point - * [Deps] update `function-bind`, `define-properties` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `@es-shims/api` - * [meta] clean up scripts - * [meta] Only apps should have lockfiles - * [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `v5.10`, `v4.9`; use `nvm install-latest-npm` - * [Tests] allow a name of `trimLeft` or `trimStart` - * [Tests] fix tests for the mongolian vowel separator - * [Tests] use `functions-have-names` - * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops - * [Tests] remove `jscs` - * [Tests] use pretest/posttest for linting/security - -2.0.0 / 2016-02-06 -================= - * [Breaking] conform to the es-shim API - * [Deps] update `define-properties` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Tests] up to `node` `v5.5` - * [Tests] fix npm upgrades on older nodes - -1.0.1 / 2015-07-29 -================= - * Fix deps mistakenly being dev deps - -1.0.0 / 2015-07-29 -================= - * v1.0.0 diff --git a/node_modules/string.prototype.trimleft/LICENSE b/node_modules/string.prototype.trimleft/LICENSE deleted file mode 100644 index b43df44..0000000 --- a/node_modules/string.prototype.trimleft/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/string.prototype.trimleft/README.md b/node_modules/string.prototype.trimleft/README.md deleted file mode 100644 index bd3f82f..0000000 --- a/node_modules/string.prototype.trimleft/README.md +++ /dev/null @@ -1,47 +0,0 @@ -String.prototype.trimLeft [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -A spec-proposal-compliant `String.prototype.trimLeft` shim. Invoke its "shim" method to shim `String.prototype.trimLeft` if it is unavailable. - -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. - -Most common usage: -```js -var trimLeft = require('string.prototype.trimleft'); - -assert(trimLeft(' \t\na \t\n') === 'a \t\n'); - -if (!String.prototype.trimLeft) { - trimLeft.shim(); -} - -assert(trimLeft(' \t\na \t\n') === ' \t\na \t\n'.trimLeft()); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.com/package/string.prototype.trimleft -[npm-version-svg]: http://vb.teelaun.ch/es-shims/String.prototype.trimLeft.svg -[travis-svg]: https://travis-ci.org/es-shims/String.prototype.trimLeft.svg -[travis-url]: https://travis-ci.org/es-shims/String.prototype.trimLeft -[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimLeft.svg -[deps-url]: https://david-dm.org/es-shims/String.prototype.trimLeft -[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimLeft/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimLeft#info=devDependencies -[testling-svg]: https://ci.testling.com/es-shims/String.prototype.trimLeft.png -[testling-url]: https://ci.testling.com/es-shims/String.prototype.trimLeft -[npm-badge-png]: https://nodei.co/npm/string.prototype.trimleft.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/string.prototype.trimleft.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/string.prototype.trimleft.svg -[downloads-url]: http://npm-stat.com/charts.html?package=string.prototype.trimleft diff --git a/node_modules/string.prototype.trimleft/auto.js b/node_modules/string.prototype.trimleft/auto.js deleted file mode 100644 index 8ebf606..0000000 --- a/node_modules/string.prototype.trimleft/auto.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -require('./shim')(); diff --git a/node_modules/string.prototype.trimleft/implementation.js b/node_modules/string.prototype.trimleft/implementation.js deleted file mode 100644 index 5df533e..0000000 --- a/node_modules/string.prototype.trimleft/implementation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var replace = bind.call(Function.call, String.prototype.replace); - -/* eslint-disable no-control-regex */ -var leftWhitespace = /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*/; -/* eslint-enable no-control-regex */ - -module.exports = function trimLeft() { - return replace(this, leftWhitespace, ''); -}; diff --git a/node_modules/string.prototype.trimleft/index.js b/node_modules/string.prototype.trimleft/index.js deleted file mode 100644 index 7fe48cf..0000000 --- a/node_modules/string.prototype.trimleft/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var define = require('define-properties'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -var bound = bind.call(Function.call, getPolyfill()); - -define(bound, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = bound; diff --git a/node_modules/string.prototype.trimleft/package.json b/node_modules/string.prototype.trimleft/package.json deleted file mode 100644 index 05ecf0a..0000000 --- a/node_modules/string.prototype.trimleft/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_from": "string.prototype.trimleft@^2.1.0", - "_id": "string.prototype.trimleft@2.1.0", - "_inBundle": false, - "_integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", - "_location": "/string.prototype.trimleft", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string.prototype.trimleft@^2.1.0", - "name": "string.prototype.trimleft", - "escapedName": "string.prototype.trimleft", - "rawSpec": "^2.1.0", - "saveSpec": null, - "fetchSpec": "^2.1.0" - }, - "_requiredBy": [ - "/es-abstract" - ], - "_resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "_shasum": "6cc47f0d7eb8d62b0f3701611715a3954591d634", - "_spec": "string.prototype.trimleft@^2.1.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/es-abstract", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/es-shims/String.prototype.trimLeft/issues" - }, - "bundleDependencies": false, - "dependencies": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - }, - "deprecated": false, - "description": "ES7 spec-compliant String.prototype.trimLeft shim.", - "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^14.1.0", - "covert": "^1.1.1", - "eslint": "^6.3.0", - "functions-have-names": "^1.1.1", - "tape": "^4.11.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/es-shims/String.prototype.trimLeft#readme", - "keywords": [ - "String.prototype.trimLeft", - "string", - "ES7", - "shim", - "trim", - "trimLeft", - "trimRight", - "polyfill", - "es-shim API" - ], - "license": "MIT", - "main": "index.js", - "name": "string.prototype.trimleft", - "repository": { - "type": "git", - "url": "git://github.com/es-shims/String.prototype.trimLeft.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "lint": "eslint .", - "posttest": "npx aud", - "pretest": "npm run lint && es-shim-api --bound", - "test": "npm run tests-only", - "test:module": "node test", - "test:shimmed": "node test/shimmed", - "tests-only": "npm run --silent test:shimmed && npm run --silent test:module" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/9.0..latest", - "firefox/4.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/11.6..latest", - "opera/next", - "safari/5.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "2.1.0" -} diff --git a/node_modules/string.prototype.trimleft/polyfill.js b/node_modules/string.prototype.trimleft/polyfill.js deleted file mode 100644 index dc33a23..0000000 --- a/node_modules/string.prototype.trimleft/polyfill.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = function getPolyfill() { - if (!String.prototype.trimLeft) { - return implementation; - } - var zeroWidthSpace = '\u200b'; - if (zeroWidthSpace.trimLeft() !== zeroWidthSpace) { - return implementation; - } - return String.prototype.trimLeft; -}; diff --git a/node_modules/string.prototype.trimleft/shim.js b/node_modules/string.prototype.trimleft/shim.js deleted file mode 100644 index 23314f0..0000000 --- a/node_modules/string.prototype.trimleft/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimTrimLeft() { - var polyfill = getPolyfill(); - define( - String.prototype, - { trimLeft: polyfill }, - { trimLeft: function () { return String.prototype.trimLeft !== polyfill; } } - ); - return polyfill; -}; diff --git a/node_modules/string.prototype.trimleft/test/index.js b/node_modules/string.prototype.trimleft/test/index.js deleted file mode 100644 index 9979507..0000000 --- a/node_modules/string.prototype.trimleft/test/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var trimLeft = require('../'); -var test = require('tape'); - -var runTests = require('./tests'); - -test('as a function', function (t) { - t.test('bad array/this value', function (st) { - st['throws'](function () { trimLeft(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st['throws'](function () { trimLeft(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(trimLeft, t); - - t.end(); -}); diff --git a/node_modules/string.prototype.trimleft/test/shimmed.js b/node_modules/string.prototype.trimleft/test/shimmed.js deleted file mode 100644 index c2ebfd4..0000000 --- a/node_modules/string.prototype.trimleft/test/shimmed.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var trimLeft = require('../'); -trimLeft.shim(); - -var runTests = require('./tests'); - -var test = require('tape'); -var defineProperties = require('define-properties'); -var bind = require('function-bind'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = require('functions-have-names')(); - -test('shimmed', function (t) { - t.equal(String.prototype.trimLeft.length, 0, 'String#trimLeft has a length of 0'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal((/^(?:trimLeft|trimStart)$/).test(String.prototype.trimLeft.name), true, 'String#trimLeft has name "trimLeft" or "trimStart"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(String.prototype, 'trimLeft'), 'String#trimLeft is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return trimLeft(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return trimLeft(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(bind.call(Function.call, String.prototype.trimLeft), t); - - t.end(); -}); diff --git a/node_modules/string.prototype.trimleft/test/tests.js b/node_modules/string.prototype.trimleft/test/tests.js deleted file mode 100644 index fe7926a..0000000 --- a/node_modules/string.prototype.trimleft/test/tests.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -module.exports = function (trimLeft, t) { - t.test('normal cases', function (st) { - st.equal(trimLeft(' \t\na \t\n'), 'a \t\n', 'strips whitespace off the left side'); - st.equal(trimLeft('a'), 'a', 'noop when no whitespace'); - - var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - st.equal(trimLeft(allWhitespaceChars + 'a' + allWhitespaceChars), 'a' + allWhitespaceChars, 'all expected whitespace chars are trimmed'); - - st.end(); - }); - - // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ - var mongolianVowelSeparator = '\u180E'; - t.test('unicode >= 4 && < 6.3', { skip: !(/^\s$/).test(mongolianVowelSeparator) }, function (st) { - st.equal(trimLeft(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), 'a' + mongolianVowelSeparator, 'mongolian vowel separator is whitespace'); - st.end(); - }); - - t.test('zero-width spaces', function (st) { - var zeroWidth = '\u200b'; - st.equal(trimLeft(zeroWidth), zeroWidth, 'zero width space does not trim'); - st.end(); - }); -}; diff --git a/node_modules/string.prototype.trimright/.editorconfig b/node_modules/string.prototype.trimright/.editorconfig deleted file mode 100644 index bc228f8..0000000 --- a/node_modules/string.prototype.trimright/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/string.prototype.trimright/.eslintrc b/node_modules/string.prototype.trimright/.eslintrc deleted file mode 100644 index 1fa9542..0000000 --- a/node_modules/string.prototype.trimright/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "overrides": [ - { - "files": "test/*", - "rules": { - "id-length": 0, - "no-invalid-this": 1, - }, - }, - ], -} diff --git a/node_modules/string.prototype.trimright/.travis.yml b/node_modules/string.prototype.trimright/.travis.yml deleted file mode 100644 index 87a3b02..0000000 --- a/node_modules/string.prototype.trimright/.travis.yml +++ /dev/null @@ -1,317 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "12.10" - - "11.15" - - "10.16" - - "9.11" - - "8.16" - - "7.10" - - "6.17" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "12.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.16" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/string.prototype.trimright/CHANGELOG.md b/node_modules/string.prototype.trimright/CHANGELOG.md deleted file mode 100644 index 535068f..0000000 --- a/node_modules/string.prototype.trimright/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ -2.1.0 / 2019-09-09 -================= - * [New] add `auto` entry point - * [Deps] update `function-bind`, `define-properties` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `@es-shims/api` - * [meta] clean up scripts - * [meta] Only apps should have lockfiles - * [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `v5.10`, `v4.9`; use `nvm install-latest-npm` - * [Tests] allow a name of `trimLeft` or `trimStart` - * [Tests] fix tests for the mongolian vowel separator - * [Tests] use `functions-have-names` - * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops - * [Tests] remove `jscs` - * [Tests] use pretest/posttest for linting/security - -2.0.0 / 2016-02-06 -================= - * [Breaking] conform to the es-shim API - * [Deps] update `define-properties` - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Tests] up to `node` `v5.5` - * [Tests] fix npm upgrades on older nodes - -1.0.1 / 2015-07-29 -================= - * Fix deps mistakenly being dev deps - -1.0.0 / 2015-07-29 -================= - * v1.0.0 diff --git a/node_modules/string.prototype.trimright/LICENSE b/node_modules/string.prototype.trimright/LICENSE deleted file mode 100644 index b43df44..0000000 --- a/node_modules/string.prototype.trimright/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/string.prototype.trimright/README.md b/node_modules/string.prototype.trimright/README.md deleted file mode 100644 index 6d736f5..0000000 --- a/node_modules/string.prototype.trimright/README.md +++ /dev/null @@ -1,47 +0,0 @@ -String.prototype.trimRight [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -A spec-proposal-compliant `String.prototype.trimRight` shim. Invoke its "shim" method to shim `String.prototype.trimRight` if it is unavailable. - -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. - -Most common usage: -```js -var trimRight = require('string.prototype.trimright'); - -assert(trimRight(' \t\na \t\n') === 'a \t\n'); - -if (!String.prototype.trimRight) { - trimRight.shim(); -} - -assert(trimRight(' \t\na \t\n ') === ' \t\na \t\n '.trimRight()); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.com/package/string.prototype.trimright -[npm-version-svg]: http://vb.teelaun.ch/es-shims/String.prototype.trimRight.svg -[travis-svg]: https://travis-ci.org/es-shims/String.prototype.trimRight.svg -[travis-url]: https://travis-ci.org/es-shims/String.prototype.trimRight -[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimRight.svg -[deps-url]: https://david-dm.org/es-shims/String.prototype.trimRight -[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimRight/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimRight#info=devDependencies -[testling-svg]: https://ci.testling.com/es-shims/String.prototype.trimRight.png -[testling-url]: https://ci.testling.com/es-shims/String.prototype.trimRight -[npm-badge-png]: https://nodei.co/npm/string.prototype.trimright.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/string.prototype.trimright.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/string.prototype.trimright.svg -[downloads-url]: http://npm-stat.com/charts.html?package=string.prototype.trimright diff --git a/node_modules/string.prototype.trimright/auto.js b/node_modules/string.prototype.trimright/auto.js deleted file mode 100644 index 8ebf606..0000000 --- a/node_modules/string.prototype.trimright/auto.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -require('./shim')(); diff --git a/node_modules/string.prototype.trimright/implementation.js b/node_modules/string.prototype.trimright/implementation.js deleted file mode 100644 index ce99554..0000000 --- a/node_modules/string.prototype.trimright/implementation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var replace = bind.call(Function.call, String.prototype.replace); - -/* eslint-disable no-control-regex */ -var rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*$/; -/* eslint-enable no-control-regex */ - -module.exports = function trimRight() { - return replace(this, rightWhitespace, ''); -}; diff --git a/node_modules/string.prototype.trimright/index.js b/node_modules/string.prototype.trimright/index.js deleted file mode 100644 index 7fe48cf..0000000 --- a/node_modules/string.prototype.trimright/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var define = require('define-properties'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -var bound = bind.call(Function.call, getPolyfill()); - -define(bound, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = bound; diff --git a/node_modules/string.prototype.trimright/package.json b/node_modules/string.prototype.trimright/package.json deleted file mode 100644 index 5ceeae0..0000000 --- a/node_modules/string.prototype.trimright/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_from": "string.prototype.trimright@^2.1.0", - "_id": "string.prototype.trimright@2.1.0", - "_inBundle": false, - "_integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", - "_location": "/string.prototype.trimright", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string.prototype.trimright@^2.1.0", - "name": "string.prototype.trimright", - "escapedName": "string.prototype.trimright", - "rawSpec": "^2.1.0", - "saveSpec": null, - "fetchSpec": "^2.1.0" - }, - "_requiredBy": [ - "/es-abstract" - ], - "_resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "_shasum": "669d164be9df9b6f7559fa8e89945b168a5a6c58", - "_spec": "string.prototype.trimright@^2.1.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/es-abstract", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/es-shims/String.prototype.trimRight/issues" - }, - "bundleDependencies": false, - "dependencies": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - }, - "deprecated": false, - "description": "ES7 spec-compliant String.prototype.trimRight shim.", - "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^14.1.0", - "covert": "^1.1.1", - "eslint": "^6.3.0", - "functions-have-names": "^1.1.1", - "tape": "^4.11.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/es-shims/String.prototype.trimRight#readme", - "keywords": [ - "String.prototype.trimRight", - "string", - "ES7", - "shim", - "trim", - "trimLeft", - "trimRight", - "polyfill", - "es-shim API" - ], - "license": "MIT", - "main": "index.js", - "name": "string.prototype.trimright", - "repository": { - "type": "git", - "url": "git://github.com/es-shims/String.prototype.trimRight.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "lint": "eslint .", - "posttest": "npx aud", - "pretest": "npm run lint && es-shim-api --bound", - "test": "npm run tests-only", - "test:module": "node test", - "test:shimmed": "node test/shimmed", - "tests-only": "npm run test:shimmed && npm run test:module" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/9.0..latest", - "firefox/4.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/11.6..latest", - "opera/next", - "safari/5.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "2.1.0" -} diff --git a/node_modules/string.prototype.trimright/polyfill.js b/node_modules/string.prototype.trimright/polyfill.js deleted file mode 100644 index 7c2aa99..0000000 --- a/node_modules/string.prototype.trimright/polyfill.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = function getPolyfill() { - if (!String.prototype.trimRight) { - return implementation; - } - var zeroWidthSpace = '\u200b'; - if (zeroWidthSpace.trimRight() !== zeroWidthSpace) { - return implementation; - } - return String.prototype.trimRight; -}; diff --git a/node_modules/string.prototype.trimright/shim.js b/node_modules/string.prototype.trimright/shim.js deleted file mode 100644 index e073afe..0000000 --- a/node_modules/string.prototype.trimright/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimTrimRight() { - var polyfill = getPolyfill(); - define( - String.prototype, - { trimRight: polyfill }, - { trimRight: function () { return String.prototype.trimRight !== polyfill; } } - ); - return polyfill; -}; diff --git a/node_modules/string.prototype.trimright/test/index.js b/node_modules/string.prototype.trimright/test/index.js deleted file mode 100644 index 84e5e3d..0000000 --- a/node_modules/string.prototype.trimright/test/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var trimRight = require('../'); -var test = require('tape'); -var runTests = require('./tests'); - -test('as a function', function (t) { - t.test('bad array/this value', function (st) { - st['throws'](function () { trimRight(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st['throws'](function () { trimRight(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(trimRight, t); - - t.end(); -}); diff --git a/node_modules/string.prototype.trimright/test/shimmed.js b/node_modules/string.prototype.trimright/test/shimmed.js deleted file mode 100644 index 92287ef..0000000 --- a/node_modules/string.prototype.trimright/test/shimmed.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var trimRight = require('../'); -trimRight.shim(); - -var runTests = require('./tests'); - -var test = require('tape'); -var defineProperties = require('define-properties'); -var bind = require('function-bind'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = require('functions-have-names')(); - -test('shimmed', function (t) { - t.equal(String.prototype.trimRight.length, 0, 'String#trimRight has a length of 0'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal((/^(?:trimRight|trimEnd)$/).test(String.prototype.trimRight.name), true, 'String#trimRight has name "trimRight" or "trimEnd"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(String.prototype, 'trimRight'), 'String#trimRight is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return trimRight(undefined, 'a'); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return trimRight(null, 'a'); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(bind.call(Function.call, String.prototype.trimRight), t); - - t.end(); -}); diff --git a/node_modules/string.prototype.trimright/test/tests.js b/node_modules/string.prototype.trimright/test/tests.js deleted file mode 100644 index b62a413..0000000 --- a/node_modules/string.prototype.trimright/test/tests.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -module.exports = function (trimRight, t) { - t.test('normal cases', function (st) { - st.equal(trimRight(' \t\na \t\n'), ' \t\na', 'strips whitespace off the left side'); - st.equal(trimRight('a'), 'a', 'noop when no whitespace'); - - var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - st.equal(trimRight(allWhitespaceChars + 'a' + allWhitespaceChars), allWhitespaceChars + 'a', 'all expected whitespace chars are trimmed'); - - st.end(); - }); - - // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ - var mongolianVowelSeparator = '\u180E'; - t.test('unicode >= 4 && < 6.3', { skip: !(/^\s$/).test(mongolianVowelSeparator) }, function (st) { - st.equal(trimRight(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), mongolianVowelSeparator + 'a', 'mongolian vowel separator is whitespace'); - st.end(); - }); - - t.test('zero-width spaces', function (st) { - var zeroWidth = '\u200b'; - st.equal(trimRight(zeroWidth), zeroWidth, 'zero width space does not trim'); - st.end(); - }); -}; diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb2..0000000 --- a/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd5831..0000000 --- a/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63..0000000 --- a/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json deleted file mode 100644 index f0ff9a0..0000000 --- a/node_modules/string_decoder/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "string_decoder@^1.1.1", - "_id": "string_decoder@1.3.0", - "_inBundle": false, - "_integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "_location": "/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@^1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/browserify", - "/stream-http/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "_shasum": "42f114594a46cf1a8e30b0a84f56c78c3edac21e", - "_spec": "string_decoder@^1.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.2.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.3.0" -} diff --git a/node_modules/subarg/.travis.yml b/node_modules/subarg/.travis.yml deleted file mode 100644 index cc4dba2..0000000 --- a/node_modules/subarg/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/subarg/LICENSE b/node_modules/subarg/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/subarg/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/subarg/example/show.js b/node_modules/subarg/example/show.js deleted file mode 100644 index f2a73ee..0000000 --- a/node_modules/subarg/example/show.js +++ /dev/null @@ -1,3 +0,0 @@ -var subarg = require('../'); -var argv = subarg(process.argv.slice(2)); -console.log(argv); diff --git a/node_modules/subarg/index.js b/node_modules/subarg/index.js deleted file mode 100644 index ca2c99d..0000000 --- a/node_modules/subarg/index.js +++ /dev/null @@ -1,35 +0,0 @@ -var minimist = require('minimist'); - -module.exports = function parse (args, opts) { - var level = 0, index; - var args_ = []; - - for (var i = 0; i < args.length; i++) { - if (typeof args[i] === 'string' && /^\[/.test(args[i])) { - if (level ++ === 0) { - index = i; - } - } - if (typeof args[i] === 'string' && /\]$/.test(args[i])) { - if (-- level > 0) continue; - - var sub = args.slice(index, i + 1); - if (typeof sub[0] === 'string') { - sub[0] = sub[0].replace(/^\[/, ''); - } - if (sub[0] === '') sub.shift(); - - var n = sub.length - 1; - if (typeof sub[n] === 'string') { - sub[n] = sub[n].replace(/\]$/, ''); - } - if (sub[n] === '') sub.pop(); - - args_.push(parse(sub)); - } - else if (level === 0) args_.push(args[i]); - } - - var argv = minimist(args_, opts); - return argv; -}; diff --git a/node_modules/subarg/package.json b/node_modules/subarg/package.json deleted file mode 100644 index bedc667..0000000 --- a/node_modules/subarg/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "subarg@^1.0.0", - "_id": "subarg@1.0.0", - "_inBundle": false, - "_integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "_location": "/subarg", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "subarg@^1.0.0", - "name": "subarg", - "escapedName": "subarg", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/browserify", - "/deps-sort", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "_shasum": "f62cf17581e996b48fc965699f54c06ae268b8d2", - "_spec": "subarg@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/subarg/issues" - }, - "bundleDependencies": false, - "dependencies": { - "minimist": "^1.1.0" - }, - "deprecated": false, - "description": "parse arguments with recursive contexts", - "devDependencies": { - "tape": "^3.0.0" - }, - "homepage": "https://github.com/substack/subarg", - "keywords": [ - "argument", - "option", - "parser", - "parsing", - "flags", - "command-line", - "cli", - "recursive", - "minimist" - ], - "license": "MIT", - "main": "index.js", - "name": "subarg", - "repository": { - "type": "git", - "url": "git://github.com/substack/subarg.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/16", - "firefox/latest", - "firefox/nightly", - "chrome/22", - "chrome/latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/subarg/readme.markdown b/node_modules/subarg/readme.markdown deleted file mode 100644 index e77a4d9..0000000 --- a/node_modules/subarg/readme.markdown +++ /dev/null @@ -1,55 +0,0 @@ -# subarg - -parse arguments with recursive contexts using -[minimist](https://npmjs.org/package/minimist) - -[![testling badge](https://ci.testling.com/substack/subarg.png)](https://ci.testling.com/substack/subarg) - -[![build status](https://secure.travis-ci.org/substack/subarg.png)](http://travis-ci.org/substack/subarg) - -This module is useful if you need to pass arguments into a piece of code without -coordinating ahead of time with the main program, like with a plugin system. - -# example - -``` js -var subarg = require('subarg'); -var argv = subarg(process.argv.slice(2)); -console.log(argv); -``` - -Contexts are denoted with square brackets: - -``` -$ node example/show.js rawr --beep [ boop -a 3 ] -n4 --robots [ -x 8 -y 6 ] -{ _: [ 'rawr' ], - beep: { _: [ 'boop' ], a: 3 }, - n: 4, - robots: { _: [], x: 8, y: 6 } } -``` - -# methods - -``` js -var subarg = require('subarg') -``` - -## var argv = subarg(args, opts) - -Parse the arguments array `args`, passing `opts` to -[minimist](https://npmjs.org/package/minimist). - -An opening `[` in the `args` array creates a new context and a `]` closes a -context. Contexts may be nested. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install subarg -``` - -# license - -MIT diff --git a/node_modules/subarg/test/arg.js b/node_modules/subarg/test/arg.js deleted file mode 100644 index d6f91ba..0000000 --- a/node_modules/subarg/test/arg.js +++ /dev/null @@ -1,31 +0,0 @@ -var subarg = require('../'); -var test = require('tape'); - -test('spaced multi sub-args', function (t) { - t.plan(2); - - t.deepEqual( - subarg('beep -t [ boop -o a.txt -o b.txt -q ] -v'.split(/\s+/)), - { - _: [ 'beep'], - t: { - _: [ 'boop' ], - o: [ 'a.txt', 'b.txt' ], - q: true - }, - v: true - } - ); - t.deepEqual( - subarg('beep -t [boop -o a.txt -o b.txt -q] -v'.split(/\s+/)), - { - _: [ 'beep'], - t: { - _: [ 'boop' ], - o: [ 'a.txt', 'b.txt' ], - q: true - }, - v: true - } - ); -}); diff --git a/node_modules/subarg/test/recursive.js b/node_modules/subarg/test/recursive.js deleted file mode 100644 index ab94c7a..0000000 --- a/node_modules/subarg/test/recursive.js +++ /dev/null @@ -1,24 +0,0 @@ -var subarg = require('../'); -var test = require('tape'); - -test('recursive', function (t) { - t.plan(1); - - t.deepEqual( - subarg('-a [ -b [ -c [ -d 5 ] ] ] -e 3'.split(/\s+/)), - { - _: [], - a: { - _: [], - b: { - _: [], - c: { - _: [], - d: 5 - } - } - }, - e: 3 - } - ); -}); diff --git a/node_modules/syntax-error/.travis.yml b/node_modules/syntax-error/.travis.yml deleted file mode 100644 index 77b2dcb..0000000 --- a/node_modules/syntax-error/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - stable - - 8 - - 6 - - 4 - - "iojs" - - "0.12" - - "0.10" - - "0.8" -before_install: - - nvm install-latest-npm diff --git a/node_modules/syntax-error/LICENSE b/node_modules/syntax-error/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/syntax-error/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/syntax-error/example/check.js b/node_modules/syntax-error/example/check.js deleted file mode 100644 index a6d51fc..0000000 --- a/node_modules/syntax-error/example/check.js +++ /dev/null @@ -1,12 +0,0 @@ -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/src.js'; -var src = fs.readFileSync(file); - -var err = check(src, file); -if (err) { - console.error('ERROR DETECTED' + Array(62).join('!')); - console.error(err); - console.error(Array(76).join('-')); -} diff --git a/node_modules/syntax-error/example/src.js b/node_modules/syntax-error/example/src.js deleted file mode 100644 index 51a63e7..0000000 --- a/node_modules/syntax-error/example/src.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x) res.push.apply(res, x); - else res.push(x); - } - return res; -}; diff --git a/node_modules/syntax-error/index.js b/node_modules/syntax-error/index.js deleted file mode 100644 index ecc7356..0000000 --- a/node_modules/syntax-error/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var aparse = require('acorn-node').parse; -function parse (src, opts) { - if (!opts) opts = {} - return aparse(src, opts); -} - -module.exports = function (src, file,opts) { - if (typeof src !== 'string') src = String(src); - - try { - eval('throw "STOP"; (function () { ' + src + '\n})()'); - return; - } - catch (err) { - if (err === 'STOP') return undefined; - if (err.constructor.name !== 'SyntaxError') return err; - return errorInfo(src, file, opts); - } -}; - -function errorInfo (src, file, opts) { - try { parse(src,opts) } - catch (err) { - return new ParseError(err, src, file); - } - return undefined; -} - -function ParseError (err, src, file) { - SyntaxError.call(this); - - this.message = err.message.replace(/\s+\(\d+:\d+\)$/, ''); - - this.line = err.loc.line; - this.column = err.loc.column + 1; - - this.annotated = '\n' - + (file || '(anonymous file)') - + ':' + this.line - + '\n' - + src.split('\n')[this.line - 1] - + '\n' - + Array(this.column).join(' ') + '^' - + '\n' - + 'ParseError: ' + this.message - ; -} - -ParseError.prototype = Object.create(SyntaxError.prototype); - -ParseError.prototype.toString = function () { - return this.annotated; -}; - -ParseError.prototype.inspect = function () { - return this.annotated; -}; diff --git a/node_modules/syntax-error/package.json b/node_modules/syntax-error/package.json deleted file mode 100644 index 97cd9fe..0000000 --- a/node_modules/syntax-error/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "syntax-error@^1.1.1", - "_id": "syntax-error@1.4.0", - "_inBundle": false, - "_integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "_location": "/syntax-error", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "syntax-error@^1.1.1", - "name": "syntax-error", - "escapedName": "syntax-error", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "_shasum": "2d9d4ff5c064acb711594a3e3b95054ad51d907c", - "_spec": "syntax-error@^1.1.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-syntax-error/issues" - }, - "bundleDependencies": false, - "dependencies": { - "acorn-node": "^1.2.0" - }, - "deprecated": false, - "description": "detect and report syntax errors in source code strings", - "devDependencies": { - "tap": "^1.1.0" - }, - "engine": { - "node": ">=0.6" - }, - "homepage": "https://github.com/substack/node-syntax-error", - "keywords": [ - "syntax", - "error", - "esprima", - "stack", - "line", - "column" - ], - "license": "MIT", - "main": "index.js", - "name": "syntax-error", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-syntax-error.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.4.0" -} diff --git a/node_modules/syntax-error/readme.markdown b/node_modules/syntax-error/readme.markdown deleted file mode 100644 index 647d06f..0000000 --- a/node_modules/syntax-error/readme.markdown +++ /dev/null @@ -1,90 +0,0 @@ -# syntax-error - -Detect and report syntax errors in source code strings. - -[![build status](https://secure.travis-ci.org/substack/node-syntax-error.png)](http://travis-ci.org/substack/node-syntax-error) - -When you type `node src.js` you get a friendly error report about exactly where -the syntax error is. This module lets you check for syntax errors and report -them in a similarly friendly format that wrapping a try/catch around -`Function()` or `vm.runInNewContext()` doesn't get you. - -# example - -``` js -var fs = require('fs'); -var check = require('syntax-error'); - -var file = __dirname + '/src.js'; -var src = fs.readFileSync(file); - -var err = check(src, file); -if (err) { - console.error('ERROR DETECTED' + Array(62).join('!')); - console.error(err); - console.error(Array(76).join('-')); -} -``` - ---- - -``` -$ node check.js -ERROR DETECTED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -/home/substack/projects/node-syntax-error/example/src.js:5 - if (Array.isArray(x) res.push.apply(res, x); - ^ -ParseError: Unexpected identifier ---------------------------------------------------------------------------- -``` - -# methods - -``` js -var check = require('syntax-error') -``` - -## var err = check(src, file, opts={}) - -Check the source code string `src` for syntax errors. -Optionally you can specify a filename `file` that will show up in the output. - -If `src` has a syntax error, return an error object `err` that can be printed or -stringified. - -If there are no syntax errors in `src`, return `undefined`. - -Options will be passed through to [acorn-node](https://github.com/browserify/acorn-node). -acorn-node defaults to options that match the most recent Node versions. - -## err.toString() - -Return the long string description with a source snippet and a `^` under -pointing exactly where the error was detected. - -# attributes - -## err.message - -short string description of the error type - -## err.line - -line number of the error in the original source (indexing starts at 1) - -## err.column - -column number of the error in the original source (indexing starts at 1) - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install syntax-error -``` - -# license - -MIT diff --git a/node_modules/syntax-error/test/check.js b/node_modules/syntax-error/test/check.js deleted file mode 100644 index f849cd3..0000000 --- a/node_modules/syntax-error/test/check.js +++ /dev/null @@ -1,17 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/sources/check.js'; -var src = fs.readFileSync(file); - -test('check', function (t) { - var err = check(src, file); - t.ok(err); - t.equal(err.line, 5); - t.equal(err.column, 30); - t.equal(err.message, 'Unexpected token'); - t.ok(String(err).indexOf(file + ':5')); - t.end(); -}); diff --git a/node_modules/syntax-error/test/esm.js b/node_modules/syntax-error/test/esm.js deleted file mode 100644 index ab475d2..0000000 --- a/node_modules/syntax-error/test/esm.js +++ /dev/null @@ -1,23 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/sources/esm.js'; -var src = fs.readFileSync(file); - -test('esm with sourceType script', function (t) { - var err = check(src, file); - t.ok(err); - t.equal(err.line, 1); - t.equal(err.column, 1); - t.equal(err.message, "'import' and 'export' may appear only with 'sourceType: module'"); - t.ok(String(err).indexOf(file + ':1')); - t.end(); -}); - -test('esm with sourceType module', function (t) { - var err = check(src, file, { sourceType: 'module' }); - t.notOk(err); - t.end(); -}); diff --git a/node_modules/syntax-error/test/html.js b/node_modules/syntax-error/test/html.js deleted file mode 100644 index 7f0dbd6..0000000 --- a/node_modules/syntax-error/test/html.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var src = ''; - -test('html', function (t) { - var err = check(src, 'foo.js'); - t.ok(err); - t.equal(err.line, 1); - t.equal(err.column, 1); - t.equal(err.message, 'Unexpected token'); - t.ok(/foo.js:1/.test(err), 'foo.js:1'); - t.end(); -}); diff --git a/node_modules/syntax-error/test/ok.js b/node_modules/syntax-error/test/ok.js deleted file mode 100644 index 21b4eb9..0000000 --- a/node_modules/syntax-error/test/ok.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/sources/ok.js'; -var src = fs.readFileSync(file); - -test('ok', function (t) { - var err = check(src, file); - t.notOk(err); - t.end(); -}); diff --git a/node_modules/syntax-error/test/run.js b/node_modules/syntax-error/test/run.js deleted file mode 100644 index 704ee15..0000000 --- a/node_modules/syntax-error/test/run.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tap').test; -var check = require('../'); - -var fs = require('fs'); -var file = __dirname + '/sources/run.js'; -var src = fs.readFileSync(file); - -test('do not run sources', function (t) { - t.plan(1); - var err = check(src, file); - t.notOk(err); -}); diff --git a/node_modules/syntax-error/test/run2.js b/node_modules/syntax-error/test/run2.js deleted file mode 100644 index cfb7e02..0000000 --- a/node_modules/syntax-error/test/run2.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tap').test; -var check = require('../'); - -var fs = require('fs'); -var file = __dirname + '/sources/run2.js'; -var src = fs.readFileSync(file); - -test('do not run sources (2)', function (t) { - t.plan(1); - var err = check(src, file); - t.notOk(err); -}); diff --git a/node_modules/syntax-error/test/shebang.js b/node_modules/syntax-error/test/shebang.js deleted file mode 100644 index 47c5653..0000000 --- a/node_modules/syntax-error/test/shebang.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/sources/shebang.js'; -var src = fs.readFileSync(file); - -test('shebang', function (t) { - var err = check(src, file); - t.notOk(err); - t.end(); -}); diff --git a/node_modules/syntax-error/test/sources/check.js b/node_modules/syntax-error/test/sources/check.js deleted file mode 100644 index 51a63e7..0000000 --- a/node_modules/syntax-error/test/sources/check.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x) res.push.apply(res, x); - else res.push(x); - } - return res; -}; diff --git a/node_modules/syntax-error/test/sources/esm.js b/node_modules/syntax-error/test/sources/esm.js deleted file mode 100644 index 220e115..0000000 --- a/node_modules/syntax-error/test/sources/esm.js +++ /dev/null @@ -1,2 +0,0 @@ -import x from 'y'; -export default z; diff --git a/node_modules/syntax-error/test/sources/ok.js b/node_modules/syntax-error/test/sources/ok.js deleted file mode 100644 index 0400619..0000000 --- a/node_modules/syntax-error/test/sources/ok.js +++ /dev/null @@ -1 +0,0 @@ -function f () {} diff --git a/node_modules/syntax-error/test/sources/run.js b/node_modules/syntax-error/test/sources/run.js deleted file mode 100644 index 6cee2e1..0000000 --- a/node_modules/syntax-error/test/sources/run.js +++ /dev/null @@ -1 +0,0 @@ -process.exit(1); diff --git a/node_modules/syntax-error/test/sources/run2.js b/node_modules/syntax-error/test/sources/run2.js deleted file mode 100644 index 88c7b94..0000000 --- a/node_modules/syntax-error/test/sources/run2.js +++ /dev/null @@ -1,3 +0,0 @@ -})(); -process.exit(1); -(function () { diff --git a/node_modules/syntax-error/test/sources/shebang.js b/node_modules/syntax-error/test/sources/shebang.js deleted file mode 100644 index 4e7a0dc..0000000 --- a/node_modules/syntax-error/test/sources/shebang.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.log('foo'); diff --git a/node_modules/syntax-error/test/sources/spread.js b/node_modules/syntax-error/test/sources/spread.js deleted file mode 100644 index 0938d93..0000000 --- a/node_modules/syntax-error/test/sources/spread.js +++ /dev/null @@ -1,2 +0,0 @@ -var a = { ...b } -;({ d, ...e } = a) diff --git a/node_modules/syntax-error/test/sources/yield.js b/node_modules/syntax-error/test/sources/yield.js deleted file mode 100644 index 07c1d05..0000000 --- a/node_modules/syntax-error/test/sources/yield.js +++ /dev/null @@ -1,13 +0,0 @@ -function *foo () { - yield 5 -} - -(function *() { - console.log(foo().next().value) -})().next(); - -(function *() { })(); - -(function * () { - yield yield 3 -})(); diff --git a/node_modules/syntax-error/test/spread.js b/node_modules/syntax-error/test/spread.js deleted file mode 100644 index c0ed3b4..0000000 --- a/node_modules/syntax-error/test/spread.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/sources/spread.js'; -var src = fs.readFileSync(file); - -test('spread', function (t) { - var err = check(src, file); - t.notOk(err); - t.end(); -}); diff --git a/node_modules/syntax-error/test/yield.js b/node_modules/syntax-error/test/yield.js deleted file mode 100644 index 701e01a..0000000 --- a/node_modules/syntax-error/test/yield.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tap').test; - -var fs = require('fs'); -var check = require('../'); - -var file = __dirname + '/sources/yield.js'; -var src = fs.readFileSync(file); - -test('yield', function (t) { - var err = check(src, file); - t.notOk(err); - t.end(); -}); diff --git a/node_modules/tape/.editorconfig b/node_modules/tape/.editorconfig deleted file mode 100644 index 227b4a3..0000000 --- a/node_modules/tape/.editorconfig +++ /dev/null @@ -1,33 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 140 -block_comment_start = /* -block_comment = * -block_comment_end = */ - -[*.md] -indent_style = space -indent_size = 4 - -[readme.markdown] -indent_size = off -max_line_length = off - -[*.json] -max_line_length = off - -[*.yml] -max_line_length = off - -[Makefile] -max_line_length = off - -[.travis.yml] -indent_size = 2 diff --git a/node_modules/tape/.eslintrc b/node_modules/tape/.eslintrc deleted file mode 100644 index cc09afb..0000000 --- a/node_modules/tape/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - "rules": { - "indent": ["error", 4], - "semi": ["error", "always"], - "space-before-function-paren": ["error", { - "anonymous": "always", - "named": "never", - }], - }, -} diff --git a/node_modules/tape/.travis.yml b/node_modules/tape/.travis.yml deleted file mode 100644 index 1a8c8e6..0000000 --- a/node_modules/tape/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10" - - "9" - - "8" - - "7" - - "6" - - "5" - - "4" - - "iojs" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - allow_failures: - - node_js: "9" - - node_js: "7" - - node_js: "5" - - node_js: "iojs" diff --git a/node_modules/tape/LICENSE b/node_modules/tape/LICENSE deleted file mode 100644 index ff4fce2..0000000 --- a/node_modules/tape/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/tape/bin/tape b/node_modules/tape/bin/tape deleted file mode 100755 index 74f4aba..0000000 --- a/node_modules/tape/bin/tape +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -var resolveModule = require('resolve').sync; -var resolvePath = require('path').resolve; -var parseOpts = require('minimist'); -var glob = require('glob'); - -var opts = parseOpts(process.argv.slice(2), { - alias: { r: 'require' }, - string: 'require', - default: { r: [] } - }); - -var cwd = process.cwd(); - -if (typeof opts.require === 'string') { - opts.require = [opts.require]; -} - -opts.require.forEach(function (module) { - if (module) { - /* This check ensures we ignore `-r ""`, trailing `-r`, or - * other silly things the user might (inadvertently) be doing. - */ - require(resolveModule(module, { basedir: cwd })); - } -}); - -opts._.forEach(function (arg) { - // If glob does not match, `files` will be an empty array. - // Note: `glob.sync` may throw an error and crash the node process. - var files = glob.sync(arg); - - if (!Array.isArray(files)) { - throw new TypeError('unknown error: glob.sync did not return an array or throw. Please report this.'); - } - - files.forEach(function (file) { - require(resolvePath(cwd, file)); - }); -}); - -// vim: ft=javascript diff --git a/node_modules/tape/example/array.js b/node_modules/tape/example/array.js deleted file mode 100644 index bec161f..0000000 --- a/node_modules/tape/example/array.js +++ /dev/null @@ -1,35 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('array', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/example/fail.js b/node_modules/tape/example/fail.js deleted file mode 100644 index a0db0b1..0000000 --- a/node_modules/tape/example/fail.js +++ /dev/null @@ -1,35 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('array', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/example/nested.js b/node_modules/tape/example/nested.js deleted file mode 100644 index 2a36f25..0000000 --- a/node_modules/tape/example/nested.js +++ /dev/null @@ -1,51 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('nested array test', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - t.test('inside test', function (q) { - q.plan(2); - q.ok(true, 'inside ok'); - - setTimeout(function () { - q.ok(true, 'inside delayed'); - }, 3000); - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); - -test('another', function (t) { - t.plan(1); - setTimeout(function () { - t.ok(true); - }, 100); -}); diff --git a/node_modules/tape/example/nested_fail.js b/node_modules/tape/example/nested_fail.js deleted file mode 100644 index ba168c7..0000000 --- a/node_modules/tape/example/nested_fail.js +++ /dev/null @@ -1,51 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('nested array test', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - t.test('inside test', function (q) { - q.plan(2); - q.ok(true); - - setTimeout(function () { - q.equal(3, 4); - }, 3000); - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); - -test('another', function (t) { - t.plan(1); - setTimeout(function () { - t.ok(true); - }, 100); -}); diff --git a/node_modules/tape/example/not_enough.js b/node_modules/tape/example/not_enough.js deleted file mode 100644 index fffc714..0000000 --- a/node_modules/tape/example/not_enough.js +++ /dev/null @@ -1,35 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('array', function (t) { - t.plan(8); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/example/static/build.sh b/node_modules/tape/example/static/build.sh deleted file mode 100755 index c583640..0000000 --- a/node_modules/tape/example/static/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -browserify ../timing.js -o bundle.js diff --git a/node_modules/tape/example/static/index.html b/node_modules/tape/example/static/index.html deleted file mode 100644 index 45ccf07..0000000 --- a/node_modules/tape/example/static/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/node_modules/tape/example/static/server.js b/node_modules/tape/example/static/server.js deleted file mode 100644 index 80cea43..0000000 --- a/node_modules/tape/example/static/server.js +++ /dev/null @@ -1,4 +0,0 @@ -var http = require('http'); -var ecstatic = require('ecstatic')(__dirname); -var server = http.createServer(ecstatic); -server.listen(8000); diff --git a/node_modules/tape/example/stream/object.js b/node_modules/tape/example/stream/object.js deleted file mode 100644 index 20f0819..0000000 --- a/node_modules/tape/example/stream/object.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('../../'); -var path = require('path'); - -test.createStream({ objectMode: true }).on('data', function (row) { - console.log(JSON.stringify(row)); -}); - -process.argv.slice(2).forEach(function (file) { - require(path.resolve(file)); -}); diff --git a/node_modules/tape/example/stream/tap.js b/node_modules/tape/example/stream/tap.js deleted file mode 100644 index 9ea9ff7..0000000 --- a/node_modules/tape/example/stream/tap.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('../../'); -var path = require('path'); - -test.createStream().pipe(process.stdout); - -process.argv.slice(2).forEach(function (file) { - require(path.resolve(file)); -}); diff --git a/node_modules/tape/example/stream/test/x.js b/node_modules/tape/example/stream/test/x.js deleted file mode 100644 index 7dbb98a..0000000 --- a/node_modules/tape/example/stream/test/x.js +++ /dev/null @@ -1,5 +0,0 @@ -var test = require('../../../'); -test(function (t) { - t.plan(1); - t.equal('beep', 'boop'); -}); diff --git a/node_modules/tape/example/stream/test/y.js b/node_modules/tape/example/stream/test/y.js deleted file mode 100644 index 28606d5..0000000 --- a/node_modules/tape/example/stream/test/y.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('../../../'); -test(function (t) { - t.plan(2); - t.equal(1+1, 2); - t.ok(true); -}); - -test('wheee', function (t) { - t.ok(true); - t.end(); -}); diff --git a/node_modules/tape/example/throw.js b/node_modules/tape/example/throw.js deleted file mode 100644 index 5fa8b94..0000000 --- a/node_modules/tape/example/throw.js +++ /dev/null @@ -1,10 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('throw', function (t) { - t.plan(2); - - setTimeout(function () { - throw new Error('doom'); - }, 100); -}); diff --git a/node_modules/tape/example/timing.js b/node_modules/tape/example/timing.js deleted file mode 100644 index 614c144..0000000 --- a/node_modules/tape/example/timing.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('../'); - -test('timing test', function (t) { - t.plan(2); - - t.equal(typeof Date.now, 'function'); - var start = new Date; - - setTimeout(function () { - t.equal(new Date - start, 100); - }, 100); -}); diff --git a/node_modules/tape/example/too_many.js b/node_modules/tape/example/too_many.js deleted file mode 100644 index cdcb5ee..0000000 --- a/node_modules/tape/example/too_many.js +++ /dev/null @@ -1,35 +0,0 @@ -var falafel = require('falafel'); -var test = require('../'); - -test('array', function (t) { - t.plan(3); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/example/two.js b/node_modules/tape/example/two.js deleted file mode 100644 index 78e49c3..0000000 --- a/node_modules/tape/example/two.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('../'); - -test('one', function (t) { - t.plan(2); - t.ok(true); - setTimeout(function () { - t.equal(1+3, 4); - }, 100); -}); - -test('two', function (t) { - t.plan(3); - t.equal(5, 2+3); - setTimeout(function () { - t.equal('a'.charCodeAt(0), 97); - t.ok(true); - }, 50); -}); diff --git a/node_modules/tape/index.js b/node_modules/tape/index.js deleted file mode 100644 index e326a96..0000000 --- a/node_modules/tape/index.js +++ /dev/null @@ -1,157 +0,0 @@ -var defined = require('defined'); -var createDefaultStream = require('./lib/default_stream'); -var Test = require('./lib/test'); -var createResult = require('./lib/results'); -var through = require('through'); - -var canEmitExit = typeof process !== 'undefined' && process - && typeof process.on === 'function' && process.browser !== true -; -var canExit = typeof process !== 'undefined' && process - && typeof process.exit === 'function' -; - -var nextTick = typeof setImmediate !== 'undefined' - ? setImmediate - : process.nextTick -; - -exports = module.exports = (function () { - var harness; - var lazyLoad = function () { - return getHarness().apply(this, arguments); - }; - - lazyLoad.only = function () { - return getHarness().only.apply(this, arguments); - }; - - lazyLoad.createStream = function (opts) { - if (!opts) opts = {}; - if (!harness) { - var output = through(); - getHarness({ stream: output, objectMode: opts.objectMode }); - return output; - } - return harness.createStream(opts); - }; - - lazyLoad.onFinish = function () { - return getHarness().onFinish.apply(this, arguments); - }; - - lazyLoad.onFailure = function () { - return getHarness().onFailure.apply(this, arguments); - }; - - lazyLoad.getHarness = getHarness; - - return lazyLoad; - - function getHarness(opts) { - if (!opts) opts = {}; - opts.autoclose = !canEmitExit; - if (!harness) harness = createExitHarness(opts); - return harness; - } -})(); - -function createExitHarness(conf) { - if (!conf) conf = {}; - var harness = createHarness({ - autoclose: defined(conf.autoclose, false) - }); - - var stream = harness.createStream({ objectMode: conf.objectMode }); - var es = stream.pipe(conf.stream || createDefaultStream()); - if (canEmitExit) { - es.on('error', function (err) { harness._exitCode = 1; }); - } - - var ended = false; - stream.on('end', function () { ended = true; }); - - if (conf.exit === false) return harness; - if (!canEmitExit || !canExit) return harness; - - process.on('exit', function (code) { - // let the process exit cleanly. - if (code !== 0) { - return; - } - - if (!ended) { - var only = harness._results._only; - for (var i = 0; i < harness._tests.length; i++) { - var t = harness._tests[i]; - if (only && t !== only) continue; - t._exit(); - } - } - harness.close(); - process.exit(code || harness._exitCode); - }); - - return harness; -} - -exports.createHarness = createHarness; -exports.Test = Test; -exports.test = exports; // tap compat -exports.test.skip = Test.skip; - -var exitInterval; - -function createHarness(conf_) { - if (!conf_) conf_ = {}; - var results = createResult(); - if (conf_.autoclose !== false) { - results.once('done', function () { results.close(); }); - } - - var test = function (name, conf, cb) { - var t = new Test(name, conf, cb); - test._tests.push(t); - - (function inspectCode(st) { - st.on('test', function sub(st_) { - inspectCode(st_); - }); - st.on('result', function (r) { - if (!r.todo && !r.ok && typeof r !== 'string') test._exitCode = 1; - }); - })(t); - - results.push(t); - return t; - }; - test._results = results; - - test._tests = []; - - test.createStream = function (opts) { - return results.createStream(opts); - }; - - test.onFinish = function (cb) { - results.on('done', cb); - }; - - test.onFailure = function (cb) { - results.on('fail', cb); - }; - - var only = false; - test.only = function () { - if (only) throw new Error('there can only be one only test'); - only = true; - var t = test.apply(null, arguments); - results.only(t); - return t; - }; - test._exitCode = 0; - - test.close = function () { results.close(); }; - - return test; -} diff --git a/node_modules/tape/lib/default_stream.js b/node_modules/tape/lib/default_stream.js deleted file mode 100644 index 2744258..0000000 --- a/node_modules/tape/lib/default_stream.js +++ /dev/null @@ -1,30 +0,0 @@ -var through = require('through'); -var fs = require('fs'); - -module.exports = function () { - var line = ''; - var stream = through(write, flush); - return stream; - - function write(buf) { - for (var i = 0; i < buf.length; i++) { - var c = typeof buf === 'string' - ? buf.charAt(i) - : String.fromCharCode(buf[i]) - ; - if (c === '\n') flush(); - else line += c; - } - } - - function flush() { - if (fs.writeSync && /^win/.test(process.platform)) { - try { fs.writeSync(1, line + '\n'); } - catch (e) { stream.emit('error', e); } - } else { - try { console.log(line); } - catch (e) { stream.emit('error', e); } - } - line = ''; - } -}; diff --git a/node_modules/tape/lib/results.js b/node_modules/tape/lib/results.js deleted file mode 100644 index 40e8591..0000000 --- a/node_modules/tape/lib/results.js +++ /dev/null @@ -1,212 +0,0 @@ -var defined = require('defined'); -var EventEmitter = require('events').EventEmitter; -var inherits = require('inherits'); -var through = require('through'); -var resumer = require('resumer'); -var inspect = require('object-inspect'); -var bind = require('function-bind'); -var has = require('has'); -var regexpTest = bind.call(Function.call, RegExp.prototype.test); -var yamlIndicators = /\:|\-|\?/; -var nextTick = typeof setImmediate !== 'undefined' - ? setImmediate - : process.nextTick -; - -module.exports = Results; -inherits(Results, EventEmitter); - -function coalesceWhiteSpaces(str) { - return String(str).replace(/\s+/g, ' '); -} - -function Results() { - if (!(this instanceof Results)) return new Results; - this.count = 0; - this.fail = 0; - this.pass = 0; - this.todo = 0; - this._stream = through(); - this.tests = []; - this._only = null; - this._isRunning = false; -} - -Results.prototype.createStream = function (opts) { - if (!opts) opts = {}; - var self = this; - var output, testId = 0; - if (opts.objectMode) { - output = through(); - self.on('_push', function ontest(t, extra) { - if (!extra) extra = {}; - var id = testId++; - t.once('prerun', function () { - var row = { - type: 'test', - name: t.name, - id: id, - skip: t._skip, - todo: t._todo - }; - if (has(extra, 'parent')) { - row.parent = extra.parent; - } - output.queue(row); - }); - t.on('test', function (st) { - ontest(st, { parent: id }); - }); - t.on('result', function (res) { - res.test = id; - res.type = 'assert'; - output.queue(res); - }); - t.on('end', function () { - output.queue({ type: 'end', test: id }); - }); - }); - self.on('done', function () { output.queue(null); }); - } else { - output = resumer(); - output.queue('TAP version 13\n'); - self._stream.pipe(output); - } - - if (!this._isRunning) { - this._isRunning = true; - nextTick(function next() { - var t; - while (t = getNextTest(self)) { - t.run(); - if (!t.ended) return t.once('end', function () { nextTick(next); }); - } - self.emit('done'); - }); - } - - return output; -}; - -Results.prototype.push = function (t) { - var self = this; - self.tests.push(t); - self._watch(t); - self.emit('_push', t); -}; - -Results.prototype.only = function (t) { - this._only = t; -}; - -Results.prototype._watch = function (t) { - var self = this; - var write = function (s) { self._stream.queue(s); }; - t.once('prerun', function () { - var premsg = ''; - if (t._skip) premsg = 'SKIP '; - else if (t._todo) premsg = 'TODO '; - write('# ' + premsg + coalesceWhiteSpaces(t.name) + '\n'); - }); - - t.on('result', function (res) { - if (typeof res === 'string') { - write('# ' + res + '\n'); - return; - } - write(encodeResult(res, self.count + 1)); - self.count ++; - - if (res.ok || res.todo) self.pass ++; - else { - self.fail ++; - self.emit('fail'); - } - }); - - t.on('test', function (st) { self._watch(st); }); -}; - -Results.prototype.close = function () { - var self = this; - if (self.closed) self._stream.emit('error', new Error('ALREADY CLOSED')); - self.closed = true; - var write = function (s) { self._stream.queue(s); }; - - write('\n1..' + self.count + '\n'); - write('# tests ' + self.count + '\n'); - write('# pass ' + (self.pass + self.todo) + '\n'); - if (self.todo) write('# todo ' + self.todo + '\n'); - if (self.fail) write('# fail ' + self.fail + '\n'); - else write('\n# ok\n'); - - self._stream.queue(null); -}; - -function encodeResult(res, count) { - var output = ''; - output += (res.ok ? 'ok ' : 'not ok ') + count; - output += res.name ? ' ' + coalesceWhiteSpaces(res.name) : ''; - - if (res.skip) { - output += ' # SKIP' + ((typeof res.skip === 'string') ? ' ' + coalesceWhiteSpaces(res.skip) : ''); - } else if (res.todo) { - output += ' # TODO' + ((typeof res.todo === 'string') ? ' ' + coalesceWhiteSpaces(res.todo) : ''); - }; - - output += '\n'; - if (res.ok) return output; - - var outer = ' '; - var inner = outer + ' '; - output += outer + '---\n'; - output += inner + 'operator: ' + res.operator + '\n'; - - if (has(res, 'expected') || has(res, 'actual')) { - var ex = inspect(res.expected, {depth: res.objectPrintDepth}); - var ac = inspect(res.actual, {depth: res.objectPrintDepth}); - - if (Math.max(ex.length, ac.length) > 65 || invalidYaml(ex) || invalidYaml(ac)) { - output += inner + 'expected: |-\n' + inner + ' ' + ex + '\n'; - output += inner + 'actual: |-\n' + inner + ' ' + ac + '\n'; - } else { - output += inner + 'expected: ' + ex + '\n'; - output += inner + 'actual: ' + ac + '\n'; - } - } - if (res.at) { - output += inner + 'at: ' + res.at + '\n'; - } - - var actualStack = res.actual && (typeof res.actual === 'object' || typeof res.actual === 'function') ? res.actual.stack : undefined; - var errorStack = res.error && res.error.stack; - var stack = defined(actualStack, errorStack); - if (stack) { - var lines = String(stack).split('\n'); - output += inner + 'stack: |-\n'; - for (var i = 0; i < lines.length; i++) { - output += inner + ' ' + lines[i] + '\n'; - } - } - - output += outer + '...\n'; - return output; -} - -function getNextTest(results) { - if (!results._only) { - return results.tests.shift(); - } - - do { - var t = results.tests.shift(); - if (!t) continue; - if (results._only === t) { - return t; - } - } while (results.tests.length !== 0); -} - -function invalidYaml(str) { - return regexpTest(yamlIndicators, str); -} diff --git a/node_modules/tape/lib/test.js b/node_modules/tape/lib/test.js deleted file mode 100644 index 31386f8..0000000 --- a/node_modules/tape/lib/test.js +++ /dev/null @@ -1,553 +0,0 @@ -var deepEqual = require('deep-equal'); -var defined = require('defined'); -var path = require('path'); -var inherits = require('inherits'); -var EventEmitter = require('events').EventEmitter; -var has = require('has'); -var trim = require('string.prototype.trim'); -var bind = require('function-bind'); -var forEach = require('for-each'); -var isEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable); -var toLowerCase = bind.call(Function.call, String.prototype.toLowerCase); - -module.exports = Test; - -var nextTick = typeof setImmediate !== 'undefined' - ? setImmediate - : process.nextTick; -var safeSetTimeout = setTimeout; -var safeClearTimeout = clearTimeout; - -inherits(Test, EventEmitter); - -var getTestArgs = function (name_, opts_, cb_) { - var name = '(anonymous)'; - var opts = {}; - var cb; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - var t = typeof arg; - if (t === 'string') { - name = arg; - } else if (t === 'object') { - opts = arg || opts; - } else if (t === 'function') { - cb = arg; - } - } - return { name: name, opts: opts, cb: cb }; -}; - -function Test(name_, opts_, cb_) { - if (! (this instanceof Test)) { - return new Test(name_, opts_, cb_); - } - - var args = getTestArgs(name_, opts_, cb_); - - this.readable = true; - this.name = args.name || '(anonymous)'; - this.assertCount = 0; - this.pendingCount = 0; - this._skip = args.opts.skip || false; - this._todo = args.opts.todo || false; - this._timeout = args.opts.timeout; - this._plan = undefined; - this._cb = args.cb; - this._progeny = []; - this._ok = true; - var depthEnvVar = process.env.NODE_TAPE_OBJECT_PRINT_DEPTH; - if (args.opts.objectPrintDepth) { - this._objectPrintDepth = args.opts.objectPrintDepth; - } else if (depthEnvVar) { - if (toLowerCase(depthEnvVar) === 'infinity') { - this._objectPrintDepth = Infinity; - } else { - this._objectPrintDepth = depthEnvVar; - } - } else { - this._objectPrintDepth = 5; - } - - for (var prop in this) { - this[prop] = (function bind(self, val) { - if (typeof val === 'function') { - return function bound() { - return val.apply(self, arguments); - }; - } - return val; - })(this, this[prop]); - } -} - -Test.prototype.run = function () { - this.emit('prerun'); - if (!this._cb || this._skip) { - return this._end(); - } - if (this._timeout != null) { - this.timeoutAfter(this._timeout); - } - this._cb(this); - this.emit('run'); -}; - -Test.prototype.test = function (name, opts, cb) { - var self = this; - var t = new Test(name, opts, cb); - this._progeny.push(t); - this.pendingCount++; - this.emit('test', t); - t.on('prerun', function () { - self.assertCount++; - }); - - if (!self._pendingAsserts()) { - nextTick(function () { - self._end(); - }); - } - - nextTick(function () { - if (!self._plan && self.pendingCount == self._progeny.length) { - self._end(); - } - }); -}; - -Test.prototype.comment = function (msg) { - var that = this; - forEach(trim(msg).split('\n'), function (aMsg) { - that.emit('result', trim(aMsg).replace(/^#\s*/, '')); - }); -}; - -Test.prototype.plan = function (n) { - this._plan = n; - this.emit('plan', n); -}; - -Test.prototype.timeoutAfter = function (ms) { - if (!ms) throw new Error('timeoutAfter requires a timespan'); - var self = this; - var timeout = safeSetTimeout(function () { - self.fail('test timed out after ' + ms + 'ms'); - self.end(); - }, ms); - this.once('end', function () { - safeClearTimeout(timeout); - }); -}; - -Test.prototype.end = function (err) { - var self = this; - if (arguments.length >= 1 && !!err) { - this.ifError(err); - } - - if (this.calledEnd) { - this.fail('.end() called twice'); - } - this.calledEnd = true; - this._end(); -}; - -Test.prototype._end = function (err) { - var self = this; - if (this._progeny.length) { - var t = this._progeny.shift(); - t.on('end', function () { self._end(); }); - t.run(); - return; - } - - if (!this.ended) this.emit('end'); - var pendingAsserts = this._pendingAsserts(); - if (!this._planError && this._plan !== undefined && pendingAsserts) { - this._planError = true; - this.fail('plan != count', { - expected : this._plan, - actual : this.assertCount - }); - } - this.ended = true; -}; - -Test.prototype._exit = function () { - if (this._plan !== undefined && - !this._planError && this.assertCount !== this._plan) { - this._planError = true; - this.fail('plan != count', { - expected : this._plan, - actual : this.assertCount, - exiting : true - }); - } else if (!this.ended) { - this.fail('test exited without ending', { - exiting: true - }); - } -}; - -Test.prototype._pendingAsserts = function () { - if (this._plan === undefined) { - return 1; - } - return this._plan - (this._progeny.length + this.assertCount); -}; - -Test.prototype._assert = function assert(ok, opts) { - var self = this; - var extra = opts.extra || {}; - - ok = !!ok || !!extra.skip; - - var res = { - id: self.assertCount++, - ok: ok, - skip: defined(extra.skip, opts.skip), - todo: defined(extra.todo, opts.todo, self._todo), - name: defined(extra.message, opts.message, '(unnamed assert)'), - operator: defined(extra.operator, opts.operator), - objectPrintDepth: self._objectPrintDepth - }; - if (has(opts, 'actual') || has(extra, 'actual')) { - res.actual = defined(extra.actual, opts.actual); - } - if (has(opts, 'expected') || has(extra, 'expected')) { - res.expected = defined(extra.expected, opts.expected); - } - this._ok = !!(this._ok && ok); - - if (!ok && !res.todo) { - res.error = defined(extra.error, opts.error, new Error(res.name)); - } - - if (!ok) { - var e = new Error('exception'); - var err = (e.stack || '').split('\n'); - var dir = __dirname + path.sep; - - for (var i = 0; i < err.length; i++) { - /* - Stack trace lines may resemble one of the following. We need - to should correctly extract a function name (if any) and - path / line no. for each line. - - at myFunction (/path/to/file.js:123:45) - at myFunction (/path/to/file.other-ext:123:45) - at myFunction (/path to/file.js:123:45) - at myFunction (C:\path\to\file.js:123:45) - at myFunction (/path/to/file.js:123) - at Test. (/path/to/file.js:123:45) - at Test.bound [as run] (/path/to/file.js:123:45) - at /path/to/file.js:123:45 - - Regex has three parts. First is non-capturing group for 'at ' - (plus anything preceding it). - - /^(?:[^\s]*\s*\bat\s+)/ - - Second captures function call description (optional). This is - not necessarily a valid JS function name, but just what the - stack trace is using to represent a function call. It may look - like `` or 'Test.bound [as run]'. - - For our purposes, we assume that, if there is a function - name, it's everything leading up to the first open - parentheses (trimmed) before our pathname. - - /(?:(.*)\s+\()?/ - - Last part captures file path plus line no (and optional - column no). - - /((?:\/|[a-zA-Z]:\\)[^:\)]+:(\d+)(?::(\d+))?)/ - */ - var re = /^(?:[^\s]*\s*\bat\s+)(?:(.*)\s+\()?((?:\/|[a-zA-Z]:\\)[^:\)]+:(\d+)(?::(\d+))?)/; - var m = re.exec(err[i]); - - if (!m) { - continue; - } - - var callDescription = m[1] || ''; - var filePath = m[2]; - - if (filePath.slice(0, dir.length) === dir) { - continue; - } - - // Function call description may not (just) be a function name. - // Try to extract function name by looking at first "word" only. - res.functionName = callDescription.split(/\s+/)[0]; - res.file = filePath; - res.line = Number(m[3]); - if (m[4]) res.column = Number(m[4]); - - res.at = callDescription + ' (' + filePath + ')'; - break; - } - } - - self.emit('result', res); - - var pendingAsserts = self._pendingAsserts(); - if (!pendingAsserts) { - if (extra.exiting) { - self._end(); - } else { - nextTick(function () { - self._end(); - }); - } - } - - if (!self._planError && pendingAsserts < 0) { - self._planError = true; - self.fail('plan != count', { - expected : self._plan, - actual : self._plan - pendingAsserts - }); - } -}; - -Test.prototype.fail = function (msg, extra) { - this._assert(false, { - message : msg, - operator : 'fail', - extra : extra - }); -}; - -Test.prototype.pass = function (msg, extra) { - this._assert(true, { - message : msg, - operator : 'pass', - extra : extra - }); -}; - -Test.prototype.skip = function (msg, extra) { - this._assert(true, { - message : msg, - operator : 'skip', - skip : true, - extra : extra - }); -}; - -function assert(value, msg, extra) { - this._assert(value, { - message : defined(msg, 'should be truthy'), - operator : 'ok', - expected : true, - actual : value, - extra : extra - }); -} -Test.prototype.ok -= Test.prototype['true'] -= Test.prototype.assert -= assert; - -function notOK(value, msg, extra) { - this._assert(!value, { - message : defined(msg, 'should be falsy'), - operator : 'notOk', - expected : false, - actual : value, - extra : extra - }); -} -Test.prototype.notOk -= Test.prototype['false'] -= Test.prototype.notok -= notOK; - -function error(err, msg, extra) { - this._assert(!err, { - message : defined(msg, String(err)), - operator : 'error', - actual : err, - extra : extra - }); -} -Test.prototype.error -= Test.prototype.ifError -= Test.prototype.ifErr -= Test.prototype.iferror -= error; - -function equal(a, b, msg, extra) { - this._assert(a === b, { - message : defined(msg, 'should be equal'), - operator : 'equal', - actual : a, - expected : b, - extra : extra - }); -} -Test.prototype.equal -= Test.prototype.equals -= Test.prototype.isEqual -= Test.prototype.is -= Test.prototype.strictEqual -= Test.prototype.strictEquals -= equal; - -function notEqual(a, b, msg, extra) { - this._assert(a !== b, { - message : defined(msg, 'should not be equal'), - operator : 'notEqual', - actual : a, - expected : b, - extra : extra - }); -} -Test.prototype.notEqual -= Test.prototype.notEquals -= Test.prototype.notStrictEqual -= Test.prototype.notStrictEquals -= Test.prototype.isNotEqual -= Test.prototype.isNot -= Test.prototype.not -= Test.prototype.doesNotEqual -= Test.prototype.isInequal -= notEqual; - -function tapeDeepEqual(a, b, msg, extra) { - this._assert(deepEqual(a, b, { strict: true }), { - message : defined(msg, 'should be equivalent'), - operator : 'deepEqual', - actual : a, - expected : b, - extra : extra - }); -} -Test.prototype.deepEqual -= Test.prototype.deepEquals -= Test.prototype.isEquivalent -= Test.prototype.same -= tapeDeepEqual; - -function deepLooseEqual(a, b, msg, extra) { - this._assert(deepEqual(a, b), { - message : defined(msg, 'should be equivalent'), - operator : 'deepLooseEqual', - actual : a, - expected : b, - extra : extra - }); -} -Test.prototype.deepLooseEqual -= Test.prototype.looseEqual -= Test.prototype.looseEquals -= deepLooseEqual; - -function notDeepEqual(a, b, msg, extra) { - this._assert(!deepEqual(a, b, { strict: true }), { - message : defined(msg, 'should not be equivalent'), - operator : 'notDeepEqual', - actual : a, - expected : b, - extra : extra - }); -} -Test.prototype.notDeepEqual -= Test.prototype.notDeepEquals -= Test.prototype.notEquivalent -= Test.prototype.notDeeply -= Test.prototype.notSame -= Test.prototype.isNotDeepEqual -= Test.prototype.isNotDeeply -= Test.prototype.isNotEquivalent -= Test.prototype.isInequivalent -= notDeepEqual; - -function notDeepLooseEqual(a, b, msg, extra) { - this._assert(!deepEqual(a, b), { - message : defined(msg, 'should be equivalent'), - operator : 'notDeepLooseEqual', - actual : a, - expected : b, - extra : extra - }); -} -Test.prototype.notDeepLooseEqual -= Test.prototype.notLooseEqual -= Test.prototype.notLooseEquals -= notDeepLooseEqual; - -Test.prototype['throws'] = function (fn, expected, msg, extra) { - if (typeof expected === 'string') { - msg = expected; - expected = undefined; - } - - var caught = undefined; - - try { - fn(); - } catch (err) { - caught = { error : err }; - if ((err != null) && (!isEnumerable(err, 'message') || !has(err, 'message'))) { - var message = err.message; - delete err.message; - err.message = message; - } - } - - var passed = caught; - - if (expected instanceof RegExp) { - passed = expected.test(caught && caught.error); - expected = String(expected); - } - - if (typeof expected === 'function' && caught) { - passed = caught.error instanceof expected; - caught.error = caught.error.constructor; - } - - this._assert(typeof fn === 'function' && passed, { - message : defined(msg, 'should throw'), - operator : 'throws', - actual : caught && caught.error, - expected : expected, - error: !passed && caught && caught.error, - extra : extra - }); -}; - -Test.prototype.doesNotThrow = function (fn, expected, msg, extra) { - if (typeof expected === 'string') { - msg = expected; - expected = undefined; - } - var caught = undefined; - try { - fn(); - } - catch (err) { - caught = { error : err }; - } - this._assert(!caught, { - message : defined(msg, 'should not throw'), - operator : 'throws', - actual : caught && caught.error, - expected : expected, - error : caught && caught.error, - extra : extra - }); -}; - -Test.skip = function (name_, _opts, _cb) { - var args = getTestArgs.apply(null, arguments); - args.opts.skip = true; - return Test(args.name, args.opts, args.cb); -}; - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/tape/node_modules/resolve/.editorconfig b/node_modules/tape/node_modules/resolve/.editorconfig deleted file mode 100644 index bc228f8..0000000 --- a/node_modules/tape/node_modules/resolve/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/tape/node_modules/resolve/.eslintignore b/node_modules/tape/node_modules/resolve/.eslintignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/tape/node_modules/resolve/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/tape/node_modules/resolve/.eslintrc b/node_modules/tape/node_modules/resolve/.eslintrc deleted file mode 100644 index 8b5748a..0000000 --- a/node_modules/tape/node_modules/resolve/.eslintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "@ljharb", - "root": true, - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "indent": [2, 4], - "strict": 0, - "complexity": 0, - "consistent-return": 0, - "curly": 0, - "dot-notation": [2, { "allowKeywords": true }], - "func-name-matching": 0, - "func-style": 0, - "global-require": 0, - "id-length": [2, { "min": 1, "max": 30 }], - "max-lines-per-function": 0, - "max-nested-callbacks": 0, - "max-params": 0, - "max-statements-per-line": [2, { "max": 2 }], - "max-statements": 0, - "no-magic-numbers": 0, - "no-console": 0, - "no-shadow": 0, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-use-before-define": 0, - "object-curly-newline": 0, - "operator-linebreak": [2, "before"], - "sort-keys": 0, - } -} diff --git a/node_modules/tape/node_modules/resolve/.travis.yml b/node_modules/tape/node_modules/resolve/.travis.yml deleted file mode 100644 index 2033171..0000000 --- a/node_modules/tape/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,294 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "12.2" - - "11.15" - - "10.15" - - "9.11" - - "8.15" - - "7.10" - - "6.17" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" - - "0.6" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "12.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "12.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.16" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" diff --git a/node_modules/tape/node_modules/resolve/CHANGELOG.md b/node_modules/tape/node_modules/resolve/CHANGELOG.md deleted file mode 100644 index 09c0f32..0000000 --- a/node_modules/tape/node_modules/resolve/CHANGELOG.md +++ /dev/null @@ -1,753 +0,0 @@ -### Changelog - -All notable changes to this project will be documented in this file. Dates are displayed in UTC. - -#### [Unreleased](https://github.com/browserify/resolve/compare/v1.11.0...HEAD) - -#### [v1.11.0](https://github.com/browserify/resolve/compare/v1.10.1...v1.11.0) - 15 May 2019 -- [New] Add `isDirectory`; use to speed up `node_modules` lookups (#192, #191, #190) -- [Tests] up to `node` `v12.2`, `v11.15`, `v6.17` - -#### [v1.10.1](https://github.com/browserify/resolve/compare/v1.10.0...v1.10.1) - 23 April 2019 -- [Fix] `core`: 6 `v8/` core modules and 3 `node-inspect/` core modules no longer exist in node 12 ([`b54d33a`][]) -- [Dev Deps] update `eslint`, `object-keys`, `tape` ([`16e3897`][]) - -[`b54d33a`]: https://github.com/browserify/resolve/commit/b54d33a -[`16e3897`]: https://github.com/browserify/resolve/commit/16e3897 - -#### [v1.10.0](https://github.com/browserify/resolve/compare/v1.9.0...v1.10.0) - 21 January 2019 - -- [Fix] `sync`/`async`: when package.json `main` is not a string, throw an error ([`#178`][]) -- [Fix] TypeError: Path must be a string. Received undefined ([`ce163e3`][]) -- [Tests] up to `v11.6`, `v10.15`, `v8.15`, `v6.16` ([`083e78c`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` ([`29a4994`][]) -- v1.10.0 (([`d098e92`][]) -- [New] `core`: add `worker_threads` in v11.7+ ([`3296106`][]) -- [Tests] add an additional test ([`2c67936`][]) - -[`ce163e3`]: https://github.com/browserify/resolve/commit/ce163e34451581ff11aea33f67a48889682c99d2 -[`083e78c`]: https://github.com/browserify/resolve/commit/083e78c1ae5c1708b7d41c9ad7c608caffeddcbf -[`29a4994`]: https://github.com/browserify/resolve/commit/29a499418d54b5befe9deef1bc7c38a9174cfbd8 -[`d098e92`]: https://github.com/browserify/resolve/commit/d098e92a7c5d7919d18ccd4d7a284ea97d11e586 -[`3296106`]: https://github.com/browserify/resolve/commit/3296106c519fc9f0866ebfd5ca6d57de22fdc505 -[`2c67936`]: https://github.com/browserify/resolve/commit/2c679363e852f7a0d570593527ea7038f0cd2c19 - -#### [v1.9.0](https://github.com/browserify/resolve/compare/v1.8.1...v1.9.0) - 17 December 2018 - -- [Fix] `sync`/`async`: fix `preserveSymlinks` option ([`#177`][]) -- [Fix] `sync`/`async`: when package.json `main` is not a string, throw an error ([`#178`][]) -- [Refactor] `node-modules-paths`: Change `paths` function option to receive a thunk for node modules resolution paths (([`d652f01`][]) -- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` (([`2b4f3a8`][]) -- [New] `async`/`sync`/`node-modules-paths`: Adds support for “paths” being a function (([`7112873`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-keys`, `safe-publish-latest`, `tape` (([`5542700`][]) -- [New] Implements a "normalize-options" pseudo-hook (([`f3961df`][]) -- [Tests] better failure messages (([`f839d20`][]) -- v1.9.0 (([`254bb40`][]) -- [Deps] update `path-parse` (([`1018c0e`][]) - -[`d652f01`]: https://github.com/browserify/resolve/commit/d652f018b2561f4863ffcd0f3ecdb0dfe65ee223 -[`2b4f3a8`]: https://github.com/browserify/resolve/commit/2b4f3a898a3943e45cdff539b542c4ebee2b608a -[`7112873`]: https://github.com/browserify/resolve/commit/711287339aad544788a4b8b5335221cea645572c -[`5542700`]: https://github.com/browserify/resolve/commit/554270035e1997ae34865500c629888249baa304 -[`f3961df`]: https://github.com/browserify/resolve/commit/f3961dfcb7b2993d935c255e65309e7028a88b8d -[`f839d20`]: https://github.com/browserify/resolve/commit/f839d20ab16ef814214d80183452d02379cbbf15 -[`254bb40`]: https://github.com/browserify/resolve/commit/254bb4029df2f8d20a33043dfabd8e5cabfa37df -[`1018c0e`]: https://github.com/browserify/resolve/commit/1018c0e49851bfb62176d8adbc94125ae85cd158 - -#### [v1.8.1](https://github.com/browserify/resolve/compare/v1.8.0...v1.8.1) - 17 June 2018 - -- [Docs] clean up readme code (([`f5394d8`][]) -- [Fix] resolution when `filename` option is passed (([`9c370c9`][]) -- [Tests] up to `node` `v10.4` (([`3a64219`][]) -- [Tests] improve output of symlink tests that fail on Mac (([`6f771b2`][]) -- v1.8.1 (([`b5fc91b`][]) - -[`f5394d8`]: https://github.com/browserify/resolve/commit/f5394d801350ff32be08dfc5ca37bcb677b4c08b -[`9c370c9`]: https://github.com/browserify/resolve/commit/9c370c9848eaecb36fb8e0b004930e2dd49e1e71 -[`3a64219`]: https://github.com/browserify/resolve/commit/3a64219a7385d5d51f3d4ff7b3de0ce749d6cf09 -[`6f771b2`]: https://github.com/browserify/resolve/commit/6f771b215b4f40b0ba0009ef564bde85212e79eb -[`b5fc91b`]: https://github.com/browserify/resolve/commit/b5fc91bf59e6da3aafedc8a8ae4ce53907c06069 - -#### [v1.8.0](https://github.com/browserify/resolve/compare/v1.7.1...v1.8.0) - 15 June 2018 - -- [New] include filename in error message ([`#162`][]) -- [Tests] up to `node` `v10.1`, `v9.11`, `v8.11`, `v6.14`, `4.9` (([`ad16af2`][]) -- Fix eslint problems and update count of tests (([`def5931`][]) -- [New] add fs/promises to the list of core modules (([`756419a`][]) -- v1.8.0 (([`dcba6d0`][]) -- [New] core: add `trace_events`, `v8/tools/arguments` (([`bae0338`][]) -- [Fix] core: `_tls_legacy` is removed in node 10 (([`4225ac5`][]) - -[`#162`]: https://github.com/browserify/resolve/pull/162 -[`ad16af2`]: https://github.com/browserify/resolve/commit/ad16af2f4f6eb1dc964f5b119f6d94bd64b2607a -[`def5931`]: https://github.com/browserify/resolve/commit/def59317704d787adcddc9695b923e65c6bf5232 -[`756419a`]: https://github.com/browserify/resolve/commit/756419a94432fd753a62f5a58b797776efb543f9 -[`dcba6d0`]: https://github.com/browserify/resolve/commit/dcba6d077708ef93085270526bb8f982b66fc16d -[`bae0338`]: https://github.com/browserify/resolve/commit/bae033824c82153ccb4f32abdd0e70ca677968bc -[`4225ac5`]: https://github.com/browserify/resolve/commit/4225ac5f4b90d26db664ed32f5b08416fea69b86 - -#### [v1.7.1](https://github.com/browserify/resolve/compare/v1.7.0...v1.7.1) - 12 April 2018 - -- [Fix] revert proper but unintended breaking change in sync packageFilter ([`#157`][]) -- v1.7.1 (([`579e2b1`][]) - -[`579e2b1`]: https://github.com/browserify/resolve/commit/579e2b161a7cbb79284b335cc3b605287da27610 - -#### [v1.7.0](https://github.com/browserify/resolve/compare/v1.6.0...v1.7.0) - 7 April 2018 - -- [Fix] Make loadAsFileSync() work the same as async loadAsFile() ([`#146`][]) -- [Tests] add more pathfilter tests (([`c3621a3`][]) -- [Tests] add some tests for browser field (([`13fb572`][]) -- [Refactor] cache default isFile functions at module level (([`fa6e6f5`][]) -- [Docs] fix default “isFile” implementations (([`0f29c93`][]) -- [Tests] add some tests for a non-directory basedir (([`0c18e40`][]) -- [Refactor] use "basedir" instead of "y", because meaningful variable names (([`876b0b0`][]) -- [Docs] fix options formatting (([`23df5f5`][]) -- Minor cleanup (([`c449d48`][]) -- [Fix] support `opts.package` in non-relative lookups (([`c8a2052`][]) -- v1.7.0 (([`bdf1210`][]) -- [Tests] work around npm SSL issue (([`04cb0bb`][]) -- [Tests] add node 8 and 9 to appveyor (([`7cbd17a`][]) -- [Tests] work around npm SSL issue (([`4b10996`][]) - -[`#146`]: https://github.com/browserify/resolve/pull/146 -[`c3621a3`]: https://github.com/browserify/resolve/commit/c3621a35675b275b2b241dd367459ed7afe1c22a -[`13fb572`]: https://github.com/browserify/resolve/commit/13fb572337623622d06450696af6c15b68be26c3 -[`fa6e6f5`]: https://github.com/browserify/resolve/commit/fa6e6f5a2d34377f6973701733177a280adf0511 -[`0f29c93`]: https://github.com/browserify/resolve/commit/0f29c93f0c74fc4e52ec6ed6678ce0fec6347e2d -[`0c18e40`]: https://github.com/browserify/resolve/commit/0c18e40e4929ba2c9426a77079c153c43e50a025 -[`876b0b0`]: https://github.com/browserify/resolve/commit/876b0b08da9fe44d81681d0c815900485536be9e -[`23df5f5`]: https://github.com/browserify/resolve/commit/23df5f526823e27e33b01333016b7f58b4f63b6f -[`c449d48`]: https://github.com/browserify/resolve/commit/c449d4809cf8461a3d54e458780902b95119a969 -[`c8a2052`]: https://github.com/browserify/resolve/commit/c8a20524c7d08671c22903e70b952575b0502f7b -[`bdf1210`]: https://github.com/browserify/resolve/commit/bdf1210d96f3e06c00fad051917950eb5238ab05 -[`04cb0bb`]: https://github.com/browserify/resolve/commit/04cb0bb94628e560bfa4163e73637d3803591714 -[`7cbd17a`]: https://github.com/browserify/resolve/commit/7cbd17ae270f9ec24ef05779c3a5e9da3e75c598 -[`4b10996`]: https://github.com/browserify/resolve/commit/4b1099668477e28117c34f9db3509ff096a49190 - -#### [v1.6.0](https://github.com/browserify/resolve/compare/v1.5.0...v1.6.0) - 20 March 2018 - -- [New] add `async_hooks` core module, added in node 8 ([`#144`][]) -- [New] add many missing core modules. (([`88c0778`][]) -- Made loadAsFileSync() work the same as async loadAsFile(). (([`dc23387`][]) -- [Tests] up to `v9.8`, `v8.10`, `v6.13` (([`315d729`][]) -- [Tests] up to `node` `v9.3`, `v8.8`, `v6.12`; pin included builds to LTS (([`5091aa2`][]) -- [Tests] add a failing test (([`90b1192`][]) -- [Dev Deps] update `eslint`, `tape` (([`2acf953`][]) -- [Tests] restore node 0.6 (([`2764758`][]) -- v1.6.0 (([`1de53b2`][]) -- [Dev Deps] update `eslint` (([`699a54e`][]) -- [Dev Deps] update `eslint` (([`2674fad`][]) - -[`88c0778`]: https://github.com/browserify/resolve/commit/88c0778be359caaeb4ca74b24a7b5f7903bc39e8 -[`dc23387`]: https://github.com/browserify/resolve/commit/dc23387adb93f497d67def7ee99fae48e5958fb3 -[`315d729`]: https://github.com/browserify/resolve/commit/315d729afe7074ffae5d6ca6509a73d747985d45 -[`5091aa2`]: https://github.com/browserify/resolve/commit/5091aa2c076b67ff762937401e81da66ef7988ca -[`90b1192`]: https://github.com/browserify/resolve/commit/90b11921181c2783209e9aa31f1e20d98c11ed17 -[`2acf953`]: https://github.com/browserify/resolve/commit/2acf953ce2a94b38528372b5f8848ac95a2aabe5 -[`2764758`]: https://github.com/browserify/resolve/commit/2764758aae576aef98f41af5d46f76ada3523012 -[`1de53b2`]: https://github.com/browserify/resolve/commit/1de53b227990cfcb07e59fdf49d34b2a8373ba4c -[`699a54e`]: https://github.com/browserify/resolve/commit/699a54e91222dc8b3e1f0af8e9859c734d99d50a -[`2674fad`]: https://github.com/browserify/resolve/commit/2674fadcfcf2b253fdcf5e9d8564fd2b23b0b57c - -#### [v1.5.0](https://github.com/browserify/resolve/compare/v1.4.0...v1.5.0) - 24 October 2017 - -- [New] node v8.8+ supports `http2` ([`#139`][]) -- [Fix] fix broken core tests; change core.json to be an object instead of an array; fix results (([`b826f30`][]) -- [Tests] up to `v8.4`; node 0.6 is failing due to travis-ci changes; allow it to fail for now. (([`e9d3a24`][]) -- [Tests] up to `node` `8.7`; use `nvm install-latest-npm` so new npm doesn’t break old node (([`d0de222`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` (([`76f28a3`][]) -- [Tests] on `node` `v8.8` (([`e0c5d51`][]) -- [Docs] update repo URL (([`3412f98`][]) -- [New] add `perf_hooks`, added in node v8.5 (([`e66117d`][]) -- v1.5.0 (([`19cbd5e`][]) -- [Dev Deps] update `eslint` (([`5bfb072`][]) - -[`b826f30`]: https://github.com/browserify/resolve/commit/b826f3007dc8903b95e39984f93c68bb5e4c85b9 -[`e9d3a24`]: https://github.com/browserify/resolve/commit/e9d3a24ae0a4d8e3eefc6431c918c23f7c8fc6d3 -[`d0de222`]: https://github.com/browserify/resolve/commit/d0de222e4b55b67224ddec0421ee66ce8cb5ee8d -[`76f28a3`]: https://github.com/browserify/resolve/commit/76f28a3d275a63b0511449d28900ab5749f27fa5 -[`e0c5d51`]: https://github.com/browserify/resolve/commit/e0c5d518abfaadc4107ca8f3f8c30caf46490444 -[`3412f98`]: https://github.com/browserify/resolve/commit/3412f984a03a345b9a5ef1f0642a0308d676a2c2 -[`e66117d`]: https://github.com/browserify/resolve/commit/e66117df49d9f967b46fde633770307c9d5a7066 -[`19cbd5e`]: https://github.com/browserify/resolve/commit/19cbd5e0b67c78176e771a1a6fa3a6ffd478e3ac -[`5bfb072`]: https://github.com/browserify/resolve/commit/5bfb072f152c77c8247f4c06c1efa9246bbdddb0 - -#### [v1.4.0](https://github.com/browserify/resolve/compare/v1.3.3...v1.4.0) - 26 July 2017 - -- [New]: add `preserveSymlinks` option ([`#130`][]) -- [Fix] `sync`: fix when package.json main = ‘.’ or main = ‘./‘ ([`#125`][]) -- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; npm 4.6+ breaks on node < 4 (([`41a3604`][]) -- [Tests] fix 0.6 and linting (([`703517b`][]) -- Only apps should have lockfiles (([`11fb3d8`][]) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` (([`bc2f7bf`][]) -- v1.4.0 (([`744f816`][]) - -[`41a3604`]: https://github.com/browserify/resolve/commit/41a3604f6408dbe9693febf895251db924c87a8f -[`703517b`]: https://github.com/browserify/resolve/commit/703517b78e7e0f8093a79c0a7a413a708ac82d06 -[`11fb3d8`]: https://github.com/browserify/resolve/commit/11fb3d85bb107a24476bd8d764ba25b3c60c184a -[`bc2f7bf`]: https://github.com/browserify/resolve/commit/bc2f7bf29d172fa54d66cf909fb47a858f7765aa -[`744f816`]: https://github.com/browserify/resolve/commit/744f8162464a104aca60777e5f615418dab3b774 - -#### [v1.3.3](https://github.com/browserify/resolve/compare/v1.3.2...v1.3.3) - 20 April 2017 - -- [Fix] error code MODULE_NOT_FOUND instead of ENOTDIR ([`#121`][]) -- [Tests] [eslint] add `npm run lint` (([`3677928`][]) -- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; comment out OSX builds since they block linux builds. (([`1d3883c`][]) -- [Fix] correctly resolve dir paths when file with the same name exists (([`a983d38`][]) -- [Tests] up to `node` `v7.9` (([`0da055c`][]) -- [Tests] improve failure scenarios. (([`1de578f`][]) -- [Fix] `sync`: ensure that the path is a string, explicitly. (([`b7ba83d`][]) -- v1.3.3 (([`f009822`][]) -- [Dev Deps] update `eslint` (([`452fdf9`][]) -- [Tests] node 0.6 can’t support an npm that understands scoped packages (([`26369cf`][]) - -[`3677928`]: https://github.com/browserify/resolve/commit/36779282881ec4abce32b2c9b7f7b10bcd09d953 -[`1d3883c`]: https://github.com/browserify/resolve/commit/1d3883c40d55242d7dfeafa43fa782dc6f4ab4a6 -[`a983d38`]: https://github.com/browserify/resolve/commit/a983d38c47ea26e57e0824f22929985ecb24faca -[`0da055c`]: https://github.com/browserify/resolve/commit/0da055cc75bebd7e0044cd4184e7c5386a7bd7de -[`1de578f`]: https://github.com/browserify/resolve/commit/1de578f2879f83ba94789041420fd3d3b929127e -[`b7ba83d`]: https://github.com/browserify/resolve/commit/b7ba83d43519c3c77af823ef1badd7f452d8b8e3 -[`f009822`]: https://github.com/browserify/resolve/commit/f0098226a4fd0dedc85b5f1e8ca8aac6a7ca7a60 -[`452fdf9`]: https://github.com/browserify/resolve/commit/452fdf981330f96d7fef88805b24e40ea24a89e1 -[`26369cf`]: https://github.com/browserify/resolve/commit/26369cfe6ce4eae7404f3c003c88618f098d6814 - -#### [v1.3.2](https://github.com/browserify/resolve/compare/v1.2.1...v1.3.2) - 26 February 2017 - -- v1.3.2 (([`781da84`][]) -- Fix prepublish script. (([`1aa1d9d`][]) - -[`781da84`]: https://github.com/browserify/resolve/commit/781da847169b8ba43f65ed3d9dbc1283d5bde74c -[`1aa1d9d`]: https://github.com/browserify/resolve/commit/1aa1d9d9adc60691431efbde8d915c143cd54916 - -#### [v1.3.1](https://github.com/browserify/resolve/compare/v1.3.0...v1.3.1) - 24 February 2017 - -- Revert "[New] add searched extensions to error messages" (([`68a081d`][]) -- v1.3.1 (([`05a5ab9`][]) - -[`68a081d`]: https://github.com/browserify/resolve/commit/68a081d1c7ff6e0fb58aeff4b6ac06aada7812c4 -[`05a5ab9`]: https://github.com/browserify/resolve/commit/05a5ab961b5720bdcf1a641c093a4789af700506 - -#### [v1.3.0](https://github.com/browserify/resolve/compare/v1.2.0...v1.3.0) - 24 February 2017 - -- v1.3.0 (([`c6966fd`][]) - -[`c6966fd`]: https://github.com/browserify/resolve/commit/c6966fd37d985aca1191711f9993bffb7ba43e96 - -#### [v1.2.1](https://github.com/browserify/resolve/compare/v1.3.1...v1.2.1) - 26 February 2017 - -- [Fix] for browserify compat, do not assume `process.versions.node` exists. ([`#120`][]) -- [Fix] for browserify compat, do not assume `process.versions.node` exists. ([`#120`][]) -- v1.2.1 (([`a73e111`][]) - -[`a73e111`]: https://github.com/browserify/resolve/commit/a73e1114ddfe9d29cc8f1874d6b704d9ae8bb220 - -#### [v1.2.0](https://github.com/browserify/resolve/compare/v1.1.7...v1.2.0) - 13 December 2016 - -- [Fix] `resolve.sync` should re-throw non `ENOENT errors. ([`#79`][]) -- [New] add missing core modules, and determine them dynamically by node version. ([`#100`][][`#110`][][`#111`][][`#112`][]) -- [Tests] test on every minor version of node. ([`#109`][][`#75`][][`#74`][][`#70`][]) -- code style: tabs → spaces (([`0ab33b2`][]) -- [Dev Deps] add `safe-publish-latest` (([`83c25dd`][]) -- [Fix] Create error outside process.nextTick (([`3fa5f02`][]) -- v1.2.0 (([`8e4a465`][]) -- readme: update API docs link for require.resolve() (([`7e98547`][]) -- [Dev Deps] update `tape` (([`764f3a2`][]) -- gitignore node_modules (([`3e8a8da`][]) - -[`0ab33b2`]: https://github.com/browserify/resolve/commit/0ab33b29b814e030021ff2df391e60a1c52dcc46 -[`83c25dd`]: https://github.com/browserify/resolve/commit/83c25dde8aa5a663bc3863d946fdc62fab5fd080 -[`3fa5f02`]: https://github.com/browserify/resolve/commit/3fa5f02f2ace0683fbd42196619c4e2bbd9eef60 -[`8e4a465`]: https://github.com/browserify/resolve/commit/8e4a4659f4120c145e2f12bb01cf4ddad61730b3 -[`7e98547`]: https://github.com/browserify/resolve/commit/7e98547319f1dada4f26d7a24f3b92a08f85c56b -[`764f3a2`]: https://github.com/browserify/resolve/commit/764f3a231c26c370c4e6b94f0bb10166c20551b7 -[`3e8a8da`]: https://github.com/browserify/resolve/commit/3e8a8da3c9d545e00e15f5bed24623eb134b2221 - -#### [v1.1.7](https://github.com/browserify/resolve/compare/v1.1.6...v1.1.7) - 24 January 2016 - -- (typo) Change againt to against ([`#83`][]) -- Fix node_modules paths on Windows (([`35b2b64`][]) -- 1.1.7 (([`bb37f0d`][]) -- (typo) Change againt to against (([`7b6843c`][]) - -[`#83`]: https://github.com/browserify/resolve/pull/83 -[`35b2b64`]: https://github.com/browserify/resolve/commit/35b2b642d91e9b81e7cc26b6fd19912e18901d55 -[`bb37f0d`]: https://github.com/browserify/resolve/commit/bb37f0d4400e4d7835375be4bd3ad1264bac3689 -[`7b6843c`]: https://github.com/browserify/resolve/commit/7b6843c0757b84e65b9af7e46a9392cbadd4a380 - -#### [v1.1.6](https://github.com/browserify/resolve/compare/v1.1.5...v1.1.6) - 15 March 2015 - -- Use path.dirname to walk up looking for a package.json ([`#76`][]) -- add back pkg assertions to pick up the root package (([`4c25e45`][]) -- 1.1.6 (([`38d451c`][]) - -[`4c25e45`]: https://github.com/browserify/resolve/commit/4c25e45625fea7980463fc107fc843aab7e0d993 -[`38d451c`]: https://github.com/browserify/resolve/commit/38d451c0ecd9267277a7683970432d37f001441e - -#### [v1.1.5](https://github.com/browserify/resolve/compare/v1.1.4...v1.1.5) - 21 February 2015 - -- another test, not quite the failing case (([`612cac2`][]) -- 1.1.5 (([`a225602`][]) -- fix for the failing case (([`503c746`][]) - -[`612cac2`]: https://github.com/browserify/resolve/commit/612cac2beac41fb13b7b12a9dfdb4207391260c1 -[`a225602`]: https://github.com/browserify/resolve/commit/a225602be4ca80f75292a6a17c78ff3b27eb0bf3 -[`503c746`]: https://github.com/browserify/resolve/commit/503c746a6e64d50f2c9b18b4476ffcfed49947f2 - -#### [v1.1.4](https://github.com/browserify/resolve/compare/v1.1.3...v1.1.4) - 20 February 2015 - -- finally seems to fully handle browser field from outside foo/bar resolution (([`5b737d5`][]) -- flatter nodeModules function (([`5ebb39a`][]) -- 1.1.4 (([`7496374`][]) - -[`5b737d5`]: https://github.com/browserify/resolve/commit/5b737d58b38ce891ef3f06d600d0562dbbc8539c -[`5ebb39a`]: https://github.com/browserify/resolve/commit/5ebb39a19b62c052ff6201600c3d2fffb3f5fdcb -[`7496374`]: https://github.com/browserify/resolve/commit/7496374878a8482f6bc26bca474595cfb81ecdd2 - -#### [v1.1.3](https://github.com/browserify/resolve/compare/v1.1.2...v1.1.3) - 17 February 2015 - -- re-implemented pathfilter feature nearly passes the test (([`60ff554`][]) -- another precedence test (([`98d22e0`][]) -- move pathfilter test to its own file (([`90826f5`][]) -- path logic fix that seems to handle all the cases across this package and browserify (([`70146a5`][]) -- tape everywhere (([`47bbfcd`][]) -- move pathfilter files into their own dir (([`7f0a3f1`][]) -- failing precedence test (([`73e958e`][]) -- nearly nearly working (([`e7bffbf`][]) -- packageFilter should have been giving the pkgfile as an argument, fixed (([`70b71e7`][]) -- this fixes the directory precedence problem (([`caca9f9`][]) -- disable faulty basedir test except on windows for now (([`3be4b79`][]) -- passes pathfilter test (([`644f814`][]) -- fix node_path test, was clearly wrong for some reason (([`9aa36e7`][]) - -[`60ff554`]: https://github.com/browserify/resolve/commit/60ff5545ec3cd15367c89c08cf3f139fa9c23796 -[`98d22e0`]: https://github.com/browserify/resolve/commit/98d22e0e21dd57fe1ab8d9573c1f63903c2b7321 -[`90826f5`]: https://github.com/browserify/resolve/commit/90826f575fe37cb3852de17e764b62e3754484b2 -[`70146a5`]: https://github.com/browserify/resolve/commit/70146a5ebc4d96438383ada02785d4e722c6f5d9 -[`47bbfcd`]: https://github.com/browserify/resolve/commit/47bbfcd9d9c8a68ce97fa37e0563930cee67093d -[`7f0a3f1`]: https://github.com/browserify/resolve/commit/7f0a3f1545f4b53f1bdd099b67561f9516693325 -[`73e958e`]: https://github.com/browserify/resolve/commit/73e958e905eed000787f0596f81c212ca2cdb3b3 -[`e7bffbf`]: https://github.com/browserify/resolve/commit/e7bffbf1b39b6239732c0e7fb01eeb9dad605d15 -[`70b71e7`]: https://github.com/browserify/resolve/commit/70b71e7980b3235018a0f5ac0bd52b8393548beb -[`caca9f9`]: https://github.com/browserify/resolve/commit/caca9f9c3576c85d8972d25012ea5d12aeaa50f4 -[`3be4b79`]: https://github.com/browserify/resolve/commit/3be4b796f1a9aadfb293b36c0c7f781ca9169f09 -[`644f814`]: https://github.com/browserify/resolve/commit/644f81478c892874f9829aa6cca36ca72474db00 -[`9aa36e7`]: https://github.com/browserify/resolve/commit/9aa36e77eca50e177498984fdef5d564903d3964 - -#### [v1.1.2](https://github.com/browserify/resolve/compare/v1.1.0...v1.1.2) - 16 February 2015 - -- Adding pathFilter docs ([`#67`][]) -- adding pathFilter docs (([`44480ff`][]) -- 1.1.2 (([`d5f6ad0`][]) - -[`#67`]: https://github.com/browserify/resolve/pull/67 -[`44480ff`]: https://github.com/browserify/resolve/commit/44480ff041f791f32b80d212302180be210901a1 -[`d5f6ad0`]: https://github.com/browserify/resolve/commit/d5f6ad02eae9b504e5edfdfaf2857600847c9bcf - -#### [v1.1.0](https://github.com/browserify/resolve/compare/v1.0.0...v1.1.0) - 27 January 2015 - -- Update docs re: input and cb args. ([`#65`][]) -- Update main README--change word order for clarity ([`#55`][]) -- attempts to find package.json data for deep references https://github.com/substack/node-resolve/issues/62 (([`caff2ba`][]) -- formatting (([`b8d09e3`][]) -- Add failing test for parent filename in error msg. (([`96d38c6`][]) -- split before computing the pivot to prevent abcnode_modulesxyz from matching (([`10380e1`][]) -- Utilize opts.filename when available to ID parent. (([`f6edcd9`][]) -- Update docs re: input and cb args. (([`38b5c41`][]) -- Update main README--change word order for clarity (([`55fd2dc`][]) -- 1.1.0 (([`65e1789`][]) - -[`#65`]: https://github.com/browserify/resolve/pull/65 -[`#55`]: https://github.com/browserify/resolve/pull/55 -[`caff2ba`]: https://github.com/browserify/resolve/commit/caff2ba60dc5d85eaded388dc6025afd05ba183b -[`b8d09e3`]: https://github.com/browserify/resolve/commit/b8d09e3a2d679f6b61515d49eca3f6d8d0d2ac7f -[`96d38c6`]: https://github.com/browserify/resolve/commit/96d38c6aaa575d12781c28b34243b4939359a335 -[`10380e1`]: https://github.com/browserify/resolve/commit/10380e16d3cf03f25941c3f1545ef73ed11bc1e1 -[`f6edcd9`]: https://github.com/browserify/resolve/commit/f6edcd95ad5d27bfbdee0fa51951aa3d45d77cba -[`38b5c41`]: https://github.com/browserify/resolve/commit/38b5c41091e4addc0c17bc9b4a2388fdef8cf3c9 -[`55fd2dc`]: https://github.com/browserify/resolve/commit/55fd2dcb400f81faafecd1b3a147e38747fc08f8 -[`65e1789`]: https://github.com/browserify/resolve/commit/65e1789c3612c1b04ad5002d1131d82e8b6262e5 - -### [v1.0.0](https://github.com/browserify/resolve/compare/v0.7.4...v1.0.0) - 11 August 2014 - -- reformat package.json (([`695bbc1`][]) -- 1.0.0 (([`d0c465c`][]) - -[`695bbc1`]: https://github.com/browserify/resolve/commit/695bbc1d9eeb35339b4a01e141c6f6e1dff3a6e3 -[`d0c465c`]: https://github.com/browserify/resolve/commit/d0c465c88e85f05113a7fbef7b976c77ecdce965 - -#### [v0.7.4](https://github.com/browserify/resolve/compare/v0.7.3...v0.7.4) - 25 July 2014 - -- merged (([`5cae82f`][]) -- 0.7.4 (([`4ad6619`][]) - -[`5cae82f`]: https://github.com/browserify/resolve/commit/5cae82fb22cb64d5b72f703c787dc0fd418ed412 -[`4ad6619`]: https://github.com/browserify/resolve/commit/4ad661931ebdd07c3df34bc897c24255705adbff - -#### [v0.7.3](https://github.com/browserify/resolve/compare/v0.7.2...v0.7.3) - 25 July 2014 - -- cb(err) for non-string args (([`965c70b`][]) -- 0.7.3 (([`f620099`][]) - -[`965c70b`]: https://github.com/browserify/resolve/commit/965c70b27ff796fc0ac3dba186d95b61d82446df -[`f620099`]: https://github.com/browserify/resolve/commit/f6200998628490aec1c3008bb4e8bf099ab4920f - -#### [v0.7.2](https://github.com/browserify/resolve/compare/v0.7.1...v0.7.2) - 25 July 2014 - -- failing dotdot test (([`3ee0f0e`][]) -- fixes for dotdot tests (([`a67f230`][]) -- failing sync dotdot test (([`55515e7`][]) -- 0.7.2 (([`eae92dd`][]) - -[`3ee0f0e`]: https://github.com/browserify/resolve/commit/3ee0f0eb97971d246a4a3f183374f60938f1ca8a -[`a67f230`]: https://github.com/browserify/resolve/commit/a67f230133050568ca14a04c0d36aaf6bf14fa89 -[`55515e7`]: https://github.com/browserify/resolve/commit/55515e7f816571fb9d71fdd6d0f012185b2eeefb -[`eae92dd`]: https://github.com/browserify/resolve/commit/eae92dd55fa92543c32c4eaff72dce2d78dd3b99 - -#### [v0.7.1](https://github.com/browserify/resolve/compare/v0.7.0...v0.7.1) - 9 June 2014 - -- [Fix] `node-modules-paths`: `opts` should be optional, and `opts.paths` should not be concatenated when omitted. ([`#96`][]) -- [Refactor] consistent spacing and quotes; run some basic linting manually. (([`f63faaf`][]) -- [Tests] use `path.join` more often to normalize paths across OS’s. (([`8280c53`][]) -- [Tests] use `path` methods to make tests pass on both linux and Windows. (([`af9a885`][]) -- [Tests] make matrix more efficient (([`7f0ce87`][]) -- [Tests] fix indentation, manual linting. (([`6984dcb`][]) -- [Tests] [Refactor] refactor `node-modules-paths` and add tests. (([`58b99a3`][]) -- [Tests] add `appveyor` (([`caffe35`][]) -- [new] Add err.code = 'MODULE_NOT_FOUND' (([`c622aef`][]) -- [New] add searched extensions to error messages (([`1260d9d`][]) -- node-modules-paths: absolutize the `start` path (([`9d6b7af`][]) -- [Refactor] `async`: remove unnecessary slashes, since `path.join` adds them. (([`dd50615`][]) -- [Tests] ensure node_path test is independent of the `tap` module’s “main” (([`ddca9ed`][]) -- 0.7.1 (([`ae0beb7`][]) - -[`f63faaf`]: https://github.com/browserify/resolve/commit/f63faaf9df5dbd8da388c674de0b14e3286e5e91 -[`8280c53`]: https://github.com/browserify/resolve/commit/8280c53eae6b612f586e133052ed2b2a56ae6649 -[`af9a885`]: https://github.com/browserify/resolve/commit/af9a8858a618ab64dd4bb311ef1be37822ade2b7 -[`7f0ce87`]: https://github.com/browserify/resolve/commit/7f0ce871b6d2b5cb2082b04cd72ddd4055cb7a05 -[`6984dcb`]: https://github.com/browserify/resolve/commit/6984dcb1407fec6af46f744ad2c63f502645bdd6 -[`58b99a3`]: https://github.com/browserify/resolve/commit/58b99a36f882d7ee65df725224f204abd27379db -[`caffe35`]: https://github.com/browserify/resolve/commit/caffe358566bb3c2f9b4cbd8c0f910debfb6df3b -[`c622aef`]: https://github.com/browserify/resolve/commit/c622aefeb286e479d536601e30bb828e69f86ec3 -[`1260d9d`]: https://github.com/browserify/resolve/commit/1260d9d1e2f55efb514540db9aa1b3d679f9db10 -[`9d6b7af`]: https://github.com/browserify/resolve/commit/9d6b7af28c054676d6ea8a5037353ed750ea13bb -[`dd50615`]: https://github.com/browserify/resolve/commit/dd506158089f7d071d2a9f61cd4385365d177219 -[`ddca9ed`]: https://github.com/browserify/resolve/commit/ddca9ed7e1d980d5ec561450875cb09463effd5a -[`ae0beb7`]: https://github.com/browserify/resolve/commit/ae0beb7e8efe4a3c38f570931115d70f883b4f22 - -#### [v0.7.0](https://github.com/browserify/resolve/compare/v0.6.3...v0.7.0) - 17 May 2014 - -- array opts.moduleDirectory tests (([`0f6d088`][]) -- opts.moduleDirectory string tests (([`a15ffd6`][]) -- Support more than one directory in opts.moduleDirectory. (([`4183463`][]) -- formatting (([`b89f089`][]) -- 0.7.0 (([`c686141`][]) -- Remove variable leftover from 325584a685 (([`12fa78c`][]) - -[`0f6d088`]: https://github.com/browserify/resolve/commit/0f6d08801db6bc2044df8767226421172a2d9461 -[`a15ffd6`]: https://github.com/browserify/resolve/commit/a15ffd6c20772831c41146189c117ab0a0650e0b -[`4183463`]: https://github.com/browserify/resolve/commit/41834633e84d76d86297968ba34c375f26fe4f08 -[`b89f089`]: https://github.com/browserify/resolve/commit/b89f08902e8551e07d66e81a3dc33840e24266c5 -[`c686141`]: https://github.com/browserify/resolve/commit/c686141e0947ccfe96d4d045d06e46edf9cdb97f -[`12fa78c`]: https://github.com/browserify/resolve/commit/12fa78ce43c4363e1c9600b635d18cd295c6949f - -#### [v0.6.3](https://github.com/browserify/resolve/compare/v0.6.2...v0.6.3) - 16 April 2014 - -- Fixed the case when main is specified as "." or "./" causing the resolve to infinite loop as documented at https://github.com/substack/node-browserify/issues/732. (([`b11f273`][]) -- 0.6.3 (([`0a7d684`][]) - -[`b11f273`]: https://github.com/browserify/resolve/commit/b11f2739ad8c9730e1076271eff54850755e2ee1 -[`0a7d684`]: https://github.com/browserify/resolve/commit/0a7d684045bee083bea0fd80ae1dc0fa317bea7f - -#### [v0.6.2](https://github.com/browserify/resolve/compare/v0.6.1...v0.6.2) - 21 March 2014 - -- passing tests for paths (([`4f56bb6`][]) -- faulty basedir does not always produce error properly in windows, because when the dirs are sliced down the final path has improper prefix, causing it to load relative to cwd (([`110168a`][]) -- 0.6.2 (([`2c74b4e`][]) - -[`4f56bb6`]: https://github.com/browserify/resolve/commit/4f56bb67fa45d35adfa6a0022cc77afbf8117234 -[`110168a`]: https://github.com/browserify/resolve/commit/110168adae1dfbedcb9a12086cacf0ce68cc67f6 -[`2c74b4e`]: https://github.com/browserify/resolve/commit/2c74b4e507659489eec132b679395e50900d1b55 - -#### [v0.6.1](https://github.com/browserify/resolve/compare/v0.6.0...v0.6.1) - 27 November 2013 - -- merged the context error patches (([`8408e6e`][]) -- 0.6.1 (([`591e359`][]) - -[`8408e6e`]: https://github.com/browserify/resolve/commit/8408e6e8902b4bec8c859d606f53366e42058378 -[`591e359`]: https://github.com/browserify/resolve/commit/591e359faf5e2eb9c7f5cc86c9ac389c43d961e8 - -#### [v0.6.0](https://github.com/browserify/resolve/compare/v0.5.1...v0.6.0) - 26 November 2013 - -- fixes #25: resolve modules with the same name as node stdlib modules ([`#25`][]) -- 0.6.0 (([`0d09991`][]) - -[`0d09991`]: https://github.com/browserify/resolve/commit/0d099913f641e59d192b37703a4eff0b76317c62 - -#### [v0.5.1](https://github.com/browserify/resolve/compare/v0.5.0...v0.5.1) - 22 September 2013 - -- Separate duplicated nodeModulesPaths function (([`325584a`][]) -- Fix prefix for windows azure (([`b5ba043`][]) -- 0.5.1 (([`281b336`][]) - -[`325584a`]: https://github.com/browserify/resolve/commit/325584a685db8f42aae3d4876ffbe64069233601 -[`b5ba043`]: https://github.com/browserify/resolve/commit/b5ba0430b012d93367a4f87c304f1d4c8c22941c -[`281b336`]: https://github.com/browserify/resolve/commit/281b336a6a9f50a54fc6817b7a1f736985f0248b - -#### [v0.5.0](https://github.com/browserify/resolve/compare/v0.4.3...v0.5.0) - 2 September 2013 - -- opts.modules => opts.moduleDirectory, documented (([`c46593d`][]) -- modules folder name is configurable (([`d65a422`][]) -- 0.5.0 (([`b1e04d7`][]) - -[`c46593d`]: https://github.com/browserify/resolve/commit/c46593de74b256196d7ea12c85422698652cff10 -[`d65a422`]: https://github.com/browserify/resolve/commit/d65a42238101ea284ddafb788debdad0e5a59504 -[`b1e04d7`]: https://github.com/browserify/resolve/commit/b1e04d7098e469823e3c3a895a604c9e93d7ade1 - -#### [v0.4.3](https://github.com/browserify/resolve/compare/v0.4.2...v0.4.3) - 7 August 2013 - -- Fix default basedir calculation (([`cd7169b`][]) -- use getCaller() in both async and sync versions (([`20f8945`][]) -- 0.4.3 (([`ee5423e`][]) - -[`cd7169b`]: https://github.com/browserify/resolve/commit/cd7169b204b9f474b6a924adf47564f33a469f07 -[`20f8945`]: https://github.com/browserify/resolve/commit/20f89456f7fc1d8e51b95ec1ab38b1ac154d9fc4 -[`ee5423e`]: https://github.com/browserify/resolve/commit/ee5423e66f50bdae6ef60e12525c9851fc95ac9d - -#### [v0.4.2](https://github.com/browserify/resolve/compare/v0.4.1...v0.4.2) - 3 August 2013 - -- Failing test case for pkg.main pointing to a directory. (([`b57a75a`][]) -- 0.4.2 (([`6173c36`][]) -- Fix for failing test case where pkg.main points to directory. (([`8c4078c`][]) - -[`b57a75a`]: https://github.com/browserify/resolve/commit/b57a75aefc394ead20d54ed107741f1f7151b90f -[`6173c36`]: https://github.com/browserify/resolve/commit/6173c363fd698653ae8504e630d82e45135a039a -[`8c4078c`]: https://github.com/browserify/resolve/commit/8c4078c9dd45c6a92f1f409d70aaccc95be3bfc6 - -#### [v0.4.1](https://github.com/browserify/resolve/compare/v0.4.0...v0.4.1) - 30 July 2013 - -- adding tests to reproduce the problem (([`ad3a477`][]) -- 0.4.1 (([`2dcc3cb`][]) -- async resolve now falls back to 'index.js' if main field in package.json is incorrect (([`62a5726`][]) - -[`ad3a477`]: https://github.com/browserify/resolve/commit/ad3a4772ddd7187ff38cb56e00635b37a491e1fa -[`2dcc3cb`]: https://github.com/browserify/resolve/commit/2dcc3cb1d350220811998718217a7647d4e25e8c -[`62a5726`]: https://github.com/browserify/resolve/commit/62a572635f21bf1c28360ea5c2238be62736429b - -#### [v0.4.0](https://github.com/browserify/resolve/compare/v0.3.1...v0.4.0) - 9 June 2013 - -- Implement async support for returning package a module was resolved from. (([`b7b2806`][]) -- 0.4.0 (([`eed74a4`][]) -- Document package option. (([`7f84028`][]) - -[`b7b2806`]: https://github.com/browserify/resolve/commit/b7b28069acb7c749a2053dbb0c8d606515954694 -[`eed74a4`]: https://github.com/browserify/resolve/commit/eed74a41f001c0d75eb3284f86fafd0185c244fa -[`7f84028`]: https://github.com/browserify/resolve/commit/7f8402881b725938cfaf1d4835ec2fb6cee4862d - -#### [v0.3.1](https://github.com/browserify/resolve/compare/v0.3.0...v0.3.1) - 29 March 2013 - -- use isFIFO() instead to more narrowly target <() usage (([`790cdf5`][]) -- check !isDirectory() instead of isFile() so that <(echo "beep") inline bash fds work (([`c396065`][]) - -[`790cdf5`]: https://github.com/browserify/resolve/commit/790cdf5ab7c92bb146e8ace05ba0b26c5f51ffb3 -[`c396065`]: https://github.com/browserify/resolve/commit/c3960650f1a1417e52238011e08a6da2b0d9fee4 - -#### [v0.3.0](https://github.com/browserify/resolve/compare/v0.2.8...v0.3.0) - 19 February 2013 - -- failing translated async test with parameterized readFile on account of 3-arg form (([`7033bbb`][]) -- factor out .sync into lib/sync.js (([`ba7038a`][]) -- updated the docs for async (([`34a958e`][]) -- first async test passes (([`e427ca8`][]) -- sync parity with async tests (([`d1191a9`][]) -- stub out async (([`f4b02e3`][]) -- factor out core into lib/ (([`a800954`][]) -- synchronous example (([`3534992`][]) -- adapted async test (([`c9111d2`][]) -- 0.3.0 (([`71d6159`][]) -- async example (([`e1a9809`][]) -- fix for async parameterized readFile (([`2d4e80e`][]) -- drop 0.4, add 0.8 in travis (([`8a1ba59`][]) - -[`7033bbb`]: https://github.com/browserify/resolve/commit/7033bbb6e21ecfd13476ca8de247580aa2f97e7c -[`ba7038a`]: https://github.com/browserify/resolve/commit/ba7038a56d78212329b64287dfaf895b1a85cf2c -[`34a958e`]: https://github.com/browserify/resolve/commit/34a958e84b7fc4cdccd7b71f9a116027a6f3a123 -[`e427ca8`]: https://github.com/browserify/resolve/commit/e427ca85b7e3b1d01b05f94783b76516b8594a03 -[`d1191a9`]: https://github.com/browserify/resolve/commit/d1191a9958581a040f4f18b3aecdd50714bffc7a -[`f4b02e3`]: https://github.com/browserify/resolve/commit/f4b02e3bbf0c3b09f83cfb2b22b12b0f55afdf92 -[`a800954`]: https://github.com/browserify/resolve/commit/a80095482ef2d16425e6e12759c9735d89f7f50b -[`3534992`]: https://github.com/browserify/resolve/commit/3534992946294811d20aaf9857ee453078cbe828 -[`c9111d2`]: https://github.com/browserify/resolve/commit/c9111d293ab35fb611d9c65ea2f88ae8cf853f8e -[`71d6159`]: https://github.com/browserify/resolve/commit/71d615968c8e34ac6f22e1c86d204e091f00b9bc -[`e1a9809`]: https://github.com/browserify/resolve/commit/e1a98093094cded0a251ef36f4f2eb0adb280acb -[`2d4e80e`]: https://github.com/browserify/resolve/commit/2d4e80e139d01176bf70132bc80caed946cd6682 -[`8a1ba59`]: https://github.com/browserify/resolve/commit/8a1ba593ab924995a45099e164cc7b769c44e9a0 - -#### [v0.2.8](https://github.com/browserify/resolve/compare/v0.2.7...v0.2.8) - 18 February 2013 - -- add the domain module to .core (([`2979cde`][]) - -[`2979cde`]: https://github.com/browserify/resolve/commit/2979cdea615fe724de62d88cb221c1d1824d0f10 - -#### [v0.2.7](https://github.com/browserify/resolve/compare/v0.2.6...v0.2.7) - 18 February 2013 - -- 0.2.7 (([`c6ec6b7`][]) -- Merge branch 'node-resolve' of git://github.com/rektide/node-module-resolver into rektide-node-resolve (([`66571ba`][]) - -[`c6ec6b7`]: https://github.com/browserify/resolve/commit/c6ec6b76b24440504f49923cceecc27efacf75c8 -[`66571ba`]: https://github.com/browserify/resolve/commit/66571ba721391b66c386b954fd25d8efcedc3257 - -#### [v0.2.6](https://github.com/browserify/resolve/compare/v0.2.5...v0.2.6) - 18 February 2013 - -- 0.2.6 (([`f0051f6`][]) -- Merge branch 'master' of git://github.com/dodo/node-resolve into dodo-master (([`5d35fc5`][]) - -[`f0051f6`]: https://github.com/browserify/resolve/commit/f0051f65a81be3ff3498d6ccfa9cd63277266a8b -[`5d35fc5`]: https://github.com/browserify/resolve/commit/5d35fc50de9b6020c7a95a52b3d9356ba93b4a3e - -#### [v0.2.5](https://github.com/browserify/resolve/compare/v0.2.4...v0.2.5) - 18 February 2013 - -- 0.2.5 (([`3046b21`][]) -- Merge branch 'master' of git://github.com/dominictarr/node-resolve into dominictarr-master (([`aec025a`][]) - -[`3046b21`]: https://github.com/browserify/resolve/commit/3046b21be2ad8df0044c11b3d4bc41ba0fd45ff3 -[`aec025a`]: https://github.com/browserify/resolve/commit/aec025a19ed5611fb7bc561962db7ccb08877404 - -#### [v0.2.4](https://github.com/browserify/resolve/compare/v0.2.3...v0.2.4) - 18 February 2013 - -- resolve '../baz' correct (([`46fe923`][]) -- 0.2.4 (([`89e0569`][]) - -[`46fe923`]: https://github.com/browserify/resolve/commit/46fe923c20feeceac783e67cfa84d07222bc17fa -[`89e0569`]: https://github.com/browserify/resolve/commit/89e056970e8afe0a546921722876f74959b423c7 - -#### [v0.2.3](https://github.com/browserify/resolve/compare/v0.2.2...v0.2.3) - 12 August 2012 - -- license file (([`a964396`][]) -- existsSync (([`d1c1012`][]) -- pass dir to packageFilter (([`3bea5b6`][]) -- pkg.main may be a directory (([`3521c2f`][]) -- Prioritize parent tree in nodeModulesPathsSync before fallback options.paths/ NODE_PATH equivalent, in accordance with http://nodejs.org/docs/latest/api/all.html#all_loading_from_the_global_folders (([`27fa227`][]) - -[`a964396`]: https://github.com/browserify/resolve/commit/a9643965438eb4fcb068a5876b317f516199879a -[`d1c1012`]: https://github.com/browserify/resolve/commit/d1c1012f14c50212ea49a9a1255c902f5ad6cb37 -[`3bea5b6`]: https://github.com/browserify/resolve/commit/3bea5b6475b39e7f4974d29c6fa1e8eb8b1589af -[`3521c2f`]: https://github.com/browserify/resolve/commit/3521c2f2b93234e5a50dc47598554a76589d6d8c -[`27fa227`]: https://github.com/browserify/resolve/commit/27fa22707e87738ddde61cb4ad90508cfe0d7755 - -#### [v0.2.2](https://github.com/browserify/resolve/compare/v0.2.1...v0.2.2) - 30 April 2012 - -- fix indentation (([`98fc4a5`][]) -- Updated to work with windows, tested on Windows 7 64-bit and OS X 10.6 (([`a6646cc`][]) -- bump for windows fixes (([`d67d595`][]) - -[`98fc4a5`]: https://github.com/browserify/resolve/commit/98fc4a50b68456d497a862b9c4e4e0a79570c770 -[`a6646cc`]: https://github.com/browserify/resolve/commit/a6646ccceb1a6c411d5b9dfdc97106c80d8a0a09 -[`d67d595`]: https://github.com/browserify/resolve/commit/d67d5959e1be31eb67d5b62e7050bff318572373 - -#### [v0.2.1](https://github.com/browserify/resolve/compare/v0.2.0...v0.2.1) - 12 April 2012 - -- now using tap (([`b625169`][]) -- using travis (([`30cc7b3`][]) -- split on multiple slashes (([`ebeafab`][]) -- fix splitting of paths to support windows as well (([`5e7e24b`][]) - -[`b625169`]: https://github.com/browserify/resolve/commit/b62516922eaaafe533806cd385017109ea057baa -[`30cc7b3`]: https://github.com/browserify/resolve/commit/30cc7b3af9299a0e08f34c314015a1395ef16ea3 -[`ebeafab`]: https://github.com/browserify/resolve/commit/ebeafab4a43c6ac4df7a8a7ee578629f81b7b9e7 -[`5e7e24b`]: https://github.com/browserify/resolve/commit/5e7e24bf11c48f14385886d7dd3661f786cc109b - -#### [v0.2.0](https://github.com/browserify/resolve/compare/v0.1.3...v0.2.0) - 25 February 2012 - -- updated the core list for 0.6.11 (([`12d4c16`][]) - -[`12d4c16`]: https://github.com/browserify/resolve/commit/12d4c164ef99bd35c13b0f566feaa70bc3560082 - -#### [v0.1.3](https://github.com/browserify/resolve/compare/v0.1.2...v0.1.3) - 14 December 2011 - -- bump (([`2dffd07`][]) -- Added readline to core modules (([`4ab55a2`][]) - -[`2dffd07`]: https://github.com/browserify/resolve/commit/2dffd072ce65b4aae4974e934ca5b58ec741f598 -[`4ab55a2`]: https://github.com/browserify/resolve/commit/4ab55a2d4eb95be2399fe94fd5d33879271b5a9f - -#### [v0.1.2](https://github.com/browserify/resolve/compare/v0.1.1...v0.1.2) - 31 October 2011 - -- Add opts.paths to list of node_modules directories (([`7bb6ef4`][]) -- bump (([`5e3fcc6`][]) - -[`7bb6ef4`]: https://github.com/browserify/resolve/commit/7bb6ef4a1805523169f30b6ea38776796a714c3a -[`5e3fcc6`]: https://github.com/browserify/resolve/commit/5e3fcc63cfec322779be5435820d3236e6d13dba - -#### [v0.1.1](https://github.com/browserify/resolve/compare/v0.1.0...v0.1.1) - 18 October 2011 - -- bump for windows paths (([`3fb86d0`][]) -- Added support for Windows-style paths. (([`638951e`][]) - -[`3fb86d0`]: https://github.com/browserify/resolve/commit/3fb86d07c77b09a7d6fa6d2a8b89432a070a6aa0 -[`638951e`]: https://github.com/browserify/resolve/commit/638951ed92fa4435d9752df30c3bcb9eb49573cd - -#### [v0.1.0](https://github.com/browserify/resolve/compare/v0.0.4...v0.1.0) - 3 October 2011 - -- passing mock test (([`030f0d3`][]) -- passing mock test with package.json (([`d2b19c8`][]) -- isFile and readFileSync as parameters (([`d30c22d`][]) -- doc updates and a minor bump for custom isFile and readFileSync params (([`b0af4c3`][]) - -[`030f0d3`]: https://github.com/browserify/resolve/commit/030f0d391e02558574bc673077fb1b4057f8358d -[`d2b19c8`]: https://github.com/browserify/resolve/commit/d2b19c893b7f8c63154c5b5ff2c419ffdc8baa0c -[`d30c22d`]: https://github.com/browserify/resolve/commit/d30c22d1e13b000016f2592d6d6f3489a2d29988 -[`b0af4c3`]: https://github.com/browserify/resolve/commit/b0af4c3ac1a51acf9995cb4e078bf5619f257952 - -#### [v0.0.4](https://github.com/browserify/resolve/compare/v0.0.3...v0.0.4) - 21 June 2011 - -- bump for packageFilter and a note in the docs (([`9fbb632`][]) -- new packageFilter option (([`c92c883`][]) - -[`9fbb632`]: https://github.com/browserify/resolve/commit/9fbb632a5c0c38641ed7c10399306a56651e0789 -[`c92c883`]: https://github.com/browserify/resolve/commit/c92c883bed3e50dd8ed9a2e1d4b9fefc9f3ced64 - -#### [v0.0.3](https://github.com/browserify/resolve/compare/v0.0.2...v0.0.3) - 20 June 2011 - -- custom extensions now work (([`502b6e9`][]) -- failing test for extensions (([`ce56f56`][]) -- bump and a note in the docs for extensions (([`2ad8287`][]) -- passing normalize test (([`055c7ce`][]) - -[`502b6e9`]: https://github.com/browserify/resolve/commit/502b6e9c8b9f258e5c943954467016e9c048fa0f -[`ce56f56`]: https://github.com/browserify/resolve/commit/ce56f56b4e1a5c1df495a7bf061fb0242103b4d8 -[`2ad8287`]: https://github.com/browserify/resolve/commit/2ad8287bc8b34929c2074a739410d08955ccdea7 -[`055c7ce`]: https://github.com/browserify/resolve/commit/055c7cea391ff0ce9cd8c585e8244f553b62f6e7 - -#### [v0.0.2](https://github.com/browserify/resolve/compare/v0.0.1...v0.0.2) - 19 June 2011 - -- failing biz test for going up and down the path directory (([`cf4f5a5`][]) -- don't stop on the first node_modules since that's going away in node anyhow, all tests pass again (([`9049abf`][]) - -[`cf4f5a5`]: https://github.com/browserify/resolve/commit/cf4f5a58d092124c517c55dd180559f5a444eb06 -[`9049abf`]: https://github.com/browserify/resolve/commit/9049abfb60cac49bb547b8ca02cc2617d406ff1a - -#### v0.0.1 - -- implementation seems to work but no tests yet (([`5218f01`][]) -- a package.json all up in this (([`4084043`][]) -- new resolve.{core,isCore} with tests and documentation, bump to 0.0.1 (([`a9ef081`][]) -- failing foo test (([`463b108`][]) -- readme before any code (([`7885443`][]) -- opts.path => opts.basedir, more descriptive I think (([`78010b1`][]) -- failing bar test (([`c40c5c1`][]) -- passing baz test to check package.json resolution (([`410635e`][]) -- a path.resolve() fixed the relative loads (([`dfef4b6`][]) -- passing the bar test after taking out the dirname() around y (([`eda2247`][]) -- trailing comma in the package.json (([`2032753`][]) - -[`5218f01`]: https://github.com/browserify/resolve/commit/5218f0106e78edce4cfb905d0ea4492ed3fd38af -[`4084043`]: https://github.com/browserify/resolve/commit/40840435a621120db78126c1792df7fdd0570703 -[`a9ef081`]: https://github.com/browserify/resolve/commit/a9ef081a4897e9882bf6bc6b31457c53b8d0fc0d -[`463b108`]: https://github.com/browserify/resolve/commit/463b108dd6e750196cba150348bd68397522c908 -[`7885443`]: https://github.com/browserify/resolve/commit/7885443d8a3dba7223b1bfca2d62cafc08a46436 -[`78010b1`]: https://github.com/browserify/resolve/commit/78010b1f91251447d1e74c6ac9cd0baebc6ddf60 -[`c40c5c1`]: https://github.com/browserify/resolve/commit/c40c5c14038acbe8bec91cf979d12382c2e6ddfe -[`410635e`]: https://github.com/browserify/resolve/commit/410635ef6226c030f74c4475e73724a01a102896 -[`dfef4b6`]: https://github.com/browserify/resolve/commit/dfef4b6185d02259c119a10c8a938e1ab148b140 -[`eda2247`]: https://github.com/browserify/resolve/commit/eda22479bd47c5d0b2e8a88851d9ffabbea2329c -[`2032753`]: https://github.com/browserify/resolve/commit/20327532053284676a269ec2441a87f16456fbf3 diff --git a/node_modules/tape/node_modules/resolve/LICENSE b/node_modules/tape/node_modules/resolve/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/tape/node_modules/resolve/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/tape/node_modules/resolve/appveyor.yml b/node_modules/tape/node_modules/resolve/appveyor.yml deleted file mode 100644 index cc73cc1..0000000 --- a/node_modules/tape/node_modules/resolve/appveyor.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: 1.0.{build} -skip_branch_with_pr: true -build: off - -environment: - matrix: - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "7" - - nodejs_version: "6" - - nodejs_version: "5" - - nodejs_version: "4" - - nodejs_version: "3" - - nodejs_version: "2" - - nodejs_version: "1" - - nodejs_version: "0.12" - - nodejs_version: "0.10" - - nodejs_version: "0.8" - - nodejs_version: "0.6" -matrix: - # fast_finish: true - allow_failures: - - nodejs_version: "0.8" - - nodejs_version: "0.6" - -platform: - - x86 - - x64 - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version $env:platform - - IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3 - - IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5 - - set PATH=%APPDATA%\npm;%PATH% - #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm - # install modules - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # run tests - - npm run tests-only diff --git a/node_modules/tape/node_modules/resolve/changelog.hbs b/node_modules/tape/node_modules/resolve/changelog.hbs deleted file mode 100644 index addd781..0000000 --- a/node_modules/tape/node_modules/resolve/changelog.hbs +++ /dev/null @@ -1,36 +0,0 @@ -### Changelog - -All notable changes to this project will be documented in this file. Dates are displayed in UTC. -{{#each releases}} - - {{#if href}} - ###{{#unless major}}#{{/unless}} [{{title}}]({{href}}){{#if tag}} - {{niceDate}}{{/if}} - {{else}} - #### {{title}} - {{/if}} - - {{#if summary}} - Summary: - {{summary}} - {{/if}} - - {{#each fixes}} - - {{{commit.subject}}} ({{#each fixes}}{{#if href}}[`#{{id}}`][]{{/if}}{{/each}}) - {{/each}} - {{#each merges}} - - {{{message}}}{{#if href}} ([`#{{id}}`][]){{/if}} - {{/each}} - {{#each commits}} - - {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}}{{#if href}} (([`{{shorthash}}`][]){{/if}} - {{/each}} - - {{#each fixes}} -{{#if href}}[`#{{id}}`]: {{href}}{{/if}} - {{/each}} - {{#each merges}} -{{#if href}}[`#{{id}}`]: {{href}}{{/if}} - {{/each}} - {{#each commits}} -{{#if href}}[`{{shorthash}}`]: {{href}}{{/if}} - {{/each}} -{{/each}} diff --git a/node_modules/tape/node_modules/resolve/example/async.js b/node_modules/tape/node_modules/resolve/example/async.js deleted file mode 100644 index 20e65dc..0000000 --- a/node_modules/tape/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err); - else console.log(res); -}); diff --git a/node_modules/tape/node_modules/resolve/example/sync.js b/node_modules/tape/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc1..0000000 --- a/node_modules/tape/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/node_modules/tape/node_modules/resolve/index.js b/node_modules/tape/node_modules/resolve/index.js deleted file mode 100644 index eb6ba89..0000000 --- a/node_modules/tape/node_modules/resolve/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var core = require('./lib/core'); -var async = require('./lib/async'); -async.core = core; -async.isCore = function isCore(x) { return core[x]; }; -async.sync = require('./lib/sync'); - -exports = async; -module.exports = async; diff --git a/node_modules/tape/node_modules/resolve/lib/async.js b/node_modules/tape/node_modules/resolve/lib/async.js deleted file mode 100644 index 8ab32a7..0000000 --- a/node_modules/tape/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,246 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var normalizeOptions = require('./normalize-options.js'); - -var defaultIsFile = function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var defaultIsDir = function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -module.exports = function resolve(x, options, callback) { - var cb = callback; - var opts = options; - if (typeof options === 'function') { - cb = opts; - opts = {}; - } - if (typeof x !== 'string') { - var err = new TypeError('Path must be a string.'); - return process.nextTick(function () { - cb(err); - }); - } - - opts = normalizeOptions(x, opts); - - var isFile = opts.isFile || defaultIsFile; - var isDirectory = opts.isDirectory || defaultIsDir; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || ['.js']; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || []; - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = path.resolve(basedir); - - if (opts.preserveSymlinks === false) { - fs.realpath(absoluteStart, function (realPathErr, realStart) { - if (realPathErr && realPathErr.code !== 'ENOENT') cb(err); - else init(realPathErr ? absoluteStart : realStart); - }); - } else { - init(absoluteStart); - } - - var res; - function init(basedir) { - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - res = path.resolve(basedir, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - if ((/\/$/).test(x) && res === basedir) { - loadAsDirectory(res, opts.package, onfile); - } else loadAsFile(res, opts.package, onfile); - } else loadNodeModules(x, basedir, function (err, n, pkg) { - if (err) cb(err); - else if (core[x]) return cb(null, x); - else if (n) cb(null, n, pkg); - else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function onfile(err, m, pkg) { - if (err) cb(err); - else if (m) cb(null, m, pkg); - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err); - else if (d) cb(null, d, pkg); - else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function loadAsFile(x, thePackage, callback) { - var loadAsFilePackage = thePackage; - var cb = callback; - if (typeof loadAsFilePackage === 'function') { - cb = loadAsFilePackage; - loadAsFilePackage = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, loadAsFilePackage); - - function load(exts, x, loadPackage) { - if (exts.length === 0) return cb(null, undefined, loadPackage); - var file = x + exts[0]; - - var pkg = loadPackage; - if (pkg) onpkg(null, pkg); - else loadpkg(path.dirname(file), onpkg); - - function onpkg(err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err); - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex(err, ex) { - if (err) return cb(err); - if (ex) return cb(null, file, pkg); - load(exts.slice(1), x, pkg); - } - } - } - - function loadpkg(dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return cb(null); - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); - - var pkgfile = path.join(dir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg(path.dirname(dir), cb); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body); } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - } - - function loadAsDirectory(x, loadAsDirectoryPackage, callback) { - var cb = callback; - var fpkg = loadAsDirectoryPackage; - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - var pkgfile = path.join(x, 'package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - return cb(mainError); - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, 'index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - } - - function processDirs(cb, dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - isDirectory(dir, isdir); - - function isdir(err, isdir) { - if (err) return cb(err); - if (!isdir) return processDirs(cb, dirs.slice(1)); - var file = path.join(dir, x); - loadAsFile(file, opts.package, onfile); - } - - function onfile(err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, x), opts.package, ondir); - } - - function ondir(err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - processDirs(cb, dirs.slice(1)); - } - } - function loadNodeModules(x, start, cb) { - processDirs(cb, nodeModulesPaths(start, opts, x)); - } -}; diff --git a/node_modules/tape/node_modules/resolve/lib/caller.js b/node_modules/tape/node_modules/resolve/lib/caller.js deleted file mode 100644 index b14a280..0000000 --- a/node_modules/tape/node_modules/resolve/lib/caller.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; diff --git a/node_modules/tape/node_modules/resolve/lib/core.js b/node_modules/tape/node_modules/resolve/lib/core.js deleted file mode 100644 index 0877650..0000000 --- a/node_modules/tape/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,53 +0,0 @@ -var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; - -function specifierIncluded(specifier) { - var parts = specifier.split(' '); - var op = parts.length > 1 ? parts[0] : '='; - var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); - - for (var i = 0; i < 3; ++i) { - var cur = Number(current[i] || 0); - var ver = Number(versionParts[i] || 0); - if (cur === ver) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - if (op === '<') { - return cur < ver; - } else if (op === '>=') { - return cur >= ver; - } else { - return false; - } - } - return op === '>='; -} - -function matchesRange(range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { return false; } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(specifiers[i])) { return false; } - } - return true; -} - -function versionIncluded(specifierValue) { - if (typeof specifierValue === 'boolean') { return specifierValue; } - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(specifierValue[i])) { return true; } - } - return false; - } - return matchesRange(specifierValue); -} - -var data = require('./core.json'); - -var core = {}; -for (var mod in data) { // eslint-disable-line no-restricted-syntax - if (Object.prototype.hasOwnProperty.call(data, mod)) { - core[mod] = versionIncluded(data[mod]); - } -} -module.exports = core; diff --git a/node_modules/tape/node_modules/resolve/lib/core.json b/node_modules/tape/node_modules/resolve/lib/core.json deleted file mode 100644 index f8b70b9..0000000 --- a/node_modules/tape/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "assert": true, - "async_hooks": ">= 8", - "buffer_ieee754": "< 0.9.7", - "buffer": true, - "child_process": true, - "cluster": true, - "console": true, - "constants": true, - "crypto": true, - "_debugger": "< 8", - "dgram": true, - "dns": true, - "domain": true, - "events": true, - "freelist": "< 6", - "fs": true, - "fs/promises": ">= 10 && < 10.1", - "_http_agent": ">= 0.11.1", - "_http_client": ">= 0.11.1", - "_http_common": ">= 0.11.1", - "_http_incoming": ">= 0.11.1", - "_http_outgoing": ">= 0.11.1", - "_http_server": ">= 0.11.1", - "http": true, - "http2": ">= 8.8", - "https": true, - "inspector": ">= 8.0.0", - "_linklist": "< 8", - "module": true, - "net": true, - "node-inspect/lib/_inspect": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12", - "os": true, - "path": true, - "perf_hooks": ">= 8.5", - "process": ">= 1", - "punycode": true, - "querystring": true, - "readline": true, - "repl": true, - "smalloc": ">= 0.11.5 && < 3", - "_stream_duplex": ">= 0.9.4", - "_stream_transform": ">= 0.9.4", - "_stream_wrap": ">= 1.4.1", - "_stream_passthrough": ">= 0.9.4", - "_stream_readable": ">= 0.9.4", - "_stream_writable": ">= 0.9.4", - "stream": true, - "string_decoder": true, - "sys": true, - "timers": true, - "_tls_common": ">= 0.11.13", - "_tls_legacy": ">= 0.11.3 && < 10", - "_tls_wrap": ">= 0.11.3", - "tls": true, - "trace_events": ">= 10", - "tty": true, - "url": true, - "util": true, - "v8/tools/arguments": ">= 10 && < 12", - "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8": ">= 1", - "vm": true, - "worker_threads": ">= 11.7", - "zlib": true -} diff --git a/node_modules/tape/node_modules/resolve/lib/node-modules-paths.js b/node_modules/tape/node_modules/resolve/lib/node-modules-paths.js deleted file mode 100644 index 2b43813..0000000 --- a/node_modules/tape/node_modules/resolve/lib/node-modules-paths.js +++ /dev/null @@ -1,42 +0,0 @@ -var path = require('path'); -var parse = path.parse || require('path-parse'); - -var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { - var prefix = '/'; - if ((/^([A-Za-z]:)/).test(absoluteStart)) { - prefix = ''; - } else if ((/^\\\\/).test(absoluteStart)) { - prefix = '\\\\'; - } - - var paths = [absoluteStart]; - var parsed = parse(absoluteStart); - while (parsed.dir !== paths[paths.length - 1]) { - paths.push(parsed.dir); - parsed = parse(parsed.dir); - } - - return paths.reduce(function (dirs, aPath) { - return dirs.concat(modules.map(function (moduleDir) { - return path.resolve(prefix, aPath, moduleDir); - })); - }, []); -}; - -module.exports = function nodeModulesPaths(start, opts, request) { - var modules = opts && opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules']; - - if (opts && typeof opts.paths === 'function') { - return opts.paths( - request, - start, - function () { return getNodeModulesDirs(start, modules); }, - opts - ); - } - - var dirs = getNodeModulesDirs(start, modules); - return opts && opts.paths ? dirs.concat(opts.paths) : dirs; -}; diff --git a/node_modules/tape/node_modules/resolve/lib/normalize-options.js b/node_modules/tape/node_modules/resolve/lib/normalize-options.js deleted file mode 100644 index 4b56904..0000000 --- a/node_modules/tape/node_modules/resolve/lib/normalize-options.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function (x, opts) { - /** - * This file is purposefully a passthrough. It's expected that third-party - * environments will override it at runtime in order to inject special logic - * into `resolve` (by manipulating the options). One such example is the PnP - * code path in Yarn. - */ - - return opts || {}; -}; diff --git a/node_modules/tape/node_modules/resolve/lib/sync.js b/node_modules/tape/node_modules/resolve/lib/sync.js deleted file mode 100644 index 7c31586..0000000 --- a/node_modules/tape/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,169 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var normalizeOptions = require('./normalize-options.js'); - -var defaultIsFile = function isFile(file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); -}; - -var defaultIsDir = function isDirectory(dir) { - try { - var stat = fs.statSync(dir); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isDirectory(); -}; - -module.exports = function (x, options) { - if (typeof x !== 'string') { - throw new TypeError('Path must be a string.'); - } - var opts = normalizeOptions(x, options); - - var isFile = opts.isFile || defaultIsFile; - var readFileSync = opts.readFileSync || fs.readFileSync; - var isDirectory = opts.isDirectory || defaultIsDir; - - var extensions = opts.extensions || ['.js']; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || []; - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = path.resolve(basedir); - - if (opts.preserveSymlinks === false) { - try { - absoluteStart = fs.realpathSync(absoluteStart); - } catch (realPathErr) { - if (realPathErr.code !== 'ENOENT') { - throw realPathErr; - } - } - } - - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - var res = path.resolve(absoluteStart, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return m; - } else if (core[x]) { - return x; - } else { - var n = loadNodeModulesSync(x, absoluteStart); - if (n) return n; - } - - if (core[x]) return x; - - var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - - function loadAsFileSync(x) { - var pkg = loadpkg(path.dirname(x)); - - if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { - var rfile = path.relative(pkg.dir, x); - var r = opts.pathFilter(pkg.pkg, x, rfile); - if (r) { - x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign - } - } - - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadpkg(dir) { - if (dir === '' || dir === '/') return; - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return; - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; - - var pkgfile = path.join(dir, 'package.json'); - - if (!isFile(pkgfile)) { - return loadpkg(path.dirname(dir)); - } - - var body = readFileSync(pkgfile); - - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, dir); - } - - return { pkg: pkg, dir: dir }; - } - - function loadAsDirectorySync(x) { - var pkgfile = path.join(x, '/package.json'); - if (isFile(pkgfile)) { - try { - var body = readFileSync(pkgfile, 'UTF8'); - var pkg = JSON.parse(body); - } catch (e) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, x); - } - - if (pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - throw mainError; - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - try { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } catch (e) {} - } - } - - return loadAsFileSync(path.join(x, '/index')); - } - - function loadNodeModulesSync(x, start) { - var dirs = nodeModulesPaths(start, opts, x); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - if (isDirectory(dir)) { - var m = loadAsFileSync(path.join(dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join(dir, '/', x)); - if (n) return n; - } - } - } -}; diff --git a/node_modules/tape/node_modules/resolve/package.json b/node_modules/tape/node_modules/resolve/package.json deleted file mode 100644 index 7da01ae..0000000 --- a/node_modules/tape/node_modules/resolve/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "resolve@~1.11.1", - "_id": "resolve@1.11.1", - "_inBundle": false, - "_integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", - "_location": "/tape/resolve", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "resolve@~1.11.1", - "name": "resolve", - "escapedName": "resolve", - "rawSpec": "~1.11.1", - "saveSpec": null, - "fetchSpec": "~1.11.1" - }, - "_requiredBy": [ - "/tape" - ], - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "_shasum": "ea10d8110376982fef578df8fc30b9ac30a07a3e", - "_spec": "resolve@~1.11.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/tape", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/browserify/resolve/issues" - }, - "bundleDependencies": false, - "dependencies": { - "path-parse": "^1.0.6" - }, - "deprecated": false, - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "devDependencies": { - "@ljharb/eslint-config": "^13.1.1", - "eslint": "^5.16.0", - "object-keys": "^1.1.1", - "safe-publish-latest": "^1.1.2", - "tap": "0.4.13", - "tape": "^4.10.1" - }, - "homepage": "https://github.com/browserify/resolve#readme", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "license": "MIT", - "main": "index.js", - "name": "resolve", - "repository": { - "type": "git", - "url": "git://github.com/browserify/resolve.git" - }, - "scripts": { - "lint": "eslint .", - "posttest": "npm run test:multirepo", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run --silent tests-only", - "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test", - "tests-only": "tape test/*.js" - }, - "version": "1.11.1" -} diff --git a/node_modules/tape/node_modules/resolve/readme.markdown b/node_modules/tape/node_modules/resolve/readme.markdown deleted file mode 100644 index f1b2706..0000000 --- a/node_modules/tape/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,201 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](https://nodejs.org/api/modules.html#modules_all_together) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/browserify/node-resolve.png)](http://travis-ci.org/browserify/node-resolve) - -# example - -asynchronously resolve: - -```js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err); - else console.log(res); -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -```js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -```js -var resolve = require('resolve'); -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.isDirectory - function to asynchronously test whether a directory exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json contents before looking at the "main" field - * pkg - package data - * pkgfile - path to package.json - -* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) - - For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function - * request - the import specifier being resolved - * start - lookup path - * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution - * opts - the resolution options - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -```js -{ - paths: [], - basedir: __dirname, - extensions: ['.js'], - readFile: fs.readFile, - isFile: function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }, - isDirectory: function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* opts.isDirectory - function to synchronously test whether a directory exists - -* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field - * pkg - package data - * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2) - -* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -```js -{ - paths: [], - basedir: __dirname, - extensions: ['.js'], - readFileSync: fs.readFileSync, - isFile: function isFile(file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); - }, - isDirectory: function isDirectory(dir) { - try { - var stat = fs.statSync(dir); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isDirectory(); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -```sh -npm install resolve -``` - -# license - -MIT diff --git a/node_modules/tape/node_modules/resolve/reaf b/node_modules/tape/node_modules/resolve/reaf deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/.eslintrc b/node_modules/tape/node_modules/resolve/test/.eslintrc deleted file mode 100644 index ddd262d..0000000 --- a/node_modules/tape/node_modules/resolve/test/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "max-lines": 0 - } -} diff --git a/node_modules/tape/node_modules/resolve/test/core.js b/node_modules/tape/node_modules/resolve/test/core.js deleted file mode 100644 index 33d9f32..0000000 --- a/node_modules/tape/node_modules/resolve/test/core.js +++ /dev/null @@ -1,82 +0,0 @@ -var test = require('tape'); -var keys = require('object-keys'); -var resolve = require('../'); - -test('core modules', function (t) { - t.test('isCore()', function (st) { - st.ok(resolve.isCore('fs')); - st.ok(resolve.isCore('net')); - st.ok(resolve.isCore('http')); - - st.ok(!resolve.isCore('seq')); - st.ok(!resolve.isCore('../')); - st.end(); - }); - - t.test('core list', function (st) { - var cores = keys(resolve.core); - st.plan(cores.length); - - for (var i = 0; i < cores.length; ++i) { - var mod = cores[i]; - if (resolve.core[mod]) { - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - mod + ' supported; requiring does not throw' - ); - } else { - st.throws( - function () { require(mod); }, // eslint-disable-line no-loop-func - mod + ' not supported; requiring throws' - ); - } - } - - st.end(); - }); - - t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { - var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle - if (!libs) { - st.skip('module.builtinModules does not exist'); - return st.end(); - } - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - st.ok(resolve.core[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - } - st.end(); - }); - - t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { - var libs = require('module').builtinModules; - if (!libs) { - st.skip('module.builtinModules does not exist'); - return st.end(); - } - var blacklist = [ - '_debug_agent', - 'v8/tools/tickprocessor-driver', - 'v8/tools/SourceMap', - 'v8/tools/tickprocessor', - 'v8/tools/profile' - ]; - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - if (blacklist.indexOf(mod) === -1) { - st.ok(resolve.core[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - } - } - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/tape/node_modules/resolve/test/dotdot.js b/node_modules/tape/node_modules/resolve/test/dotdot.js deleted file mode 100644 index 3080665..0000000 --- a/node_modules/tape/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = path.join(__dirname, '/dotdot/abc'); - - resolve('..', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'dotdot/index.js')); - }); - - resolve('.', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = path.join(__dirname, '/dotdot/abc'); - - var a = resolve.sync('..', { basedir: dir }); - t.equal(a, path.join(__dirname, 'dotdot/index.js')); - - var b = resolve.sync('.', { basedir: dir }); - t.equal(b, path.join(dir, 'index.js')); -}); diff --git a/node_modules/tape/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/tape/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534..0000000 --- a/node_modules/tape/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/node_modules/tape/node_modules/resolve/test/dotdot/index.js b/node_modules/tape/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index 643f9fc..0000000 --- a/node_modules/tape/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever'; diff --git a/node_modules/tape/node_modules/resolve/test/faulty_basedir.js b/node_modules/tape/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index 5f2141a..0000000 --- a/node_modules/tape/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tape'); -var path = require('path'); -var resolve = require('../'); - -test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { - t.equal(!!err, true); - }); -}); - -test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { - t.plan(2); - - var opts = { - basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), - preserveSymlinks: false - }; - - var module = './dotdot/abc'; - - resolve(module, opts, function (err, res) { - t.equal(err.code, 'MODULE_NOT_FOUND'); - t.equal(res, undefined); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/filter.js b/node_modules/tape/node_modules/resolve/test/filter.js deleted file mode 100644 index dfc622a..0000000 --- a/node_modules/tape/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,34 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'resolver'); - var packageFilterArgs; - resolve('./baz', { - basedir: dir, - packageFilter: function (pkg, pkgfile) { - pkg.main = 'doom'; - packageFilterArgs = [pkg, pkgfile]; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); - - var packageData = packageFilterArgs[0]; - t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); - t.equal(packageData.main, 'doom', 'package "main" was altered'); - - var packageFile = packageFilterArgs[1]; - t.equal( - packageFile, - path.join(dir, 'baz/package.json'), - 'second packageFilter argument is "pkgfile"' - ); - - t.end(); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/filter_sync.js b/node_modules/tape/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index 064052e..0000000 --- a/node_modules/tape/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,26 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = path.join(__dirname, 'resolver'); - var packageFilterArgs; - var res = resolve.sync('./baz', { - basedir: dir, - packageFilter: function (pkg, dir) { - pkg.main = 'doom'; - packageFilterArgs = [pkg, dir]; - return pkg; - } - }); - - t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); - - var packageData = packageFilterArgs[0]; - t.equal(packageData.main, 'doom', 'package "main" was altered'); - - var packageFile = packageFilterArgs[1]; - t.equal(packageFile, path.join(dir, 'baz'), 'second packageFilter argument is "dir"'); - - t.end(); -}); diff --git a/node_modules/tape/node_modules/resolve/test/mock.js b/node_modules/tape/node_modules/resolve/test/mock.js deleted file mode 100644 index d4f57a3..0000000 --- a/node_modules/tape/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,169 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(8); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - var dirs = {}; - dirs[path.resolve('/foo/bar')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mock from package', function (t) { - t.plan(8); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - var dirs = {}; - dirs[path.resolve('/foo/bar')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, file)); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - 'package': { main: 'bar' }, - readFile: function (file, cb) { - cb(null, files[file]); - } - }; - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg && pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg && pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - var dirs = {}; - dirs[path.resolve('/foo')] = true; - dirs[path.resolve('/foo/node_modules')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); - t.equal(pkg && pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - var dirs = {}; - dirs[path.resolve('/foo')] = true; - dirs[path.resolve('/foo/node_modules')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - isDirectory: function (dir, cb) { - cb(null, !!dirs[path.resolve(dir)]); - }, - 'package': { main: 'bar' }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); - t.equal(pkg && pkg.main, './baz.js'); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/mock_sync.js b/node_modules/tape/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index af06ae1..0000000 --- a/node_modules/tape/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,80 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - var dirs = {}; - dirs[path.resolve('/foo/bar')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file) { - return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); - }, - isDirectory: function (dir) { - return !!dirs[path.resolve(dir)]; - }, - readFileSync: function (file) { - return files[path.resolve(file)]; - } - }; - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - path.resolve('/foo/bar/baz.js') - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - path.resolve('/foo/bar/baz.js') - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - var dirs = {}; - dirs[path.resolve('/foo')] = true; - dirs[path.resolve('/foo/node_modules')] = true; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file) { - return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); - }, - isDirectory: function (dir) { - return !!dirs[path.resolve(dir)]; - }, - readFileSync: function (file) { - return files[path.resolve(file)]; - } - }; - } - - t.equal( - resolve.sync('bar', opts('/foo')), - path.resolve('/foo/node_modules/bar/baz.js') - ); -}); diff --git a/node_modules/tape/node_modules/resolve/test/module_dir.js b/node_modules/tape/node_modules/resolve/test/module_dir.js deleted file mode 100644 index b50e5bb..0000000 --- a/node_modules/tape/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'module_dir'); - var xopts = { - basedir: dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); - }); - - var yopts = { - basedir: dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = path.join(__dirname, 'module_dir'); - var aopts = { - basedir: dir, - moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); - }); - - var bopts = { - basedir: dir, - moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); - }); - - var copts = { - basedir: dir, - moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/tape/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index dd7cf7b..0000000 --- a/node_modules/tape/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100; }; diff --git a/node_modules/tape/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/tape/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index ef2d4d4..0000000 --- a/node_modules/tape/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100; }; diff --git a/node_modules/tape/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/tape/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index e8ba629..0000000 --- a/node_modules/tape/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111; }; diff --git a/node_modules/tape/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/tape/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf..0000000 --- a/node_modules/tape/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/node_modules/tape/node_modules/resolve/test/node-modules-paths.js b/node_modules/tape/node_modules/resolve/test/node-modules-paths.js deleted file mode 100644 index 675441d..0000000 --- a/node_modules/tape/node_modules/resolve/test/node-modules-paths.js +++ /dev/null @@ -1,143 +0,0 @@ -var test = require('tape'); -var path = require('path'); -var parse = path.parse || require('path-parse'); -var keys = require('object-keys'); - -var nodeModulesPaths = require('../lib/node-modules-paths'); - -var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { - var moduleDirs = [].concat(moduleDirectories || 'node_modules'); - if (paths) { - for (var k = 0; k < paths.length; ++k) { - moduleDirs.push(path.basename(paths[k])); - } - } - - var foundModuleDirs = {}; - var uniqueDirs = {}; - var parsedDirs = {}; - for (var i = 0; i < dirs.length; ++i) { - var parsed = parse(dirs[i]); - if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } - foundModuleDirs[parsed.base] += 1; - parsedDirs[parsed.dir] = true; - uniqueDirs[dirs[i]] = true; - } - t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); - var foundModuleDirNames = keys(foundModuleDirs); - t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); - t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); - - var counts = {}; - for (var j = 0; j < foundModuleDirNames.length; ++j) { - counts[foundModuleDirs[j]] = true; - } - t.equal(keys(counts).length, 1, 'all found module directories had the same count'); -}; - -test('node-modules-paths', function (t) { - t.test('no options', function (t) { - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start); - - verifyDirs(t, start, dirs); - - t.end(); - }); - - t.test('empty options', function (t) { - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, {}); - - verifyDirs(t, start, dirs); - - t.end(); - }); - - t.test('with paths=array option', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var dirs = nodeModulesPaths(start, { paths: paths }); - - verifyDirs(t, start, dirs, null, paths); - - t.end(); - }); - - t.test('with paths=function option', function (t) { - var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { - return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); - }; - - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); - - verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); - - t.end(); - }); - - t.test('with paths=function skipping node modules resolution', function (t) { - var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { - return []; - }; - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, { paths: paths }); - t.deepEqual(dirs, [], 'no node_modules was computed'); - t.end(); - }); - - t.test('with moduleDirectory option', function (t) { - var start = path.join(__dirname, 'resolver'); - var moduleDirectory = 'not node modules'; - var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); - - verifyDirs(t, start, dirs, moduleDirectory); - - t.end(); - }); - - t.test('with 1 moduleDirectory and paths options', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var moduleDirectory = 'not node modules'; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); - - verifyDirs(t, start, dirs, moduleDirectory, paths); - - t.end(); - }); - - t.test('with 1+ moduleDirectory and paths options', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var moduleDirectories = ['not node modules', 'other modules']; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - verifyDirs(t, start, dirs, moduleDirectories, paths); - - t.end(); - }); - - t.test('combine paths correctly on Windows', function (t) { - var start = 'C:\\Users\\username\\myProject\\src'; - var paths = []; - var moduleDirectories = ['node_modules', start]; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); - - t.end(); - }); - - t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { - var start = '/Users/username/git/myProject/src'; - var paths = []; - var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); - - t.end(); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/node_path.js b/node_modules/tape/node_modules/resolve/test/node_path.js deleted file mode 100644 index d06aa4e..0000000 --- a/node_modules/tape/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,70 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(8); - - var isDir = function (dir, cb) { - if (dir === '/node_path' || dir === 'node_path/x') { - return cb(null, true); - } - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }; - - resolve('aaa', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname, - isDirectory: isDir - }, function (err, res) { - t.error(err); - t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); - }); - - resolve('bbb', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname, - isDirectory: isDir - }, function (err, res) { - t.error(err); - t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); - }); - - resolve('ccc', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname, - isDirectory: isDir - }, function (err, res) { - t.error(err); - t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); - }); - - // ensure that relative paths still resolve against the regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path' - ], - basedir: path.join(__dirname, 'node_path/x'), - isDirectory: isDir - }, function (err, res) { - var root = require('tap/package.json').main; - t.error(err); - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/tape/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index ad70d0b..0000000 --- a/node_modules/tape/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A'; diff --git a/node_modules/tape/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/tape/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index a64132e..0000000 --- a/node_modules/tape/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C'; diff --git a/node_modules/tape/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/tape/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index 4d0f32e..0000000 --- a/node_modules/tape/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B'; diff --git a/node_modules/tape/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/tape/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index 793315e..0000000 --- a/node_modules/tape/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY'; diff --git a/node_modules/tape/node_modules/resolve/test/nonstring.js b/node_modules/tape/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40..0000000 --- a/node_modules/tape/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/pathfilter.js b/node_modules/tape/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 16519ae..0000000 --- a/node_modules/tape/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,75 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); - -var pathFilterFactory = function (t) { - return function (pkg, x, remainder) { - t.equal(pkg.version, '1.2.3'); - t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); - t.equal(remainder, 'ref'); - return 'alt'; - }; -}; - -test('#62: deep module references and the pathFilter', function (t) { - t.test('deep/ref.js', function (st) { - st.plan(3); - - resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { - if (err) st.fail(err); - - st.equal(pkg.version, '1.2.3'); - st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); - }); - - var res = resolve.sync('deep/ref', { basedir: resolverDir }); - st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); - }); - - t.test('deep/deeper/ref', function (st) { - st.plan(4); - - resolve( - 'deep/deeper/ref', - { basedir: resolverDir }, - function (err, res, pkg) { - if (err) t.fail(err); - st.notEqual(pkg, undefined); - st.equal(pkg.version, '1.2.3'); - st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); - } - ); - - var res = resolve.sync( - 'deep/deeper/ref', - { basedir: resolverDir } - ); - st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); - }); - - t.test('deep/ref alt', function (st) { - st.plan(8); - - var pathFilter = pathFilterFactory(st); - - var res = resolve.sync( - 'deep/ref', - { basedir: resolverDir, pathFilter: pathFilter } - ); - st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); - - resolve( - 'deep/ref', - { basedir: resolverDir, pathFilter: pathFilter }, - function (err, res, pkg) { - if (err) st.fail(err); - st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); - st.end(); - } - ); - }); - - t.end(); -}); diff --git a/node_modules/tape/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/tape/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/precedence.js b/node_modules/tape/node_modules/resolve/test/precedence.js deleted file mode 100644 index 2febb59..0000000 --- a/node_modules/tape/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir: dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/precedence/aaa.js b/node_modules/tape/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index b83a3e7..0000000 --- a/node_modules/tape/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf'; diff --git a/node_modules/tape/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/tape/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index e0f8f6a..0000000 --- a/node_modules/tape/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok'; diff --git a/node_modules/tape/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/tape/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index 93542a9..0000000 --- a/node_modules/tape/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); diff --git a/node_modules/tape/node_modules/resolve/test/precedence/bbb.js b/node_modules/tape/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index 2298f47..0000000 --- a/node_modules/tape/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '>_<'; diff --git a/node_modules/tape/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/tape/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d..0000000 --- a/node_modules/tape/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/node_modules/tape/node_modules/resolve/test/resolver.js b/node_modules/tape/node_modules/resolve/test/resolver.js deleted file mode 100644 index 4552f4f..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,418 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(12); - var dir = path.join(__dirname, 'resolver'); - - resolve('./foo', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg.main, 'resolver'); - }); - - resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - }); - - resolve('foo', { basedir: dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - // Test that filename is reported as the "from" value when passed. - resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = path.join(__dirname, 'resolver'); - - resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg.main, 'bar'); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'resolver'); - - resolve('./baz', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/quux.js')); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/quux.js')); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - - resolve('./grux', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg.main, 'grux'); - }); - - resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg.main, 'tiv'); - }); - - resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver/quux'); - - resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo/index.js')); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - - resolve('../grux', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(5); - var dir = path.join(__dirname, 'resolver'); - - resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'cup.coffee')); - }); - - resolve('./cup.coffee', { basedir: dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'cup.coffee')); - }); - - resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - // Test that filename is reported as the "from" value when passed. - resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'resolver'); - - resolve('./mug', { basedir: dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'mug.js')); - }); - - resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, '/mug.coffee')); - }); - - resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { - t.equal(res, path.join(dir, '/mug.js')); - }); -}); - -test('other path', function (t) { - t.plan(6); - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'other_path/root.js')); - }); - - resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); - }); - - resolve('root', { basedir: dir }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('incorrect main', function (t) { - t.plan(1); - - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'index.js')); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = path.join(__dirname, 'resolver/without_basedir'); - var tester = require(path.join(dir, 'main.js')); - - tester(t, function (err, res, pkg) { - if (err) { - t.fail(err); - } else { - t.equal(res, path.join(dir, 'node_modules/mymodule.js')); - } - }); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - t.plan(2); - - var dir = path.join(__dirname, 'resolver'); - - resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'same_names/foo.js')); - }); - - resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'same_names/foo/index.js')); - }); -}); - -test('async: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.plan(1); - resolve('./' + testFile, function (err, res, pkg) { - if (err) t.fail(err); - st.equal(res, __filename, 'sanity check'); - }); - }); - - t.test('with a fake directory', function (st) { - st.plan(4); - - resolve('./' + testFile + '/blah', function (err, res, pkg) { - st.ok(err, 'there is an error'); - st.notOk(res, 'no result'); - - st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - err && err.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - st.end(); - }); - }); - - t.end(); -}); - -test('async dot main', function (t) { - var start = new Date(); - t.plan(3); - resolve('./resolver/dot_main', function (err, ret) { - t.notOk(err); - t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); - }); -}); - -test('async dot slash main', function (t) { - var start = new Date(); - t.plan(3); - resolve('./resolver/dot_slash_main', function (err, ret) { - t.notOk(err); - t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); - }); -}); - -test('not a directory', function (t) { - t.plan(6); - var path = './foo'; - resolve(path, { basedir: __filename }, function (err, res, pkg) { - t.ok(err, 'a non-directory errors'); - t.equal(arguments.length, 1); - t.equal(res, undefined); - t.equal(pkg, undefined); - - t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); - t.equal(err && err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('non-string "main" field in package.json', function (t) { - t.plan(5); - - var dir = path.join(__dirname, 'resolver'); - resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - t.equal(res, undefined, 'res is undefined'); - t.equal(pkg, undefined, 'pkg is undefined'); - }); -}); - -test('non-string "main" field in package.json', function (t) { - t.plan(5); - - var dir = path.join(__dirname, 'resolver'); - resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - t.equal(res, undefined, 'res is undefined'); - t.equal(pkg, undefined, 'pkg is undefined'); - }); -}); - -test('browser field in package.json', function (t) { - t.plan(3); - - var dir = path.join(__dirname, 'resolver'); - resolve( - './browser_field', - { - basedir: dir, - packageFilter: function packageFilter(pkg) { - if (pkg.browser) { - pkg.main = pkg.browser; - delete pkg.browser; - } - return pkg; - } - }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'browser_field', 'b.js')); - t.equal(pkg && pkg.main, 'b'); - t.equal(pkg && pkg.browser, undefined); - } - ); -}); diff --git a/node_modules/tape/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/tape/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/baz/package.json b/node_modules/tape/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index c41e4db..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "quux.js" -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/tape/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/tape/node_modules/resolve/test/resolver/browser_field/a.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/tape/node_modules/resolve/test/resolver/browser_field/b.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/tape/node_modules/resolve/test/resolver/browser_field/package.json deleted file mode 100644 index bf406f0..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/browser_field/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "browser_field", - "main": "a", - "browser": "b" -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/cup.coffee b/node_modules/tape/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b13789..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/node_modules/tape/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/tape/node_modules/resolve/test/resolver/dot_main/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/dot_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/tape/node_modules/resolve/test/resolver/dot_main/package.json deleted file mode 100644 index d7f4fc8..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/dot_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "." -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/tape/node_modules/resolve/test/resolver/dot_slash_main/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/dot_slash_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/tape/node_modules/resolve/test/resolver/dot_slash_main/package.json deleted file mode 100644 index f51287b..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/dot_slash_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "./" -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/foo.js b/node_modules/tape/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/tape/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/tape/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index b718804..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "wrong.js" -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/tape/node_modules/resolve/test/resolver/invalid_main/package.json deleted file mode 100644 index 0cf8279..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/invalid_main/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "invalid main", - "main": [ - "why is this a thing", - "srsly omg wtf" - ] -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/mug.coffee b/node_modules/tape/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/mug.js b/node_modules/tape/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/tape/node_modules/resolve/test/resolver/multirepo/lerna.json deleted file mode 100644 index d6707ca..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/lerna.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "packages": [ - "packages/*" - ], - "version": "0.0.0" -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/tape/node_modules/resolve/test/resolver/multirepo/package.json deleted file mode 100644 index 8508f9d..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "monorepo-symlink-test", - "private": true, - "version": "0.0.0", - "description": "", - "main": "index.js", - "scripts": { - "postinstall": "lerna bootstrap", - "test": "node packages/package-a" - }, - "author": "", - "license": "MIT", - "dependencies": { - "jquery": "^3.3.1", - "resolve": "../../../" - }, - "devDependencies": { - "lerna": "^3.4.3" - } -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js deleted file mode 100644 index 8875a32..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var assert = require('assert'); -var path = require('path'); -var resolve = require('resolve'); - -var basedir = __dirname + '/node_modules/@my-scope/package-b'; - -var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); - -/* - * preserveSymlinks === false - * will search NPM package from - * - packages/package-b/node_modules - * - packages/node_modules - * - node_modules - */ -assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); -assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); - -/* - * preserveSymlinks === true - * will search NPM package from - * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules - * - packages/package-a/node_modules/@my-scope/packages/node_modules - * - packages/package-a/node_modules/@my-scope/node_modules - * - packages/package-a/node_modules/node_modules - * - packages/package-a/node_modules - * - packages/node_modules - * - node_modules - */ -assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); -assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); - -console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json deleted file mode 100644 index 204de51..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@my-scope/package-a", - "version": "0.0.0", - "private": true, - "description": "", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@my-scope/package-b": "^0.0.0" - } -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json deleted file mode 100644 index f57c3b5..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@my-scope/package-b", - "private": true, - "version": "0.0.0", - "description": "", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@my-scope/package-a": "^0.0.0" - } -} diff --git a/node_modules/tape/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/tape/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/tape/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/tape/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/tape/node_modules/resolve/test/resolver/same_names/foo.js deleted file mode 100644 index 888cae3..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/same_names/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 42; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/tape/node_modules/resolve/test/resolver/same_names/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/same_names/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/tape/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/tape/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/tape/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/tape/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5b31975..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../../../'); - -module.exports = function (t, cb) { - resolve('mymodule', null, cb); -}; diff --git a/node_modules/tape/node_modules/resolve/test/resolver_sync.js b/node_modules/tape/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index 878e589..0000000 --- a/node_modules/tape/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,329 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: dir }), - path.join(dir, 'foo.js') - ); - - t.equal( - resolve.sync('./foo.js', { basedir: dir }), - path.join(dir, 'foo.js') - ); - - t.equal( - resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), - path.join(dir, 'foo.js') - ); - - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }); - - // Test that filename is reported as the "from" value when passed. - t.throws( - function () { - resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); - }, - { - name: 'Error', - message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" - } - ); - - t.end(); -}); - -test('bar', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('foo', { basedir: path.join(dir, 'bar') }), - path.join(dir, 'bar/node_modules/foo/index.js') - ); - t.end(); -}); - -test('baz', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./baz', { basedir: dir }), - path.join(dir, 'baz/quux.js') - ); - t.end(); -}); - -test('biz', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - t.equal( - resolve.sync('./grux', { basedir: dir }), - path.join(dir, 'grux/index.js') - ); - - t.equal( - resolve.sync('tiv', { basedir: path.join(dir, 'grux') }), - path.join(dir, 'tiv/index.js') - ); - - t.equal( - resolve.sync('grux', { basedir: path.join(dir, 'tiv') }), - path.join(dir, 'grux/index.js') - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - t.equal( - resolve.sync('../grux', { basedir: dir }), - path.join(dir, 'index.js') - ); - t.end(); -}); - -test('cup', function (t) { - var dir = path.join(__dirname, 'resolver'); - t.equal( - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'cup.coffee') - ); - - t.equal( - resolve.sync('./cup.coffee', { basedir: dir }), - path.join(dir, 'cup.coffee') - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js'] - }); - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = path.join(__dirname, 'resolver'); - t.equal( - resolve.sync('./mug', { basedir: dir }), - path.join(dir, 'mug.js') - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.coffee', '.js'] - }), - path.join(dir, 'mug.coffee') - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'mug.js') - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - t.equal( - resolve.sync('root', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/root.js') - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/lib/other-lib.js') - ); - - t.throws(function () { - resolve.sync('root', { basedir: dir }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir: dir, - paths: [otherDir] - }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - t.equal( - resolve.sync('./incorrect_main', { basedir: resolverDir }), - path.join(dir, 'index.js') - ); - - t.end(); -}); - -var stubStatSync = function stubStatSync(fn) { - var fs = require('fs'); - var statSync = fs.statSync; - try { - fs.statSync = function () { - throw new EvalError('Unknown Error'); - }; - return fn(); - } finally { - fs.statSync = statSync; - } -}; - -test('#79 - re-throw non ENOENT errors from stat', function (t) { - var dir = path.join(__dirname, 'resolver'); - - stubStatSync(function () { - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }, /Unknown Error/); - }); - - t.end(); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }), - path.join(dir, 'same_names/foo.js') - ); - t.equal( - resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }), - path.join(dir, 'same_names/foo/index.js') - ); - t.end(); -}); - -test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.equal( - resolve.sync('./' + testFile), - __filename, - 'sanity check' - ); - st.end(); - }); - - t.test('with a fake directory', function (st) { - function run() { return resolve.sync('./' + testFile + '/blah'); } - - st.throws(run, 'throws an error'); - - try { - run(); - } catch (e) { - st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - e.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - } - - st.end(); - }); - - t.end(); -}); - -test('sync dot main', function (t) { - var start = new Date(); - t.equal(resolve.sync('./resolver/dot_main'), path.join(__dirname, 'resolver/dot_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync dot slash main', function (t) { - var start = new Date(); - t.equal(resolve.sync('./resolver/dot_slash_main'), path.join(__dirname, 'resolver/dot_slash_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('not a directory', function (t) { - var path = './foo'; - try { - resolve.sync(path, { basedir: __filename }); - t.fail(); - } catch (err) { - t.ok(err, 'a non-directory errors'); - t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); - t.equal(err && err.code, 'MODULE_NOT_FOUND'); - } - t.end(); -}); - -test('non-string "main" field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - try { - var result = resolve.sync('./invalid_main', { basedir: dir }); - t.equal(result, undefined, 'result should not exist'); - t.fail('should not get here'); - } catch (err) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - } - t.end(); -}); - -test('non-string "main" field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - try { - var result = resolve.sync('./invalid_main', { basedir: dir }); - t.equal(result, undefined, 'result should not exist'); - t.fail('should not get here'); - } catch (err) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - } - t.end(); -}); - -test('browser field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - var res = resolve.sync('./browser_field', { - basedir: dir, - packageFilter: function packageFilter(pkg) { - if (pkg.browser) { - pkg.main = pkg.browser; - delete pkg.browser; - } - return pkg; - } - }); - t.equal(res, path.join(dir, 'browser_field', 'b.js')); - t.end(); -}); diff --git a/node_modules/tape/node_modules/resolve/test/shadowed_core.js b/node_modules/tape/node_modules/resolve/test/shadowed_core.js deleted file mode 100644 index 98c52a7..0000000 --- a/node_modules/tape/node_modules/resolve/test/shadowed_core.js +++ /dev/null @@ -1,38 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('shadowed core modules still return core module', function (t) { - t.plan(2); - - resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { - t.ifError(err); - t.equal(res, 'util'); - }); -}); - -test('shadowed core modules still return core module [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); - - t.equal(res, 'util'); -}); - -test('shadowed core modules return shadow when appending `/`', function (t) { - t.plan(2); - - resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); - }); -}); - -test('shadowed core modules return shadow when appending `/` [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); - - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); -}); - diff --git a/node_modules/tape/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/tape/node_modules/resolve/test/shadowed_core/node_modules/util/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/tape/node_modules/resolve/test/subdirs.js b/node_modules/tape/node_modules/resolve/test/subdirs.js deleted file mode 100644 index b7b8450..0000000 --- a/node_modules/tape/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/node_modules/tape/node_modules/resolve/test/symlinks.js b/node_modules/tape/node_modules/resolve/test/symlinks.js deleted file mode 100644 index ea95a1e..0000000 --- a/node_modules/tape/node_modules/resolve/test/symlinks.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var test = require('tape'); -var resolve = require('../'); - -var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); -try { - fs.unlinkSync(symlinkDir); -} catch (err) {} -try { - fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); -} - -test('symlink', function (t) { - t.plan(2); - - resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { - t.error(err); - t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - }); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.plan(4); - - resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { - t.ok(err, 'there is an error'); - t.notOk(res, 'no result'); - - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - t.equal( - err && err.message, - 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', - 'can not find nonexistent module' - ); - }); -}); - -test('sync symlink', function (t) { - var start = new Date(); - t.doesNotThrow(function () { - t.equal(resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - }); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.throws(function () { - resolve.sync('foo', { basedir: symlinkDir }); - }, /Cannot find module 'foo'/); - t.end(); -}); diff --git a/node_modules/tape/package.json b/node_modules/tape/package.json deleted file mode 100644 index 553776d..0000000 --- a/node_modules/tape/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_from": "tape@^4.11.0", - "_id": "tape@4.11.0", - "_inBundle": false, - "_integrity": "sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA==", - "_location": "/tape", - "_phantomChildren": { - "path-parse": "1.0.6" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "tape@^4.11.0", - "name": "tape", - "escapedName": "tape", - "rawSpec": "^4.11.0", - "saveSpec": null, - "fetchSpec": "^4.11.0" - }, - "_requiredBy": [ - "/blue-tape", - "/pact-lang-api" - ], - "_resolved": "https://registry.npmjs.org/tape/-/tape-4.11.0.tgz", - "_shasum": "63d41accd95e45a23a874473051c57fdbc58edc1", - "_spec": "tape@^4.11.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/pact-lang-api", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": { - "tape": "./bin/tape" - }, - "bugs": { - "url": "https://github.com/substack/tape/issues" - }, - "bundleDependencies": false, - "dependencies": { - "deep-equal": "~1.0.1", - "defined": "~1.0.0", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.4", - "has": "~1.0.3", - "inherits": "~2.0.4", - "minimist": "~1.2.0", - "object-inspect": "~1.6.0", - "resolve": "~1.11.1", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.1.2", - "through": "~2.3.8" - }, - "deprecated": false, - "description": "tap-producing test harness for node and browsers", - "devDependencies": { - "concat-stream": "^1.6.2", - "eclint": "^2.8.1", - "eslint": "^5.16.0", - "falafel": "^2.1.0", - "js-yaml": "^3.13.1", - "tap": "^8.0.1", - "tap-parser": "^3.0.5" - }, - "directories": { - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/tape", - "keywords": [ - "tap", - "test", - "harness", - "assert", - "browser" - ], - "license": "MIT", - "main": "index.js", - "name": "tape", - "repository": { - "type": "git", - "url": "git://github.com/substack/tape.git" - }, - "scripts": { - "lint": "eslint .", - "prelint": "eclint check", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "tap test/*.js" - }, - "testling": { - "files": "test/browser/*.js", - "browsers": [ - "ie/6..latest", - "chrome/20..latest", - "firefox/10..latest", - "safari/latest", - "opera/11.0..latest", - "iphone/6", - "ipad/6" - ] - }, - "version": "4.11.0" -} diff --git a/node_modules/tape/readme.markdown b/node_modules/tape/readme.markdown deleted file mode 100644 index 1cf5a08..0000000 --- a/node_modules/tape/readme.markdown +++ /dev/null @@ -1,394 +0,0 @@ -# tape - -tap-producing test harness for node and browsers - -[![browser support](https://ci.testling.com/substack/tape.png)](http://ci.testling.com/substack/tape) - -[![build status](https://secure.travis-ci.org/substack/tape.svg?branch=master)](http://travis-ci.org/substack/tape) - -![tape](https://web.archive.org/web/20170612184731if_/http://substack.net/images/tape_drive.png) - -# example - -``` js -var test = require('tape'); - -test('timing test', function (t) { - t.plan(2); - - t.equal(typeof Date.now, 'function'); - var start = Date.now(); - - setTimeout(function () { - t.equal(Date.now() - start, 100); - }, 100); -}); -``` - -``` -$ node example/timing.js -TAP version 13 -# timing test -ok 1 should be equal -not ok 2 should be equal - --- - operator: equal - expected: 100 - actual: 107 - ... - -1..2 -# tests 2 -# pass 1 -# fail 1 -``` - -# usage - -You always need to `require('tape')` in test files. You can run the tests by -usual node means (`require('test-file.js')` or `node test-file.js`). You can -also run tests using the `tape` binary to utilize globbing, on Windows for -example: - -```sh -$ tape tests/**/*.js -``` - -`tape`'s arguments are passed to the -[`glob`](https://www.npmjs.com/package/glob) module. If you want `glob` to -perform the expansion on a system where the shell performs such expansion, quote -the arguments as necessary: - -```sh -$ tape 'tests/**/*.js' -$ tape "tests/**/*.js" -``` - -## Preloading modules - -Additionally, it is possible to make `tape` load one or more modules before running any tests, by using the `-r` or `--require` flag. Here's an example that loads [babel-register](http://babeljs.io/docs/usage/require/) before running any tests, to allow for JIT compilation: - -```sh -$ tape -r babel-register tests/**/*.js -``` - -Depending on the module you're loading, you may be able to parameterize it using environment variables or auxiliary files. Babel, for instance, will load options from [`.babelrc`](http://babeljs.io/docs/usage/babelrc/) at runtime. - -The `-r` flag behaves exactly like node's `require`, and uses the same module resolution algorithm. This means that if you need to load local modules, you have to prepend their path with `./` or `../` accordingly. - -For example: - -```sh -$ tape -r ./my/local/module tests/**/*.js -``` - -Please note that all modules loaded using the `-r` flag will run *before* any tests, regardless of when they are specified. For example, `tape -r a b -r c` will actually load `a` and `c` *before* loading `b`, since they are flagged as required modules. - -# things that go well with tape - -`tape` maintains a fairly minimal core. Additional features are usually added by using another module alongside `tape`. - -## pretty reporters - -The default TAP output is good for machines and humans that are robots. - -If you want a more colorful / pretty output there are lots of modules on npm -that will output something pretty if you pipe TAP into them: - -- [tap-spec](https://github.com/scottcorgan/tap-spec) -- [tap-dot](https://github.com/scottcorgan/tap-dot) -- [faucet](https://github.com/substack/faucet) -- [tap-bail](https://github.com/juliangruber/tap-bail) -- [tap-browser-color](https://github.com/kirbysayshi/tap-browser-color) -- [tap-json](https://github.com/gummesson/tap-json) -- [tap-min](https://github.com/derhuerst/tap-min) -- [tap-nyan](https://github.com/calvinmetcalf/tap-nyan) -- [tap-pessimist](https://www.npmjs.org/package/tap-pessimist) -- [tap-prettify](https://github.com/toolness/tap-prettify) -- [colortape](https://github.com/shuhei/colortape) -- [tap-xunit](https://github.com/aghassemi/tap-xunit) -- [tap-difflet](https://github.com/namuol/tap-difflet) -- [tape-dom](https://github.com/gritzko/tape-dom) -- [tap-diff](https://github.com/axross/tap-diff) -- [tap-notify](https://github.com/axross/tap-notify) -- [tap-summary](https://github.com/zoubin/tap-summary) -- [tap-markdown](https://github.com/Hypercubed/tap-markdown) -- [tap-html](https://github.com/gabrielcsapo/tap-html) -- [tap-react-browser](https://github.com/mcnuttandrew/tap-react-browser) -- [tap-junit](https://github.com/dhershman1/tap-junit) - -To use them, try `node test/index.js | tap-spec` or pipe it into one -of the modules of your choice! - -## uncaught exceptions - -By default, uncaught exceptions in your tests will not be intercepted, and will cause `tape` to crash. If you find this behavior undesirable, use [`tape-catch`](https://github.com/michaelrhodes/tape-catch) to report any exceptions as TAP errors. - -## other - -- CoffeeScript support with https://www.npmjs.com/package/coffeetape -- Promise support with https://www.npmjs.com/package/blue-tape or https://www.npmjs.com/package/tape-promise -- ES6 support with https://www.npmjs.com/package/babel-tape-runner or https://www.npmjs.com/package/buble-tape-runner -- Different test syntax with https://github.com/pguth/flip-tape (warning: mutates String.prototype) -- Electron test runner with https://github.com/tundrax/electron-tap -- Concurrency support with https://github.com/imsnif/mixed-tape - -# methods - -The assertion methods in `tape` are heavily influenced or copied from the methods -in [node-tap](https://github.com/isaacs/node-tap). - -```js -var test = require('tape') -``` - -## test([name], [opts], cb) - -Create a new test with an optional `name` string and optional `opts` object. -`cb(t)` fires with the new test object `t` once all preceding tests have -finished. Tests execute serially. - -Available `opts` options are: -- opts.skip = true/false. See test.skip. -- opts.timeout = 500. Set a timeout for the test, after which it will fail. See test.timeoutAfter. -- opts.objectPrintDepth = 5. Configure max depth of expected / actual object printing. Environmental variable `NODE_TAPE_OBJECT_PRINT_DEPTH` can set the desired default depth for all tests; locally-set values will take precedence. -- opts.todo = true/false. Test will be allowed to fail. - -If you forget to `t.plan()` out how many assertions you are going to run and you -don't call `t.end()` explicitly, your test will hang. - -## test.skip([name], [opts], cb) - -Generate a new test that will be skipped over. - -## test.onFinish(fn) - -The onFinish hook will get invoked when ALL `tape` tests have finished -right before `tape` is about to print the test summary. - -## test.onFailure(fn) - -The onFailure hook will get invoked whenever any `tape` tests has failed. - -## t.plan(n) - -Declare that `n` assertions should be run. `t.end()` will be called -automatically after the `n`th assertion. If there are any more assertions after -the `n`th, or after `t.end()` is called, they will generate errors. - -## t.end(err) - -Declare the end of a test explicitly. If `err` is passed in `t.end` will assert -that it is falsey. - -## t.fail(msg) - -Generate a failing assertion with a message `msg`. - -## t.pass(msg) - -Generate a passing assertion with a message `msg`. - -## t.timeoutAfter(ms) - -Automatically timeout the test after X ms. - -## t.skip(msg) - -Generate an assertion that will be skipped over. - -## t.ok(value, msg) - -Assert that `value` is truthy with an optional description of the assertion `msg`. - -Aliases: `t.true()`, `t.assert()` - -## t.notOk(value, msg) - -Assert that `value` is falsy with an optional description of the assertion `msg`. - -Aliases: `t.false()`, `t.notok()` - -## t.error(err, msg) - -Assert that `err` is falsy. If `err` is non-falsy, use its `err.message` as the -description message. - -Aliases: `t.ifError()`, `t.ifErr()`, `t.iferror()` - -## t.equal(actual, expected, msg) - -Assert that `actual === expected` with an optional description of the assertion `msg`. - -Aliases: `t.equals()`, `t.isEqual()`, `t.is()`, `t.strictEqual()`, -`t.strictEquals()` - -## t.notEqual(actual, expected, msg) - -Assert that `actual !== expected` with an optional description of the assertion `msg`. - -Aliases: `t.notEquals()`, `t.notStrictEqual()`, `t.notStrictEquals()`, -`t.isNotEqual()`, `t.isNot()`, `t.not()`, `t.doesNotEqual()`, `t.isInequal()` - -## t.deepEqual(actual, expected, msg) - -Assert that `actual` and `expected` have the same structure and nested values using -[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with strict comparisons (`===`) on leaf nodes and an optional description of the assertion `msg`. - -Aliases: `t.deepEquals()`, `t.isEquivalent()`, `t.same()` - -## t.notDeepEqual(actual, expected, msg) - -Assert that `actual` and `expected` do not have the same structure and nested values using -[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with strict comparisons (`===`) on leaf nodes and an optional description of the assertion `msg`. - -Aliases: `t.notDeepEquals`, `t.notEquivalent()`, `t.notDeeply()`, `t.notSame()`, -`t.isNotDeepEqual()`, `t.isNotDeeply()`, `t.isNotEquivalent()`, -`t.isInequivalent()` - -## t.deepLooseEqual(actual, expected, msg) - -Assert that `actual` and `expected` have the same structure and nested values using -[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with loose comparisons (`==`) on leaf nodes and an optional description of the assertion `msg`. - -Aliases: `t.looseEqual()`, `t.looseEquals()` - -## t.notDeepLooseEqual(actual, expected, msg) - -Assert that `actual` and `expected` do not have the same structure and nested values using -[node's deepEqual() algorithm](https://github.com/substack/node-deep-equal) -with loose comparisons (`==`) on leaf nodes and an optional description of the assertion `msg`. - -Aliases: `t.notLooseEqual()`, `t.notLooseEquals()` - -## t.throws(fn, expected, msg) - -Assert that the function call `fn()` throws an exception. `expected`, if present, must be a `RegExp` or `Function`. The `RegExp` matches the string representation of the exception, as generated by `err.toString()`. The `Function` is the exception thrown (e.g. `Error`). `msg` is an optional description of the assertion. - -## t.doesNotThrow(fn, expected, msg) - -Assert that the function call `fn()` does not throw an exception. `expected`, if present, limits what should not be thrown. For example, set `expected` to `/user/` to fail the test only if the string representation of the exception contains the word `user`. Any other exception would pass the test. If `expected` is omitted, any exception will fail the test. `msg` is an optional description of the assertion. - -## t.test(name, [opts], cb) - -Create a subtest with a new test handle `st` from `cb(st)` inside the current -test `t`. `cb(st)` will only fire when `t` finishes. Additional tests queued up -after `t` will not be run until all subtests finish. - -You may pass the same options that [`test()`](#testname-opts-cb) accepts. - -## t.comment(message) - -Print a message without breaking the tap output. (Useful when using e.g. `tap-colorize` where output is buffered & `console.log` will print in incorrect order vis-a-vis tap output.) - -## var htest = test.createHarness() - -Create a new test harness instance, which is a function like `test()`, but with -a new pending stack and test state. - -By default the TAP output goes to `console.log()`. You can pipe the output to -someplace else if you `htest.createStream().pipe()` to a destination stream on -the first tick. - -## test.only([name], [opts], cb) - -Like `test([name], [opts], cb)` except if you use `.only` this is the only test case -that will run for the entire process, all other test cases using `tape` will -be ignored. - -## var stream = test.createStream(opts) - -Create a stream of output, bypassing the default output stream that writes -messages to `console.log()`. By default `stream` will be a text stream of TAP -output, but you can get an object stream instead by setting `opts.objectMode` to -`true`. - -### tap stream reporter - -You can create your own custom test reporter using this `createStream()` api: - -``` js -var test = require('tape'); -var path = require('path'); - -test.createStream().pipe(process.stdout); - -process.argv.slice(2).forEach(function (file) { - require(path.resolve(file)); -}); -``` - -You could substitute `process.stdout` for whatever other output stream you want, -like a network connection or a file. - -Pass in test files to run as arguments: - -```sh -$ node tap.js test/x.js test/y.js -TAP version 13 -# (anonymous) -not ok 1 should be equal - --- - operator: equal - expected: "boop" - actual: "beep" - ... -# (anonymous) -ok 2 should be equal -ok 3 (unnamed assert) -# wheee -ok 4 (unnamed assert) - -1..4 -# tests 4 -# pass 3 -# fail 1 -``` - -### object stream reporter - -Here's how you can render an object stream instead of TAP: - -``` js -var test = require('tape'); -var path = require('path'); - -test.createStream({ objectMode: true }).on('data', function (row) { - console.log(JSON.stringify(row)) -}); - -process.argv.slice(2).forEach(function (file) { - require(path.resolve(file)); -}); -``` - -The output for this runner is: - -```sh -$ node object.js test/x.js test/y.js -{"type":"test","name":"(anonymous)","id":0} -{"id":0,"ok":false,"name":"should be equal","operator":"equal","actual":"beep","expected":"boop","error":{},"test":0,"type":"assert"} -{"type":"end","test":0} -{"type":"test","name":"(anonymous)","id":1} -{"id":0,"ok":true,"name":"should be equal","operator":"equal","actual":2,"expected":2,"test":1,"type":"assert"} -{"id":1,"ok":true,"name":"(unnamed assert)","operator":"ok","actual":true,"expected":true,"test":1,"type":"assert"} -{"type":"end","test":1} -{"type":"test","name":"wheee","id":2} -{"id":0,"ok":true,"name":"(unnamed assert)","operator":"ok","actual":true,"expected":true,"test":2,"type":"assert"} -{"type":"end","test":2} -``` - -# install - -With [npm](https://npmjs.org) do: - -```sh -npm install tape --save-dev -``` - -# license - -MIT diff --git a/node_modules/tape/test/add-subtest-async.js b/node_modules/tape/test/add-subtest-async.js deleted file mode 100644 index 12b2e2d..0000000 --- a/node_modules/tape/test/add-subtest-async.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('../'); - -test('parent', function (t) { - t.pass('parent'); - setTimeout(function () { - t.test('child', function (st) { - st.pass('child'); - st.end(); - }); - }, 100); -}); diff --git a/node_modules/tape/test/anonymous-fn.js b/node_modules/tape/test/anonymous-fn.js deleted file mode 100644 index e05b967..0000000 --- a/node_modules/tape/test/anonymous-fn.js +++ /dev/null @@ -1,49 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; -var testWrapper = require('./anonymous-fn/test-wrapper'); - -tap.test('inside anonymous functions', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - var tc = function (rows) { - var body = stripFullStack(rows.toString('utf8')); - - // Handle stack trace variation in Node v0.8 - body = body.replace( - 'at Test.module.exports', - 'at Test.' - ); - - tt.same(body, [ - 'TAP version 13', - '# wrapped test failure', - 'not ok 1 fail', - ' ---', - ' operator: fail', - ' at: ($TEST/anonymous-fn.js:$LINE:$COL)', - ' stack: |-', - ' Error: fail', - ' [... stack stripped ...]', - ' at $TEST/anonymous-fn.js:$LINE:$COL', - ' at Test. ($TEST/anonymous-fn/test-wrapper.js:$LINE:$COL)', - ' [... stack stripped ...]', - ' ...', - '', - '1..1', - '# tests 1', - '# pass 0', - '# fail 1' - ].join('\n') + '\n'); - }; - - test.createStream().pipe(concat(tc)); - - test('wrapped test failure', testWrapper(function (t) { - t.fail('fail'); - t.end(); - })); -}); diff --git a/node_modules/tape/test/anonymous-fn/test-wrapper.js b/node_modules/tape/test/anonymous-fn/test-wrapper.js deleted file mode 100644 index 38e8ba1..0000000 --- a/node_modules/tape/test/anonymous-fn/test-wrapper.js +++ /dev/null @@ -1,16 +0,0 @@ -// Example of wrapper function that would invoke tape -module.exports = function (testCase) { - return function (t) { - setUp(); - testCase(t); - tearDown(); - }; -}; - -function setUp() { - // ... example ... -} - -function tearDown() { - // ... example ... -} diff --git a/node_modules/tape/test/array.js b/node_modules/tape/test/array.js deleted file mode 100644 index dc4a4a4..0000000 --- a/node_modules/tape/test/array.js +++ /dev/null @@ -1,61 +0,0 @@ -var falafel = require('falafel'); -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -tap.test('array test', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - - test.createStream().pipe(concat(function (rows) { - tt.same(rows.toString('utf8'), [ - 'TAP version 13', - '# array', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'ok 5 should be equivalent', - '', - '1..5', - '# tests 5', - '# pass 5', - '', - '# ok' - ].join('\n') + '\n'); - })); - - test('array', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); - }); -}); diff --git a/node_modules/tape/test/bound.js b/node_modules/tape/test/bound.js deleted file mode 100644 index 58f2692..0000000 --- a/node_modules/tape/test/bound.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('../'); - -test('bind works', function (t) { - t.plan(2); - var equal = t.equal; - var deepEqual = t.deepEqual; - equal(3, 3); - deepEqual([4], [4]); - t.end(); -}); diff --git a/node_modules/tape/test/browser/asserts.js b/node_modules/tape/test/browser/asserts.js deleted file mode 100644 index a1b24f6..0000000 --- a/node_modules/tape/test/browser/asserts.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('../../'); - -test(function (t) { - t.plan(4); - t.ok(true); - t.equal(3, 1+2); - t.deepEqual([1,2,[3,4]], [1,2,[3,4]]); - t.notDeepEqual([1,2,[3,4,5]], [1,2,[3,4]]); -}); diff --git a/node_modules/tape/test/child_ordering.js b/node_modules/tape/test/child_ordering.js deleted file mode 100644 index 08d3c76..0000000 --- a/node_modules/tape/test/child_ordering.js +++ /dev/null @@ -1,54 +0,0 @@ -var test = require('../'); - -var childRan = false; - -test('parent', function (t) { - t.test('child', function (t) { - childRan = true; - t.pass('child ran'); - t.end(); - }); - t.end(); -}); - -test('uncle', function (t) { - t.ok(childRan, 'Child should run before next top-level test'); - t.end(); -}); - -var grandParentRan = false; -var parentRan = false; -var grandChildRan = false; -test('grandparent', function (t) { - t.ok(!grandParentRan, 'grand parent ran twice'); - grandParentRan = true; - t.test('parent', function (t) { - t.ok(!parentRan, 'parent ran twice'); - parentRan = true; - t.test('grandchild', function (t) { - t.ok(!grandChildRan, 'grand child ran twice'); - grandChildRan = true; - t.pass('grand child ran'); - t.end(); - }); - t.pass('parent ran'); - t.end(); - }); - t.test('other parent', function (t) { - t.ok(parentRan, 'first parent runs before second parent'); - t.ok(grandChildRan, 'grandchild runs before second parent'); - t.end(); - }); - t.pass('grandparent ran'); - t.end(); -}); - -test('second grandparent', function (t) { - t.ok(grandParentRan, 'grandparent ran'); - t.ok(parentRan, 'parent ran'); - t.ok(grandChildRan, 'grandchild ran'); - t.pass('other grandparent ran'); - t.end(); -}); - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/tape/test/circular-things.js b/node_modules/tape/test/circular-things.js deleted file mode 100644 index 88a8465..0000000 --- a/node_modules/tape/test/circular-things.js +++ /dev/null @@ -1,44 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('circular test', function (assert) { - var test = tape.createHarness({ exit : false }); - assert.plan(1); - - test.createStream().pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# circular\n' - + 'not ok 1 should be equal\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: |-\n' - + ' {}\n' - + ' actual: |-\n' - + ' { circular: [Circular] }\n' - + ' at: Test. ($TEST/circular-things.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should be equal\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/circular-things.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - })); - - test("circular", function (t) { - t.plan(1); - var circular = {}; - circular.circular = circular; - t.equal(circular, {}); - }); -}); diff --git a/node_modules/tape/test/comment.js b/node_modules/tape/test/comment.js deleted file mode 100644 index b3f9bcc..0000000 --- a/node_modules/tape/test/comment.js +++ /dev/null @@ -1,175 +0,0 @@ -var concat = require('concat-stream'); -var tap = require('tap'); -var tape = require('../'); - -// Exploratory test to ascertain proper output when no t.comment() call -// is made. -tap.test('no comment', function (assert) { - assert.plan(1); - - var verify = function (output) { - assert.equal(output.toString('utf8'), [ - 'TAP version 13', - '# no comment', - '', - '1..0', - '# tests 0', - '# pass 0', - '', - '# ok', - '' - ].join('\n')); - }; - - var test = tape.createHarness(); - test.createStream().pipe(concat(verify)); - test('no comment', function (t) { - t.end(); - }); -}); - -// Exploratory test, can we call t.comment() passing nothing? -tap.test('missing argument', function (assert) { - assert.plan(1); - var test = tape.createHarness(); - test.createStream(); - test('missing argument', function (t) { - try { - t.comment(); - t.end(); - } catch (err) { - assert.equal(err.constructor, TypeError); - } finally { - assert.end(); - } - }); -}); - -// Exploratory test, can we call t.comment() passing nothing? -tap.test('null argument', function (assert) { - assert.plan(1); - var test = tape.createHarness(); - test.createStream(); - test('null argument', function (t) { - try { - t.comment(null); - t.end(); - } catch (err) { - assert.equal(err.constructor, TypeError); - } finally { - assert.end(); - } - }); -}); - - -// Exploratory test, how is whitespace treated? -tap.test('whitespace', function (assert) { - assert.plan(1); - - var verify = function (output) { - assert.equal(output.toString('utf8'), [ - 'TAP version 13', - '# whitespace', - '# ', - '# a', - '# a', - '# a', - '', - '1..0', - '# tests 0', - '# pass 0', - '', - '# ok', - '' - ].join('\n')); - }; - - var test = tape.createHarness(); - test.createStream().pipe(concat(verify)); - test('whitespace', function (t) { - t.comment(' '); - t.comment(' a'); - t.comment('a '); - t.comment(' a '); - t.end(); - }); -}); - -// Exploratory test, how about passing types other than strings? -tap.test('non-string types', function (assert) { - assert.plan(1); - - var verify = function (output) { - assert.equal(output.toString('utf8'), [ - 'TAP version 13', - '# non-string types', - '# true', - '# false', - '# 42', - '# 6.66', - '# [object Object]', - '# [object Object]', - '# [object Object]', - '# function ConstructorFunction() {}', - '', - '1..0', - '# tests 0', - '# pass 0', - '', - '# ok', - '' - ].join('\n')); - }; - - var test = tape.createHarness(); - test.createStream().pipe(concat(verify)); - test('non-string types', function (t) { - t.comment(true); - t.comment(false); - t.comment(42); - t.comment(6.66); - t.comment({}); - t.comment({"answer": 42}); - function ConstructorFunction() {} - t.comment(new ConstructorFunction()); - t.comment(ConstructorFunction); - t.end(); - }); -}); - -tap.test('multiline string', function (assert) { - assert.plan(1); - - var verify = function (output) { - assert.equal(output.toString('utf8'), [ - 'TAP version 13', - '# multiline strings', - '# a', - '# b', - '# c', - '# d', - '', - '1..0', - '# tests 0', - '# pass 0', - '', - '# ok', - '' - ].join('\n')); - }; - - var test = tape.createHarness(); - test.createStream().pipe(concat(verify)); - test('multiline strings', function (t) { - t.comment([ - 'a', - 'b', - ].join('\n')); - t.comment([ - 'c', - 'd', - ].join('\r\n')); - t.end(); - }); -}); diff --git a/node_modules/tape/test/common.js b/node_modules/tape/test/common.js deleted file mode 100644 index 39b1240..0000000 --- a/node_modules/tape/test/common.js +++ /dev/null @@ -1,63 +0,0 @@ -var path = require('path'); -var yaml = require('js-yaml'); - -module.exports.getDiag = function (body) { - var yamlStart = body.indexOf(' ---'); - var yamlEnd = body.indexOf(' ...\n'); - var diag = body.slice(yamlStart, yamlEnd).split('\n').map(function (line) { - return line.slice(2); - }).join('\n'); - - // The stack trace and at variable will vary depending on where the code - // is run, so just strip it out. - var withStack = yaml.safeLoad(diag); - delete withStack.stack; - delete withStack.at; - return withStack; -}; - -// There are three challenges associated with checking the stack traces included -// in errors: -// 1) The base checkout directory of tape might change. Because stack traces -// include absolute paths, the stack traces will change depending on the -// checkout path. We handle this by replacing the base test directory with a -// placeholder $TEST variable and the package root with a placehodler -// $TAPE variable. -// 2) Line positions within the file might change. We handle this by replacing -// line and column markers with placeholder $LINE and $COL "variables" -// a) node 0.8 does not provide nested eval line numbers, so we remove them -// 3) Stacks themselves change frequently with refactoring. We've even run into -// issues with node library refactorings "breaking" stack traces. Most of -// these changes are irrelevant to the tests themselves. To counter this, we -// strip out all stack frames that aren't directly under our test directory, -// and replace them with placeholders. -module.exports.stripFullStack = function (output) { - var stripped = ' [... stack stripped ...]'; - var withDuplicates = output.split('\n').map(function (line) { - var m = line.match(/[ ]{8}at .*\((.*)\)/); - - var stripChangingData = function (line) { - var withoutTestDir = line.replace(__dirname, '$TEST'); - var withoutPackageDir = withoutTestDir.replace(path.dirname(__dirname), '$TAPE'); - var withoutPathSep = withoutPackageDir.replace(new RegExp('\\' + path.sep, 'g'), '/'); - var withoutLineNumbers = withoutPathSep.replace(/:\d+:\d+/g, ':$LINE:$COL'); - var withoutNestedLineNumbers = withoutLineNumbers.replace(/, \:\$LINE:\$COL\)$/, ')'); - return withoutNestedLineNumbers; - }; - - if (m) { - if (m[1].slice(0, __dirname.length) === __dirname) { - return stripChangingData(line); - } - return stripped; - } - return stripChangingData(line); - }); - - var deduped = withDuplicates.filter(function (line, ix) { - var hasPrior = line === stripped && withDuplicates[ix - 1] === stripped; - return !hasPrior; - }); - - return deduped.join('\n'); -}; diff --git a/node_modules/tape/test/create_multiple_streams.js b/node_modules/tape/test/create_multiple_streams.js deleted file mode 100644 index 53f4309..0000000 --- a/node_modules/tape/test/create_multiple_streams.js +++ /dev/null @@ -1,31 +0,0 @@ -var tape = require('../'); - -tape.test('createMultipleStreams', function (tt) { - tt.plan(2); - - var th = tape.createHarness(); - th.createStream(); - th.createStream(); - - var testOneComplete = false; - - th('test one', function (tht) { - tht.plan(1); - setTimeout( function () { - tht.pass(); - testOneComplete = true; - }, 100); - }); - - th('test two', function (tht) { - tht.ok(testOneComplete, 'test 1 completed before test 2'); - tht.end(); - }); - - th.onFinish(function () { - tt.equal(th._results.count, 2, "harness test ran"); - tt.equal(th._results.fail, 0, "harness test didn't fail"); - }); -}); - - diff --git a/node_modules/tape/test/deep-equal-failure.js b/node_modules/tape/test/deep-equal-failure.js deleted file mode 100644 index c6fa3f6..0000000 --- a/node_modules/tape/test/deep-equal-failure.js +++ /dev/null @@ -1,191 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); -var tapParser = require('tap-parser'); -var common = require('./common'); - -var getDiag = common.getDiag; -var stripFullStack = common.stripFullStack; - -tap.test('deep equal failure', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# deep equal\n' - + 'not ok 1 should be equal\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: |-\n' - + ' { b: 2 }\n' - + ' actual: |-\n' - + ' { a: 1 }\n' - + ' at: Test. ($TEST/deep-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should be equal\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/deep-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'equal', - expected: '{ b: 2 }', - actual: '{ a: 1 }' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should be equal', - diag: { - operator: 'equal', - expected: '{ b: 2 }', - actual: '{ a: 1 }' - } - }); - }); - - test("deep equal", function (t) { - t.plan(1); - t.equal({a: 1}, {b: 2}); - }); -}); - -tap.test('deep equal failure, depth 6, with option', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# deep equal\n' - + 'not ok 1 should be equal\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: |-\n' - + ' { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }\n' - + ' actual: |-\n' - + ' { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }\n' - + ' at: Test. ($TEST/deep-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should be equal\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/deep-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'equal', - expected: '{ a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should be equal', - diag: { - operator: 'equal', - expected: '{ a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }' - } - }); - }); - - test("deep equal", {objectPrintDepth: 6}, function (t) { - t.plan(1); - t.equal({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }); - }); -}); - -tap.test('deep equal failure, depth 6, without option', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# deep equal\n' - + 'not ok 1 should be equal\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: |-\n' - + ' { a: { a1: { a2: { a3: { a4: [Object] } } } } }\n' - + ' actual: |-\n' - + ' { a: { a1: { a2: { a3: { a4: [Object] } } } } }\n' - + ' at: Test. ($TEST/deep-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should be equal\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/deep-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'equal', - expected: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should be equal', - diag: { - operator: 'equal', - expected: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }' - } - }); - }); - - test("deep equal", function (t) { - t.plan(1); - t.equal({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }); - }); -}); diff --git a/node_modules/tape/test/deep.js b/node_modules/tape/test/deep.js deleted file mode 100644 index 909ebe1..0000000 --- a/node_modules/tape/test/deep.js +++ /dev/null @@ -1,17 +0,0 @@ -var test = require('../'); - -test('deep strict equal', function (t) { - t.notDeepEqual( - [ { a: '3' } ], - [ { a: 3 } ] - ); - t.end(); -}); - -test('deep loose equal', function (t) { - t.deepLooseEqual( - [ { a: '3' } ], - [ { a: 3 } ] - ); - t.end(); -}); diff --git a/node_modules/tape/test/default-messages.js b/node_modules/tape/test/default-messages.js deleted file mode 100644 index dcfdbff..0000000 --- a/node_modules/tape/test/default-messages.js +++ /dev/null @@ -1,31 +0,0 @@ -var tap = require('tap'); -var path = require('path'); -var spawn = require('child_process').spawn; -var concat = require('concat-stream'); - -tap.test('default messages', function (t) { - t.plan(1); - - var ps = spawn(process.execPath, [path.join(__dirname, 'messages', 'defaults.js')]); - - ps.stdout.pipe(concat(function (rows) { - - t.same(rows.toString('utf8'), [ - 'TAP version 13', - '# default messages', - 'ok 1 should be truthy', - 'ok 2 should be falsy', - 'ok 3 should be equal', - 'ok 4 should not be equal', - 'ok 5 should be equivalent', - 'ok 6 should be equivalent', - 'ok 7 should be equivalent', - '', - '1..7', - '# tests 7', - '# pass 7', - '', - '# ok' - ].join('\n') + '\n\n'); - })); -}); diff --git a/node_modules/tape/test/double_end.js b/node_modules/tape/test/double_end.js deleted file mode 100644 index b2fbc5b..0000000 --- a/node_modules/tape/test/double_end.js +++ /dev/null @@ -1,60 +0,0 @@ -var test = require('tap').test; -var path = require('path'); -var concat = require('concat-stream'); -var spawn = require('child_process').spawn; - -var stripFullStack = require('./common').stripFullStack; - -test(function (t) { - t.plan(2); - var ps = spawn(process.execPath, [path.join(__dirname, 'double_end', 'double.js')]); - ps.on('exit', function (code) { - t.equal(code, 1); - }); - ps.stdout.pipe(concat(function (body) { - // The implementation of node's timer library has changed over time. We - // need to reverse engineer the error we expect to see. - - // This code is unfortunately by necessity highly coupled to node - // versions, and may require tweaking with future versions of the timers - // library. - function doEnd() { throw new Error(); }; - var to = setTimeout(doEnd, 5000); - clearTimeout(to); - to._onTimeout = doEnd; - - var stackExpected; - var atExpected; - try { - to._onTimeout(); - } - catch (e) { - stackExpected = stripFullStack(e.stack).split('\n')[1]; - stackExpected = stackExpected.replace('double_end.js', 'double_end/double.js'); - stackExpected = stackExpected.trim(); - atExpected = stackExpected.replace(/^at\s+/, 'at: '); - } - - var stripped = stripFullStack(body.toString('utf8')); - t.equal(stripped, [ - 'TAP version 13', - '# double end', - 'ok 1 should be equal', - 'not ok 2 .end() called twice', - ' ---', - ' operator: fail', - ' ' + atExpected, - ' stack: |-', - ' Error: .end() called twice', - ' [... stack stripped ...]', - ' ' + stackExpected, - ' [... stack stripped ...]', - ' ...', - '', - '1..2', - '# tests 2', - '# pass 1', - '# fail 1', - ].join('\n') + '\n\n'); - })); -}); diff --git a/node_modules/tape/test/double_end/double.js b/node_modules/tape/test/double_end/double.js deleted file mode 100644 index 43929e5..0000000 --- a/node_modules/tape/test/double_end/double.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('../../'); - -test('double end', function (t) { - function doEnd() { - t.end(); - } - - t.equal(1 + 1, 2); - t.end(); - setTimeout(doEnd, 5); -}); diff --git a/node_modules/tape/test/end-as-callback.js b/node_modules/tape/test/end-as-callback.js deleted file mode 100644 index a978688..0000000 --- a/node_modules/tape/test/end-as-callback.js +++ /dev/null @@ -1,88 +0,0 @@ -var tap = require("tap"); -var forEach = require("for-each"); -var tape = require("../"); -var concat = require('concat-stream'); - -tap.test("tape assert.end as callback", function (tt) { - var test = tape.createHarness({ exit: false }); - - test.createStream().pipe(concat(function (rows) { - tt.equal(rows.toString('utf8'), [ - 'TAP version 13', - '# do a task and write', - 'ok 1 null', - 'ok 2 should be equal', - '# do a task and write fail', - 'ok 3 null', - 'ok 4 should be equal', - 'not ok 5 Error: fail', - getStackTrace(rows), // tap error stack - '', - '1..5', - '# tests 5', - '# pass 4', - '# fail 1' - ].join('\n') + '\n'); - tt.end(); - })); - - test("do a task and write", function (assert) { - fakeAsyncTask("foo", function (err, value) { - assert.ifError(err); - assert.equal(value, "taskfoo"); - - fakeAsyncWrite("bar", assert.end); - }); - }); - - test("do a task and write fail", function (assert) { - fakeAsyncTask("bar", function (err, value) { - assert.ifError(err); - assert.equal(value, "taskbar"); - - fakeAsyncWriteFail("baz", assert.end); - }); - }); -}); - -function fakeAsyncTask(name, cb) { - cb(null, "task" + name); -} - -function fakeAsyncWrite(name, cb) { - cb(null); -} - -function fakeAsyncWriteFail(name, cb) { - cb(new Error("fail")); -} - -/** - * extract the stack trace for the failed test. - * this will change dependent on the environment - * so no point hard-coding it in the test assertion - * see: https://git.io/v6hGG for example - * @param String rows - the tap output lines - * @returns String stacktrace - just the error stack part - */ -function getStackTrace(rows) { - var stacktrace = ' ---\n'; - var extract = false; - forEach(rows.toString('utf8').split('\n'), function (row) { - if (!extract) { - if (row.indexOf('---') > -1) { // start of stack trace - extract = true; - } - } else { - if (row.indexOf('...') > -1) { // end of stack trace - extract = false; - stacktrace += ' ...'; - } else { - stacktrace += row + '\n'; - } - - } - }); - // console.log(stacktrace); - return stacktrace; -} diff --git a/node_modules/tape/test/exit.js b/node_modules/tape/test/exit.js deleted file mode 100644 index 90bf3a8..0000000 --- a/node_modules/tape/test/exit.js +++ /dev/null @@ -1,204 +0,0 @@ -var tap = require('tap'); -var path = require('path'); -var spawn = require('child_process').spawn; -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('exit ok', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(rows.toString('utf8'), [ - 'TAP version 13', - '# array', - '# hi', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'ok 5 should be equivalent', - '', - '1..5', - '# tests 5', - '# pass 5', - '', - '# ok', - '', // yes, these double-blank-lines at the end are required. - '' // if you can figure out how to remove them, please do! - ].join('\n')); - }; - - var ps = spawn(process.execPath, [path.join(__dirname, 'exit', 'ok.js')]); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); - -tap.test('exit fail', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# array', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'not ok 5 should be equivalent', - ' ---', - ' operator: deepEqual', - ' expected: [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]', - ' actual: [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]', - ' at: ($TEST/exit/fail.js:$LINE:$COL)', - ' stack: |-', - ' Error: should be equivalent', - ' [... stack stripped ...]', - ' at $TEST/exit/fail.js:$LINE:$COL', - ' at eval (eval at ($TEST/exit/fail.js:$LINE:$COL))', - ' at eval (eval at ($TEST/exit/fail.js:$LINE:$COL))', - ' at Test. ($TEST/exit/fail.js:$LINE:$COL)', - ' [... stack stripped ...]', - ' ...', - '', - '1..5', - '# tests 5', - '# pass 4', - '# fail 1' - ].join('\n') + '\n\n'); - }; - - var ps = spawn(process.execPath, [path.join(__dirname, 'exit', 'fail.js')]); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.notEqual(code, 0); - }); -}); - -tap.test('too few exit', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# array', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'ok 5 should be equivalent', - 'not ok 6 plan != count', - ' ---', - ' operator: fail', - ' expected: 6', - ' actual: 5', - ' at: process. ($TAPE/index.js:$LINE:$COL)', - ' stack: |-', - ' Error: plan != count', - ' [... stack stripped ...]', - ' ...', - '', - '1..6', - '# tests 6', - '# pass 5', - '# fail 1' - ].join('\n') + '\n\n'); - }; - - var ps = spawn(process.execPath, [path.join(__dirname, '/exit/too_few.js')]); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.notEqual(code, 0); - }); -}); - -tap.test('more planned in a second test', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# first', - 'ok 1 should be truthy', - '# second', - 'ok 2 should be truthy', - 'not ok 3 plan != count', - ' ---', - ' operator: fail', - ' expected: 2', - ' actual: 1', - ' at: process. ($TAPE/index.js:$LINE:$COL)', - ' stack: |-', - ' Error: plan != count', - ' [... stack stripped ...]', - ' ...', - '', - '1..3', - '# tests 3', - '# pass 2', - '# fail 1' - ].join('\n') + '\n\n'); - }; - - var ps = spawn(process.execPath, [path.join(__dirname, '/exit/second.js')]); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.notEqual(code, 0); - }); -}); - -tap.test('todo passing', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# TODO todo pass', - 'ok 1 should be truthy # TODO', - '', - '1..1', - '# tests 1', - '# pass 1', - '', - '# ok' - ].join('\n') + '\n\n'); - }; - - var ps = spawn(process.execPath, [path.join(__dirname, '/exit/todo.js')]); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); - -tap.test('todo failing', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# TODO todo fail', - 'not ok 1 should be truthy # TODO', - ' ---', - ' operator: ok', - ' expected: true', - ' actual: false', - ' at: Test. ($TEST/exit/todo_fail.js:$LINE:$COL)', - ' ...', - '', - '1..1', - '# tests 1', - '# pass 1', - '', - '# ok' - ].join('\n') + '\n\n'); - }; - - var ps = spawn(process.execPath, [path.join(__dirname, '/exit/todo_fail.js')]); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); diff --git a/node_modules/tape/test/exit/fail.js b/node_modules/tape/test/exit/fail.js deleted file mode 100644 index 07a65ca..0000000 --- a/node_modules/tape/test/exit/fail.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('../../'); -var falafel = require('falafel'); - -test('array', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/test/exit/ok.js b/node_modules/tape/test/exit/ok.js deleted file mode 100644 index 6d405c7..0000000 --- a/node_modules/tape/test/exit/ok.js +++ /dev/null @@ -1,36 +0,0 @@ -var falafel = require('falafel'); -var test = require('../../'); - -test('array', function (t) { - t.comment('hi'); - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/test/exit/second.js b/node_modules/tape/test/exit/second.js deleted file mode 100644 index 8a206bb..0000000 --- a/node_modules/tape/test/exit/second.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('../../'); - -test('first', function (t) { - t.plan(1); - t.ok(true); -}); - -test('second', function (t) { - t.plan(2); - t.ok(true); -}); diff --git a/node_modules/tape/test/exit/todo.js b/node_modules/tape/test/exit/todo.js deleted file mode 100644 index acbf960..0000000 --- a/node_modules/tape/test/exit/todo.js +++ /dev/null @@ -1,6 +0,0 @@ -var test = require('../../'); - -test('todo pass', { todo: true }, function (t) { - t.plan(1); - t.ok(true); -}); diff --git a/node_modules/tape/test/exit/todo_fail.js b/node_modules/tape/test/exit/todo_fail.js deleted file mode 100644 index f8ffa67..0000000 --- a/node_modules/tape/test/exit/todo_fail.js +++ /dev/null @@ -1,6 +0,0 @@ -var test = require('../../'); - -test('todo fail', { todo: true }, function (t) { - t.plan(1); - t.ok(false); -}); diff --git a/node_modules/tape/test/exit/too_few.js b/node_modules/tape/test/exit/too_few.js deleted file mode 100644 index 68ba71d..0000000 --- a/node_modules/tape/test/exit/too_few.js +++ /dev/null @@ -1,35 +0,0 @@ -var falafel = require('falafel'); -var test = require('../../'); - -test('array', function (t) { - t.plan(6); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); -}); diff --git a/node_modules/tape/test/exposed-harness.js b/node_modules/tape/test/exposed-harness.js deleted file mode 100644 index 1056ddb..0000000 --- a/node_modules/tape/test/exposed-harness.js +++ /dev/null @@ -1,12 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); - -tap.test('main harness object is exposed', function (assert) { - - assert.equal(typeof tape.getHarness, 'function', 'tape.getHarness is a function'); - - assert.equal(tape.getHarness()._results.pass, 0); - - assert.end(); - -}); diff --git a/node_modules/tape/test/fail.js b/node_modules/tape/test/fail.js deleted file mode 100644 index 133359c..0000000 --- a/node_modules/tape/test/fail.js +++ /dev/null @@ -1,78 +0,0 @@ -var falafel = require('falafel'); -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('array test', function (tt) { - tt.plan(1); - - var test = tape.createHarness({ exit : false }); - var tc = function (rows) { - tt.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# array', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'not ok 5 should be equivalent', - ' ---', - ' operator: deepEqual', - ' expected: [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]', - ' actual: [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]', - ' at: ($TEST/fail.js:$LINE:$COL)', - ' stack: |-', - ' Error: should be equivalent', - ' [... stack stripped ...]', - ' at $TEST/fail.js:$LINE:$COL', - ' at eval (eval at ($TEST/fail.js:$LINE:$COL))', - ' at eval (eval at ($TEST/fail.js:$LINE:$COL))', - ' at Test. ($TEST/fail.js:$LINE:$COL)', - ' [... stack stripped ...]', - ' ...', - '', - '1..5', - '# tests 5', - '# pass 4', - '# fail 1', - '' - ].join('\n')); - }; - - test.createStream().pipe(concat(tc)); - - test('array', function (t) { - t.plan(5); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4444 ] ], [ 5, 6 ] ]); - } - ); - }); -}); diff --git a/node_modules/tape/test/has spaces.js b/node_modules/tape/test/has spaces.js deleted file mode 100644 index 19a2b9e..0000000 --- a/node_modules/tape/test/has spaces.js +++ /dev/null @@ -1,40 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('array test', function (tt) { - tt.plan(1); - - var test = tape.createHarness({ exit : false }); - var tc = function (rows) { - tt.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# fail', - 'not ok 1 this should fail', - ' ---', - ' operator: fail', - ' at: Test. ($TEST/has spaces.js:$LINE:$COL)', - ' stack: |-', - ' Error: this should fail', - ' [... stack stripped ...]', - ' at Test. ($TEST/has spaces.js:$LINE:$COL)', - ' [... stack stripped ...]', - ' ...', - '', - '1..1', - '# tests 1', - '# pass 0', - '# fail 1', - '' - ].join('\n')); - }; - - test.createStream().pipe(concat(tc)); - - test('fail', function (t) { - t.fail('this should fail'); - t.end(); - }); -}); diff --git a/node_modules/tape/test/many.js b/node_modules/tape/test/many.js deleted file mode 100644 index d6e8515..0000000 --- a/node_modules/tape/test/many.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('../'); - -test('many tests', function (t) { - t.plan(100); - for (var i = 0; i < 100; i++) { - setTimeout(function () { t.pass(); }, Math.random() * 50); - } -}); diff --git a/node_modules/tape/test/max_listeners.js b/node_modules/tape/test/max_listeners.js deleted file mode 100644 index e807cdb..0000000 --- a/node_modules/tape/test/max_listeners.js +++ /dev/null @@ -1,10 +0,0 @@ -var spawn = require('child_process').spawn; -var path = require('path'); - -var ps = spawn(process.execPath, [path.join(__dirname, 'max_listeners', 'source.js')]); - -ps.stdout.pipe(process.stdout, { end : false }); - -ps.stderr.on('data', function (buf) { - console.log('not ok ' + buf); -}); diff --git a/node_modules/tape/test/max_listeners/source.js b/node_modules/tape/test/max_listeners/source.js deleted file mode 100644 index 2179f97..0000000 --- a/node_modules/tape/test/max_listeners/source.js +++ /dev/null @@ -1,5 +0,0 @@ -var test = require('../../'); - -for (var i = 0; i < 11; i ++) { - test(function (t) { t.ok(true, 'true is truthy'); t.end(); }); -} diff --git a/node_modules/tape/test/messages/defaults.js b/node_modules/tape/test/messages/defaults.js deleted file mode 100644 index 836a34a..0000000 --- a/node_modules/tape/test/messages/defaults.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('../../'); - -test('default messages', function (t) { - t.plan(7); - t.ok(true); - t.notOk(false); - t.equal(true, true); - t.notEqual(true, false); - t.deepEqual(true, true); - t.deepLooseEqual(true, true); - t.notDeepLooseEqual(true, false); -}); diff --git a/node_modules/tape/test/nested-async-plan-noend.js b/node_modules/tape/test/nested-async-plan-noend.js deleted file mode 100644 index 1acc141..0000000 --- a/node_modules/tape/test/nested-async-plan-noend.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('../'); - -test('Harness async test support', function (t) { - t.plan(3); - - t.ok(true, 'sync child A'); - - t.test('sync child B', function (tt) { - tt.plan(2); - - setTimeout(function () { - tt.test('async grandchild A', function (ttt) { - ttt.plan(1); - ttt.ok(true); - }); - }, 50); - - setTimeout(function () { - tt.test('async grandchild B', function (ttt) { - ttt.plan(1); - ttt.ok(true); - }); - }, 100); - }); - - setTimeout(function () { - t.test('async child', function (tt) { - tt.plan(2); - tt.ok(true, 'sync grandchild in async child A'); - tt.test('sync grandchild in async child B', function (ttt) { - ttt.plan(1); - ttt.ok(true); - }); - }); - }, 200); -}); diff --git a/node_modules/tape/test/nested-sync-noplan-noend.js b/node_modules/tape/test/nested-sync-noplan-noend.js deleted file mode 100644 index c0e5d4a..0000000 --- a/node_modules/tape/test/nested-sync-noplan-noend.js +++ /dev/null @@ -1,43 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -tap.test('nested sync test without plan or end', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - var tc = function (rows) { - tt.same(rows.toString('utf8'), [ - 'TAP version 13', - '# nested without plan or end', - '# first', - 'ok 1 should be truthy', - '# second', - 'ok 2 should be truthy', - '', - '1..2', - '# tests 2', - '# pass 2', - '', - '# ok' - ].join('\n') + '\n'); - }; - - test.createStream().pipe(concat(tc)); - - test('nested without plan or end', function (t) { - t.test('first', function (q) { - setTimeout(function first() { - q.ok(true); - q.end(); - }, 10); - }); - t.test('second', function (q) { - setTimeout(function second() { - q.ok(true); - q.end(); - }, 10); - }); - }); - -}); diff --git a/node_modules/tape/test/nested.js b/node_modules/tape/test/nested.js deleted file mode 100644 index 4682259..0000000 --- a/node_modules/tape/test/nested.js +++ /dev/null @@ -1,83 +0,0 @@ -var falafel = require('falafel'); -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -tap.test('array test', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - var tc = function (rows) { - tt.same(rows.toString('utf8'), [ - 'TAP version 13', - '# nested array test', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'ok 5 should be equivalent', - '# inside test', - 'ok 6 should be truthy', - 'ok 7 should be truthy', - '# another', - 'ok 8 should be truthy', - '', - '1..8', - '# tests 8', - '# pass 8', - '', - '# ok' - ].join('\n') + '\n'); - }; - - test.createStream().pipe(concat(tc)); - - test('nested array test', function (t) { - t.plan(6); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - t.test('inside test', function (q) { - q.plan(2); - q.ok(true); - - setTimeout(function () { - q.ok(true); - }, 100); - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); - }); - - test('another', function (t) { - t.plan(1); - setTimeout(function () { - t.ok(true); - }, 50); - }); -}); diff --git a/node_modules/tape/test/nested2.js b/node_modules/tape/test/nested2.js deleted file mode 100644 index 1612b9b..0000000 --- a/node_modules/tape/test/nested2.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('../'); - -test(function (t) { - var i = 0; - t.test('setup', function (t) { - process.nextTick(function () { - t.equal(i, 0, 'called once'); - i++; - t.end(); - }); - }); - - - t.test('teardown', function (t) { - t.end(); - }); - - t.end(); -}); diff --git a/node_modules/tape/test/no_callback.js b/node_modules/tape/test/no_callback.js deleted file mode 100644 index 760ff26..0000000 --- a/node_modules/tape/test/no_callback.js +++ /dev/null @@ -1,3 +0,0 @@ -var test = require('../'); - -test('No callback.'); diff --git a/node_modules/tape/test/not-deep-equal-failure.js b/node_modules/tape/test/not-deep-equal-failure.js deleted file mode 100644 index 305029c..0000000 --- a/node_modules/tape/test/not-deep-equal-failure.js +++ /dev/null @@ -1,191 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); -var tapParser = require('tap-parser'); -var common = require('./common'); - -var getDiag = common.getDiag; -var stripFullStack = common.stripFullStack; - -tap.test('deep equal failure', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# not deep equal\n' - + 'not ok 1 should not be equivalent\n' - + ' ---\n' - + ' operator: notDeepEqual\n' - + ' expected: |-\n' - + ' { b: 2 }\n' - + ' actual: |-\n' - + ' { b: 2 }\n' - + ' at: Test. ($TEST/not-deep-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should not be equivalent\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/not-deep-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'notDeepEqual', - expected: '{ b: 2 }', - actual: '{ b: 2 }' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should not be equivalent', - diag: { - operator: 'notDeepEqual', - expected: '{ b: 2 }', - actual: '{ b: 2 }' - } - }); - }); - - test("not deep equal", function (t) { - t.plan(1); - t.notDeepEqual({b: 2}, {b: 2}); - }); -}); - -tap.test('not deep equal failure, depth 6, with option', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# not deep equal\n' - + 'not ok 1 should not be equivalent\n' - + ' ---\n' - + ' operator: notDeepEqual\n' - + ' expected: |-\n' - + ' { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }\n' - + ' actual: |-\n' - + ' { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }\n' - + ' at: Test. ($TEST/not-deep-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should not be equivalent\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/not-deep-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'notDeepEqual', - expected: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should not be equivalent', - diag: { - operator: 'notDeepEqual', - expected: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }' - } - }); - }); - - test("not deep equal", {objectPrintDepth: 6}, function (t) { - t.plan(1); - t.notDeepEqual({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }); - }); -}); - -tap.test('not deep equal failure, depth 6, without option', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# not deep equal\n' - + 'not ok 1 should not be equivalent\n' - + ' ---\n' - + ' operator: notDeepEqual\n' - + ' expected: |-\n' - + ' { a: { a1: { a2: { a3: { a4: [Object] } } } } }\n' - + ' actual: |-\n' - + ' { a: { a1: { a2: { a3: { a4: [Object] } } } } }\n' - + ' at: Test. ($TEST/not-deep-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should not be equivalent\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/not-deep-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'notDeepEqual', - expected: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should not be equivalent', - diag: { - operator: 'notDeepEqual', - expected: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }', - actual: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }' - } - }); - }); - - test("not deep equal", function (t) { - t.plan(1); - t.notDeepEqual({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }); - }); -}); diff --git a/node_modules/tape/test/not-equal-failure.js b/node_modules/tape/test/not-equal-failure.js deleted file mode 100644 index d007b37..0000000 --- a/node_modules/tape/test/not-equal-failure.js +++ /dev/null @@ -1,67 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); -var tapParser = require('tap-parser'); -var common = require('./common'); - -var getDiag = common.getDiag; -var stripFullStack = common.stripFullStack; - -tap.test('not equal failure', function (assert) { - var test = tape.createHarness({ exit : false }); - var stream = test.createStream(); - var parser = tapParser(); - assert.plan(3); - - stream.pipe(parser); - stream.pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# not equal\n' - + 'not ok 1 should not be equal\n' - + ' ---\n' - + ' operator: notEqual\n' - + ' expected: 2\n' - + ' actual: 2\n' - + ' at: Test. ($TEST/not-equal-failure.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should not be equal\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/not-equal-failure.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - assert.deepEqual(getDiag(body), { - operator: 'notEqual', - expected: '2', - actual: '2' - }); - })); - - parser.once('assert', function (data) { - delete data.diag.stack; - delete data.diag.at; - assert.deepEqual(data, { - ok: false, - id: 1, - name: 'should not be equal', - diag: { - operator: 'notEqual', - expected: '2', - actual: '2' - } - }); - }); - - test("not equal", function (t) { - t.plan(1); - t.notEqual(2, 2); - }); -}); diff --git a/node_modules/tape/test/objectMode.js b/node_modules/tape/test/objectMode.js deleted file mode 100644 index d9e1f6e..0000000 --- a/node_modules/tape/test/objectMode.js +++ /dev/null @@ -1,70 +0,0 @@ -var tap = require('tap'); -var tape = require('../'); -var forEach = require('for-each'); -var through = require('through'); - -tap.test('object results', function (assert) { - var printer = through({ objectMode: true }); - var objects = []; - - printer.write = function (obj) { - objects.push(obj); - }; - - printer.end = function (obj) { - if (obj) objects.push(obj); - - var todos = 0; - var skips = 0; - var testIds = []; - var endIds = []; - var asserts = 0; - - assert.equal(objects.length, 13); - - forEach(objects, function (obj) { - if (obj.type === 'assert') { - asserts++; - } else if (obj.type === 'test') { - testIds.push(obj.id); - - if (obj.skip) { - skips++; - } else if (obj.todo) { - todos++; - } - } else if (obj.type === 'end') { - endIds.push(obj.text); - // test object should exist - assert.notEqual(testIds.indexOf(obj.test), -1); - } - }); - - assert.equal(asserts, 5); - assert.equal(skips, 1); - assert.equal(todos, 2); - assert.equal(testIds.length, endIds.length); - assert.end(); - }; - - tape.createStream({ objectMode: true }) - .pipe(printer); - - tape('parent', function (t1) { - t1.equal(true, true); - t1.test('child1', {skip: true}, function (t2) { - t2.equal(true, true); - t2.equal(true, false); - t2.end(); - }); - t1.test('child2', {todo: true}, function (t3) { - t3.equal(true, false); - t3.equal(true, true); - t3.end(); - }); - t1.test('child3', {todo: true}); - t1.equal(true, true); - t1.equal(true, true); - t1.end(); - }); -}); diff --git a/node_modules/tape/test/onFailure.js b/node_modules/tape/test/onFailure.js deleted file mode 100644 index 518c373..0000000 --- a/node_modules/tape/test/onFailure.js +++ /dev/null @@ -1,21 +0,0 @@ -var tap = require("tap"); -var tape = require("../").createHarness(); - -//Because this test passing depends on a failure, -//we must direct the failing output of the inner test -var noop = function () {}; -var mockSink = {on:noop, removeListener:noop, emit:noop, end:noop}; -tape.createStream().pipe(mockSink); - -tap.test("on failure", { timeout: 1000 }, function (tt) { - tt.plan(1); - - tape("dummy test", function (t) { - t.fail(); - t.end(); - }); - - tape.onFailure(function () { - tt.pass("tape ended"); - }); -}); diff --git a/node_modules/tape/test/onFinish.js b/node_modules/tape/test/onFinish.js deleted file mode 100644 index 80ccf05..0000000 --- a/node_modules/tape/test/onFinish.js +++ /dev/null @@ -1,12 +0,0 @@ -var tap = require("tap"); -var tape = require("../"); - -tap.test("on finish", {timeout: 1000}, function (tt) { - tt.plan(1); - tape.onFinish(function () { - tt.pass('tape ended'); - }); - tape('dummy test', function (t) { - t.end(); - }); -}); diff --git a/node_modules/tape/test/only-twice.js b/node_modules/tape/test/only-twice.js deleted file mode 100644 index 50eea1e..0000000 --- a/node_modules/tape/test/only-twice.js +++ /dev/null @@ -1,20 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); - -tap.test('only twice error', function (assert) { - var test = tape.createHarness({ exit : false }); - - test.only("first only", function (t) { - t.end(); - }); - - assert.throws(function () { - test.only('second only', function (t) { - t.end(); - }); - }, { - name: 'Error', - message: 'there can only be one only test' - }); - assert.end(); -}); diff --git a/node_modules/tape/test/only.js b/node_modules/tape/test/only.js deleted file mode 100644 index bcfc905..0000000 --- a/node_modules/tape/test/only.js +++ /dev/null @@ -1,45 +0,0 @@ -var tap = require('tap'); -var tape = require('../'); -var concat = require('concat-stream'); - -tap.test('tape only test', function (tt) { - var test = tape.createHarness({ exit: false }); - var ran = []; - - var tc = function (rows) { - tt.deepEqual(rows.toString('utf8'), [ - 'TAP version 13', - '# run success', - 'ok 1 assert name', - '', - '1..1', - '# tests 1', - '# pass 1', - '', - '# ok' - ].join('\n') + '\n'); - tt.deepEqual(ran, [ 3 ]); - - tt.end(); - }; - - test.createStream().pipe(concat(tc)); - - test("never run fail", function (t) { - ran.push(1); - t.equal(true, false); - t.end(); - }); - - test("never run success", function (t) { - ran.push(2); - t.equal(true, true); - t.end(); - }); - - test.only("run success", function (t) { - ran.push(3); - t.ok(true, "assert name"); - t.end(); - }); -}); diff --git a/node_modules/tape/test/only2.js b/node_modules/tape/test/only2.js deleted file mode 100644 index fcf4f43..0000000 --- a/node_modules/tape/test/only2.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('../'); - -test('only2 test 1', function (t) { - t.end(); -}); - -test.only('only2 test 2', function (t) { - t.end(); -}); diff --git a/node_modules/tape/test/only3.js b/node_modules/tape/test/only3.js deleted file mode 100644 index b192a4e..0000000 --- a/node_modules/tape/test/only3.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('../'); - -test('only3 test 1', function (t) { - t.fail('not 1'); - t.end(); -}); - -test.only('only3 test 2', function (t) { - t.end(); -}); - -test('only3 test 3', function (t) { - t.fail('not 3'); - t.end(); -}); diff --git a/node_modules/tape/test/only4.js b/node_modules/tape/test/only4.js deleted file mode 100644 index d570b5b..0000000 --- a/node_modules/tape/test/only4.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('../'); - -test('only4 duplicate test name', function (t) { - t.fail('not 1'); - t.end(); -}); - -test.only('only4 duplicate test name', function (t) { - t.end(); -}); diff --git a/node_modules/tape/test/only5.js b/node_modules/tape/test/only5.js deleted file mode 100644 index 0e15887..0000000 --- a/node_modules/tape/test/only5.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('../'); - -test.only('only5 duplicate test name', function (t) { - t.end(); -}); - -test('only5 duplicate test name', function (t) { - t.fail('not 2'); - t.end(); -}); diff --git a/node_modules/tape/test/order.js b/node_modules/tape/test/order.js deleted file mode 100644 index 02aaa05..0000000 --- a/node_modules/tape/test/order.js +++ /dev/null @@ -1,17 +0,0 @@ -var test = require('../'); -var current = 0; - -test(function (t) { - t.equal(current++, 0); - t.end(); -}); -test(function (t) { - t.plan(1); - setTimeout(function () { - t.equal(current++, 1); - }, 100); -}); -test(function (t) { - t.equal(current++, 2); - t.end(); -}); diff --git a/node_modules/tape/test/plan_optional.js b/node_modules/tape/test/plan_optional.js deleted file mode 100644 index 680dbcb..0000000 --- a/node_modules/tape/test/plan_optional.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('../'); - -test('plan should be optional', function (t) { - t.pass('no plan here'); - t.end(); -}); - -test('no plan async', function (t) { - setTimeout(function () { - t.pass('ok'); - t.end(); - }, 100); -}); - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/tape/test/require.js b/node_modules/tape/test/require.js deleted file mode 100644 index 7420bb7..0000000 --- a/node_modules/tape/test/require.js +++ /dev/null @@ -1,69 +0,0 @@ -var tap = require('tap'); -var spawn = require('child_process').spawn; -var concat = require('concat-stream'); - -tap.test('requiring a single module', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(rows.toString('utf8'), [ - 'TAP version 13', - '# module-a', - 'ok 1 loaded module a', - '# test-a', - 'ok 2 module-a loaded in same context', - 'ok 3 test ran after module-a was loaded', - '', - '1..3', - '# tests 3', - '# pass 3', - '', - '# ok' - ].join('\n') + '\n\n'); - }; - - var ps = tape('-r ./require/a require/test-a.js'); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); - -tap.test('requiring multiple modules', function (t) { - t.plan(2); - - var tc = function (rows) { - t.same(rows.toString('utf8'), [ - 'TAP version 13', - '# module-a', - 'ok 1 loaded module a', - '# module-b', - 'ok 2 loaded module b', - '# test-a', - 'ok 3 module-a loaded in same context', - 'ok 4 test ran after module-a was loaded', - '# test-b', - 'ok 5 module-b loaded in same context', - 'ok 6 test ran after module-b was loaded', - '', - '1..6', - '# tests 6', - '# pass 6', - '', - '# ok' - ].join('\n') + '\n\n'); - }; - - var ps = tape('-r ./require/a -r ./require/b require/test-a.js require/test-b.js'); - ps.stdout.pipe(concat(tc)); - ps.on('exit', function (code) { - t.equal(code, 0); - }); -}); - -function tape(args) { - var proc = require('child_process'); - var bin = __dirname + '/../bin/tape'; - - return proc.spawn('node', [bin].concat(args.split(' ')), { cwd: __dirname }); -} diff --git a/node_modules/tape/test/require/a.js b/node_modules/tape/test/require/a.js deleted file mode 100644 index 86e0296..0000000 --- a/node_modules/tape/test/require/a.js +++ /dev/null @@ -1,8 +0,0 @@ -var tape = require('../..'); - -tape.test('module-a', function (t) { - t.plan(1); - t.pass('loaded module a'); -}); - -global.module_a = true; diff --git a/node_modules/tape/test/require/b.js b/node_modules/tape/test/require/b.js deleted file mode 100644 index 808fc9e..0000000 --- a/node_modules/tape/test/require/b.js +++ /dev/null @@ -1,8 +0,0 @@ -var tape = require('../..'); - -tape.test('module-b', function (t) { - t.plan(1); - t.pass('loaded module b'); -}); - -global.module_b = true; diff --git a/node_modules/tape/test/require/test-a.js b/node_modules/tape/test/require/test-a.js deleted file mode 100644 index 03d5a84..0000000 --- a/node_modules/tape/test/require/test-a.js +++ /dev/null @@ -1,7 +0,0 @@ -var tape = require('../..'); - -tape.test('test-a', function (t) { - t.ok(global.module_a, 'module-a loaded in same context'); - t.pass('test ran after module-a was loaded'); - t.end(); -}); diff --git a/node_modules/tape/test/require/test-b.js b/node_modules/tape/test/require/test-b.js deleted file mode 100644 index 5069b55..0000000 --- a/node_modules/tape/test/require/test-b.js +++ /dev/null @@ -1,7 +0,0 @@ -var tape = require('../..'); - -tape.test('test-b', function (t) { - t.ok(global.module_b, 'module-b loaded in same context'); - t.pass('test ran after module-b was loaded'); - t.end(); -}); diff --git a/node_modules/tape/test/skip.js b/node_modules/tape/test/skip.js deleted file mode 100644 index 234c75a..0000000 --- a/node_modules/tape/test/skip.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('../'); -var ran = 0; - -var concat = require('concat-stream'); -var tap = require('tap'); - -tap.test('test SKIP comment', function (assert) { - assert.plan(1); - - var verify = function (output) { - assert.equal(output.toString('utf8'), [ - 'TAP version 13', - '# SKIP skipped', - '', - '1..0', - '# tests 0', - '# pass 0', - '', - '# ok', - '' - ].join('\n')); - }; - - var tapeTest = test.createHarness(); - tapeTest.createStream().pipe(concat(verify)); - tapeTest('skipped', { skip: true }, function (t) { - t.end(); - }); -}); - -test('skip this', { skip: true }, function (t) { - t.fail('this should not even run'); - ran++; - t.end(); -}); - -test.skip('skip this too', function (t) { - t.fail('this should not even run'); - ran++; - t.end(); -}); - -test('skip subtest', function (t) { - ran++; - t.test('skip this', { skip: true }, function (t) { - t.fail('this should not even run'); - t.end(); - }); - t.end(); -}); - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/tape/test/skip_explanation.js b/node_modules/tape/test/skip_explanation.js deleted file mode 100644 index 09928ff..0000000 --- a/node_modules/tape/test/skip_explanation.js +++ /dev/null @@ -1,82 +0,0 @@ -var tap = require('tap'); -var test = require('../'); -var concat = require('concat-stream'); -var stripFullStack = require('./common').stripFullStack; - -tap.test('test skip explanations', function (assert) { - assert.plan(1); - - var verify = function (output) { - assert.equal(stripFullStack(output.toString('utf8')), [ - 'TAP version 13', - '# SKIP (this skips)', - '# some tests might skip', - 'ok 1 this runs', - 'ok 2 failing assert is skipped # SKIP', - 'ok 3 this runs', - '# incomplete test', - 'ok 4 run sh', - 'ok 5 run openssl # SKIP', - '# incomplete test with explanation', - 'ok 6 run sh (conditional skip) # SKIP', - 'ok 7 run openssl # SKIP can\'t run on windows platforms', - 'ok 8 this runs', - '# too much explanation', - 'ok 9 run openssl # SKIP Installer cannot work on windows and fails to add to PATH Err: (2401) denied', - '', - '1..9', - '# tests 9', - '# pass 9', - '', - '# ok', - '' - ].join('\n')); - }; - - var tapeTest = test.createHarness(); - tapeTest.createStream().pipe(concat(verify)); - - tapeTest('(this skips)', { skip: true }, function (t) { - t.fail('doesn\'t run'); - t.fail('this doesn\'t run too', { skip: false }); - t.end(); - }); - - tapeTest('some tests might skip', function (t) { - t.pass('this runs'); - t.fail('failing assert is skipped', { skip: true }); - t.pass('this runs'); - t.end(); - }); - - tapeTest('incomplete test', function (t) { - // var platform = process.platform; something like this needed - var platform = 'win32'; - - t.pass('run sh', { skip: platform !== 'win32' }); - t.pass('run openssl', { skip: platform === 'win32' }); - t.end(); - }); - - tapeTest('incomplete test with explanation', function (t) { - // var platform = process.platform; something like this needed - var platform = 'win32'; - - t.fail('run sh (conditional skip)', { skip: platform === 'win32' }); - t.fail('run openssl', { skip: platform === 'win32' && 'can\'t run on windows platforms' }); - t.pass('this runs'); - t.end(); - }); - - tapeTest('too much explanation', function (t) { - // var platform = process.platform; something like this needed - var platform = 'win32'; - - t.fail('run openssl', - { skip: platform === 'win32' && 'Installer cannot work on windows\nand fails to add to PATH\n\n Err: (2401) denied' } - ); - t.end(); - }); -}); - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/tape/test/stackTrace.js b/node_modules/tape/test/stackTrace.js deleted file mode 100644 index e7f8d4b..0000000 --- a/node_modules/tape/test/stackTrace.js +++ /dev/null @@ -1,253 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); -var tapParser = require('tap-parser'); -var yaml = require('js-yaml'); - -tap.test('preserves stack trace with newlines', function (tt) { - tt.plan(3); - - var test = tape.createHarness(); - var stream = test.createStream(); - var parser = stream.pipe(tapParser()); - var stackTrace = 'foo\n bar'; - - parser.once('assert', function (data) { - delete data.diag.at; - tt.deepEqual(data, { - ok: false, - id: 1, - name: "Error: Preserve stack", - diag: { - stack: stackTrace, - operator: 'error', - expected: 'undefined', - actual: '[Error: Preserve stack]' - } - }); - }); - - stream.pipe(concat(function (body) { - var body = body.toString('utf8'); - body = stripAt(body); - tt.equal( - body, - 'TAP version 13\n' - + '# multiline stack trace\n' - + 'not ok 1 Error: Preserve stack\n' - + ' ---\n' - + ' operator: error\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + ' [Error: Preserve stack]\n' - + ' stack: |-\n' - + ' foo\n' - + ' bar\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - tt.deepEqual(getDiag(body), { - stack: stackTrace, - operator: 'error', - expected: 'undefined', - actual: '[Error: Preserve stack]' - }); - })); - - test('multiline stack trace', function (t) { - t.plan(1); - var err = new Error('Preserve stack'); - err.stack = stackTrace; - t.error(err); - }); -}); - -tap.test('parses function name from original stack', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - test.createStream(); - - test._results._watch = function (t) { - t.on('result', function (res) { - tt.equal('Test.testFunctionNameParsing', res.functionName); - }); - }; - - test('t.equal stack trace', function testFunctionNameParsing(t) { - t.equal(true, false, 'true should be false'); - t.end(); - }); -}); - -tap.test('parses function name from original stack for anonymous function', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - test.createStream(); - - test._results._watch = function (t) { - t.on('result', function (res) { - tt.equal('Test.', res.functionName); - }); - }; - - test('t.equal stack trace', function (t) { - t.equal(true, false, 'true should be false'); - t.end(); - }); -}); - -tap.test('preserves stack trace for failed assertions', function (tt) { - tt.plan(6); - - var test = tape.createHarness(); - var stream = test.createStream(); - var parser = stream.pipe(tapParser()); - - var stack = ''; - parser.once('assert', function (data) { - tt.equal(typeof data.diag.at, 'string'); - tt.equal(typeof data.diag.stack, 'string'); - at = data.diag.at || ''; - stack = data.diag.stack || ''; - tt.ok(/^Error: true should be false(\n at .+)+/.exec(stack), 'stack should be a stack'); - tt.deepEqual(data, { - ok: false, - id: 1, - name: "true should be false", - diag: { - at: at, - stack: stack, - operator: 'equal', - expected: false, - actual: true - } - }); - }); - - stream.pipe(concat(function (body) { - var body = body.toString('utf8'); - body = stripAt(body); - tt.equal( - body, - 'TAP version 13\n' - + '# t.equal stack trace\n' - + 'not ok 1 true should be false\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: false\n' - + ' actual: true\n' - + ' stack: |-\n' - + ' ' - + stack.replace(/\n/g, '\n ') + '\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - tt.deepEqual(getDiag(body), { - stack: stack, - operator: 'equal', - expected: false, - actual: true - }); - })); - - test('t.equal stack trace', function (t) { - t.plan(1); - t.equal(true, false, 'true should be false'); - }); -}); - -tap.test('preserves stack trace for failed assertions where actual===falsy', function (tt) { - tt.plan(6); - - var test = tape.createHarness(); - var stream = test.createStream(); - var parser = stream.pipe(tapParser()); - - var stack = ''; - parser.once('assert', function (data) { - tt.equal(typeof data.diag.at, 'string'); - tt.equal(typeof data.diag.stack, 'string'); - at = data.diag.at || ''; - stack = data.diag.stack || ''; - tt.ok(/^Error: false should be true(\n at .+)+/.exec(stack), 'stack should be a stack'); - tt.deepEqual(data, { - ok: false, - id: 1, - name: "false should be true", - diag: { - at: at, - stack: stack, - operator: 'equal', - expected: true, - actual: false - } - }); - }); - - stream.pipe(concat(function (body) { - var body = body.toString('utf8'); - body = stripAt(body); - tt.equal( - body, - 'TAP version 13\n' - + '# t.equal stack trace\n' - + 'not ok 1 false should be true\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: true\n' - + ' actual: false\n' - + ' stack: |-\n' - + ' ' - + stack.replace(/\n/g, '\n ') + '\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - - tt.deepEqual(getDiag(body), { - stack: stack, - operator: 'equal', - expected: true, - actual: false - }); - })); - - test('t.equal stack trace', function (t) { - t.plan(1); - t.equal(false, true, 'false should be true'); - }); -}); - -function getDiag(body) { - var yamlStart = body.indexOf(' ---'); - var yamlEnd = body.indexOf(' ...\n'); - var diag = body.slice(yamlStart, yamlEnd).split('\n').map(function (line) { - return line.slice(2); - }).join('\n'); - - // Get rid of 'at' variable (which has a line number / path of its own that's - // difficult to check). - var withStack = yaml.safeLoad(diag); - delete withStack.at; - return withStack; -} - -function stripAt(body) { - return body.replace(/^\s*at:\s+Test.*$\n/m, ''); -} diff --git a/node_modules/tape/test/subcount.js b/node_modules/tape/test/subcount.js deleted file mode 100644 index 8985e6d..0000000 --- a/node_modules/tape/test/subcount.js +++ /dev/null @@ -1,14 +0,0 @@ -var test = require('../'); - -test('parent test', function (t) { - t.plan(2); - t.test('first child', function (t) { - t.plan(1); - t.pass('pass first child'); - }); - - t.test(function (t) { - t.plan(1); - t.pass('pass second child'); - }); -}); diff --git a/node_modules/tape/test/subtest_and_async.js b/node_modules/tape/test/subtest_and_async.js deleted file mode 100644 index 5d92285..0000000 --- a/node_modules/tape/test/subtest_and_async.js +++ /dev/null @@ -1,25 +0,0 @@ -var test = require('../'); - -var asyncFunction = function (callback) { - setTimeout(callback, Math.random * 50); -}; - -test('master test', function (t) { - t.test('subtest 1', function (st) { - st.pass('subtest 1 before async call'); - asyncFunction(function () { - st.pass('subtest 1 in async callback'); - st.end(); - }); - }); - - t.test('subtest 2', function (st) { - st.pass('subtest 2 before async call'); - asyncFunction(function () { - st.pass('subtest 2 in async callback'); - st.end(); - }); - }); - - t.end(); -}); diff --git a/node_modules/tape/test/subtest_plan.js b/node_modules/tape/test/subtest_plan.js deleted file mode 100644 index e0f906e..0000000 --- a/node_modules/tape/test/subtest_plan.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require('../'); - -test('parent', function (t) { - t.plan(3); - - var firstChildRan = false; - - t.pass('assertion in parent'); - - t.test('first child', function (t) { - t.plan(1); - t.pass('pass first child'); - firstChildRan = true; - }); - - t.test('second child', function (t) { - t.plan(2); - t.ok(firstChildRan, 'first child ran first'); - t.pass('pass second child'); - }); -}); diff --git a/node_modules/tape/test/throws.js b/node_modules/tape/test/throws.js deleted file mode 100644 index 9b2bba9..0000000 --- a/node_modules/tape/test/throws.js +++ /dev/null @@ -1,203 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -function fn() { - throw new TypeError('RegExp'); -} - -function getNonFunctionMessage(fn) { - try { - fn(); - } catch (e) { - return e.message; - } -} - -var getter = function () { return 'message'; }; -var messageGetterError = Object.defineProperty( - { custom: 'error' }, - 'message', - { configurable: true, enumerable: true, get: getter } -); -var thrower = function () { throw messageGetterError; }; - -tap.test('failures', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - test.createStream().pipe(concat(function (body) { - tt.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# non functions\n' - + 'not ok 1 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage() + "] message: '" + getNonFunctionMessage() + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage(undefined) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 2 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage(null) + "] message: '" + getNonFunctionMessage(null) + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage(null) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 3 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage(true) + "] message: '" + getNonFunctionMessage(true) + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage(true) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 4 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage(false) + "] message: '" + getNonFunctionMessage(false) + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage(false) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 5 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage('abc') + "] message: '" + getNonFunctionMessage('abc') + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage('abc') + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 6 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage(/a/g) + "] message: '" + getNonFunctionMessage(/a/g) + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage(/a/g) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 7 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage([]) + "] message: '" + getNonFunctionMessage([]) + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage([]) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + 'not ok 8 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: |-\n' - + ' undefined\n' - + ' actual: |-\n' - + " { [TypeError: " + getNonFunctionMessage({}) + "] message: '" + getNonFunctionMessage({}) + "' }\n" - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' TypeError: ' + getNonFunctionMessage({}) + '\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '# function\n' - + 'not ok 9 should throw\n' - + ' ---\n' - + ' operator: throws\n' - + ' expected: undefined\n' - + ' actual: undefined\n' - + ' at: Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should throw\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/throws.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '# custom error messages\n' - + 'ok 10 "message" is enumerable\n' - + "ok 11 { custom: 'error', message: 'message' }\n" - + 'ok 12 getter is still the same\n' - + '# throws null\n' - + 'ok 13 throws null\n' - + '\n1..13\n' - + '# tests 13\n' - + '# pass 4\n' - + '# fail 9\n' - ); - })); - - test('non functions', function (t) { - t.plan(8); - t.throws(); - t.throws(null); - t.throws(true); - t.throws(false); - t.throws('abc'); - t.throws(/a/g); - t.throws([]); - t.throws({}); - }); - - test('function', function (t) { - t.plan(1); - t.throws(function () {}); - }); - - test('custom error messages', function (t) { - t.plan(3); - t.equal(Object.prototype.propertyIsEnumerable.call(messageGetterError, 'message'), true, '"message" is enumerable'); - t.throws(thrower, "{ custom: 'error', message: 'message' }"); - t.equal(Object.getOwnPropertyDescriptor(messageGetterError, 'message').get, getter, 'getter is still the same'); - }); - - test('throws null', function (t) { - t.plan(1); - t.throws(function () { throw null; }, 'throws null'); - t.end(); - }); -}); diff --git a/node_modules/tape/test/timeout.js b/node_modules/tape/test/timeout.js deleted file mode 100644 index b74b11a..0000000 --- a/node_modules/tape/test/timeout.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('../'); -var ran = 0; - -test('timeout', function (t) { - t.pass('this should run'); - ran++; - setTimeout(function () { - t.end(); - }, 100); -}); - -test('should still run', { timeout: 50 }, function (t) { - t.equal(ran, 1); - t.end(); -}); diff --git a/node_modules/tape/test/timeoutAfter.js b/node_modules/tape/test/timeoutAfter.js deleted file mode 100644 index 80752d2..0000000 --- a/node_modules/tape/test/timeoutAfter.js +++ /dev/null @@ -1,36 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('timeoutAfter test', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - var tc = function (rows) { - tt.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# timeoutAfter', - 'not ok 1 test timed out after 1ms', - ' ---', - ' operator: fail', - ' stack: |-', - ' Error: test timed out after 1ms', - ' [... stack stripped ...]', - ' ...', - '', - '1..1', - '# tests 1', - '# pass 0', - '# fail 1' - ].join('\n') + '\n'); - }; - - test.createStream().pipe(concat(tc)); - - test('timeoutAfter', function (t) { - t.plan(1); - t.timeoutAfter(1); - }); -}); diff --git a/node_modules/tape/test/todo.js b/node_modules/tape/test/todo.js deleted file mode 100644 index 73a8f6a..0000000 --- a/node_modules/tape/test/todo.js +++ /dev/null @@ -1,42 +0,0 @@ -var tap = require('tap'); -var tape = require('../'); -var concat = require('concat-stream'); - -var common = require('./common'); -var stripFullStack = common.stripFullStack; - -tap.test('tape todo test', function (assert) { - var test = tape.createHarness({ exit: false }); - assert.plan(1); - - test.createStream().pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# success\n' - + 'ok 1 this test runs\n' - + '# TODO failure\n' - + 'not ok 2 should never happen # TODO\n' - + ' ---\n' - + ' operator: fail\n' - + ' at: Test. ($TEST/todo.js:$LINE:$COL)\n' - + ' ...\n' - + '\n' - + '1..2\n' - + '# tests 2\n' - + '# pass 2\n' - + '\n' - + '# ok\n' - ); - })); - - test('success', function (t) { - t.equal(true, true, 'this test runs'); - t.end(); - }); - - test('failure', { todo: true }, function (t) { - t.fail('should never happen'); - t.end(); - }); -}); diff --git a/node_modules/tape/test/todo_explanation.js b/node_modules/tape/test/todo_explanation.js deleted file mode 100644 index 5269b08..0000000 --- a/node_modules/tape/test/todo_explanation.js +++ /dev/null @@ -1,70 +0,0 @@ -var tap = require('tap'); -var tape = require('../'); -var concat = require('concat-stream'); - -var common = require('./common'); -var stripFullStack = common.stripFullStack; - -tap.test('tape todo test', { todo: process.versions.node.match(/0\.8\.\d+/) ? 'Fails on node 0.8': false }, function (assert) { - var test = tape.createHarness({ exit: false }); - assert.plan(1); - - test.createStream().pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), [ - 'TAP version 13', - '# success', - 'ok 1 this test runs', - '# TODO incomplete test1', - 'not ok 2 check output # TODO', - ' ---', - ' operator: equal', - ' expected: false', - ' actual: true', - ' at: Test. ($TEST/todo_explanation.js:$LINE:$COL)', - ' ...', - 'not ok 3 check vars output # TODO name conflict', - ' ---', - ' operator: equal', - ' expected: 0', - ' actual: 1', - ' at: Test. ($TEST/todo_explanation.js:$LINE:$COL)', - ' ...', - '# incomplete test2', - 'not ok 4 run openssl # TODO installer needs fix', - ' ---', - ' operator: fail', - ' at: Test. ($TEST/todo_explanation.js:$LINE:$COL)', - ' ...', - '# TODO passing test', - '', - '1..4', - '# tests 4', - '# pass 4', - '', - '# ok', - '' - ].join('\n') - ); - })); - - test('success', function (t) { - t.equal(true, true, 'this test runs'); - t.end(); - }); - - test('incomplete test1', { todo: true }, function (t) { - t.equal(true, false, 'check output'); - t.equal(1, 0, 'check vars output', { todo: 'name conflict' }); - t.end(); - }); - - test('incomplete test2', function (t) { - t.fail('run openssl', { todo: 'installer needs fix' }); - t.end(); - }); - - test('passing test', { todo: 'yet incomplete' }, function (t) { - t.end(); - }); -}); diff --git a/node_modules/tape/test/todo_single.js b/node_modules/tape/test/todo_single.js deleted file mode 100644 index 48cd287..0000000 --- a/node_modules/tape/test/todo_single.js +++ /dev/null @@ -1,37 +0,0 @@ -var tap = require('tap'); -var tape = require('../'); -var concat = require('concat-stream'); - -var common = require('./common'); -var stripFullStack = common.stripFullStack; - -tap.test('tape todo test', function (assert) { - var test = tape.createHarness({ exit: false }); - assert.plan(1); - - test.createStream().pipe(concat(function (body) { - assert.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# TODO failure\n' - + 'not ok 1 should be equal # TODO\n' - + ' ---\n' - + ' operator: equal\n' - + ' expected: false\n' - + ' actual: true\n' - + ' at: Test. ($TEST/todo_single.js:$LINE:$COL)\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 1\n' - + '\n' - + '# ok\n' - ); - })); - - test('failure', { todo: true }, function (t) { - t.equal(true, false); - t.end(); - }); -}); diff --git a/node_modules/tape/test/too_many.js b/node_modules/tape/test/too_many.js deleted file mode 100644 index 5c7e4b3..0000000 --- a/node_modules/tape/test/too_many.js +++ /dev/null @@ -1,78 +0,0 @@ -var falafel = require('falafel'); -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('array test', function (tt) { - tt.plan(1); - - var test = tape.createHarness({ exit : false }); - var tc = function (rows) { - tt.same(stripFullStack(rows.toString('utf8')), [ - 'TAP version 13', - '# array', - 'ok 1 should be equivalent', - 'ok 2 should be equivalent', - 'ok 3 should be equivalent', - 'ok 4 should be equivalent', - 'not ok 5 plan != count', - ' ---', - ' operator: fail', - ' expected: 3', - ' actual: 4', - ' at: ($TEST/too_many.js:$LINE:$COL)', - ' stack: |-', - ' Error: plan != count', - ' [... stack stripped ...]', - ' at $TEST/too_many.js:$LINE:$COL', - ' at eval (eval at ($TEST/too_many.js:$LINE:$COL))', - ' at eval (eval at ($TEST/too_many.js:$LINE:$COL))', - ' at Test. ($TEST/too_many.js:$LINE:$COL)', - ' [... stack stripped ...]', - ' ...', - 'ok 6 should be equivalent', - '', - '1..6', - '# tests 6', - '# pass 5', - '# fail 1' - ].join('\n') + '\n'); - }; - - test.createStream().pipe(concat(tc)); - - test('array', function (t) { - t.plan(3); - - var src = '(' + function () { - var xs = [ 1, 2, [ 3, 4 ] ]; - var ys = [ 5, 6 ]; - g([ xs, ys ]); - } + ')()'; - - var output = falafel(src, function (node) { - if (node.type === 'ArrayExpression') { - node.update('fn(' + node.source() + ')'); - } - }); - - var arrays = [ - [ 3, 4 ], - [ 1, 2, [ 3, 4 ] ], - [ 5, 6 ], - [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], - ]; - - Function(['fn','g'], output)( - function (xs) { - t.same(arrays.shift(), xs); - return xs; - }, - function (xs) { - t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); - } - ); - }); -}); diff --git a/node_modules/tape/test/undef.js b/node_modules/tape/test/undef.js deleted file mode 100644 index 52759ac..0000000 --- a/node_modules/tape/test/undef.js +++ /dev/null @@ -1,42 +0,0 @@ -var tape = require('../'); -var tap = require('tap'); -var concat = require('concat-stream'); - -var stripFullStack = require('./common').stripFullStack; - -tap.test('array test', function (tt) { - tt.plan(1); - - var test = tape.createHarness(); - test.createStream().pipe(concat(function (body) { - tt.equal( - stripFullStack(body.toString('utf8')), - 'TAP version 13\n' - + '# undef\n' - + 'not ok 1 should be equivalent\n' - + ' ---\n' - + ' operator: deepEqual\n' - + ' expected: |-\n' - + ' { beep: undefined }\n' - + ' actual: |-\n' - + ' {}\n' - + ' at: Test. ($TEST/undef.js:$LINE:$COL)\n' - + ' stack: |-\n' - + ' Error: should be equivalent\n' - + ' [... stack stripped ...]\n' - + ' at Test. ($TEST/undef.js:$LINE:$COL)\n' - + ' [... stack stripped ...]\n' - + ' ...\n' - + '\n' - + '1..1\n' - + '# tests 1\n' - + '# pass 0\n' - + '# fail 1\n' - ); - })); - - test('undef', function (t) { - t.plan(1); - t.deepEqual({}, { beep: undefined }); - }); -}); diff --git a/node_modules/through/.travis.yml b/node_modules/through/.travis.yml deleted file mode 100644 index c693a93..0000000 --- a/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/node_modules/through/LICENSE.APACHE2 b/node_modules/through/LICENSE.APACHE2 deleted file mode 100644 index 6366c04..0000000 --- a/node_modules/through/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/through/LICENSE.MIT b/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd7..0000000 --- a/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/through/index.js b/node_modules/through/index.js deleted file mode 100644 index ca5fc59..0000000 --- a/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/node_modules/through/package.json b/node_modules/through/package.json deleted file mode 100644 index bd33123..0000000 --- a/node_modules/through/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "through@>=2.2.7 <3", - "_id": "through@2.3.8", - "_inBundle": false, - "_integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "_location": "/through", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "through@>=2.2.7 <3", - "name": "through", - "escapedName": "through", - "rawSpec": ">=2.2.7 <3", - "saveSpec": null, - "fetchSpec": ">=2.2.7 <3" - }, - "_requiredBy": [ - "/JSONStream" - ], - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_spec": "through@>=2.2.7 <3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/JSONStream", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "simplified stream construction", - "devDependencies": { - "from": "~0.1.3", - "stream-spec": "~0.3.5", - "tape": "~2.3.2" - }, - "homepage": "https://github.com/dominictarr/through", - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "license": "MIT", - "main": "index.js", - "name": "through", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "version": "2.3.8" -} diff --git a/node_modules/through/readme.markdown b/node_modules/through/readme.markdown deleted file mode 100644 index cb34c81..0000000 --- a/node_modules/through/readme.markdown +++ /dev/null @@ -1,64 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) -[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/node_modules/through/test/async.js b/node_modules/through/test/async.js deleted file mode 100644 index 46bdbae..0000000 --- a/node_modules/through/test/async.js +++ /dev/null @@ -1,28 +0,0 @@ -var from = require('from') -var through = require('../') - -var tape = require('tape') - -tape('simple async example', function (t) { - - var n = 0, expected = [1,2,3,4,5], actual = [] - from(expected) - .pipe(through(function(data) { - this.pause() - n ++ - setTimeout(function(){ - console.log('pushing data', data) - this.push(data) - this.resume() - }.bind(this), 300) - })).pipe(through(function(data) { - console.log('pushing data second time', data); - this.push(data) - })).on('data', function (d) { - actual.push(d) - }).on('end', function() { - t.deepEqual(actual, expected) - t.end() - }) - -}) diff --git a/node_modules/through/test/auto-destroy.js b/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd00..0000000 --- a/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/node_modules/through/test/buffering.js b/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bf..0000000 --- a/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/node_modules/through/test/end.js b/node_modules/through/test/end.js deleted file mode 100644 index fa113f5..0000000 --- a/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/node_modules/through/test/index.js b/node_modules/through/test/index.js deleted file mode 100644 index 96da82f..0000000 --- a/node_modules/through/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - var s = spec(t).through().pausable() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - var s = spec(t).through().pausable() - - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - - var s = spec(t) - .through() - .pausable() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - }) - - t.on('close', function () { - s.validate() - assert.end() - }) - - write(expected, t) -}) - -test('does not soft-end on `undefined`', function(assert) { - var stream = through() - , count = 0 - - stream.on('data', function (data) { - count++ - }) - - stream.write(undefined) - stream.write(undefined) - - assert.equal(count, 2) - - assert.end() -}) diff --git a/node_modules/through2/LICENSE.md b/node_modules/through2/LICENSE.md deleted file mode 100644 index a2429b6..0000000 --- a/node_modules/through2/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -# The MIT License (MIT) - -**Copyright (c) Rod Vagg (the "Original Author") and additional contributors** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/through2/README.md b/node_modules/through2/README.md deleted file mode 100644 index b5e44c7..0000000 --- a/node_modules/through2/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) - .on('finish', () => doSomethingSpecial()) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', (data) => { - all.push(data) - }) - .on('end', () => { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - (chunk, enc, cb) => { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - (chunk, enc, cb) => cb(null, chunk), // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit == "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one - -## License - -**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/through2/package.json b/node_modules/through2/package.json deleted file mode 100644 index fecccfa..0000000 --- a/node_modules/through2/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "through2@^2.0.0", - "_id": "through2@2.0.5", - "_inBundle": false, - "_integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "_location": "/through2", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "through2@^2.0.0", - "name": "through2", - "escapedName": "through2", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/browser-pack", - "/browserify", - "/deps-sort", - "/insert-module-globals", - "/module-deps" - ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "_shasum": "01c1e39eb31d07cb7d03a96a70823260b23132cd", - "_spec": "through2@^2.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "deprecated": false, - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "devDependencies": { - "bl": "~2.0.1", - "faucet": "0.0.1", - "nyc": "~13.1.0", - "safe-buffer": "~5.1.2", - "stream-spigot": "~3.0.6", - "tape": "~4.9.1" - }, - "homepage": "https://github.com/rvagg/through2#readme", - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "license": "MIT", - "main": "through2.js", - "name": "through2", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/through2.git" - }, - "scripts": { - "test": "node test/test.js | faucet" - }, - "version": "2.0.5" -} diff --git a/node_modules/through2/through2.js b/node_modules/through2/through2.js deleted file mode 100644 index 6baa6a1..0000000 --- a/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream').Transform - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/timers-browserify/.npmignore b/node_modules/timers-browserify/.npmignore deleted file mode 100644 index 03e05e4..0000000 --- a/node_modules/timers-browserify/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -/node_modules diff --git a/node_modules/timers-browserify/CHANGELOG.md b/node_modules/timers-browserify/CHANGELOG.md deleted file mode 100644 index a7cd8bc..0000000 --- a/node_modules/timers-browserify/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -# Change Log -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.4.0 - 2015-02-23 - -### Added -* Link to `timers-browserify-full`, which offers a larger, but much more exact, - version of Node's `timers` library - -### Changed -* `setTimeout` and `setInterval` return objects with the same API as the Node - implementation, instead of just IDs - -### Fixed -* `active` implementation actually has an effect, as in Node -* Replaced usages of `apply` that break in IE 8 - -## 1.3.0 - 2015-02-04 - -### Changed -* Prefer native versions of `setImmediate` and `clearImmediate` if they exist - -## 1.2.0 - 2015-01-02 - -### Changed -* Update `process` dependency - -## 1.1.0 - 2014-08-26 - -### Added -* `clearImmediate` available to undo `setImmediate` - -## 1.0.3 - 2014-06-30 - -### Fixed -* Resume returning opaque IDs from `setTimeout` and `setInterval` - -## 1.0.2 - 2014-06-30 - -### Fixed -* Pass `window` explicitly to `setTimeout` and others to resolve an error in - Chrome - -## 1.0.1 - 2013-12-28 - -### Changed -* Replaced `setimmediate` dependency with `process` for the `nextTick` shim - -## 1.0.0 - 2013-12-10 - -### Added -* Guard against undefined globals like `setTimeout` in some environments - -## 0.0.0 - 2012-05-30 - -### Added -* Basic functionality for initial release diff --git a/node_modules/timers-browserify/LICENSE.md b/node_modules/timers-browserify/LICENSE.md deleted file mode 100644 index 940ec90..0000000 --- a/node_modules/timers-browserify/LICENSE.md +++ /dev/null @@ -1,46 +0,0 @@ -# timers-browserify - -This project uses the [MIT](http://jryans.mit-license.org/) license: - - Copyright © 2012 J. Ryan Stinnett - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the “Software”), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - -# lib/node - -The `lib/node` directory borrows files from joyent/node which uses the following license: - - Copyright Joyent, Inc. and other Node contributors. All rights reserved. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. diff --git a/node_modules/timers-browserify/README.md b/node_modules/timers-browserify/README.md deleted file mode 100644 index c7efa19..0000000 --- a/node_modules/timers-browserify/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Overview - -Adds support for the `timers` module to browserify. - -## Wait, isn't it already supported in the browser? - -The public methods of the `timers` module are: - -* `setTimeout(callback, delay, [arg], [...])` -* `clearTimeout(timeoutId)` -* `setInterval(callback, delay, [arg], [...])` -* `clearInterval(intervalId)` - -and indeed, browsers support these already. - -## So, why does this exist? - -The `timers` module also includes some private methods used in other built-in -Node.js modules: - -* `enroll(item, delay)` -* `unenroll(item)` -* `active(item)` - -These are used to efficiently support a large quantity of timers with the same -timeouts by creating only a few timers under the covers. - -Node.js also offers the `immediate` APIs, which aren't yet available cross-browser, so we polyfill those: - -* `setImmediate(callback, [arg], [...])` -* `clearImmediate(immediateId)` - -## I need lots of timers and want to use linked list timers as Node.js does. - -Linked lists are efficient when you have thousands (millions?) of timers with the same delay. -Take a look at [timers-browserify-full](https://www.npmjs.com/package/timers-browserify-full) in this case. - -# License - -[MIT](http://jryans.mit-license.org/) diff --git a/node_modules/timers-browserify/example/enroll/build.sh b/node_modules/timers-browserify/example/enroll/build.sh deleted file mode 100755 index d276735..0000000 --- a/node_modules/timers-browserify/example/enroll/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -browserify --debug -o js/browserify.js js/main.js diff --git a/node_modules/timers-browserify/example/enroll/index.html b/node_modules/timers-browserify/example/enroll/index.html deleted file mode 100644 index 9cc1140..0000000 --- a/node_modules/timers-browserify/example/enroll/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/node_modules/timers-browserify/example/enroll/js/browserify.js b/node_modules/timers-browserify/example/enroll/js/browserify.js deleted file mode 100644 index c2d0821..0000000 --- a/node_modules/timers-browserify/example/enroll/js/browserify.js +++ /dev/null @@ -1,233 +0,0 @@ -var require = function (file, cwd) { - var resolved = require.resolve(file, cwd || '/'); - var mod = require.modules[resolved]; - if (!mod) throw new Error( - 'Failed to resolve module ' + file + ', tried ' + resolved - ); - var res = mod._cached ? mod._cached : mod(); - return res; -} - -require.paths = []; -require.modules = {}; -require.extensions = [".js",".coffee"]; - -require._core = { - 'assert': true, - 'events': true, - 'fs': true, - 'path': true, - 'vm': true -}; - -require.resolve = (function () { - return function (x, cwd) { - if (!cwd) cwd = '/'; - - if (require._core[x]) return x; - var path = require.modules.path(); - cwd = path.resolve('/', cwd); - var y = cwd || '/'; - - if (x.match(/^(?:\.\.?\/|\/)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); - if (m) return m; - } - - var n = loadNodeModulesSync(x, y); - if (n) return n; - - throw new Error("Cannot find module '" + x + "'"); - - function loadAsFileSync (x) { - if (require.modules[x]) { - return x; - } - - for (var i = 0; i < require.extensions.length; i++) { - var ext = require.extensions[i]; - if (require.modules[x + ext]) return x + ext; - } - } - - function loadAsDirectorySync (x) { - x = x.replace(/\/+$/, ''); - var pkgfile = x + '/package.json'; - if (require.modules[pkgfile]) { - var pkg = require.modules[pkgfile](); - var b = pkg.browserify; - if (typeof b === 'object' && b.main) { - var m = loadAsFileSync(path.resolve(x, b.main)); - if (m) return m; - } - else if (typeof b === 'string') { - var m = loadAsFileSync(path.resolve(x, b)); - if (m) return m; - } - else if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - } - } - - return loadAsFileSync(x + '/index'); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPathsSync(start); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(dir + '/' + x); - if (m) return m; - var n = loadAsDirectorySync(dir + '/' + x); - if (n) return n; - } - - var m = loadAsFileSync(x); - if (m) return m; - } - - function nodeModulesPathsSync (start) { - var parts; - if (start === '/') parts = [ '' ]; - else parts = path.normalize(start).split('/'); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; - dirs.push(dir); - } - - return dirs; - } - }; -})(); - -require.alias = function (from, to) { - var path = require.modules.path(); - var res = null; - try { - res = require.resolve(from + '/package.json', '/'); - } - catch (err) { - res = require.resolve(from, '/'); - } - var basedir = path.dirname(res); - - var keys = (Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; - })(require.modules); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key.slice(0, basedir.length + 1) === basedir + '/') { - var f = key.slice(basedir.length); - require.modules[to + f] = require.modules[basedir + f]; - } - else if (key === basedir) { - require.modules[to] = require.modules[basedir]; - } - } -}; - -require.define = function (filename, fn) { - var dirname = require._core[filename] - ? '' - : require.modules.path().dirname(filename) - ; - - var require_ = function (file) { - return require(file, dirname) - }; - require_.resolve = function (name) { - return require.resolve(name, dirname); - }; - require_.modules = require.modules; - require_.define = require.define; - var module_ = { exports : {} }; - - require.modules[filename] = function () { - require.modules[filename]._cached = module_.exports; - fn.call( - module_.exports, - require_, - module_, - module_.exports, - dirname, - filename - ); - require.modules[filename]._cached = module_.exports; - return module_.exports; - }; -}; - -if (typeof process === 'undefined') process = {}; - -if (!process.nextTick) process.nextTick = (function () { - var queue = []; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canPost) { - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'browserify-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - } - - return function (fn) { - if (canPost) { - queue.push(fn); - window.postMessage('browserify-tick', '*'); - } - else setTimeout(fn, 0); - }; -})(); - -if (!process.title) process.title = 'browser'; - -if (!process.binding) process.binding = function (name) { - if (name === 'evals') return require('vm') - else throw new Error('No such module') -}; - -if (!process.cwd) process.cwd = function () { return '.' }; - -if (!process.env) process.env = {}; -if (!process.argv) process.argv = []; - -require.define("path", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "function filter (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (fn(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length; i >= 0; i--) {\n var last = parts[i];\n if (last == '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Regex to split a filename into [*, dir, basename, ext]\n// posix version\nvar splitPathRe = /^(.+\\/(?!$)|\\/)?((?:.+?)?(\\.[^.]*)?)$/;\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\nvar resolvedPath = '',\n resolvedAbsolute = false;\n\nfor (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0)\n ? arguments[i]\n : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string' || !path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n}\n\n// At this point the path should be resolved to a full absolute path, but\n// handle relative paths to be safe (might happen when process.cwd() fails)\n\n// Normalize the path\nresolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\nvar isAbsolute = path.charAt(0) === '/',\n trailingSlash = path.slice(-1) === '/';\n\n// Normalize the path\npath = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n \n return (isAbsolute ? '/' : '') + path;\n};\n\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n return p && typeof p === 'string';\n }).join('/'));\n};\n\n\nexports.dirname = function(path) {\n var dir = splitPathRe.exec(path)[1] || '';\n var isWindows = false;\n if (!dir) {\n // No dirname\n return '.';\n } else if (dir.length === 1 ||\n (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) {\n // It is just a slash or a drive letter with a slash\n return dir;\n } else {\n // It is a full dirname, strip trailing slash\n return dir.substring(0, dir.length - 1);\n }\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPathRe.exec(path)[2] || '';\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPathRe.exec(path)[3] || '';\n};\n\n//@ sourceURL=path" -)); - -require.define("timers", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "module.exports = require(\"timers-browserify\")\n//@ sourceURL=timers" -)); - -require.define("/node_modules/timers-browserify/package.json", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "module.exports = {\"main\":\"main.js\"}\n//@ sourceURL=/node_modules/timers-browserify/package.json" -)); - -require.define("/node_modules/timers-browserify/main.js", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "// DOM APIs, for completeness\n\nexports.setTimeout = setTimeout;\nexports.clearTimeout = clearTimeout;\nexports.setInterval = setInterval;\nexports.clearInterval = clearInterval;\n\n// TODO: Change to more effiecient list approach used in Node.js\n// For now, we just implement the APIs using the primitives above.\n\nexports.enroll = function(item, delay) {\n item._timeoutID = setTimeout(item._onTimeout, delay);\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._timeoutID);\n};\n\nexports.active = function(item) {\n // our naive impl doesn't care (correctness is still preserved)\n};\n\n//@ sourceURL=/node_modules/timers-browserify/main.js" -)); - -require.define("/main.js", Function( - [ 'require', 'module', 'exports', '__dirname', '__filename' ], - "var timers = require('timers');\n\nvar obj = {\n _onTimeout: function() {\n console.log('Timer ran for: ' + (new Date().getTime() - obj.now) + ' ms');\n },\n start: function() {\n console.log('Timer should run for 100 ms');\n this.now = new Date().getTime();\n timers.enroll(this, 100);\n }\n};\n\nobj.start();\n\n//@ sourceURL=/main.js" -)); -require("/main.js"); diff --git a/node_modules/timers-browserify/example/enroll/js/main.js b/node_modules/timers-browserify/example/enroll/js/main.js deleted file mode 100644 index 0007df8..0000000 --- a/node_modules/timers-browserify/example/enroll/js/main.js +++ /dev/null @@ -1,14 +0,0 @@ -var timers = require('timers'); - -var obj = { - _onTimeout: function() { - console.log('Timer ran for: ' + (new Date().getTime() - obj.now) + ' ms'); - }, - start: function() { - console.log('Timer should run for 100 ms'); - this.now = new Date().getTime(); - timers.enroll(this, 100); - } -}; - -obj.start(); diff --git a/node_modules/timers-browserify/example/enroll/server.js b/node_modules/timers-browserify/example/enroll/server.js deleted file mode 100644 index 37b1a0a..0000000 --- a/node_modules/timers-browserify/example/enroll/server.js +++ /dev/null @@ -1,11 +0,0 @@ -var connect = require('connect'); -var server = connect.createServer(); -server.use(connect.static(__dirname)); - -var browserify = require('browserify'); -var bundle = browserify(__dirname + '/js/main.js', { mount: '/js/browserify.js' }); -server.use(bundle); - -var port = parseInt(process.argv[2] || 8080, 10); -server.listen(port); -console.log('Listening on :' + port); diff --git a/node_modules/timers-browserify/main.js b/node_modules/timers-browserify/main.js deleted file mode 100644 index 38c058f..0000000 --- a/node_modules/timers-browserify/main.js +++ /dev/null @@ -1,76 +0,0 @@ -var nextTick = require('process/browser.js').nextTick; -var apply = Function.prototype.apply; -var slice = Array.prototype.slice; -var immediateIds = {}; -var nextImmediateId = 0; - -// DOM APIs, for completeness - -exports.setTimeout = function() { - return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout); -}; -exports.setInterval = function() { - return new Timeout(apply.call(setInterval, window, arguments), clearInterval); -}; -exports.clearTimeout = -exports.clearInterval = function(timeout) { timeout.close(); }; - -function Timeout(id, clearFn) { - this._id = id; - this._clearFn = clearFn; -} -Timeout.prototype.unref = Timeout.prototype.ref = function() {}; -Timeout.prototype.close = function() { - this._clearFn.call(window, this._id); -}; - -// Does not start the time, just sets up the members needed. -exports.enroll = function(item, msecs) { - clearTimeout(item._idleTimeoutId); - item._idleTimeout = msecs; -}; - -exports.unenroll = function(item) { - clearTimeout(item._idleTimeoutId); - item._idleTimeout = -1; -}; - -exports._unrefActive = exports.active = function(item) { - clearTimeout(item._idleTimeoutId); - - var msecs = item._idleTimeout; - if (msecs >= 0) { - item._idleTimeoutId = setTimeout(function onTimeout() { - if (item._onTimeout) - item._onTimeout(); - }, msecs); - } -}; - -// That's not how node.js implements it but the exposed api is the same. -exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) { - var id = nextImmediateId++; - var args = arguments.length < 2 ? false : slice.call(arguments, 1); - - immediateIds[id] = true; - - nextTick(function onNextTick() { - if (immediateIds[id]) { - // fn.call() is faster so we optimize for the common use-case - // @see http://jsperf.com/call-apply-segu - if (args) { - fn.apply(null, args); - } else { - fn.call(null); - } - // Prevent ids from leaking - exports.clearImmediate(id); - } - }); - - return id; -}; - -exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) { - delete immediateIds[id]; -}; \ No newline at end of file diff --git a/node_modules/timers-browserify/package.json b/node_modules/timers-browserify/package.json deleted file mode 100644 index a78a2ec..0000000 --- a/node_modules/timers-browserify/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_from": "timers-browserify@^1.0.1", - "_id": "timers-browserify@1.4.2", - "_inBundle": false, - "_integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "_location": "/timers-browserify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "timers-browserify@^1.0.1", - "name": "timers-browserify", - "escapedName": "timers-browserify", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "_shasum": "c9c58b575be8407375cb5e2462dacee74359f41d", - "_spec": "timers-browserify@^1.0.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com", - "url": "http://convolv.es/" - }, - "bugs": { - "url": "https://github.com/jryans/timers-browserify/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Guy Bedford", - "email": "guybedford@gmail.com" - }, - { - "name": "Ionut-Cristian Florescu", - "email": "ionut.florescu@gmail.com" - }, - { - "name": "James Halliday", - "email": "mail@substack.net" - }, - { - "name": "Jan Schär", - "email": "jscissr@gmail.com" - }, - { - "name": "Johannes Ewald", - "email": "johannes.ewald@peerigon.com" - }, - { - "name": "Jonathan Prins", - "email": "jon@blip.tv" - }, - { - "name": "Matt Esch", - "email": "matt@mattesch.info" - } - ], - "dependencies": { - "process": "~0.11.0" - }, - "deprecated": false, - "description": "timers module for browserify", - "devDependencies": { - "browserify": "~1.10.16", - "connect": "~2.3.0" - }, - "engines": { - "node": ">=0.6.0" - }, - "homepage": "https://github.com/jryans/timers-browserify", - "jspm": { - "map": { - "./main.js": { - "node": "@node/timers" - } - } - }, - "keywords": [ - "timers", - "browserify", - "browser" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/jryans/timers-browserify/blob/master/LICENSE.md" - } - ], - "main": "main.js", - "name": "timers-browserify", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/jryans/timers-browserify.git" - }, - "version": "1.4.2" -} diff --git a/node_modules/tty-browserify/LICENSE b/node_modules/tty-browserify/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/tty-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/tty-browserify/index.js b/node_modules/tty-browserify/index.js deleted file mode 100644 index 7823016..0000000 --- a/node_modules/tty-browserify/index.js +++ /dev/null @@ -1,11 +0,0 @@ -exports.isatty = function () { return false; }; - -function ReadStream() { - throw new Error('tty.ReadStream is not implemented'); -} -exports.ReadStream = ReadStream; - -function WriteStream() { - throw new Error('tty.WriteStream is not implemented'); -} -exports.WriteStream = WriteStream; diff --git a/node_modules/tty-browserify/package.json b/node_modules/tty-browserify/package.json deleted file mode 100644 index b2e101a..0000000 --- a/node_modules/tty-browserify/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "tty-browserify@0.0.1", - "_id": "tty-browserify@0.0.1", - "_inBundle": false, - "_integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "_location": "/tty-browserify", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "tty-browserify@0.0.1", - "name": "tty-browserify", - "escapedName": "tty-browserify", - "rawSpec": "0.0.1", - "saveSpec": null, - "fetchSpec": "0.0.1" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "_shasum": "3f05251ee17904dfd0677546670db9651682b811", - "_spec": "tty-browserify@0.0.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/browserify/tty-browserify/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "the tty module from node core for browsers", - "devDependencies": { - "tape": "~1.0.4" - }, - "homepage": "https://github.com/browserify/tty-browserify", - "keywords": [ - "tty", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "name": "tty-browserify", - "repository": { - "type": "git", - "url": "git://github.com/browserify/tty-browserify.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "0.0.1" -} diff --git a/node_modules/tty-browserify/readme.markdown b/node_modules/tty-browserify/readme.markdown deleted file mode 100644 index 91a2051..0000000 --- a/node_modules/tty-browserify/readme.markdown +++ /dev/null @@ -1 +0,0 @@ -# tty-browserify diff --git a/node_modules/tweetnacl/.npmignore b/node_modules/tweetnacl/.npmignore deleted file mode 100644 index 7d98dcb..0000000 --- a/node_modules/tweetnacl/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.eslintrc -.travis.yml -bower.json -test diff --git a/node_modules/tweetnacl/AUTHORS.md b/node_modules/tweetnacl/AUTHORS.md deleted file mode 100644 index 6d74d40..0000000 --- a/node_modules/tweetnacl/AUTHORS.md +++ /dev/null @@ -1,28 +0,0 @@ -List of TweetNaCl.js authors -============================ - - Alphabetical order by first name. - Format: Name (GitHub username or URL) - -* AndSDev (@AndSDev) -* Devi Mandiri (@devi) -* Dmitry Chestnykh (@dchest) - -List of authors of third-party public domain code from which TweetNaCl.js code was derived -========================================================================================== - -[TweetNaCl](http://tweetnacl.cr.yp.to/) --------------------------------------- - -* Bernard van Gastel -* Daniel J. Bernstein -* Peter Schwabe -* Sjaak Smetsers -* Tanja Lange -* Wesley Janssen - - -[Poly1305-donna](https://github.com/floodyberry/poly1305-donna) --------------------------------------------------------------- - -* Andrew Moon (@floodyberry) diff --git a/node_modules/tweetnacl/CHANGELOG.md b/node_modules/tweetnacl/CHANGELOG.md deleted file mode 100644 index 92a4fdc..0000000 --- a/node_modules/tweetnacl/CHANGELOG.md +++ /dev/null @@ -1,221 +0,0 @@ -TweetNaCl.js Changelog -====================== - - -v0.14.5 -------- - -* Fixed incomplete return types in TypeScript typings. -* Replaced COPYING.txt with LICENSE file, which now has public domain dedication - text from The Unlicense. License fields in package.json and bower.json have - been set to "Unlicense". The project was and will be in the public domain -- - this change just makes it easier for automated tools to know about this fact by - using the widely recognized and SPDX-compatible template for public domain - dedication. - - -v0.14.4 -------- - -* Added TypeScript type definitions (contributed by @AndSDev). -* Improved benchmarking code. - - -v0.14.3 -------- - -Fixed a bug in the fast version of Poly1305 and brought it back. - -Thanks to @floodyberry for promptly responding and fixing the original C code: - -> "The issue was not properly detecting if st->h was >= 2^130 - 5, coupled with -> [testing mistake] not catching the failure. The chance of the bug affecting -> anything in the real world is essentially zero luckily, but it's good to have -> it fixed." - -https://github.com/floodyberry/poly1305-donna/issues/2#issuecomment-202698577 - - -v0.14.2 -------- - -Switched Poly1305 fast version back to original (slow) version due to a bug. - - -v0.14.1 -------- - -No code changes, just tweaked packaging and added COPYING.txt. - - -v0.14.0 -------- - -* **Breaking change!** All functions from `nacl.util` have been removed. These - functions are no longer available: - - nacl.util.decodeUTF8 - nacl.util.encodeUTF8 - nacl.util.decodeBase64 - nacl.util.encodeBase64 - - If want to continue using them, you can include - package: - - - - - or - - var nacl = require('tweetnacl'); - nacl.util = require('tweetnacl-util'); - - However it is recommended to use better packages that have wider - compatibility and better performance. Functions from `nacl.util` were never - intended to be robust solution for string conversion and were included for - convenience: cryptography library is not the right place for them. - - Currently calling these functions will throw error pointing to - `tweetnacl-util-js` (in the next version this error message will be removed). - -* Improved detection of available random number generators, making it possible - to use `nacl.randomBytes` and related functions in Web Workers without - changes. - -* Changes to testing (see README). - - -v0.13.3 -------- - -No code changes. - -* Reverted license field in package.json to "Public domain". - -* Fixed typo in README. - - -v0.13.2 -------- - -* Fixed undefined variable bug in fast version of Poly1305. No worries, this - bug was *never* triggered. - -* Specified CC0 public domain dedication. - -* Updated development dependencies. - - -v0.13.1 -------- - -* Exclude `crypto` and `buffer` modules from browserify builds. - - -v0.13.0 -------- - -* Made `nacl-fast` the default version in NPM package. Now - `require("tweetnacl")` will use fast version; to get the original version, - use `require("tweetnacl/nacl.js")`. - -* Cleanup temporary array after generating random bytes. - - -v0.12.2 -------- - -* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, - `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. - - -v0.12.1 -------- - -* Significantly improved performance of Salsa20 (~1.5x faster) and - Poly1305 (~3.5x faster) in `nacl-fast` version. - - -v0.12.0 -------- - -* Instead of using the given secret key directly, TweetNaCl.js now copies it to - a new array in `nacl.box.keyPair.fromSecretKey` and - `nacl.sign.keyPair.fromSecretKey`. - - -v0.11.2 -------- - -* Added new constant: `nacl.sign.seedLength`. - - -v0.11.1 -------- - -* Even faster hash for both short and long inputs (in `nacl-fast`). - - -v0.11.0 -------- - -* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs - deterministically from a 32-byte seed. (It behaves like - [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) - `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) - -* Fast version now has an improved hash implementation that is 2x-5x faster. - -* Fixed benchmarks, which may have produced incorrect measurements. - - -v0.10.1 -------- - -* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. - - -v0.10.0 -------- - -* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal - with signed messages, and new `nacl.sign.detached` and - `nacl.sign.detached.verify` are available. - - Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a - message and "detached" signature. This was unlike NaCl's API, which dealt with - signed messages (concatenation of signature and message). - - The new API is: - - nacl.sign(message, secretKey) -> signedMessage - nacl.sign.open(signedMessage, publicKey) -> message | null - - Since detached signatures are common, two new API functions were introduced: - - nacl.sign.detached(message, secretKey) -> signature - nacl.sign.detached.verify(message, signature, publicKey) -> true | false - - (Note that it's `verify`, not `open`, and it returns a boolean value, unlike - `open`, which returns an "unsigned" message.) - -* NPM package now comes without `test` directory to keep it small. - - -v0.9.2 ------- - -* Improved documentation. -* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 - bytes in Poly1305 (and thus, secretbox and box). However this has no impact - in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit - indexes, and most implementations won't allocate more than a gigabyte or so. - (Obviously, there are no tests for the correctness of implementation.) Also, - it's not recommended to use messages that large without splitting them into - smaller packets anyway. - - -v0.9.1 ------- - -* Initial release diff --git a/node_modules/tweetnacl/LICENSE b/node_modules/tweetnacl/LICENSE deleted file mode 100644 index cf1ab25..0000000 --- a/node_modules/tweetnacl/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md b/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a8eb4a9..0000000 --- a/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ -# Important! - -If your contribution is not trivial (not a typo fix, etc.), we can only accept -it if you dedicate your copyright for the contribution to the public domain. -Make sure you understand what it means (see http://unlicense.org/)! If you -agree, please add yourself to AUTHORS.md file, and include the following text -to your pull request description or a comment in it: - ------------------------------------------------------------------------------- - - I dedicate any and all copyright interest in this software to the - public domain. I make this dedication for the benefit of the public at - large and to the detriment of my heirs and successors. I intend this - dedication to be an overt act of relinquishment in perpetuity of all - present and future rights to this software under copyright law. - - Anyone is free to copy, modify, publish, use, compile, sell, or - distribute this software, either in source code form or as a compiled - binary, for any purpose, commercial or non-commercial, and by any - means. diff --git a/node_modules/tweetnacl/README.md b/node_modules/tweetnacl/README.md deleted file mode 100644 index ffb6871..0000000 --- a/node_modules/tweetnacl/README.md +++ /dev/null @@ -1,459 +0,0 @@ -TweetNaCl.js -============ - -Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) -to JavaScript for modern browsers and Node.js. Public domain. - -[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) -](https://travis-ci.org/dchest/tweetnacl-js) - -Demo: - -**:warning: The library is stable and API is frozen, however it has not been -independently reviewed. If you can help reviewing it, please [contact -me](mailto:dmitry@codingrobots.com).** - -Documentation -============= - -* [Overview](#overview) -* [Installation](#installation) -* [Usage](#usage) - * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) - * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) - * [Scalar multiplication](#scalar-multiplication) - * [Signatures](#signatures) - * [Hashing](#hashing) - * [Random bytes generation](#random-bytes-generation) - * [Constant-time comparison](#constant-time-comparison) -* [System requirements](#system-requirements) -* [Development and testing](#development-and-testing) -* [Benchmarks](#benchmarks) -* [Contributors](#contributors) -* [Who uses it](#who-uses-it) - - -Overview --------- - -The primary goal of this project is to produce a translation of TweetNaCl to -JavaScript which is as close as possible to the original C implementation, plus -a thin layer of idiomatic high-level API on top of it. - -There are two versions, you can use either of them: - -* `nacl.js` is the port of TweetNaCl with minimum differences from the - original + high-level API. - -* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with - faster versions. - - -Installation ------------- - -You can install TweetNaCl.js via a package manager: - -[Bower](http://bower.io): - - $ bower install tweetnacl - -[NPM](https://www.npmjs.org/): - - $ npm install tweetnacl - -or [download source code](https://github.com/dchest/tweetnacl-js/releases). - - -Usage ------ - -All API functions accept and return bytes as `Uint8Array`s. If you need to -encode or decode strings, use functions from - or one of the more robust codec -packages. - -In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you -can freely pass them to TweetNaCl.js functions as arguments. The returned -objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to -convert them manually; make sure to convert using copying: `new Buffer(array)`, -instead of sharing: `new Buffer(array.buffer)`, because some functions return -subarrays of their buffers. - - -### Public-key authenticated encryption (box) - -Implements *curve25519-xsalsa20-poly1305*. - -#### nacl.box.keyPair() - -Generates a new random key pair for box and returns it as an object with -`publicKey` and `secretKey` members: - - { - publicKey: ..., // Uint8Array with 32-byte public key - secretKey: ... // Uint8Array with 32-byte secret key - } - - -#### nacl.box.keyPair.fromSecretKey(secretKey) - -Returns a key pair for box with public key corresponding to the given secret -key. - -#### nacl.box(message, nonce, theirPublicKey, mySecretKey) - -Encrypt and authenticates message using peer's public key, our secret key, and -the given nonce, which must be unique for each distinct message for a key pair. - -Returns an encrypted and authenticated message, which is -`nacl.box.overheadLength` longer than the original message. - -#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) - -Authenticates and decrypts the given box with peer's public key, our secret -key, and the given nonce. - -Returns the original message, or `false` if authentication fails. - -#### nacl.box.before(theirPublicKey, mySecretKey) - -Returns a precomputed shared key which can be used in `nacl.box.after` and -`nacl.box.open.after`. - -#### nacl.box.after(message, nonce, sharedKey) - -Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. - -#### nacl.box.open.after(box, nonce, sharedKey) - -Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. - -#### nacl.box.publicKeyLength = 32 - -Length of public key in bytes. - -#### nacl.box.secretKeyLength = 32 - -Length of secret key in bytes. - -#### nacl.box.sharedKeyLength = 32 - -Length of precomputed shared key in bytes. - -#### nacl.box.nonceLength = 24 - -Length of nonce in bytes. - -#### nacl.box.overheadLength = 16 - -Length of overhead added to box compared to original message. - - -### Secret-key authenticated encryption (secretbox) - -Implements *xsalsa20-poly1305*. - -#### nacl.secretbox(message, nonce, key) - -Encrypt and authenticates message using the key and the nonce. The nonce must -be unique for each distinct message for this key. - -Returns an encrypted and authenticated message, which is -`nacl.secretbox.overheadLength` longer than the original message. - -#### nacl.secretbox.open(box, nonce, key) - -Authenticates and decrypts the given secret box using the key and the nonce. - -Returns the original message, or `false` if authentication fails. - -#### nacl.secretbox.keyLength = 32 - -Length of key in bytes. - -#### nacl.secretbox.nonceLength = 24 - -Length of nonce in bytes. - -#### nacl.secretbox.overheadLength = 16 - -Length of overhead added to secret box compared to original message. - - -### Scalar multiplication - -Implements *curve25519*. - -#### nacl.scalarMult(n, p) - -Multiplies an integer `n` by a group element `p` and returns the resulting -group element. - -#### nacl.scalarMult.base(n) - -Multiplies an integer `n` by a standard group element and returns the resulting -group element. - -#### nacl.scalarMult.scalarLength = 32 - -Length of scalar in bytes. - -#### nacl.scalarMult.groupElementLength = 32 - -Length of group element in bytes. - - -### Signatures - -Implements [ed25519](http://ed25519.cr.yp.to). - -#### nacl.sign.keyPair() - -Generates new random key pair for signing and returns it as an object with -`publicKey` and `secretKey` members: - - { - publicKey: ..., // Uint8Array with 32-byte public key - secretKey: ... // Uint8Array with 64-byte secret key - } - -#### nacl.sign.keyPair.fromSecretKey(secretKey) - -Returns a signing key pair with public key corresponding to the given -64-byte secret key. The secret key must have been generated by -`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. - -#### nacl.sign.keyPair.fromSeed(seed) - -Returns a new signing key pair generated deterministically from a 32-byte seed. -The seed must contain enough entropy to be secure. This method is not -recommended for general use: instead, use `nacl.sign.keyPair` to generate a new -key pair from a random seed. - -#### nacl.sign(message, secretKey) - -Signs the message using the secret key and returns a signed message. - -#### nacl.sign.open(signedMessage, publicKey) - -Verifies the signed message and returns the message without signature. - -Returns `null` if verification failed. - -#### nacl.sign.detached(message, secretKey) - -Signs the message using the secret key and returns a signature. - -#### nacl.sign.detached.verify(message, signature, publicKey) - -Verifies the signature for the message and returns `true` if verification -succeeded or `false` if it failed. - -#### nacl.sign.publicKeyLength = 32 - -Length of signing public key in bytes. - -#### nacl.sign.secretKeyLength = 64 - -Length of signing secret key in bytes. - -#### nacl.sign.seedLength = 32 - -Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. - -#### nacl.sign.signatureLength = 64 - -Length of signature in bytes. - - -### Hashing - -Implements *SHA-512*. - -#### nacl.hash(message) - -Returns SHA-512 hash of the message. - -#### nacl.hash.hashLength = 64 - -Length of hash in bytes. - - -### Random bytes generation - -#### nacl.randomBytes(length) - -Returns a `Uint8Array` of the given length containing random bytes of -cryptographic quality. - -**Implementation note** - -TweetNaCl.js uses the following methods to generate random bytes, -depending on the platform it runs on: - -* `window.crypto.getRandomValues` (WebCrypto standard) -* `window.msCrypto.getRandomValues` (Internet Explorer 11) -* `crypto.randomBytes` (Node.js) - -If the platform doesn't provide a suitable PRNG, the following functions, -which require random numbers, will throw exception: - -* `nacl.randomBytes` -* `nacl.box.keyPair` -* `nacl.sign.keyPair` - -Other functions are deterministic and will continue working. - -If a platform you are targeting doesn't implement secure random number -generator, but you somehow have a cryptographically-strong source of entropy -(not `Math.random`!), and you know what you are doing, you can plug it into -TweetNaCl.js like this: - - nacl.setPRNG(function(x, n) { - // ... copy n random bytes into x ... - }); - -Note that `nacl.setPRNG` *completely replaces* internal random byte generator -with the one provided. - - -### Constant-time comparison - -#### nacl.verify(x, y) - -Compares `x` and `y` in constant time and returns `true` if their lengths are -non-zero and equal, and their contents are equal. - -Returns `false` if either of the arguments has zero length, or arguments have -different lengths, or their contents differ. - - -System requirements -------------------- - -TweetNaCl.js supports modern browsers that have a cryptographically secure -pseudorandom number generator and typed arrays, including the latest versions -of: - -* Chrome -* Firefox -* Safari (Mac, iOS) -* Internet Explorer 11 - -Other systems: - -* Node.js - - -Development and testing ------------------------- - -Install NPM modules needed for development: - - $ npm install - -To build minified versions: - - $ npm run build - -Tests use minified version, so make sure to rebuild it every time you change -`nacl.js` or `nacl-fast.js`. - -### Testing - -To run tests in Node.js: - - $ npm run test-node - -By default all tests described here work on `nacl.min.js`. To test other -versions, set environment variable `NACL_SRC` to the file name you want to test. -For example, the following command will test fast minified version: - - $ NACL_SRC=nacl-fast.min.js npm run test-node - -To run full suite of tests in Node.js, including comparing outputs of -JavaScript port to outputs of the original C version: - - $ npm run test-node-all - -To prepare tests for browsers: - - $ npm run build-test-browser - -and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to -run them. - -To run headless browser tests with `tape-run` (powered by Electron): - - $ npm run test-browser - -(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) - -To run tests in both Node and Electron: - - $ npm test - -### Benchmarking - -To run benchmarks in Node.js: - - $ npm run bench - $ NACL_SRC=nacl-fast.min.js npm run bench - -To run benchmarks in a browser, open `test/benchmark/bench.html` (or -`test/benchmark/bench-fast.html`). - - -Benchmarks ----------- - -For reference, here are benchmarks from MacBook Pro (Retina, 13-inch, Mid 2014) -laptop with 2.6 GHz Intel Core i5 CPU (Intel) in Chrome 53/OS X and Xiaomi Redmi -Note 3 smartphone with 1.8 GHz Qualcomm Snapdragon 650 64-bit CPU (ARM) in -Chrome 52/Android: - -| | nacl.js Intel | nacl-fast.js Intel | nacl.js ARM | nacl-fast.js ARM | -| ------------- |:-------------:|:-------------------:|:-------------:|:-----------------:| -| salsa20 | 1.3 MB/s | 128 MB/s | 0.4 MB/s | 43 MB/s | -| poly1305 | 13 MB/s | 171 MB/s | 4 MB/s | 52 MB/s | -| hash | 4 MB/s | 34 MB/s | 0.9 MB/s | 12 MB/s | -| secretbox 1K | 1113 op/s | 57583 op/s | 334 op/s | 14227 op/s | -| box 1K | 145 op/s | 718 op/s | 37 op/s | 368 op/s | -| scalarMult | 171 op/s | 733 op/s | 56 op/s | 380 op/s | -| sign | 77 op/s | 200 op/s | 20 op/s | 61 op/s | -| sign.open | 39 op/s | 102 op/s | 11 op/s | 31 op/s | - -(You can run benchmarks on your devices by clicking on the links at the bottom -of the [home page](https://tweetnacl.js.org)). - -In short, with *nacl-fast.js* and 1024-byte messages you can expect to encrypt and -authenticate more than 57000 messages per second on a typical laptop or more than -14000 messages per second on a $170 smartphone, sign about 200 and verify 100 -messages per second on a laptop or 60 and 30 messages per second on a smartphone, -per CPU core (with Web Workers you can do these operations in parallel), -which is good enough for most applications. - - -Contributors ------------- - -See AUTHORS.md file. - - -Third-party libraries based on TweetNaCl.js -------------------------------------------- - -* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation -* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption -* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) -* [chloride](https://github.com/dominictarr/chloride) - unified API for various NaCl modules - - -Who uses it ------------ - -Some notable users of TweetNaCl.js: - -* [miniLock](http://minilock.io/) -* [Stellar](https://www.stellar.org/) diff --git a/node_modules/tweetnacl/nacl-fast.js b/node_modules/tweetnacl/nacl-fast.js deleted file mode 100644 index 5e4562f..0000000 --- a/node_modules/tweetnacl/nacl-fast.js +++ /dev/null @@ -1,2388 +0,0 @@ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function ts64(x, i, h, l) { - x[i] = (h >> 24) & 0xff; - x[i+1] = (h >> 16) & 0xff; - x[i+2] = (h >> 8) & 0xff; - x[i+3] = h & 0xff; - x[i+4] = (l >> 24) & 0xff; - x[i+5] = (l >> 16) & 0xff; - x[i+6] = (l >> 8) & 0xff; - x[i+7] = l & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core_salsa20(o, p, k, c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - x0 = x0 + j0 | 0; - x1 = x1 + j1 | 0; - x2 = x2 + j2 | 0; - x3 = x3 + j3 | 0; - x4 = x4 + j4 | 0; - x5 = x5 + j5 | 0; - x6 = x6 + j6 | 0; - x7 = x7 + j7 | 0; - x8 = x8 + j8 | 0; - x9 = x9 + j9 | 0; - x10 = x10 + j10 | 0; - x11 = x11 + j11 | 0; - x12 = x12 + j12 | 0; - x13 = x13 + j13 | 0; - x14 = x14 + j14 | 0; - x15 = x15 + j15 | 0; - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x1 >>> 0 & 0xff; - o[ 5] = x1 >>> 8 & 0xff; - o[ 6] = x1 >>> 16 & 0xff; - o[ 7] = x1 >>> 24 & 0xff; - - o[ 8] = x2 >>> 0 & 0xff; - o[ 9] = x2 >>> 8 & 0xff; - o[10] = x2 >>> 16 & 0xff; - o[11] = x2 >>> 24 & 0xff; - - o[12] = x3 >>> 0 & 0xff; - o[13] = x3 >>> 8 & 0xff; - o[14] = x3 >>> 16 & 0xff; - o[15] = x3 >>> 24 & 0xff; - - o[16] = x4 >>> 0 & 0xff; - o[17] = x4 >>> 8 & 0xff; - o[18] = x4 >>> 16 & 0xff; - o[19] = x4 >>> 24 & 0xff; - - o[20] = x5 >>> 0 & 0xff; - o[21] = x5 >>> 8 & 0xff; - o[22] = x5 >>> 16 & 0xff; - o[23] = x5 >>> 24 & 0xff; - - o[24] = x6 >>> 0 & 0xff; - o[25] = x6 >>> 8 & 0xff; - o[26] = x6 >>> 16 & 0xff; - o[27] = x6 >>> 24 & 0xff; - - o[28] = x7 >>> 0 & 0xff; - o[29] = x7 >>> 8 & 0xff; - o[30] = x7 >>> 16 & 0xff; - o[31] = x7 >>> 24 & 0xff; - - o[32] = x8 >>> 0 & 0xff; - o[33] = x8 >>> 8 & 0xff; - o[34] = x8 >>> 16 & 0xff; - o[35] = x8 >>> 24 & 0xff; - - o[36] = x9 >>> 0 & 0xff; - o[37] = x9 >>> 8 & 0xff; - o[38] = x9 >>> 16 & 0xff; - o[39] = x9 >>> 24 & 0xff; - - o[40] = x10 >>> 0 & 0xff; - o[41] = x10 >>> 8 & 0xff; - o[42] = x10 >>> 16 & 0xff; - o[43] = x10 >>> 24 & 0xff; - - o[44] = x11 >>> 0 & 0xff; - o[45] = x11 >>> 8 & 0xff; - o[46] = x11 >>> 16 & 0xff; - o[47] = x11 >>> 24 & 0xff; - - o[48] = x12 >>> 0 & 0xff; - o[49] = x12 >>> 8 & 0xff; - o[50] = x12 >>> 16 & 0xff; - o[51] = x12 >>> 24 & 0xff; - - o[52] = x13 >>> 0 & 0xff; - o[53] = x13 >>> 8 & 0xff; - o[54] = x13 >>> 16 & 0xff; - o[55] = x13 >>> 24 & 0xff; - - o[56] = x14 >>> 0 & 0xff; - o[57] = x14 >>> 8 & 0xff; - o[58] = x14 >>> 16 & 0xff; - o[59] = x14 >>> 24 & 0xff; - - o[60] = x15 >>> 0 & 0xff; - o[61] = x15 >>> 8 & 0xff; - o[62] = x15 >>> 16 & 0xff; - o[63] = x15 >>> 24 & 0xff; -} - -function core_hsalsa20(o,p,k,c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x5 >>> 0 & 0xff; - o[ 5] = x5 >>> 8 & 0xff; - o[ 6] = x5 >>> 16 & 0xff; - o[ 7] = x5 >>> 24 & 0xff; - - o[ 8] = x10 >>> 0 & 0xff; - o[ 9] = x10 >>> 8 & 0xff; - o[10] = x10 >>> 16 & 0xff; - o[11] = x10 >>> 24 & 0xff; - - o[12] = x15 >>> 0 & 0xff; - o[13] = x15 >>> 8 & 0xff; - o[14] = x15 >>> 16 & 0xff; - o[15] = x15 >>> 24 & 0xff; - - o[16] = x6 >>> 0 & 0xff; - o[17] = x6 >>> 8 & 0xff; - o[18] = x6 >>> 16 & 0xff; - o[19] = x6 >>> 24 & 0xff; - - o[20] = x7 >>> 0 & 0xff; - o[21] = x7 >>> 8 & 0xff; - o[22] = x7 >>> 16 & 0xff; - o[23] = x7 >>> 24 & 0xff; - - o[24] = x8 >>> 0 & 0xff; - o[25] = x8 >>> 8 & 0xff; - o[26] = x8 >>> 16 & 0xff; - o[27] = x8 >>> 24 & 0xff; - - o[28] = x9 >>> 0 & 0xff; - o[29] = x9 >>> 8 & 0xff; - o[30] = x9 >>> 16 & 0xff; - o[31] = x9 >>> 24 & 0xff; -} - -function crypto_core_salsa20(out,inp,k,c) { - core_salsa20(out,inp,k,c); -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core_hsalsa20(out,inp,k,c); -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = x[i]; - } - return 0; -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20(c,cpos,d,sn,s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); -} - -/* -* Port of Andrew Moon's Poly1305-donna-16. Public domain. -* https://github.com/floodyberry/poly1305-donna -*/ - -var poly1305 = function(key) { - this.buffer = new Uint8Array(16); - this.r = new Uint16Array(10); - this.h = new Uint16Array(10); - this.pad = new Uint16Array(8); - this.leftover = 0; - this.fin = 0; - - var t0, t1, t2, t3, t4, t5, t6, t7; - - t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; - t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; - t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; - this.r[5] = ((t4 >>> 1)) & 0x1ffe; - t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; - t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - this.r[9] = ((t7 >>> 5)) & 0x007f; - - this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; - this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; - this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; - this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; - this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; - this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; - this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; - this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; -}; - -poly1305.prototype.blocks = function(m, mpos, bytes) { - var hibit = this.fin ? 0 : (1 << 11); - var t0, t1, t2, t3, t4, t5, t6, t7, c; - var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; - - var h0 = this.h[0], - h1 = this.h[1], - h2 = this.h[2], - h3 = this.h[3], - h4 = this.h[4], - h5 = this.h[5], - h6 = this.h[6], - h7 = this.h[7], - h8 = this.h[8], - h9 = this.h[9]; - - var r0 = this.r[0], - r1 = this.r[1], - r2 = this.r[2], - r3 = this.r[3], - r4 = this.r[4], - r5 = this.r[5], - r6 = this.r[6], - r7 = this.r[7], - r8 = this.r[8], - r9 = this.r[9]; - - while (bytes >= 16) { - t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; - t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; - t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; - h5 += ((t4 >>> 1)) & 0x1fff; - t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; - t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - h9 += ((t7 >>> 5)) | hibit; - - c = 0; - - d0 = c; - d0 += h0 * r0; - d0 += h1 * (5 * r9); - d0 += h2 * (5 * r8); - d0 += h3 * (5 * r7); - d0 += h4 * (5 * r6); - c = (d0 >>> 13); d0 &= 0x1fff; - d0 += h5 * (5 * r5); - d0 += h6 * (5 * r4); - d0 += h7 * (5 * r3); - d0 += h8 * (5 * r2); - d0 += h9 * (5 * r1); - c += (d0 >>> 13); d0 &= 0x1fff; - - d1 = c; - d1 += h0 * r1; - d1 += h1 * r0; - d1 += h2 * (5 * r9); - d1 += h3 * (5 * r8); - d1 += h4 * (5 * r7); - c = (d1 >>> 13); d1 &= 0x1fff; - d1 += h5 * (5 * r6); - d1 += h6 * (5 * r5); - d1 += h7 * (5 * r4); - d1 += h8 * (5 * r3); - d1 += h9 * (5 * r2); - c += (d1 >>> 13); d1 &= 0x1fff; - - d2 = c; - d2 += h0 * r2; - d2 += h1 * r1; - d2 += h2 * r0; - d2 += h3 * (5 * r9); - d2 += h4 * (5 * r8); - c = (d2 >>> 13); d2 &= 0x1fff; - d2 += h5 * (5 * r7); - d2 += h6 * (5 * r6); - d2 += h7 * (5 * r5); - d2 += h8 * (5 * r4); - d2 += h9 * (5 * r3); - c += (d2 >>> 13); d2 &= 0x1fff; - - d3 = c; - d3 += h0 * r3; - d3 += h1 * r2; - d3 += h2 * r1; - d3 += h3 * r0; - d3 += h4 * (5 * r9); - c = (d3 >>> 13); d3 &= 0x1fff; - d3 += h5 * (5 * r8); - d3 += h6 * (5 * r7); - d3 += h7 * (5 * r6); - d3 += h8 * (5 * r5); - d3 += h9 * (5 * r4); - c += (d3 >>> 13); d3 &= 0x1fff; - - d4 = c; - d4 += h0 * r4; - d4 += h1 * r3; - d4 += h2 * r2; - d4 += h3 * r1; - d4 += h4 * r0; - c = (d4 >>> 13); d4 &= 0x1fff; - d4 += h5 * (5 * r9); - d4 += h6 * (5 * r8); - d4 += h7 * (5 * r7); - d4 += h8 * (5 * r6); - d4 += h9 * (5 * r5); - c += (d4 >>> 13); d4 &= 0x1fff; - - d5 = c; - d5 += h0 * r5; - d5 += h1 * r4; - d5 += h2 * r3; - d5 += h3 * r2; - d5 += h4 * r1; - c = (d5 >>> 13); d5 &= 0x1fff; - d5 += h5 * r0; - d5 += h6 * (5 * r9); - d5 += h7 * (5 * r8); - d5 += h8 * (5 * r7); - d5 += h9 * (5 * r6); - c += (d5 >>> 13); d5 &= 0x1fff; - - d6 = c; - d6 += h0 * r6; - d6 += h1 * r5; - d6 += h2 * r4; - d6 += h3 * r3; - d6 += h4 * r2; - c = (d6 >>> 13); d6 &= 0x1fff; - d6 += h5 * r1; - d6 += h6 * r0; - d6 += h7 * (5 * r9); - d6 += h8 * (5 * r8); - d6 += h9 * (5 * r7); - c += (d6 >>> 13); d6 &= 0x1fff; - - d7 = c; - d7 += h0 * r7; - d7 += h1 * r6; - d7 += h2 * r5; - d7 += h3 * r4; - d7 += h4 * r3; - c = (d7 >>> 13); d7 &= 0x1fff; - d7 += h5 * r2; - d7 += h6 * r1; - d7 += h7 * r0; - d7 += h8 * (5 * r9); - d7 += h9 * (5 * r8); - c += (d7 >>> 13); d7 &= 0x1fff; - - d8 = c; - d8 += h0 * r8; - d8 += h1 * r7; - d8 += h2 * r6; - d8 += h3 * r5; - d8 += h4 * r4; - c = (d8 >>> 13); d8 &= 0x1fff; - d8 += h5 * r3; - d8 += h6 * r2; - d8 += h7 * r1; - d8 += h8 * r0; - d8 += h9 * (5 * r9); - c += (d8 >>> 13); d8 &= 0x1fff; - - d9 = c; - d9 += h0 * r9; - d9 += h1 * r8; - d9 += h2 * r7; - d9 += h3 * r6; - d9 += h4 * r5; - c = (d9 >>> 13); d9 &= 0x1fff; - d9 += h5 * r4; - d9 += h6 * r3; - d9 += h7 * r2; - d9 += h8 * r1; - d9 += h9 * r0; - c += (d9 >>> 13); d9 &= 0x1fff; - - c = (((c << 2) + c)) | 0; - c = (c + d0) | 0; - d0 = c & 0x1fff; - c = (c >>> 13); - d1 += c; - - h0 = d0; - h1 = d1; - h2 = d2; - h3 = d3; - h4 = d4; - h5 = d5; - h6 = d6; - h7 = d7; - h8 = d8; - h9 = d9; - - mpos += 16; - bytes -= 16; - } - this.h[0] = h0; - this.h[1] = h1; - this.h[2] = h2; - this.h[3] = h3; - this.h[4] = h4; - this.h[5] = h5; - this.h[6] = h6; - this.h[7] = h7; - this.h[8] = h8; - this.h[9] = h9; -}; - -poly1305.prototype.finish = function(mac, macpos) { - var g = new Uint16Array(10); - var c, mask, f, i; - - if (this.leftover) { - i = this.leftover; - this.buffer[i++] = 1; - for (; i < 16; i++) this.buffer[i] = 0; - this.fin = 1; - this.blocks(this.buffer, 0, 16); - } - - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - for (i = 2; i < 10; i++) { - this.h[i] += c; - c = this.h[i] >>> 13; - this.h[i] &= 0x1fff; - } - this.h[0] += (c * 5); - c = this.h[0] >>> 13; - this.h[0] &= 0x1fff; - this.h[1] += c; - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - this.h[2] += c; - - g[0] = this.h[0] + 5; - c = g[0] >>> 13; - g[0] &= 0x1fff; - for (i = 1; i < 10; i++) { - g[i] = this.h[i] + c; - c = g[i] >>> 13; - g[i] &= 0x1fff; - } - g[9] -= (1 << 13); - - mask = (c ^ 1) - 1; - for (i = 0; i < 10; i++) g[i] &= mask; - mask = ~mask; - for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; - - this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; - this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; - this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; - this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; - this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; - this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; - this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; - this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; - - f = this.h[0] + this.pad[0]; - this.h[0] = f & 0xffff; - for (i = 1; i < 8; i++) { - f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; - this.h[i] = f & 0xffff; - } - - mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; - mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; - mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; - mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; - mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; - mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; - mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; - mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; - mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; - mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; - mac[macpos+10] = (this.h[5] >>> 0) & 0xff; - mac[macpos+11] = (this.h[5] >>> 8) & 0xff; - mac[macpos+12] = (this.h[6] >>> 0) & 0xff; - mac[macpos+13] = (this.h[6] >>> 8) & 0xff; - mac[macpos+14] = (this.h[7] >>> 0) & 0xff; - mac[macpos+15] = (this.h[7] >>> 8) & 0xff; -}; - -poly1305.prototype.update = function(m, mpos, bytes) { - var i, want; - - if (this.leftover) { - want = (16 - this.leftover); - if (want > bytes) - want = bytes; - for (i = 0; i < want; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - bytes -= want; - mpos += want; - this.leftover += want; - if (this.leftover < 16) - return; - this.blocks(this.buffer, 0, 16); - this.leftover = 0; - } - - if (bytes >= 16) { - want = bytes - (bytes % 16); - this.blocks(m, mpos, want); - mpos += want; - bytes -= want; - } - - if (bytes) { - for (i = 0; i < bytes; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - this.leftover += bytes; - } -}; - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s = new poly1305(k); - s.update(m, mpos, n); - s.finish(out, outpos); - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var i, v, c = 1; - for (i = 0; i < 16; i++) { - v = o[i] + c + 65535; - c = Math.floor(v / 65536); - o[i] = v - c * 65536; - } - o[0] += c-1 + 37 * (c-1); -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; -} - -function Z(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; -} - -function M(o, a, b) { - var v, c, - t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, - t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, - t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, - t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, - b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11], - b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - - v = a[0]; - t0 += v * b0; - t1 += v * b1; - t2 += v * b2; - t3 += v * b3; - t4 += v * b4; - t5 += v * b5; - t6 += v * b6; - t7 += v * b7; - t8 += v * b8; - t9 += v * b9; - t10 += v * b10; - t11 += v * b11; - t12 += v * b12; - t13 += v * b13; - t14 += v * b14; - t15 += v * b15; - v = a[1]; - t1 += v * b0; - t2 += v * b1; - t3 += v * b2; - t4 += v * b3; - t5 += v * b4; - t6 += v * b5; - t7 += v * b6; - t8 += v * b7; - t9 += v * b8; - t10 += v * b9; - t11 += v * b10; - t12 += v * b11; - t13 += v * b12; - t14 += v * b13; - t15 += v * b14; - t16 += v * b15; - v = a[2]; - t2 += v * b0; - t3 += v * b1; - t4 += v * b2; - t5 += v * b3; - t6 += v * b4; - t7 += v * b5; - t8 += v * b6; - t9 += v * b7; - t10 += v * b8; - t11 += v * b9; - t12 += v * b10; - t13 += v * b11; - t14 += v * b12; - t15 += v * b13; - t16 += v * b14; - t17 += v * b15; - v = a[3]; - t3 += v * b0; - t4 += v * b1; - t5 += v * b2; - t6 += v * b3; - t7 += v * b4; - t8 += v * b5; - t9 += v * b6; - t10 += v * b7; - t11 += v * b8; - t12 += v * b9; - t13 += v * b10; - t14 += v * b11; - t15 += v * b12; - t16 += v * b13; - t17 += v * b14; - t18 += v * b15; - v = a[4]; - t4 += v * b0; - t5 += v * b1; - t6 += v * b2; - t7 += v * b3; - t8 += v * b4; - t9 += v * b5; - t10 += v * b6; - t11 += v * b7; - t12 += v * b8; - t13 += v * b9; - t14 += v * b10; - t15 += v * b11; - t16 += v * b12; - t17 += v * b13; - t18 += v * b14; - t19 += v * b15; - v = a[5]; - t5 += v * b0; - t6 += v * b1; - t7 += v * b2; - t8 += v * b3; - t9 += v * b4; - t10 += v * b5; - t11 += v * b6; - t12 += v * b7; - t13 += v * b8; - t14 += v * b9; - t15 += v * b10; - t16 += v * b11; - t17 += v * b12; - t18 += v * b13; - t19 += v * b14; - t20 += v * b15; - v = a[6]; - t6 += v * b0; - t7 += v * b1; - t8 += v * b2; - t9 += v * b3; - t10 += v * b4; - t11 += v * b5; - t12 += v * b6; - t13 += v * b7; - t14 += v * b8; - t15 += v * b9; - t16 += v * b10; - t17 += v * b11; - t18 += v * b12; - t19 += v * b13; - t20 += v * b14; - t21 += v * b15; - v = a[7]; - t7 += v * b0; - t8 += v * b1; - t9 += v * b2; - t10 += v * b3; - t11 += v * b4; - t12 += v * b5; - t13 += v * b6; - t14 += v * b7; - t15 += v * b8; - t16 += v * b9; - t17 += v * b10; - t18 += v * b11; - t19 += v * b12; - t20 += v * b13; - t21 += v * b14; - t22 += v * b15; - v = a[8]; - t8 += v * b0; - t9 += v * b1; - t10 += v * b2; - t11 += v * b3; - t12 += v * b4; - t13 += v * b5; - t14 += v * b6; - t15 += v * b7; - t16 += v * b8; - t17 += v * b9; - t18 += v * b10; - t19 += v * b11; - t20 += v * b12; - t21 += v * b13; - t22 += v * b14; - t23 += v * b15; - v = a[9]; - t9 += v * b0; - t10 += v * b1; - t11 += v * b2; - t12 += v * b3; - t13 += v * b4; - t14 += v * b5; - t15 += v * b6; - t16 += v * b7; - t17 += v * b8; - t18 += v * b9; - t19 += v * b10; - t20 += v * b11; - t21 += v * b12; - t22 += v * b13; - t23 += v * b14; - t24 += v * b15; - v = a[10]; - t10 += v * b0; - t11 += v * b1; - t12 += v * b2; - t13 += v * b3; - t14 += v * b4; - t15 += v * b5; - t16 += v * b6; - t17 += v * b7; - t18 += v * b8; - t19 += v * b9; - t20 += v * b10; - t21 += v * b11; - t22 += v * b12; - t23 += v * b13; - t24 += v * b14; - t25 += v * b15; - v = a[11]; - t11 += v * b0; - t12 += v * b1; - t13 += v * b2; - t14 += v * b3; - t15 += v * b4; - t16 += v * b5; - t17 += v * b6; - t18 += v * b7; - t19 += v * b8; - t20 += v * b9; - t21 += v * b10; - t22 += v * b11; - t23 += v * b12; - t24 += v * b13; - t25 += v * b14; - t26 += v * b15; - v = a[12]; - t12 += v * b0; - t13 += v * b1; - t14 += v * b2; - t15 += v * b3; - t16 += v * b4; - t17 += v * b5; - t18 += v * b6; - t19 += v * b7; - t20 += v * b8; - t21 += v * b9; - t22 += v * b10; - t23 += v * b11; - t24 += v * b12; - t25 += v * b13; - t26 += v * b14; - t27 += v * b15; - v = a[13]; - t13 += v * b0; - t14 += v * b1; - t15 += v * b2; - t16 += v * b3; - t17 += v * b4; - t18 += v * b5; - t19 += v * b6; - t20 += v * b7; - t21 += v * b8; - t22 += v * b9; - t23 += v * b10; - t24 += v * b11; - t25 += v * b12; - t26 += v * b13; - t27 += v * b14; - t28 += v * b15; - v = a[14]; - t14 += v * b0; - t15 += v * b1; - t16 += v * b2; - t17 += v * b3; - t18 += v * b4; - t19 += v * b5; - t20 += v * b6; - t21 += v * b7; - t22 += v * b8; - t23 += v * b9; - t24 += v * b10; - t25 += v * b11; - t26 += v * b12; - t27 += v * b13; - t28 += v * b14; - t29 += v * b15; - v = a[15]; - t15 += v * b0; - t16 += v * b1; - t17 += v * b2; - t18 += v * b3; - t19 += v * b4; - t20 += v * b5; - t21 += v * b6; - t22 += v * b7; - t23 += v * b8; - t24 += v * b9; - t25 += v * b10; - t26 += v * b11; - t27 += v * b12; - t28 += v * b13; - t29 += v * b14; - t30 += v * b15; - - t0 += 38 * t16; - t1 += 38 * t17; - t2 += 38 * t18; - t3 += 38 * t19; - t4 += 38 * t20; - t5 += 38 * t21; - t6 += 38 * t22; - t7 += 38 * t23; - t8 += 38 * t24; - t9 += 38 * t25; - t10 += 38 * t26; - t11 += 38 * t27; - t12 += 38 * t28; - t13 += 38 * t29; - t14 += 38 * t30; - // t15 left as is - - // first car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - // second car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - o[ 0] = t0; - o[ 1] = t1; - o[ 2] = t2; - o[ 3] = t3; - o[ 4] = t4; - o[ 5] = t5; - o[ 6] = t6; - o[ 7] = t7; - o[ 8] = t8; - o[ 9] = t9; - o[10] = t10; - o[11] = t11; - o[12] = t12; - o[13] = t13; - o[14] = t14; - o[15] = t15; -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function crypto_hashblocks_hl(hh, hl, m, n) { - var wh = new Int32Array(16), wl = new Int32Array(16), - bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, - bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, - th, tl, i, j, h, l, a, b, c, d; - - var ah0 = hh[0], - ah1 = hh[1], - ah2 = hh[2], - ah3 = hh[3], - ah4 = hh[4], - ah5 = hh[5], - ah6 = hh[6], - ah7 = hh[7], - - al0 = hl[0], - al1 = hl[1], - al2 = hl[2], - al3 = hl[3], - al4 = hl[4], - al5 = hl[5], - al6 = hl[6], - al7 = hl[7]; - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) { - j = 8 * i + pos; - wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; - wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; - } - for (i = 0; i < 80; i++) { - bh0 = ah0; - bh1 = ah1; - bh2 = ah2; - bh3 = ah3; - bh4 = ah4; - bh5 = ah5; - bh6 = ah6; - bh7 = ah7; - - bl0 = al0; - bl1 = al1; - bl2 = al2; - bl3 = al3; - bl4 = al4; - bl5 = al5; - bl6 = al6; - bl7 = al7; - - // add - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma1 - h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); - l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Ch - h = (ah4 & ah5) ^ (~ah4 & ah6); - l = (al4 & al5) ^ (~al4 & al6); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // K - h = K[i*2]; - l = K[i*2+1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // w - h = wh[i%16]; - l = wl[i%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - th = c & 0xffff | d << 16; - tl = a & 0xffff | b << 16; - - // add - h = th; - l = tl; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma0 - h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); - l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Maj - h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); - l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh7 = (c & 0xffff) | (d << 16); - bl7 = (a & 0xffff) | (b << 16); - - // add - h = bh3; - l = bl3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = th; - l = tl; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh3 = (c & 0xffff) | (d << 16); - bl3 = (a & 0xffff) | (b << 16); - - ah1 = bh0; - ah2 = bh1; - ah3 = bh2; - ah4 = bh3; - ah5 = bh4; - ah6 = bh5; - ah7 = bh6; - ah0 = bh7; - - al1 = bl0; - al2 = bl1; - al3 = bl2; - al4 = bl3; - al5 = bl4; - al6 = bl5; - al7 = bl6; - al0 = bl7; - - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - // add - h = wh[j]; - l = wl[j]; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = wh[(j+9)%16]; - l = wl[(j+9)%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma0 - th = wh[(j+1)%16]; - tl = wl[(j+1)%16]; - h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); - l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma1 - th = wh[(j+14)%16]; - tl = wl[(j+14)%16]; - h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); - l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - wh[j] = (c & 0xffff) | (d << 16); - wl[j] = (a & 0xffff) | (b << 16); - } - } - } - - // add - h = ah0; - l = al0; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[0]; - l = hl[0]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[0] = ah0 = (c & 0xffff) | (d << 16); - hl[0] = al0 = (a & 0xffff) | (b << 16); - - h = ah1; - l = al1; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[1]; - l = hl[1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[1] = ah1 = (c & 0xffff) | (d << 16); - hl[1] = al1 = (a & 0xffff) | (b << 16); - - h = ah2; - l = al2; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[2]; - l = hl[2]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[2] = ah2 = (c & 0xffff) | (d << 16); - hl[2] = al2 = (a & 0xffff) | (b << 16); - - h = ah3; - l = al3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[3]; - l = hl[3]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[3] = ah3 = (c & 0xffff) | (d << 16); - hl[3] = al3 = (a & 0xffff) | (b << 16); - - h = ah4; - l = al4; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[4]; - l = hl[4]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[4] = ah4 = (c & 0xffff) | (d << 16); - hl[4] = al4 = (a & 0xffff) | (b << 16); - - h = ah5; - l = al5; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[5]; - l = hl[5]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[5] = ah5 = (c & 0xffff) | (d << 16); - hl[5] = al5 = (a & 0xffff) | (b << 16); - - h = ah6; - l = al6; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[6]; - l = hl[6]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[6] = ah6 = (c & 0xffff) | (d << 16); - hl[6] = al6 = (a & 0xffff) | (b << 16); - - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[7]; - l = hl[7]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[7] = ah7 = (c & 0xffff) | (d << 16); - hl[7] = al7 = (a & 0xffff) | (b << 16); - - pos += 128; - n -= 128; - } - - return n; -} - -function crypto_hash(out, m, n) { - var hh = new Int32Array(8), - hl = new Int32Array(8), - x = new Uint8Array(256), - i, b = n; - - hh[0] = 0x6a09e667; - hh[1] = 0xbb67ae85; - hh[2] = 0x3c6ef372; - hh[3] = 0xa54ff53a; - hh[4] = 0x510e527f; - hh[5] = 0x9b05688c; - hh[6] = 0x1f83d9ab; - hh[7] = 0x5be0cd19; - - hl[0] = 0xf3bcc908; - hl[1] = 0x84caa73b; - hl[2] = 0xfe94f82b; - hl[3] = 0x5f1d36f1; - hl[4] = 0xade682d1; - hl[5] = 0x2b3e6c1f; - hl[6] = 0xfb41bd6b; - hl[7] = 0x137e2179; - - crypto_hashblocks_hl(hh, hl, m, n); - n %= 128; - - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, (b / 0x20000000) | 0, b << 3); - crypto_hashblocks_hl(hh, hl, x, n); - - for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/node_modules/tweetnacl/nacl-fast.min.js b/node_modules/tweetnacl/nacl-fast.min.js deleted file mode 100644 index 8bc47da..0000000 --- a/node_modules/tweetnacl/nacl-fast.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;i>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+c|0,B=B+u|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,c=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=i[s];for(;o>=64;){for(a(u,c,h,ur),s=0;s<64;s++)r[t+s]=n[e+s]^u[s];for(f=1,s=8;s<16;s++)f=f+(255&c[s])|0,c[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(u,c,h,ur),s=0;s=64;){for(a(s,f,o,ur),h=0;h<64;h++)r[t+h]=s[h];for(i=1,h=8;h<16;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,ur),h=0;h>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;n<16;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,c=0,u=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],G=n[6],Z=n[7],j=n[8],q=n[9],V=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*P,h+=e*O,a+=e*N,f+=e*C,s+=e*F,c+=e*I,u+=e*G,y+=e*Z,l+=e*j,w+=e*q,p+=e*V,v+=e*X,b+=e*D,g+=e*H,_+=e*J,A+=e*Q,e=t[1],h+=e*P,a+=e*O,f+=e*N,s+=e*C,c+=e*F,u+=e*I,y+=e*G,l+=e*Z,w+=e*j,p+=e*q,v+=e*V,b+=e*X,g+=e*D,_+=e*H,A+=e*J,d+=e*Q,e=t[2],a+=e*P,f+=e*O,s+=e*N,c+=e*C,u+=e*F,y+=e*I,l+=e*G,w+=e*Z,p+=e*j,v+=e*q,b+=e*V,g+=e*X,_+=e*D,A+=e*H,d+=e*J,U+=e*Q,e=t[3],f+=e*P,s+=e*O,c+=e*N,u+=e*C,y+=e*F,l+=e*I,w+=e*G,p+=e*Z,v+=e*j,b+=e*q,g+=e*V,_+=e*X,A+=e*D,d+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*P,c+=e*O,u+=e*N,y+=e*C,l+=e*F,w+=e*I,p+=e*G,v+=e*Z,b+=e*j,g+=e*q,_+=e*V,A+=e*X,d+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],c+=e*P,u+=e*O,y+=e*N,l+=e*C,w+=e*F,p+=e*I,v+=e*G,b+=e*Z,g+=e*j,_+=e*q,A+=e*V,d+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],u+=e*P,y+=e*O,l+=e*N,w+=e*C,p+=e*F,v+=e*I,b+=e*G,g+=e*Z,_+=e*j,A+=e*q,d+=e*V,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*P,l+=e*O,w+=e*N,p+=e*C,v+=e*F,b+=e*I,g+=e*G,_+=e*Z,A+=e*j,d+=e*q,U+=e*V,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*P,w+=e*O,p+=e*N,v+=e*C,b+=e*F,g+=e*I,_+=e*G,A+=e*Z,d+=e*j,U+=e*q,E+=e*V,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*P,p+=e*O,v+=e*N,b+=e*C,g+=e*F,_+=e*I,A+=e*G,d+=e*Z,U+=e*j,E+=e*q,x+=e*V,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*P,v+=e*O,b+=e*N,g+=e*C,_+=e*F,A+=e*I,d+=e*G,U+=e*Z,E+=e*j,x+=e*q,M+=e*V,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],v+=e*P,b+=e*O,g+=e*N,_+=e*C,A+=e*F,d+=e*I,U+=e*G,E+=e*Z,x+=e*j,M+=e*q,m+=e*V,B+=e*X;S+=e*D;K+=e*H,T+=e*J,Y+=e*Q,e=t[12],b+=e*P,g+=e*O,_+=e*N,A+=e*C,d+=e*F,U+=e*I,E+=e*G,x+=e*Z,M+=e*j,m+=e*q,B+=e*V,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],g+=e*P,_+=e*O,A+=e*N,d+=e*C,U+=e*F,E+=e*I,x+=e*G,M+=e*Z,m+=e*j,B+=e*q,S+=e*V,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],_+=e*P,A+=e*O,d+=e*N,U+=e*C,E+=e*F,x+=e*I,M+=e*G,m+=e*Z,B+=e*j,S+=e*q,K+=e*V,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,z+=e*Q,e=t[15],A+=e*P,d+=e*O,U+=e*N,E+=e*C,x+=e*F,M+=e*I,m+=e*G,B+=e*Z,S+=e*j,K+=e*q,T+=e*V,Y+=e*X,k+=e*D,L+=e*H,z+=e*J,R+=e*Q,i+=38*d,h+=38*U,a+=38*E,f+=38*x,s+=38*M,c+=38*m,u+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=c,r[6]=u,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g;r[14]=_;r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),c=$(),u=$(),y=$();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;o<16;o++)f[o]=h[o],c[o]=a[o]=s[o]=0;for(a[0]=c[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,c,e),x(u,a,s),M(a,a,s),x(s,f,c),M(f,f,c),B(c,u),B(y,a),m(a,s,a),m(s,f,u),x(u,a,s),M(a,a,s),B(f,a),M(s,c,y),m(a,s,ir),x(a,a,c),m(s,s,a),m(a,c,y),m(c,f,h),B(f,u),_(a,f,e),_(s,c,e);for(o=0;o<16;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=c[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,ur)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;U<16;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;U<80;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,c=N,u=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,u=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=c,k=u,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;E<16;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;o=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*vr[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),c=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var u=n+64;for(o=0;o>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],c=[$(),$(),$(),$()];if(h=-1,n<64)return-1;if(X(c,e))return-1;for(i=0;i>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),c=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|c<<8),k+=c>>>5|U,u=0,y=u,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),u=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),u+=y>>>13,y&=8191,l=u,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),u=l>>>13,l&=8191,l+=S*(5*C),l+=K*(5*N),l+=T*(5*O),l+=Y*(5*P),l+=k*(5*R),u+=l>>>13,l&=8191,w=u,w+=E*R,w+=x*z,w+=M*L,w+=m*(5*G),w+=B*(5*I),u=w>>>13,w&=8191,w+=S*(5*F),w+=K*(5*C),w+=T*(5*N),w+=Y*(5*O),w+=k*(5*P),u+=w>>>13,w&=8191,p=u,p+=E*P,p+=x*R,p+=M*z,p+=m*L,p+=B*(5*G),u=p>>>13,p&=8191,p+=S*(5*I),p+=K*(5*F),p+=T*(5*C),p+=Y*(5*N),p+=k*(5*O),u+=p>>>13,p&=8191,v=u,v+=E*O,v+=x*P,v+=M*R,v+=m*z,v+=B*L,u=v>>>13,v&=8191,v+=S*(5*G),v+=K*(5*I),v+=T*(5*F),v+=Y*(5*C),v+=k*(5*N),u+=v>>>13,v&=8191,b=u,b+=E*N,b+=x*O,b+=M*P,b+=m*R,b+=B*z,u=b>>>13,b&=8191,b+=S*L,b+=K*(5*G),b+=T*(5*I),b+=Y*(5*F),b+=k*(5*C),u+=b>>>13,b&=8191,g=u,g+=E*C,g+=x*N,g+=M*O,g+=m*P,g+=B*R,u=g>>>13,g&=8191,g+=S*z,g+=K*L,g+=T*(5*G),g+=Y*(5*I),g+=k*(5*F),u+=g>>>13,g&=8191,_=u,_+=E*F,_+=x*C,_+=M*N,_+=m*O,_+=B*P,u=_>>>13,_&=8191,_+=S*R,_+=K*z,_+=T*L,_+=Y*(5*G),_+=k*(5*I),u+=_>>>13,_&=8191,A=u,A+=E*I,A+=x*F,A+=M*C,A+=m*N,A+=B*O,u=A>>>13,A&=8191,A+=S*P,A+=K*R,A+=T*z,A+=Y*L,A+=k*(5*G),u+=A>>>13,A&=8191,d=u,d+=E*G,d+=x*I,d+=M*F,d+=m*C,d+=B*N,u=d>>>13,d&=8191,d+=S*O,d+=K*P,d+=T*R,d+=Y*z,d+=k*L,u+=d>>>13,d&=8191,u=(u<<2)+u|0,u=u+y|0,y=8191&u,u>>>=13,l+=u,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;e=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n void): void; -} diff --git a/node_modules/tweetnacl/nacl.js b/node_modules/tweetnacl/nacl.js deleted file mode 100644 index f72dd78..0000000 --- a/node_modules/tweetnacl/nacl.js +++ /dev/null @@ -1,1175 +0,0 @@ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function L32(x, c) { return (x << c) | (x >>> (32 - c)); } - -function ld32(x, i) { - var u = x[i+3] & 0xff; - u = (u<<8)|(x[i+2] & 0xff); - u = (u<<8)|(x[i+1] & 0xff); - return (u<<8)|(x[i+0] & 0xff); -} - -function dl64(x, i) { - var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; - var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; - return new u64(h, l); -} - -function st32(x, j, u) { - var i; - for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } -} - -function ts64(x, i, u) { - x[i] = (u.hi >> 24) & 0xff; - x[i+1] = (u.hi >> 16) & 0xff; - x[i+2] = (u.hi >> 8) & 0xff; - x[i+3] = u.hi & 0xff; - x[i+4] = (u.lo >> 24) & 0xff; - x[i+5] = (u.lo >> 16) & 0xff; - x[i+6] = (u.lo >> 8) & 0xff; - x[i+7] = u.lo & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core(out,inp,k,c,h) { - var w = new Uint32Array(16), x = new Uint32Array(16), - y = new Uint32Array(16), t = new Uint32Array(4); - var i, j, m; - - for (i = 0; i < 4; i++) { - x[5*i] = ld32(c, 4*i); - x[1+i] = ld32(k, 4*i); - x[6+i] = ld32(inp, 4*i); - x[11+i] = ld32(k, 16+4*i); - } - - for (i = 0; i < 16; i++) y[i] = x[i]; - - for (i = 0; i < 20; i++) { - for (j = 0; j < 4; j++) { - for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; - t[1] ^= L32((t[0]+t[3])|0, 7); - t[2] ^= L32((t[1]+t[0])|0, 9); - t[3] ^= L32((t[2]+t[1])|0,13); - t[0] ^= L32((t[3]+t[2])|0,18); - for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; - } - for (m = 0; m < 16; m++) x[m] = w[m]; - } - - if (h) { - for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; - for (i = 0; i < 4; i++) { - x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; - x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; - } - for (i = 0; i < 4; i++) { - st32(out,4*i,x[5*i]); - st32(out,16+4*i,x[6+i]); - } - } else { - for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); - } -} - -function crypto_core_salsa20(out,inp,k,c) { - core(out,inp,k,c,false); - return 0; -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core(out,inp,k,c,true); - return 0; -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - if (!b) return 0; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - if (m) mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,d,n,k) { - return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); -} - -function add1305(h, c) { - var j, u = 0; - for (j = 0; j < 17; j++) { - u = (u + ((h[j] + c[j]) | 0)) | 0; - h[j] = u & 255; - u >>>= 8; - } -} - -var minusp = new Uint32Array([ - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 -]); - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s, i, j, u; - var x = new Uint32Array(17), r = new Uint32Array(17), - h = new Uint32Array(17), c = new Uint32Array(17), - g = new Uint32Array(17); - for (j = 0; j < 17; j++) r[j]=h[j]=0; - for (j = 0; j < 16; j++) r[j]=k[j]; - r[3]&=15; - r[4]&=252; - r[7]&=15; - r[8]&=252; - r[11]&=15; - r[12]&=252; - r[15]&=15; - - while (n > 0) { - for (j = 0; j < 17; j++) c[j] = 0; - for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; - c[j] = 1; - mpos += j; n -= j; - add1305(h,c); - for (i = 0; i < 17; i++) { - x[i] = 0; - for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; - } - for (i = 0; i < 17; i++) h[i] = x[i]; - u = 0; - for (j = 0; j < 16; j++) { - u = (u + h[j]) | 0; - h[j] = u & 255; - u >>>= 8; - } - u = (u + h[16]) | 0; h[16] = u & 3; - u = (5 * (u >>> 2)) | 0; - for (j = 0; j < 16; j++) { - u = (u + h[j]) | 0; - h[j] = u & 255; - u >>>= 8; - } - u = (u + h[16]) | 0; h[16] = u; - } - - for (j = 0; j < 17; j++) g[j] = h[j]; - add1305(h,minusp); - s = (-(h[16] >>> 7) | 0); - for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); - - for (j = 0; j < 16; j++) c[j] = k[j + 16]; - c[16] = 0; - add1305(h,c); - for (j = 0; j < 16; j++) out[outpos+j] = h[j]; - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var c; - var i; - for (i = 0; i < 16; i++) { - o[i] += 65536; - c = Math.floor(o[i] / 65536); - o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); - o[i] -= (c * 65536); - } -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - var i; - for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; -} - -function Z(o, a, b) { - var i; - for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; -} - -function M(o, a, b) { - var i, j, t = new Float64Array(31); - for (i = 0; i < 31; i++) t[i] = 0; - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - t[i+j] += a[i] * b[j]; - } - } - for (i = 0; i < 15; i++) { - t[i] += 38 * t[i+16]; - } - for (i = 0; i < 16; i++) o[i] = t[i]; - car25519(o); - car25519(o); -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -function add64() { - var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; - for (i = 0; i < arguments.length; i++) { - l = arguments[i].lo; - h = arguments[i].hi; - a += (l & m16); b += (l >>> 16); - c += (h & m16); d += (h >>> 16); - } - - b += (a >>> 16); - c += (b >>> 16); - d += (c >>> 16); - - return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); -} - -function shr64(x, c) { - return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); -} - -function xor64() { - var l = 0, h = 0, i; - for (i = 0; i < arguments.length; i++) { - l ^= arguments[i].lo; - h ^= arguments[i].hi; - } - return new u64(h, l); -} - -function R(x, c) { - var h, l, c1 = 32 - c; - if (c < 32) { - h = (x.hi >>> c) | (x.lo << c1); - l = (x.lo >>> c) | (x.hi << c1); - } else if (c < 64) { - h = (x.lo >>> c) | (x.hi << c1); - l = (x.hi >>> c) | (x.lo << c1); - } - return new u64(h, l); -} - -function Ch(x, y, z) { - var h = (x.hi & y.hi) ^ (~x.hi & z.hi), - l = (x.lo & y.lo) ^ (~x.lo & z.lo); - return new u64(h, l); -} - -function Maj(x, y, z) { - var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), - l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); - return new u64(h, l); -} - -function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } -function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } -function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } -function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } - -var K = [ - new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), - new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), - new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), - new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), - new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), - new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), - new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), - new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), - new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), - new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), - new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), - new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), - new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), - new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), - new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), - new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), - new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), - new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), - new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), - new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), - new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), - new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), - new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), - new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), - new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), - new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), - new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), - new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), - new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), - new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), - new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), - new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), - new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), - new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), - new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), - new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), - new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), - new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), - new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), - new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) -]; - -function crypto_hashblocks(x, m, n) { - var z = [], b = [], a = [], w = [], t, i, j; - - for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); - for (i = 0; i < 80; i++) { - for (j = 0; j < 8; j++) b[j] = a[j]; - t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); - b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); - b[3] = add64(b[3], t); - for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); - } - } - } - - for (i = 0; i < 8; i++) { - a[i] = add64(a[i], z[i]); - z[i] = a[i]; - } - - pos += 128; - n -= 128; - } - - for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); - return n; -} - -var iv = new Uint8Array([ - 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, - 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, - 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, - 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, - 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, - 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, - 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, - 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 -]); - -function crypto_hash(out, m, n) { - var h = new Uint8Array(64), x = new Uint8Array(256); - var i, b = n; - - for (i = 0; i < 64; i++) h[i] = iv[i]; - - crypto_hashblocks(h, m, n); - n %= 128; - - for (i = 0; i < 256; i++) x[i] = 0; - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); - crypto_hashblocks(h, x, n); - - for (i = 0; i < 64; i++) out[i] = h[i]; - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/node_modules/tweetnacl/nacl.min.js b/node_modules/tweetnacl/nacl.min.js deleted file mode 100644 index 4484974..0000000 --- a/node_modules/tweetnacl/nacl.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new sr(e,t)}function o(r,n,e){var t;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;i>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),l=new Uint32Array(16),s=new Uint32Array(16),h=new Uint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}else for(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function l(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),l=new Uint32Array(17),s=new Uint32Array(17),h=new Uint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;e<16;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var s=a.subarray(32),h=a.subarray(16);return k(s,s),Y(h,h,s),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new sr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new sr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r>>n|r.lo<>>n|r.hi<>>n|r.hi<>>n|r.lo<=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;o>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", - "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js", - "test": "npm run test-node-all && npm run test-browser", - "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet", - "test-node": "tape test/*.js | faucet", - "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet" - }, - "types": "nacl.d.ts", - "version": "0.14.5" -} diff --git a/node_modules/typedarray/.travis.yml b/node_modules/typedarray/.travis.yml deleted file mode 100644 index cc4dba2..0000000 --- a/node_modules/typedarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/typedarray/LICENSE b/node_modules/typedarray/LICENSE deleted file mode 100644 index 11adfae..0000000 --- a/node_modules/typedarray/LICENSE +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (c) 2010, Linden Research, Inc. - Copyright (c) 2012, Joshua Bell - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - $/LicenseInfo$ - */ - -// Original can be found at: -// https://bitbucket.org/lindenlab/llsd -// Modifications by Joshua Bell inexorabletash@gmail.com -// https://github.com/inexorabletash/polyfill - -// ES3/ES5 implementation of the Krhonos Typed Array Specification -// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ -// Date: 2011-02-01 -// -// Variations: -// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) diff --git a/node_modules/typedarray/example/tarray.js b/node_modules/typedarray/example/tarray.js deleted file mode 100644 index 8423d7c..0000000 --- a/node_modules/typedarray/example/tarray.js +++ /dev/null @@ -1,4 +0,0 @@ -var Uint8Array = require('../').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); diff --git a/node_modules/typedarray/index.js b/node_modules/typedarray/index.js deleted file mode 100644 index 5e54084..0000000 --- a/node_modules/typedarray/index.js +++ /dev/null @@ -1,630 +0,0 @@ -var undefined = (void 0); // Paranoia - -// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to -// create, and consume so much memory, that the browser appears frozen. -var MAX_ARRAY_LENGTH = 1e5; - -// Approximations of internal ECMAScript conversion functions -var ECMAScript = (function() { - // Stash a copy in case other scripts modify these - var opts = Object.prototype.toString, - ophop = Object.prototype.hasOwnProperty; - - return { - // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: - Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); }, - HasProperty: function(o, p) { return p in o; }, - HasOwnProperty: function(o, p) { return ophop.call(o, p); }, - IsCallable: function(o) { return typeof o === 'function'; }, - ToInt32: function(v) { return v >> 0; }, - ToUint32: function(v) { return v >>> 0; } - }; -}()); - -// Snapshot intrinsics -var LN2 = Math.LN2, - abs = Math.abs, - floor = Math.floor, - log = Math.log, - min = Math.min, - pow = Math.pow, - round = Math.round; - -// ES5: lock down object properties -function configureProperties(obj) { - if (getOwnPropNames && defineProp) { - var props = getOwnPropNames(obj), i; - for (i = 0; i < props.length; i += 1) { - defineProp(obj, props[i], { - value: obj[props[i]], - writable: false, - enumerable: false, - configurable: false - }); - } - } -} - -// emulate ES5 getter/setter API using legacy APIs -// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx -// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but -// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) -var defineProp -if (Object.defineProperty && (function() { - try { - Object.defineProperty({}, 'x', {}); - return true; - } catch (e) { - return false; - } - })()) { - defineProp = Object.defineProperty; -} else { - defineProp = function(o, p, desc) { - if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); - if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); } - if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); } - if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; } - return o; - }; -} - -var getOwnPropNames = Object.getOwnPropertyNames || function (o) { - if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); - var props = [], p; - for (p in o) { - if (ECMAScript.HasOwnProperty(o, p)) { - props.push(p); - } - } - return props; -}; - -// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) -// for index in 0 ... obj.length -function makeArrayAccessors(obj) { - if (!defineProp) { return; } - - if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); - - function makeArrayAccessor(index) { - defineProp(obj, index, { - 'get': function() { return obj._getter(index); }, - 'set': function(v) { obj._setter(index, v); }, - enumerable: true, - configurable: false - }); - } - - var i; - for (i = 0; i < obj.length; i += 1) { - makeArrayAccessor(i); - } -} - -// Internal conversion functions: -// pack() - take a number (interpreted as Type), output a byte array -// unpack() - take a byte array, output a Type-like number - -function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } -function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } - -function packI8(n) { return [n & 0xff]; } -function unpackI8(bytes) { return as_signed(bytes[0], 8); } - -function packU8(n) { return [n & 0xff]; } -function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } - -function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } - -function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); } - -function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); } - -function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packIEEE754(v, ebits, fbits) { - - var bias = (1 << (ebits - 1)) - 1, - s, e, f, ln, - i, bits, str, bytes; - - function roundToEven(n) { - var w = floor(n), f = n - w; - if (f < 0.5) - return w; - if (f > 0.5) - return w + 1; - return w % 2 ? w + 1 : w; - } - - // Compute sign, exponent, fraction - if (v !== v) { - // NaN - // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping - e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; - } else if (v === Infinity || v === -Infinity) { - e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; - } else if (v === 0) { - e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; - } else { - s = v < 0; - v = abs(v); - - if (v >= pow(2, 1 - bias)) { - e = min(floor(log(v) / LN2), 1023); - f = roundToEven(v / pow(2, e) * pow(2, fbits)); - if (f / pow(2, fbits) >= 2) { - e = e + 1; - f = 1; - } - if (e > bias) { - // Overflow - e = (1 << ebits) - 1; - f = 0; - } else { - // Normalized - e = e + bias; - f = f - pow(2, fbits); - } - } else { - // Denormalized - e = 0; - f = roundToEven(v / pow(2, 1 - bias - fbits)); - } - } - - // Pack sign, exponent, fraction - bits = []; - for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } - for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } - bits.push(s ? 1 : 0); - bits.reverse(); - str = bits.join(''); - - // Bits to bytes - bytes = []; - while (str.length) { - bytes.push(parseInt(str.substring(0, 8), 2)); - str = str.substring(8); - } - return bytes; -} - -function unpackIEEE754(bytes, ebits, fbits) { - - // Bytes to bits - var bits = [], i, j, b, str, - bias, s, e, f; - - for (i = bytes.length; i; i -= 1) { - b = bytes[i - 1]; - for (j = 8; j; j -= 1) { - bits.push(b % 2 ? 1 : 0); b = b >> 1; - } - } - bits.reverse(); - str = bits.join(''); - - // Unpack sign, exponent, fraction - bias = (1 << (ebits - 1)) - 1; - s = parseInt(str.substring(0, 1), 2) ? -1 : 1; - e = parseInt(str.substring(1, 1 + ebits), 2); - f = parseInt(str.substring(1 + ebits), 2); - - // Produce number - if (e === (1 << ebits) - 1) { - return f !== 0 ? NaN : s * Infinity; - } else if (e > 0) { - // Normalized - return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); - } else if (f !== 0) { - // Denormalized - return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); - } else { - return s < 0 ? -0 : 0; - } -} - -function unpackF64(b) { return unpackIEEE754(b, 11, 52); } -function packF64(v) { return packIEEE754(v, 11, 52); } -function unpackF32(b) { return unpackIEEE754(b, 8, 23); } -function packF32(v) { return packIEEE754(v, 8, 23); } - - -// -// 3 The ArrayBuffer Type -// - -(function() { - - /** @constructor */ - var ArrayBuffer = function ArrayBuffer(length) { - length = ECMAScript.ToInt32(length); - if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer'); - - this.byteLength = length; - this._bytes = []; - this._bytes.length = length; - - var i; - for (i = 0; i < this.byteLength; i += 1) { - this._bytes[i] = 0; - } - - configureProperties(this); - }; - - exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; - - // - // 4 The ArrayBufferView Type - // - - // NOTE: this constructor is not exported - /** @constructor */ - var ArrayBufferView = function ArrayBufferView() { - //this.buffer = null; - //this.byteOffset = 0; - //this.byteLength = 0; - }; - - // - // 5 The Typed Array View Types - // - - function makeConstructor(bytesPerElement, pack, unpack) { - // Each TypedArray type requires a distinct constructor instance with - // identical logic, which this produces. - - var ctor; - ctor = function(buffer, byteOffset, length) { - var array, sequence, i, s; - - if (!arguments.length || typeof arguments[0] === 'number') { - // Constructor(unsigned long length) - this.length = ECMAScript.ToInt32(arguments[0]); - if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer'); - - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) { - // Constructor(TypedArray array) - array = arguments[0]; - - this.length = array.length; - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - this._setter(i, array._getter(i)); - } - } else if (typeof arguments[0] === 'object' && - !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(sequence array) - sequence = arguments[0]; - - this.length = ECMAScript.ToUint32(sequence.length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - s = sequence[i]; - this._setter(i, Number(s)); - } - } else if (typeof arguments[0] === 'object' && - (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, optional unsigned long length) - this.buffer = buffer; - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (this.byteOffset % this.BYTES_PER_ELEMENT) { - // The given byteOffset must be a multiple of the element - // size of the specific type, otherwise an exception is raised. - throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - - if (this.byteLength % this.BYTES_PER_ELEMENT) { - throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); - } - this.length = this.byteLength / this.BYTES_PER_ELEMENT; - } else { - this.length = ECMAScript.ToUint32(length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - - this.constructor = ctor; - - configureProperties(this); - makeArrayAccessors(this); - }; - - ctor.prototype = new ArrayBufferView(); - ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; - ctor.prototype._pack = pack; - ctor.prototype._unpack = unpack; - ctor.BYTES_PER_ELEMENT = bytesPerElement; - - // getter type (unsigned long index); - ctor.prototype._getter = function(index) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = [], i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - bytes.push(this.buffer._bytes[o]); - } - return this._unpack(bytes); - }; - - // NONSTANDARD: convenience alias for getter: type get(unsigned long index); - ctor.prototype.get = ctor.prototype._getter; - - // setter void (unsigned long index, type value); - ctor.prototype._setter = function(index, value) { - if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = this._pack(value), i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - this.buffer._bytes[o] = bytes[i]; - } - }; - - // void set(TypedArray array, optional unsigned long offset); - // void set(sequence array, optional unsigned long offset); - ctor.prototype.set = function(index, value) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - var array, sequence, offset, len, - i, s, d, - byteOffset, byteLength, tmp; - - if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { - // void set(TypedArray array, optional unsigned long offset); - array = arguments[0]; - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + array.length > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; - byteLength = array.length * this.BYTES_PER_ELEMENT; - - if (array.buffer === this.buffer) { - tmp = []; - for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { - tmp[i] = array.buffer._bytes[s]; - } - for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { - this.buffer._bytes[d] = tmp[i]; - } - } else { - for (i = 0, s = array.byteOffset, d = byteOffset; - i < byteLength; i += 1, s += 1, d += 1) { - this.buffer._bytes[d] = array.buffer._bytes[s]; - } - } - } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { - // void set(sequence array, optional unsigned long offset); - sequence = arguments[0]; - len = ECMAScript.ToUint32(sequence.length); - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + len > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - for (i = 0; i < len; i += 1) { - s = sequence[i]; - this._setter(offset + i, Number(s)); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - }; - - // TypedArray subarray(long begin, optional long end); - ctor.prototype.subarray = function(start, end) { - function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } - - start = ECMAScript.ToInt32(start); - end = ECMAScript.ToInt32(end); - - if (arguments.length < 1) { start = 0; } - if (arguments.length < 2) { end = this.length; } - - if (start < 0) { start = this.length + start; } - if (end < 0) { end = this.length + end; } - - start = clamp(start, 0, this.length); - end = clamp(end, 0, this.length); - - var len = end - start; - if (len < 0) { - len = 0; - } - - return new this.constructor( - this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); - }; - - return ctor; - } - - var Int8Array = makeConstructor(1, packI8, unpackI8); - var Uint8Array = makeConstructor(1, packU8, unpackU8); - var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8); - var Int16Array = makeConstructor(2, packI16, unpackI16); - var Uint16Array = makeConstructor(2, packU16, unpackU16); - var Int32Array = makeConstructor(4, packI32, unpackI32); - var Uint32Array = makeConstructor(4, packU32, unpackU32); - var Float32Array = makeConstructor(4, packF32, unpackF32); - var Float64Array = makeConstructor(8, packF64, unpackF64); - - exports.Int8Array = exports.Int8Array || Int8Array; - exports.Uint8Array = exports.Uint8Array || Uint8Array; - exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray; - exports.Int16Array = exports.Int16Array || Int16Array; - exports.Uint16Array = exports.Uint16Array || Uint16Array; - exports.Int32Array = exports.Int32Array || Int32Array; - exports.Uint32Array = exports.Uint32Array || Uint32Array; - exports.Float32Array = exports.Float32Array || Float32Array; - exports.Float64Array = exports.Float64Array || Float64Array; -}()); - -// -// 6 The DataView View Type -// - -(function() { - function r(array, index) { - return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; - } - - var IS_BIG_ENDIAN = (function() { - var u16array = new(exports.Uint16Array)([0x1234]), - u8array = new(exports.Uint8Array)(u16array.buffer); - return r(u8array, 0) === 0x12; - }()); - - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, - // optional unsigned long byteLength) - /** @constructor */ - var DataView = function DataView(buffer, byteOffset, byteLength) { - if (arguments.length === 0) { - buffer = new exports.ArrayBuffer(0); - } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { - throw new TypeError("TypeError"); - } - - this.buffer = buffer || new exports.ArrayBuffer(0); - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - } else { - this.byteLength = ECMAScript.ToUint32(byteLength); - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - - configureProperties(this); - }; - - function makeGetter(arrayType) { - return function(byteOffset, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - byteOffset += this.byteOffset; - - var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), - bytes = [], i; - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(uint8Array, i)); - } - - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); - }; - } - - DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); - DataView.prototype.getInt8 = makeGetter(exports.Int8Array); - DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); - DataView.prototype.getInt16 = makeGetter(exports.Int16Array); - DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); - DataView.prototype.getInt32 = makeGetter(exports.Int32Array); - DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); - DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); - - function makeSetter(arrayType) { - return function(byteOffset, value, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - - // Get bytes - var typeArray = new arrayType([value]), - byteArray = new exports.Uint8Array(typeArray.buffer), - bytes = [], i, byteView; - - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(byteArray, i)); - } - - // Flip if necessary - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - // Write them - byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); - byteView.set(bytes); - }; - } - - DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); - DataView.prototype.setInt8 = makeSetter(exports.Int8Array); - DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); - DataView.prototype.setInt16 = makeSetter(exports.Int16Array); - DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); - DataView.prototype.setInt32 = makeSetter(exports.Int32Array); - DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); - DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); - - exports.DataView = exports.DataView || DataView; - -}()); diff --git a/node_modules/typedarray/package.json b/node_modules/typedarray/package.json deleted file mode 100644 index 2cb4a9a..0000000 --- a/node_modules/typedarray/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "typedarray@^0.0.6", - "_id": "typedarray@0.0.6", - "_inBundle": false, - "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "_location": "/typedarray", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "typedarray@^0.0.6", - "name": "typedarray", - "escapedName": "typedarray", - "rawSpec": "^0.0.6", - "saveSpec": null, - "fetchSpec": "^0.0.6" - }, - "_requiredBy": [ - "/concat-stream" - ], - "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "_spec": "typedarray@^0.0.6", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/concat-stream", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/typedarray/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "TypedArray polyfill for old browsers", - "devDependencies": { - "tape": "~2.3.2" - }, - "homepage": "https://github.com/substack/typedarray", - "keywords": [ - "ArrayBuffer", - "DataView", - "Float32Array", - "Float64Array", - "Int8Array", - "Int16Array", - "Int32Array", - "Uint8Array", - "Uint8ClampedArray", - "Uint16Array", - "Uint32Array", - "typed", - "array", - "polyfill" - ], - "license": "MIT", - "main": "index.js", - "name": "typedarray", - "repository": { - "type": "git", - "url": "git://github.com/substack/typedarray.git" - }, - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "0.0.6" -} diff --git a/node_modules/typedarray/readme.markdown b/node_modules/typedarray/readme.markdown deleted file mode 100644 index d18f6f7..0000000 --- a/node_modules/typedarray/readme.markdown +++ /dev/null @@ -1,61 +0,0 @@ -# typedarray - -TypedArray polyfill ripped from [this -module](https://raw.github.com/inexorabletash/polyfill). - -[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray) - -[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray) - -# example - -``` js -var Uint8Array = require('typedarray').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); -``` - -output: - -``` -55 -``` - -# methods - -``` js -var TA = require('typedarray') -``` - -The `TA` object has the following constructors: - -* TA.ArrayBuffer -* TA.DataView -* TA.Float32Array -* TA.Float64Array -* TA.Int8Array -* TA.Int16Array -* TA.Int32Array -* TA.Uint8Array -* TA.Uint8ClampedArray -* TA.Uint16Array -* TA.Uint32Array - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install typedarray -``` - -To use this module in the browser, compile with -[browserify](http://browserify.org) -or download a UMD build from browserify CDN: - -http://wzrd.in/standalone/typedarray@latest - -# license - -MIT diff --git a/node_modules/typedarray/test/server/undef_globals.js b/node_modules/typedarray/test/server/undef_globals.js deleted file mode 100644 index 425950f..0000000 --- a/node_modules/typedarray/test/server/undef_globals.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape'); -var vm = require('vm'); -var fs = require('fs'); -var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8'); - -test('u8a without globals', function (t) { - var c = { - module: { exports: {} }, - }; - c.exports = c.module.exports; - vm.runInNewContext(src, c); - var TA = c.module.exports; - var ua = new(TA.Uint8Array)(5); - - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/node_modules/typedarray/test/tarray.js b/node_modules/typedarray/test/tarray.js deleted file mode 100644 index df596a3..0000000 --- a/node_modules/typedarray/test/tarray.js +++ /dev/null @@ -1,10 +0,0 @@ -var TA = require('../'); -var test = require('tape'); - -test('tiny u8a test', function (t) { - var ua = new(TA.Uint8Array)(5); - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/node_modules/umd/HISTORY.md b/node_modules/umd/HISTORY.md deleted file mode 100644 index 2d4b449..0000000 --- a/node_modules/umd/HISTORY.md +++ /dev/null @@ -1,64 +0,0 @@ -3.0.1 / 2015-04-25 -================== - -- Document and test casing/sanitization behavior (thanks @bendrucker) - -3.0.0 / 2015-02-04 -================== - - - remove dependency on ruglify (thanks to @zertosh) - - add `this` as an additional fallback when looking for a global (thanks to @winterbe) - - use `options` rather than `true` / `false` for whether to use CommonJS (with fallback for backwards compatibility). - - support `$` and `_` in module names (thanks to @fitnr) **(BREAKING CHANGE)** - - uglify as a pre-publish step - removing a dependency - - brfs as a pre-publish step - allowing this module to be used from the browser. - - remove support for streaming **(BREAKING CHANGE)** - -2.1.0 / 2014-04-02 -================== - - - Check for definition of `module` as well as `exports` for CommonJS (fixes some custom RequireJS loaders) - - Pass empty array to define for AMD - -2.0.0 / 2013-12-29 -================== - - - Use module name as a namespace for globals if it contains `.` - -1.3.1 / 2013-08-25 -================== - - - Update uglify-js - -1.3.0 / 2013-08-01 -================== - - - Remove SES and Montage bootstrap - - Add MIT LICENSE - - Handle web workers global - - Update uglify-js to fix npm warning - -1.2.1 / 2013-06-07 -================== - - - Fix CLI - -1.2.0 / 2013-06-07 -================== - - - Add CLI - -1.1.1 / 2013-04-15 -================== - - - Update through - -1.1.0 / 2013-03-31 -================== - - - Make Cammel Case less suprising/forcefull - -1.0.0 / 2013-03-16 -================== - - - Initial Release diff --git a/node_modules/umd/LICENSE b/node_modules/umd/LICENSE deleted file mode 100644 index dfb0b19..0000000 --- a/node_modules/umd/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Forbes Lindesay - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/umd/README.md b/node_modules/umd/README.md deleted file mode 100644 index 1fb98c5..0000000 --- a/node_modules/umd/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# umd - - -Universal Module Definition for use in automated build systems - - - simple synchronous wrapping of a string - - `return` style module support - - CommonJS support - - prevents internal UMDs from conflicting - -[![Build Status](https://img.shields.io/travis/ForbesLindesay/umd/master.svg)](https://travis-ci.org/ForbesLindesay/umd) -[![Dependency Status](https://img.shields.io/david/ForbesLindesay/umd.svg)](https://david-dm.org/ForbesLindesay/umd) -[![NPM version](https://img.shields.io/npm/v/umd.svg)](https://www.npmjs.com/package/umd) - -## Source Format - -In order for the UMD wrapper to work the source code for your module should `return` the export, e.g. - -```javascript -function method() { - //code -} -method.helper = function () { - //code -} -return method; -``` - -For examples, see the examples directory. The CommonJS module format is also supported by passing true as the second argument to methods. - -## API - -options: - - - `commonJS` (default: `false`) - If commonJS is `true` then it will accept CommonJS source instead of source code which `return`s the module. - -### umd(name, source, [options]) - - The `name` should the the name of the module. Use a string like name, all lower case with hyphens instead of spaces. - - If `source` should be a string, that is wrapped in umd and returned as a string. - -### umd.prelude(module, [options]) - - return the text which will be inserted before a module. - -### umd.postlude(module, [options]) - - return the text which will be inserted after a module. - -## Command Line - -``` -Usage: umd [options] - -Pipe Usage: umd [options] < source > destination - -Options: - - -h --help Display usage information - -c --commonJS Use CommonJS module format - ``` - - You can easilly pipe unix commands together like: - - ```js - cat my-module.js | umd my-module | uglify-js > my-module.umd.min.js - ``` - -## Name Casing and Characters - -The `name` passed to `umd` will be converted to camel case (`my-library` becomes `myLibrary`) and may only contain: - -* alphanumeric characters -* $ -* _ - -The name may not begin with a number. Invalid characters will be stripped. - -## License - - MIT diff --git a/node_modules/umd/bin/cli.js b/node_modules/umd/bin/cli.js deleted file mode 100755 index 3a2287a..0000000 --- a/node_modules/umd/bin/cli.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -var read = require('fs').createReadStream -var write = require('fs').createWriteStream - -var umd = require('../') - -var args = process.argv.slice(2) - -var help = false -var commonJS = false -args = args.filter(function (arg) { - if (arg === '-h' || arg === '--help') { - help = true - return false - } else if (arg === '-c' || arg === '--commonJS') { - commonJS = true - return false - } - return true -}) - -if (help || !args[0]) { - console.log('Usage: umd [options]') - console.log('') - console.log('Pipe Usage: umd [options] < source > destination') - console.log('') - console.log('Options:') - console.log('') - console.log(' -h --help Display usage information') - console.log(' -c --commonJS Use CommonJS module format') - console.log('') - if (!help) process.exit(1) -} else { - var source = args[1] ? read(args[1]) : process.stdin - var dest = args[2] ? write(args[2]) : process.stdout - var prelude = umd.prelude(args[0], {commonJS: commonJS}) - var postlude = umd.postlude(args[0], {commonJS: commonJS}) - dest.write(prelude) - source.on('end', function () { - dest.write(postlude + '\n') - }).pipe(dest, {end: false}) -} diff --git a/node_modules/umd/index.js b/node_modules/umd/index.js deleted file mode 100644 index bc32794..0000000 --- a/node_modules/umd/index.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - - -var templateSTR = "(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}defineNamespace()}})(function(){source()});\n"; - -function template(moduleName, options) { - if (typeof options === 'boolean') { - options = {commonJS: options}; - } else if (!options) { - options = {}; - } - var str = templateSTR.replace(/defineNamespace\(\)/g, compileNamespace(moduleName)) - .split('source()') - str[0] = str[0].trim(); - //make sure these are undefined so as to not get confused if modules have inner UMD systems - str[0] += 'var define,module,exports;'; - if (options.commonJS) str[0] += 'module={exports:(exports={})};'; - str[0] += '\n'; - if (options.commonJS) str[1] = 'return module.exports;' + str[1]; - str[1] = '\n' + str[1]; - return str; -} - -exports = module.exports = function (name, src, options) { - if (typeof options === 'string' && typeof src === 'object') { - var tmp = options; - options = src; - src = tmp; - } - return exports.prelude(name, options) + src + exports.postlude(name, options); -}; - -exports.prelude = function (moduleName, options) { - return template(moduleName, options)[0]; -}; -exports.postlude = function (moduleName, options) { - return template(moduleName, options)[1]; -}; - - -function camelCase(name) { - name = name.replace(/\-([a-z])/g, function (_, char) { return char.toUpperCase(); }); - if (!/^[a-zA-Z_$]$/.test(name[0])) { - name = name.substr(1); - } - var result = name.replace(/[^\w$]+/g, '') - if (!result) { - throw new Error('Invalid JavaScript identifier resulted from camel-casing'); - } - return result -} - - -function compileNamespace(name) { - var names = name.split('.') - - // No namespaces, yield the best case 'global.NAME = VALUE' - if (names.length === 1) { - return 'g.' + camelCase(name) + ' = f()'; - - // Acceptable case, with reasonable compilation - } else if (names.length === 2) { - names = names.map(camelCase); - return '(g.' + names[0] + ' || (g.' + names[0] + ' = {})).' + names[1] + ' = f()'; - - // Worst case, too many namespaces to care about - } else { - var valueContainer = names.pop() - return names.map(compileNamespaceStep) - .concat(['g.' + camelCase(valueContainer) + ' = f()']) - .join(';'); - } -} - -function compileNamespaceStep(name) { - name = camelCase(name); - return 'g=(g.' + name + '||(g.' + name + ' = {}))'; -} diff --git a/node_modules/umd/package.json b/node_modules/umd/package.json deleted file mode 100644 index 2589a8d..0000000 --- a/node_modules/umd/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "umd@^3.0.0", - "_id": "umd@3.0.3", - "_inBundle": false, - "_integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "_location": "/umd", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "umd@^3.0.0", - "name": "umd", - "escapedName": "umd", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/browser-pack" - ], - "_resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "_shasum": "aa9fe653c42b9097678489c01000acb69f0b26cf", - "_spec": "umd@^3.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browser-pack", - "author": { - "name": "ForbesLindesay" - }, - "bin": { - "umd": "./bin/cli.js" - }, - "bugs": { - "url": "https://github.com/ForbesLindesay/umd/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Universal Module Definition for use in automated build systems", - "devDependencies": { - "brfs": "^1.3.0", - "linify": "^1.0.1", - "mocha": "*", - "uglify-js": "^3.3.15" - }, - "files": [ - "index.js", - "bin/cli.js" - ], - "homepage": "https://github.com/ForbesLindesay/umd#readme", - "license": "MIT", - "name": "umd", - "repository": { - "type": "git", - "url": "git+https://github.com/ForbesLindesay/umd.git" - }, - "scripts": { - "build": "uglifyjs template.js > template.min.js && brfs source.js > index.js", - "prepublish": "npm run build && linify transform bin", - "test": "npm run build && mocha -R spec" - }, - "version": "3.0.3" -} diff --git a/node_modules/undeclared-identifiers/.travis.yml b/node_modules/undeclared-identifiers/.travis.yml deleted file mode 100644 index 9b333bf..0000000 --- a/node_modules/undeclared-identifiers/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - stable - - 8 - - 6 - - 4 -cache: - directories: - - ~/.npm diff --git a/node_modules/undeclared-identifiers/CHANGELOG.md b/node_modules/undeclared-identifiers/CHANGELOG.md deleted file mode 100644 index 0e2a914..0000000 --- a/node_modules/undeclared-identifiers/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# undeclared-identifiers change log - -All notable changes to this project will be documented in this file. - -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.1.3 -* Do not count class names and method names as undeclared. ([#1](https://github.com/goto-bus-stop/undeclared-identifiers/pull/1)) - -## 1.1.2 -* Fix wildcard use not being detected after property use. ([349d998](https://github.com/goto-bus-stop/undeclared-identifiers/commit/349d998559f83976ccd3b3d091e2b06f00ce4189)) - -## 1.1.1 -* Fix standard property access being detected as wildcards. ([029a0b7](https://github.com/goto-bus-stop/undeclared-identifiers/commit/029a0b773a7a4d2402a6de19c8c8693407f8da63)) - -## 1.1.0 -* Accept an AST. ([1605b88](https://github.com/goto-bus-stop/undeclared-identifiers/commit/1605b881cd567894fab1ee2727961dd715a38820)) -* Add `opts.wildcard`. ([cdabd70](https://github.com/goto-bus-stop/undeclared-identifiers/commit/cdabd70e000b2fa976c7f4118757736e023b93f2)) - -## 1.0.0 - -* initial release. diff --git a/node_modules/undeclared-identifiers/LICENSE.md b/node_modules/undeclared-identifiers/LICENSE.md deleted file mode 100644 index 22b9972..0000000 --- a/node_modules/undeclared-identifiers/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -# [Apache License 2.0](https://spdx.org/licenses/Apache-2.0) - -Copyright 2018 Renée Kooi - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -> http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/undeclared-identifiers/README.md b/node_modules/undeclared-identifiers/README.md deleted file mode 100644 index 8afc3d9..0000000 --- a/node_modules/undeclared-identifiers/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# undeclared-identifiers - -find undeclared identifiers and property accesses in a javascript file. - -[![npm][npm-image]][npm-url] -[![travis][travis-image]][travis-url] -[![standard][standard-image]][standard-url] - -[npm-image]: https://img.shields.io/npm/v/undeclared-identifiers.svg?style=flat-square -[npm-url]: https://www.npmjs.com/package/undeclared-identifiers -[travis-image]: https://img.shields.io/travis/goto-bus-stop/undeclared-identifiers.svg?style=flat-square -[travis-url]: https://travis-ci.org/goto-bus-stop/undeclared-identifiers -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square -[standard-url]: http://npm.im/standard - -## Install - -``` -npm install undeclared-identifiers -``` - -## Usage - -```js -var undeclaredIdentifiers = require('undeclared-identifiers') - -undeclaredIdentifiers(src) -// { identifiers: ['Buffer'], -// properties: ['Buffer.isBuffer'] } -``` - -## API - -### `res = undeclaredIdentifiers(source, opts)` - -Find undeclared identifiers and properties that are used in the `source`. `source` can be an AST or a source string that will be parsed using [acorn-node](https://github.com/browserify/acorn-node). - -`res` is an object with properties: - - - `res.identifiers` - an array of variable names as strings. - - `res.properties` - an array of property names as .-separated strings, such as `'xyz.abc'`. These are the property accesses on the undeclared variables found in `res.identifiers`. - -Set `opts.properties` to false to only return identifiers. - -When `opts.wildcard` is true, unknown uses of undeclared identifiers will be added to `res.properties` as `'VarName.*'`. - -```js -undeclaredIdentifiers('Buffer(), Buffer.from()', { wildcard: true }) -// { identifiers: ['Buffer'], -// properties: ['Buffer.*', 'Buffer.from'] } -``` - -## License - -[Apache-2.0](LICENSE.md) diff --git a/node_modules/undeclared-identifiers/bench/index.js b/node_modules/undeclared-identifiers/bench/index.js deleted file mode 100644 index 5fc4ca3..0000000 --- a/node_modules/undeclared-identifiers/bench/index.js +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable no-unused-expressions */ -var bench = require('nanobench') -var acornsrc = require('fs').readFileSync(require.resolve('acorn')) -var lodashsrc = require('fs').readFileSync(require.resolve('lodash')) -var jquerysrc = require('fs').readFileSync(require.resolve('jquery')) -var threesrc = require('fs').readFileSync(require.resolve('three')) -var find = require('../') - -// Optimize. -for (var i = 0; i < 5; i++) find(acornsrc).properties - -// Has very few undeclared identifiers -bench('acorn × 1', function (b) { - b.start() - find(acornsrc).properties - b.end() -}) -bench('acorn × 5', function (b) { - b.start() - for (var i = 0; i < 5; i++) find(acornsrc).properties - b.end() -}) - -bench('lodash × 1', function (b) { - b.start() - find(lodashsrc).properties - b.end() -}) -bench('lodash × 5', function (b) { - b.start() - for (var i = 0; i < 5; i++) find(lodashsrc).properties - b.end() -}) - -// Has more undeclared identifiers and properties -bench('jquery × 1', function (b) { - b.start() - find(jquerysrc).properties - b.end() -}) -bench('jquery × 5', function (b) { - b.start() - for (var i = 0; i < 5; i++) find(jquerysrc).properties - b.end() -}) - -// is very large -bench('three × 1', function (b) { - b.start() - find(threesrc).identifiers - b.end() -}) -bench('three × 5', function (b) { - b.start() - for (var i = 0; i < 5; i++) find(threesrc).identifiers - b.end() -}) diff --git a/node_modules/undeclared-identifiers/bin.js b/node_modules/undeclared-identifiers/bin.js deleted file mode 100755 index 936e11e..0000000 --- a/node_modules/undeclared-identifiers/bin.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -var concat = require('simple-concat') -var undeclared = require('./') - -if (arg('--help') || arg('-h')) { - console.log('usage: undeclared-identifiers [--identifiers] [--properties] < source.js') - process.exit(0) -} - -concat(process.stdin, function (err, src) { - if (err) throw err - - var r = undeclared(src) - var i = arg('--identifiers') || arg('-i') - var p = arg('--properties') || arg('-p') - - if (!i && !p) i = p = true - - if (i) r.identifiers.forEach(log) - if (p) r.properties.forEach(log) -}) - -function arg (s) { - return process.argv.indexOf(s) !== -1 -} -function log (n) { - console.log(n) -} diff --git a/node_modules/undeclared-identifiers/index.js b/node_modules/undeclared-identifiers/index.js deleted file mode 100644 index 8891417..0000000 --- a/node_modules/undeclared-identifiers/index.js +++ /dev/null @@ -1,146 +0,0 @@ -var xtend = require('xtend') -var acorn = require('acorn-node') -var dash = require('dash-ast') -var getAssignedIdentifiers = require('get-assigned-identifiers') - -function visitFunction (node, state, ancestors) { - if (node.params.length > 0) { - var idents = [] - for (var i = 0; i < node.params.length; i++) { - var sub = getAssignedIdentifiers(node.params[i]) - for (var j = 0; j < sub.length; j++) idents.push(sub[j]) - } - declareNames(node, idents) - } - if (node.type === 'FunctionDeclaration') { - var parent = getScopeNode(ancestors, 'const') - declareNames(parent, [node.id]) - } else if (node.type === 'FunctionExpression' && node.id) { - declareNames(node, [node.id]) - } -} - -var scopeVisitor = { - VariableDeclaration: function (node, state, ancestors) { - var parent = getScopeNode(ancestors, node.kind) - for (var i = 0; i < node.declarations.length; i++) { - declareNames(parent, getAssignedIdentifiers(node.declarations[i].id)) - } - }, - FunctionExpression: visitFunction, - FunctionDeclaration: visitFunction, - ArrowFunctionExpression: visitFunction, - ClassDeclaration: function (node, state, ancestors) { - var parent = getScopeNode(ancestors, 'const') - if (node.id) { - declareNames(parent, [node.id]) - } - }, - ImportDeclaration: function (node, state, ancestors) { - declareNames(ancestors[0] /* root */, getAssignedIdentifiers(node)) - }, - CatchClause: function (node) { - if (node.param) declareNames(node, [node.param]) - } -} - -var bindingVisitor = { - Identifier: function (node, state, ancestors) { - if (!state.identifiers) return - var parent = ancestors[ancestors.length - 1] - if (parent.type === 'MemberExpression' && parent.property === node) return - if (parent.type === 'Property' && !parent.computed && parent.key === node) return - if (parent.type === 'MethodDefinition' && !parent.computed && parent.key === node) return - if (parent.type === 'LabeledStatement' && parent.label === node) return - if (!has(state.undeclared, node.name)) { - for (var i = ancestors.length - 1; i >= 0; i--) { - if (ancestors[i]._names !== undefined && has(ancestors[i]._names, node.name)) { - return - } - } - - state.undeclared[node.name] = true - } - - if (state.wildcard && - !(parent.type === 'MemberExpression' && parent.object === node) && - !(parent.type === 'VariableDeclarator' && parent.id === node) && - !(parent.type === 'AssignmentExpression' && parent.left === node)) { - state.undeclaredProps[node.name + '.*'] = true - } - }, - MemberExpression: function (node, state) { - if (!state.properties) return - if (node.object.type === 'Identifier' && has(state.undeclared, node.object.name)) { - var prop = !node.computed && node.property.type === 'Identifier' - ? node.property.name - : node.computed && node.property.type === 'Literal' - ? node.property.value - : null - if (prop) state.undeclaredProps[node.object.name + '.' + prop] = true - } - } -} - -module.exports = function findUndeclared (src, opts) { - opts = xtend({ - identifiers: true, - properties: true, - wildcard: false - }, opts) - - var state = { - undeclared: {}, - undeclaredProps: {}, - identifiers: opts.identifiers, - properties: opts.properties, - wildcard: opts.wildcard - } - - // Parse if `src` is not already an AST. - var ast = typeof src === 'object' && src !== null && typeof src.type === 'string' - ? src - : acorn.parse(src) - - var parents = [] - dash(ast, { - enter: function (node, parent) { - if (parent) parents.push(parent) - var visit = scopeVisitor[node.type] - if (visit) visit(node, state, parents) - }, - leave: function (node, parent) { - var visit = bindingVisitor[node.type] - if (visit) visit(node, state, parents) - if (parent) parents.pop() - } - }) - - return { - identifiers: Object.keys(state.undeclared), - properties: Object.keys(state.undeclaredProps) - } -} - -function getScopeNode (parents, kind) { - for (var i = parents.length - 1; i >= 0; i--) { - if (parents[i].type === 'FunctionDeclaration' || parents[i].type === 'FunctionExpression' || - parents[i].type === 'ArrowFunctionExpression' || parents[i].type === 'Program') { - return parents[i] - } - if (kind !== 'var' && parents[i].type === 'BlockStatement') { - return parents[i] - } - } -} - -function declareNames (node, names) { - if (node._names === undefined) { - node._names = Object.create(null) - } - for (var i = 0; i < names.length; i++) { - node._names[names[i].name] = true - } -} - -function has (obj, name) { return Object.prototype.hasOwnProperty.call(obj, name) } diff --git a/node_modules/undeclared-identifiers/package.json b/node_modules/undeclared-identifiers/package.json deleted file mode 100644 index 7788468..0000000 --- a/node_modules/undeclared-identifiers/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "undeclared-identifiers@^1.1.2", - "_id": "undeclared-identifiers@1.1.3", - "_inBundle": false, - "_integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "_location": "/undeclared-identifiers", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "undeclared-identifiers@^1.1.2", - "name": "undeclared-identifiers", - "escapedName": "undeclared-identifiers", - "rawSpec": "^1.1.2", - "saveSpec": null, - "fetchSpec": "^1.1.2" - }, - "_requiredBy": [ - "/insert-module-globals" - ], - "_resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "_shasum": "9254c1d37bdac0ac2b52de4b6722792d2a91e30f", - "_spec": "undeclared-identifiers@^1.1.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/insert-module-globals", - "author": { - "name": "Renée Kooi", - "email": "renee@kooi.me" - }, - "bin": { - "undeclared-identifiers": "bin.js" - }, - "bugs": { - "url": "https://github.com/goto-bus-stop/undeclared-identifiers/issues" - }, - "bundleDependencies": false, - "dependencies": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - }, - "deprecated": false, - "description": "find undeclared identifiers and property accesses in a javascript file.", - "devDependencies": { - "jquery": "^3.3.1", - "lodash": "^4.17.5", - "nanobench": "^2.1.0", - "standard": "^11.0.0", - "tap-spec": "^5.0.0", - "tape": "^4.0.0", - "three": "^0.92.0" - }, - "homepage": "https://github.com/goto-bus-stop/undeclared-identifiers", - "keywords": [ - "ast", - "check", - "detect", - "identifiers", - "javascript", - "undeclared" - ], - "license": "Apache-2.0", - "main": "index.js", - "name": "undeclared-identifiers", - "repository": { - "type": "git", - "url": "git+https://github.com/goto-bus-stop/undeclared-identifiers.git" - }, - "scripts": { - "test": "standard && tape test/*.js | tap-spec" - }, - "version": "1.1.3" -} diff --git a/node_modules/undeclared-identifiers/test/index.js b/node_modules/undeclared-identifiers/test/index.js deleted file mode 100644 index bbfdb79..0000000 --- a/node_modules/undeclared-identifiers/test/index.js +++ /dev/null @@ -1,258 +0,0 @@ -var test = require('tape') -var acorn = require('acorn-node') -var find = require('../') - -test('undeclared variables', function (t) { - t.deepEqual(find(` - var a, b - a, b, c - `), { - identifiers: ['c'], - properties: [] - }) - t.end() -}) - -test('pass in a parsed ast', function (t) { - t.deepEqual(find(acorn.parse(` - var a, b - a, b, c - `)), { - identifiers: ['c'], - properties: [] - }) - t.end() -}) - -test('undeclared properties', function (t) { - t.deepEqual(find(` - var a, b - a, b, c, d.e - `), { - identifiers: ['c', 'd'], - properties: ['d.e'] - }) - t.end() -}) - -test('wildcard use of undeclared name', function (t) { - t.deepEqual(find(` - function func () {} - new A() - A.from() - func(b) - C.from() - `, { wildcard: true }), { - identifiers: ['A', 'b', 'C'], - properties: ['A.*', 'A.from', 'b.*', 'C.from'] - }) - t.end() -}) - -test('wildcard use of undeclared name (different order)', function (t) { - t.deepEqual(find(` - A.from() - new A() - `, { wildcard: true }), { - identifiers: ['A'], - properties: ['A.from', 'A.*'] - }) - t.end() -}) - -test('function names', function (t) { - t.deepEqual(find(` - function x () { - return x - } - x() - `), { - identifiers: [], - properties: [] - }) - t.deepEqual(find(` - function x () { - return x - } - y() - `), { - identifiers: ['y'], - properties: [] - }) - t.end() -}) - -test('class names', function (t) { - t.deepEqual(find(` - class X {} - new X() - `), { - identifiers: [], - properties: [] - }) - t.deepEqual(find(` - class X extends Y {} - new X() - `), { - identifiers: ['Y'], - properties: [] - }) - t.deepEqual(find(` - class Y {} - class X extends Y {} - new X() - `), { - identifiers: [], - properties: [] - }) - t.end() -}) - -test('class methods', function (t) { - t.deepEqual(find(` - class X { - constructor() { u } - bar() { v } - static foo() { w } - } - `), { - identifiers: ['u', 'v', 'w'], - properties: [] - }) - t.end() -}) - -test('super', function (t) { - t.deepEqual(find(` - class X extends Y { - constructor() { super() } - } - `), { - identifiers: ['Y'], - properties: [] - }) - t.deepEqual(find(` - class X { - foo() { super.foo } - } - `), { - identifiers: [], - properties: [] - }) - t.end() -}) - -test('scope', function (t) { - t.deepEqual(find(` - function y () { - function x () { - return x - } - } - x(y(x.y)) - `), { - identifiers: ['x'], - properties: ['x.y'] - }) - t.end() -}) - -test('block scope', function (t) { - t.deepEqual(find(` - var x - { var y; let z } - x, y, z - `), { - identifiers: ['z'], - properties: [] - }) - t.end() -}) - -test('function parameters', function (t) { - t.deepEqual(find(` - function a (a1, a2) { a, a1, a2, a3 } - ;(function b (b1, b2) { b, b1, b2, b3 }) - ;((c1, c2) => { c1, c2, c3 }) - `), { - identifiers: ['a3', 'b3', 'c3'], - properties: [] - }) - t.deepEqual(find(` - function a (a1, a2) { } - a, a1, a2 - `), { - identifiers: ['a1', 'a2'], - properties: [] - }) - t.end() -}) - -test('assignment', function (t) { - t.deepEqual(find(` - var a - b = 2 - b.c = 3 - `), { - identifiers: ['b'], - properties: ['b.c'] - }) - t.end() -}) - -test('catch', function (t) { - t.deepEqual(find(` - try { var a } catch (err) { err } - try { let b } catch (orr) { orr } - a, b - `), { - identifiers: ['b'], - properties: [] - }) - t.end() -}) - -test('object prototype names', function (t) { - t.deepEqual(find(` - var propertyIsEnumerable, hasOwnProperty - isPrototypeOf - `), { - identifiers: ['isPrototypeOf'], - properties: [] - }) - t.end() -}) - -test('labels', function (t) { - t.deepEqual(find(` - a: a; - b: a; - c: a; - `), { - identifiers: ['a'], - properties: [] - }) - t.end() -}) - -test('property keys', function (t) { - t.deepEqual(find(` - ({ a: a, - b: a, [d]: a, - c: a, }) - `), { - identifiers: ['a', 'd'], - properties: [] - }) - t.end() -}) - -test('string property access', function (t) { - t.deepEqual(find(` - Buffer["isBuffer"] - `), { - identifiers: ['Buffer'], - properties: ['Buffer.isBuffer'] - }) - t.end() -}) diff --git a/node_modules/url/.npmignore b/node_modules/url/.npmignore deleted file mode 100644 index ba11471..0000000 --- a/node_modules/url/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test-url.js diff --git a/node_modules/url/.travis.yml b/node_modules/url/.travis.yml deleted file mode 100644 index 16ed301..0000000 --- a/node_modules/url/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.10" -env: - global: - - secure: OgPRLCzHFh5WbjHEKlghHFW1oOreSF2JVUr3CMaFDi03ngTS2WONSw8mRn8SA6FTldiGGBx1n8orDzUw6cdkB7+tkU3G5B0M0V3vl823NaUFKgxsCM3UGDYfJb3yfAG5cj72rVZoX/ABd1fVuG4vBIlDLxsSlKQFMzUCFoyttr8= - - secure: AiZP8GHbyx83ZBhOvOxxtpNcgNHoP+vo5G1a1OYU78EHCgHg8NRyHKyCdrBnPvw6mV2BI/8frZaXAEicsHMtHMofBYn7nibNlaajBPI8AkHtYfNSc+zO+71Kwv7VOTOKKnkMEIkqhHlc6njFoH3QaBNHsgNlzzplPxaIt8vdUVk= diff --git a/node_modules/url/.zuul.yml b/node_modules/url/.zuul.yml deleted file mode 100644 index feea8b6..0000000 --- a/node_modules/url/.zuul.yml +++ /dev/null @@ -1,16 +0,0 @@ -ui: mocha-tdd -browsers: - - name: chrome - version: latest - - name: firefox - version: 24..latest - - name: safari - version: latest - - name: ie - version: 9..latest - - name: iphone - version: oldest..latest - - name: ipad - version: oldest..latest - - name: android - version: oldest..latest diff --git a/node_modules/url/LICENSE b/node_modules/url/LICENSE deleted file mode 100644 index f45bc11..0000000 --- a/node_modules/url/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/url/README.md b/node_modules/url/README.md deleted file mode 100644 index 8b35460..0000000 --- a/node_modules/url/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# node-url - -[![Build Status](https://travis-ci.org/defunctzombie/node-url.svg?branch=master)](https://travis-ci.org/defunctzombie/node-url) - -This module has utilities for URL resolution and parsing meant to have feature parity with node.js core [url](http://nodejs.org/api/url.html) module. - -```js -var url = require('url'); -``` - -## api - -Parsed URL objects have some or all of the following fields, depending on -whether or not they exist in the URL string. Any parts that are not in the URL -string will not be in the parsed object. Examples are shown for the URL - -`'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'` - -* `href`: The full URL that was originally parsed. Both the protocol and host are lowercased. - - Example: `'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'` - -* `protocol`: The request protocol, lowercased. - - Example: `'http:'` - -* `host`: The full lowercased host portion of the URL, including port - information. - - Example: `'host.com:8080'` - -* `auth`: The authentication information portion of a URL. - - Example: `'user:pass'` - -* `hostname`: Just the lowercased hostname portion of the host. - - Example: `'host.com'` - -* `port`: The port number portion of the host. - - Example: `'8080'` - -* `pathname`: The path section of the URL, that comes after the host and - before the query, including the initial slash if present. - - Example: `'/p/a/t/h'` - -* `search`: The 'query string' portion of the URL, including the leading - question mark. - - Example: `'?query=string'` - -* `path`: Concatenation of `pathname` and `search`. - - Example: `'/p/a/t/h?query=string'` - -* `query`: Either the 'params' portion of the query string, or a - querystring-parsed object. - - Example: `'query=string'` or `{'query':'string'}` - -* `hash`: The 'fragment' portion of the URL including the pound-sign. - - Example: `'#hash'` - -The following methods are provided by the URL module: - -### url.parse(urlStr, [parseQueryString], [slashesDenoteHost]) - -Take a URL string, and return an object. - -Pass `true` as the second argument to also parse -the query string using the `querystring` module. -Defaults to `false`. - -Pass `true` as the third argument to treat `//foo/bar` as -`{ host: 'foo', pathname: '/bar' }` rather than -`{ pathname: '//foo/bar' }`. Defaults to `false`. - -### url.format(urlObj) - -Take a parsed URL object, and return a formatted URL string. - -* `href` will be ignored. -* `protocol` is treated the same with or without the trailing `:` (colon). - * The protocols `http`, `https`, `ftp`, `gopher`, `file` will be - postfixed with `://` (colon-slash-slash). - * All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will - be postfixed with `:` (colon) -* `auth` will be used if present. -* `hostname` will only be used if `host` is absent. -* `port` will only be used if `host` is absent. -* `host` will be used in place of `hostname` and `port` -* `pathname` is treated the same with or without the leading `/` (slash) -* `search` will be used in place of `query` -* `query` (object; see `querystring`) will only be used if `search` is absent. -* `search` is treated the same with or without the leading `?` (question mark) -* `hash` is treated the same with or without the leading `#` (pound sign, anchor) - -### url.resolve(from, to) - -Take a base URL, and a href URL, and resolve them as a browser would for -an anchor tag. Examples: - - url.resolve('/one/two/three', 'four') // '/one/two/four' - url.resolve('http://example.com/', '/one') // 'http://example.com/one' - url.resolve('http://example.com/one', '/two') // 'http://example.com/two' diff --git a/node_modules/url/node_modules/punycode/LICENSE-MIT.txt b/node_modules/url/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/node_modules/url/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/url/node_modules/punycode/README.md b/node_modules/url/node_modules/punycode/README.md deleted file mode 100644 index 831e637..0000000 --- a/node_modules/url/node_modules/punycode/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) - -A robust Punycode converter that fully complies to [RFC 3492](http://tools.ietf.org/html/rfc3492) and [RFC 5891](http://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](http://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc). - -## Installation - -Via [npm](http://npmjs.org/) (only required for Node.js releases older than v0.6.2): - -```bash -npm install punycode -``` - -Via [Bower](http://bower.io/): - -```bash -bower install punycode -``` - -Via [Component](https://github.com/component/component): - -```bash -component install bestiejs/punycode.js -``` - -In a browser: - -```html - -``` - -In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/): - -```js -var punycode = require('punycode'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('punycode.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'punycode': 'path/to/punycode' - } - }, - ['punycode'], - function(punycode) { - console.log(punycode); - } -); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that's already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## Unit tests & code coverage - -After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -Feel free to fork if you see possible improvements! - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Contributors - -| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/url/node_modules/punycode/package.json b/node_modules/url/node_modules/punycode/package.json deleted file mode 100644 index 1292d7d..0000000 --- a/node_modules/url/node_modules/punycode/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "punycode@1.3.2", - "_id": "punycode@1.3.2", - "_inBundle": false, - "_integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "_location": "/url/punycode", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "punycode@1.3.2", - "name": "punycode", - "escapedName": "punycode", - "rawSpec": "1.3.2", - "saveSpec": null, - "fetchSpec": "1.3.2" - }, - "_requiredBy": [ - "/url" - ], - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "_shasum": "9653a036fb7c1ee42342f2325cceefea3926c48d", - "_spec": "punycode@1.3.2", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/url", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - } - ], - "deprecated": false, - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "devDependencies": { - "coveralls": "^2.10.1", - "grunt": "^0.4.5", - "grunt-contrib-uglify": "^0.5.0", - "grunt-shell": "^0.7.0", - "istanbul": "^0.2.13", - "qunit-extras": "^1.2.0", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.14" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js" - ], - "homepage": "https://mths.be/punycode", - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "main": "punycode.js", - "name": "punycode", - "repository": { - "type": "git", - "url": "git+https://github.com/bestiejs/punycode.js.git" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "version": "1.3.2" -} diff --git a/node_modules/url/node_modules/punycode/punycode.js b/node_modules/url/node_modules/punycode/punycode.js deleted file mode 100644 index ac68597..0000000 --- a/node_modules/url/node_modules/punycode/punycode.js +++ /dev/null @@ -1,530 +0,0 @@ -/*! https://mths.be/punycode v1.3.2 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * http://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.3.2', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/url/package.json b/node_modules/url/package.json deleted file mode 100644 index 622d52b..0000000 --- a/node_modules/url/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "_from": "url@~0.11.0", - "_id": "url@0.11.0", - "_inBundle": false, - "_integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "_location": "/url", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "url@~0.11.0", - "name": "url", - "escapedName": "url", - "rawSpec": "~0.11.0", - "saveSpec": null, - "fetchSpec": "~0.11.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "_shasum": "3838e97cfc60521eb73c525a8e55bfdd9e2e28f1", - "_spec": "url@~0.11.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "bugs": { - "url": "https://github.com/defunctzombie/node-url/issues" - }, - "bundleDependencies": false, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "deprecated": false, - "description": "The core `url` packaged standalone for use with Browserify.", - "devDependencies": { - "assert": "1.1.1", - "mocha": "1.18.2", - "zuul": "3.3.0" - }, - "homepage": "https://github.com/defunctzombie/node-url#readme", - "license": "MIT", - "main": "./url.js", - "name": "url", - "repository": { - "type": "git", - "url": "git+https://github.com/defunctzombie/node-url.git" - }, - "scripts": { - "test": "mocha --ui qunit test.js && zuul -- test.js", - "test-local": "zuul --local -- test.js" - }, - "version": "0.11.0" -} diff --git a/node_modules/url/test.js b/node_modules/url/test.js deleted file mode 100644 index 3b7d335..0000000 --- a/node_modules/url/test.js +++ /dev/null @@ -1,1599 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); - -var url = require('./url'); - -// URLs to parse, and expected data -// { url : parsed } -var parseTests = { - '//some_path' : { - 'href': '//some_path', - 'pathname': '//some_path', - 'path': '//some_path' - }, - - 'http:\\\\evil-phisher\\foo.html#h\\a\\s\\h': { - protocol: 'http:', - slashes: true, - host: 'evil-phisher', - hostname: 'evil-phisher', - pathname: '/foo.html', - path: '/foo.html', - hash: '#h%5Ca%5Cs%5Ch', - href: 'http://evil-phisher/foo.html#h%5Ca%5Cs%5Ch' - }, - - 'http:\\\\evil-phisher\\foo.html?json="\\"foo\\""#h\\a\\s\\h': { - protocol: 'http:', - slashes: true, - host: 'evil-phisher', - hostname: 'evil-phisher', - pathname: '/foo.html', - search: '?json=%22%5C%22foo%5C%22%22', - query: 'json=%22%5C%22foo%5C%22%22', - path: '/foo.html?json=%22%5C%22foo%5C%22%22', - hash: '#h%5Ca%5Cs%5Ch', - href: 'http://evil-phisher/foo.html?json=%22%5C%22foo%5C%22%22#h%5Ca%5Cs%5Ch' - }, - - 'http:\\\\evil-phisher\\foo.html#h\\a\\s\\h?blarg': { - protocol: 'http:', - slashes: true, - host: 'evil-phisher', - hostname: 'evil-phisher', - pathname: '/foo.html', - path: '/foo.html', - hash: '#h%5Ca%5Cs%5Ch?blarg', - href: 'http://evil-phisher/foo.html#h%5Ca%5Cs%5Ch?blarg' - }, - - - 'http:\\\\evil-phisher\\foo.html': { - protocol: 'http:', - slashes: true, - host: 'evil-phisher', - hostname: 'evil-phisher', - pathname: '/foo.html', - path: '/foo.html', - href: 'http://evil-phisher/foo.html' - }, - - 'HTTP://www.example.com/' : { - 'href': 'http://www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'HTTP://www.example.com' : { - 'href': 'http://www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://www.ExAmPlE.com/' : { - 'href': 'http://www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://user:pw@www.ExAmPlE.com/' : { - 'href': 'http://user:pw@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pw', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://USER:PW@www.ExAmPlE.com/' : { - 'href': 'http://USER:PW@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'USER:PW', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://user@www.example.com/' : { - 'href': 'http://user@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://user%3Apw@www.example.com/' : { - 'href': 'http://user:pw@www.example.com/', - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pw', - 'host': 'www.example.com', - 'hostname': 'www.example.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://x.com/path?that\'s#all, folks' : { - 'href': 'http://x.com/path?that%27s#all,%20folks', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.com', - 'hostname': 'x.com', - 'search': '?that%27s', - 'query': 'that%27s', - 'pathname': '/path', - 'hash': '#all,%20folks', - 'path': '/path?that%27s' - }, - - 'HTTP://X.COM/Y' : { - 'href': 'http://x.com/Y', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.com', - 'hostname': 'x.com', - 'pathname': '/Y', - 'path': '/Y' - }, - - // + not an invalid host character - // per https://url.spec.whatwg.org/#host-parsing - 'http://x.y.com+a/b/c' : { - 'href': 'http://x.y.com+a/b/c', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.y.com+a', - 'hostname': 'x.y.com+a', - 'pathname': '/b/c', - 'path': '/b/c' - }, - - // an unexpected invalid char in the hostname. - 'HtTp://x.y.cOm;a/b/c?d=e#f gi' : { - 'href': 'http://x.y.com/;a/b/c?d=e#f%20g%3Ch%3Ei', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.y.com', - 'hostname': 'x.y.com', - 'pathname': ';a/b/c', - 'search': '?d=e', - 'query': 'd=e', - 'hash': '#f%20g%3Ch%3Ei', - 'path': ';a/b/c?d=e' - }, - - // make sure that we don't accidentally lcast the path parts. - 'HtTp://x.y.cOm;A/b/c?d=e#f gi' : { - 'href': 'http://x.y.com/;A/b/c?d=e#f%20g%3Ch%3Ei', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x.y.com', - 'hostname': 'x.y.com', - 'pathname': ';A/b/c', - 'search': '?d=e', - 'query': 'd=e', - 'hash': '#f%20g%3Ch%3Ei', - 'path': ';A/b/c?d=e' - }, - - 'http://x...y...#p': { - 'href': 'http://x...y.../#p', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x...y...', - 'hostname': 'x...y...', - 'hash': '#p', - 'pathname': '/', - 'path': '/' - }, - - 'http://x/p/"quoted"': { - 'href': 'http://x/p/%22quoted%22', - 'protocol': 'http:', - 'slashes': true, - 'host': 'x', - 'hostname': 'x', - 'pathname': '/p/%22quoted%22', - 'path': '/p/%22quoted%22' - }, - - ' Is a URL!': { - 'href': '%3Chttp://goo.corn/bread%3E%20Is%20a%20URL!', - 'pathname': '%3Chttp://goo.corn/bread%3E%20Is%20a%20URL!', - 'path': '%3Chttp://goo.corn/bread%3E%20Is%20a%20URL!' - }, - - 'http://www.narwhaljs.org/blog/categories?id=news' : { - 'href': 'http://www.narwhaljs.org/blog/categories?id=news', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.narwhaljs.org', - 'hostname': 'www.narwhaljs.org', - 'search': '?id=news', - 'query': 'id=news', - 'pathname': '/blog/categories', - 'path': '/blog/categories?id=news' - }, - - 'http://mt0.google.com/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=' : { - 'href': 'http://mt0.google.com/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'hostname': 'mt0.google.com', - 'pathname': '/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=', - 'path': '/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=' - }, - - 'http://mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' : { - 'href': 'http://mt0.google.com/vt/lyrs=m@114???&hl=en&src=api' + - '&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'hostname': 'mt0.google.com', - 'search': '???&hl=en&src=api&x=2&y=2&z=3&s=', - 'query': '??&hl=en&src=api&x=2&y=2&z=3&s=', - 'pathname': '/vt/lyrs=m@114', - 'path': '/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' - }, - - 'http://user:pass@mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=': - { - 'href': 'http://user:pass@mt0.google.com/vt/lyrs=m@114???' + - '&hl=en&src=api&x=2&y=2&z=3&s=', - 'protocol': 'http:', - 'slashes': true, - 'host': 'mt0.google.com', - 'auth': 'user:pass', - 'hostname': 'mt0.google.com', - 'search': '???&hl=en&src=api&x=2&y=2&z=3&s=', - 'query': '??&hl=en&src=api&x=2&y=2&z=3&s=', - 'pathname': '/vt/lyrs=m@114', - 'path': '/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=' - }, - - 'file:///etc/passwd' : { - 'href': 'file:///etc/passwd', - 'slashes': true, - 'protocol': 'file:', - 'pathname': '/etc/passwd', - 'hostname': '', - 'host': '', - 'path': '/etc/passwd' - }, - - 'file://localhost/etc/passwd' : { - 'href': 'file://localhost/etc/passwd', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/passwd', - 'hostname': 'localhost', - 'host': 'localhost', - 'path': '/etc/passwd' - }, - - 'file://foo/etc/passwd' : { - 'href': 'file://foo/etc/passwd', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/passwd', - 'hostname': 'foo', - 'host': 'foo', - 'path': '/etc/passwd' - }, - - 'file:///etc/node/' : { - 'href': 'file:///etc/node/', - 'slashes': true, - 'protocol': 'file:', - 'pathname': '/etc/node/', - 'hostname': '', - 'host': '', - 'path': '/etc/node/' - }, - - 'file://localhost/etc/node/' : { - 'href': 'file://localhost/etc/node/', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/node/', - 'hostname': 'localhost', - 'host': 'localhost', - 'path': '/etc/node/' - }, - - 'file://foo/etc/node/' : { - 'href': 'file://foo/etc/node/', - 'protocol': 'file:', - 'slashes': true, - 'pathname': '/etc/node/', - 'hostname': 'foo', - 'host': 'foo', - 'path': '/etc/node/' - }, - - 'http:/baz/../foo/bar' : { - 'href': 'http:/baz/../foo/bar', - 'protocol': 'http:', - 'pathname': '/baz/../foo/bar', - 'path': '/baz/../foo/bar' - }, - - 'http://user:pass@example.com:8000/foo/bar?baz=quux#frag' : { - 'href': 'http://user:pass@example.com:8000/foo/bar?baz=quux#frag', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com:8000', - 'auth': 'user:pass', - 'port': '8000', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - '//user:pass@example.com:8000/foo/bar?baz=quux#frag' : { - 'href': '//user:pass@example.com:8000/foo/bar?baz=quux#frag', - 'slashes': true, - 'host': 'example.com:8000', - 'auth': 'user:pass', - 'port': '8000', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - '/foo/bar?baz=quux#frag' : { - 'href': '/foo/bar?baz=quux#frag', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - 'http:/foo/bar?baz=quux#frag' : { - 'href': 'http:/foo/bar?baz=quux#frag', - 'protocol': 'http:', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': 'baz=quux', - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - - 'mailto:foo@bar.com?subject=hello' : { - 'href': 'mailto:foo@bar.com?subject=hello', - 'protocol': 'mailto:', - 'host': 'bar.com', - 'auth' : 'foo', - 'hostname' : 'bar.com', - 'search': '?subject=hello', - 'query': 'subject=hello', - 'path': '?subject=hello' - }, - - 'javascript:alert(\'hello\');' : { - 'href': 'javascript:alert(\'hello\');', - 'protocol': 'javascript:', - 'pathname': 'alert(\'hello\');', - 'path': 'alert(\'hello\');' - }, - - 'xmpp:isaacschlueter@jabber.org' : { - 'href': 'xmpp:isaacschlueter@jabber.org', - 'protocol': 'xmpp:', - 'host': 'jabber.org', - 'auth': 'isaacschlueter', - 'hostname': 'jabber.org' - }, - - 'http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar' : { - 'href' : 'http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar', - 'protocol' : 'http:', - 'slashes': true, - 'host' : '127.0.0.1:8080', - 'auth' : 'atpass:foo@bar', - 'hostname' : '127.0.0.1', - 'port' : '8080', - 'pathname': '/path', - 'search' : '?search=foo', - 'query' : 'search=foo', - 'hash' : '#bar', - 'path': '/path?search=foo' - }, - - 'svn+ssh://foo/bar': { - 'href': 'svn+ssh://foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'svn+ssh:', - 'pathname': '/bar', - 'path': '/bar', - 'slashes': true - }, - - 'dash-test://foo/bar': { - 'href': 'dash-test://foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar', - 'path': '/bar', - 'slashes': true - }, - - 'dash-test:foo/bar': { - 'href': 'dash-test:foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar', - 'path': '/bar' - }, - - 'dot.test://foo/bar': { - 'href': 'dot.test://foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar', - 'path': '/bar', - 'slashes': true - }, - - 'dot.test:foo/bar': { - 'href': 'dot.test:foo/bar', - 'host': 'foo', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar', - 'path': '/bar' - }, - - // IDNA tests - 'http://www.日本語.com/' : { - 'href': 'http://www.xn--wgv71a119e.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.xn--wgv71a119e.com', - 'hostname': 'www.xn--wgv71a119e.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://example.Bücher.com/' : { - 'href': 'http://example.xn--bcher-kva.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.xn--bcher-kva.com', - 'hostname': 'example.xn--bcher-kva.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://www.Äffchen.com/' : { - 'href': 'http://www.xn--ffchen-9ta.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.xn--ffchen-9ta.com', - 'hostname': 'www.xn--ffchen-9ta.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://www.Äffchen.cOm;A/b/c?d=e#f gi' : { - 'href': 'http://www.xn--ffchen-9ta.com/;A/b/c?d=e#f%20g%3Ch%3Ei', - 'protocol': 'http:', - 'slashes': true, - 'host': 'www.xn--ffchen-9ta.com', - 'hostname': 'www.xn--ffchen-9ta.com', - 'pathname': ';A/b/c', - 'search': '?d=e', - 'query': 'd=e', - 'hash': '#f%20g%3Ch%3Ei', - 'path': ';A/b/c?d=e' - }, - - 'http://SÉLIER.COM/' : { - 'href': 'http://xn--slier-bsa.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'xn--slier-bsa.com', - 'hostname': 'xn--slier-bsa.com', - 'pathname': '/', - 'path': '/' - }, - - 'http://ليهمابتكلموشعربي؟.ي؟/' : { - 'href': 'http://xn--egbpdaj6bu4bxfgehfvwxn.xn--egb9f/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'xn--egbpdaj6bu4bxfgehfvwxn.xn--egb9f', - 'hostname': 'xn--egbpdaj6bu4bxfgehfvwxn.xn--egb9f', - 'pathname': '/', - 'path': '/' - }, - - 'http://➡.ws/➡' : { - 'href': 'http://xn--hgi.ws/➡', - 'protocol': 'http:', - 'slashes': true, - 'host': 'xn--hgi.ws', - 'hostname': 'xn--hgi.ws', - 'pathname': '/➡', - 'path': '/➡' - }, - - 'http://bucket_name.s3.amazonaws.com/image.jpg': { - protocol: 'http:', - 'slashes': true, - slashes: true, - host: 'bucket_name.s3.amazonaws.com', - hostname: 'bucket_name.s3.amazonaws.com', - pathname: '/image.jpg', - href: 'http://bucket_name.s3.amazonaws.com/image.jpg', - 'path': '/image.jpg' - }, - - 'git+http://github.com/joyent/node.git': { - protocol: 'git+http:', - slashes: true, - host: 'github.com', - hostname: 'github.com', - pathname: '/joyent/node.git', - path: '/joyent/node.git', - href: 'git+http://github.com/joyent/node.git' - }, - - //if local1@domain1 is uses as a relative URL it may - //be parse into auth@hostname, but here there is no - //way to make it work in url.parse, I add the test to be explicit - 'local1@domain1': { - 'pathname': 'local1@domain1', - 'path': 'local1@domain1', - 'href': 'local1@domain1' - }, - - //While this may seem counter-intuitive, a browser will parse - // as a path. - 'www.example.com' : { - 'href': 'www.example.com', - 'pathname': 'www.example.com', - 'path': 'www.example.com' - }, - - // ipv6 support - '[fe80::1]': { - 'href': '[fe80::1]', - 'pathname': '[fe80::1]', - 'path': '[fe80::1]' - }, - - 'coap://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]': { - 'protocol': 'coap:', - 'slashes': true, - 'host': '[fedc:ba98:7654:3210:fedc:ba98:7654:3210]', - 'hostname': 'fedc:ba98:7654:3210:fedc:ba98:7654:3210', - 'href': 'coap://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/', - 'pathname': '/', - 'path': '/' - }, - - 'coap://[1080:0:0:0:8:800:200C:417A]:61616/': { - 'protocol': 'coap:', - 'slashes': true, - 'host': '[1080:0:0:0:8:800:200c:417a]:61616', - 'port': '61616', - 'hostname': '1080:0:0:0:8:800:200c:417a', - 'href': 'coap://[1080:0:0:0:8:800:200c:417a]:61616/', - 'pathname': '/', - 'path': '/' - }, - - 'http://user:password@[3ffe:2a00:100:7031::1]:8080': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:password', - 'host': '[3ffe:2a00:100:7031::1]:8080', - 'port': '8080', - 'hostname': '3ffe:2a00:100:7031::1', - 'href': 'http://user:password@[3ffe:2a00:100:7031::1]:8080/', - 'pathname': '/', - 'path': '/' - }, - - 'coap://u:p@[::192.9.5.5]:61616/.well-known/r?n=Temperature': { - 'protocol': 'coap:', - 'slashes': true, - 'auth': 'u:p', - 'host': '[::192.9.5.5]:61616', - 'port': '61616', - 'hostname': '::192.9.5.5', - 'href': 'coap://u:p@[::192.9.5.5]:61616/.well-known/r?n=Temperature', - 'search': '?n=Temperature', - 'query': 'n=Temperature', - 'pathname': '/.well-known/r', - 'path': '/.well-known/r?n=Temperature' - }, - - // empty port - 'http://example.com:': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/', - 'pathname': '/', - 'path': '/' - }, - - 'http://example.com:/a/b.html': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/a/b.html', - 'pathname': '/a/b.html', - 'path': '/a/b.html' - }, - - 'http://example.com:?a=b': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/?a=b', - 'search': '?a=b', - 'query': 'a=b', - 'pathname': '/', - 'path': '/?a=b' - }, - - 'http://example.com:#abc': { - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'href': 'http://example.com/#abc', - 'hash': '#abc', - 'pathname': '/', - 'path': '/' - }, - - 'http://[fe80::1]:/a/b?a=b#abc': { - 'protocol': 'http:', - 'slashes': true, - 'host': '[fe80::1]', - 'hostname': 'fe80::1', - 'href': 'http://[fe80::1]/a/b?a=b#abc', - 'search': '?a=b', - 'query': 'a=b', - 'hash': '#abc', - 'pathname': '/a/b', - 'path': '/a/b?a=b' - }, - - 'http://-lovemonsterz.tumblr.com/rss': { - 'protocol': 'http:', - 'slashes': true, - 'host': '-lovemonsterz.tumblr.com', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://-lovemonsterz.tumblr.com/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://-lovemonsterz.tumblr.com:80/rss': { - 'protocol': 'http:', - 'slashes': true, - 'port': '80', - 'host': '-lovemonsterz.tumblr.com:80', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://-lovemonsterz.tumblr.com:80/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://user:pass@-lovemonsterz.tumblr.com/rss': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'host': '-lovemonsterz.tumblr.com', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://user:pass@-lovemonsterz.tumblr.com/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://user:pass@-lovemonsterz.tumblr.com:80/rss': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'port': '80', - 'host': '-lovemonsterz.tumblr.com:80', - 'hostname': '-lovemonsterz.tumblr.com', - 'href': 'http://user:pass@-lovemonsterz.tumblr.com:80/rss', - 'pathname': '/rss', - 'path': '/rss', - }, - - 'http://_jabber._tcp.google.com/test': { - 'protocol': 'http:', - 'slashes': true, - 'host': '_jabber._tcp.google.com', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://_jabber._tcp.google.com/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://user:pass@_jabber._tcp.google.com/test': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'host': '_jabber._tcp.google.com', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://user:pass@_jabber._tcp.google.com/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://_jabber._tcp.google.com:80/test': { - 'protocol': 'http:', - 'slashes': true, - 'port': '80', - 'host': '_jabber._tcp.google.com:80', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://_jabber._tcp.google.com:80/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://user:pass@_jabber._tcp.google.com:80/test': { - 'protocol': 'http:', - 'slashes': true, - 'auth': 'user:pass', - 'port': '80', - 'host': '_jabber._tcp.google.com:80', - 'hostname': '_jabber._tcp.google.com', - 'href': 'http://user:pass@_jabber._tcp.google.com:80/test', - 'pathname': '/test', - 'path': '/test', - }, - - 'http://x:1/\' <>"`/{}|\\^~`/': { - protocol: 'http:', - slashes: true, - host: 'x:1', - port: '1', - hostname: 'x', - pathname: '/%27%20%3C%3E%22%60/%7B%7D%7C/%5E~%60/', - path: '/%27%20%3C%3E%22%60/%7B%7D%7C/%5E~%60/', - href: 'http://x:1/%27%20%3C%3E%22%60/%7B%7D%7C/%5E~%60/' - }, - - 'http://a@b@c/': { - protocol: 'http:', - slashes: true, - auth: 'a@b', - host: 'c', - hostname: 'c', - href: 'http://a%40b@c/', - path: '/', - pathname: '/' - }, - - 'http://a@b?@c': { - protocol: 'http:', - slashes: true, - auth: 'a', - host: 'b', - hostname: 'b', - href: 'http://a@b/?@c', - path: '/?@c', - pathname: '/', - search: '?@c', - query: '@c' - }, - - 'http://a\r" \t\n<\'b:b@c\r\nd/e?f':{ - protocol: 'http:', - slashes: true, - auth: 'a\r" \t\n<\'b:b', - host: 'c', - port: null, - hostname: 'c', - hash: null, - search: '?f', - query: 'f', - pathname: '%0D%0Ad/e', - path: '%0D%0Ad/e?f', - href: 'http://a%0D%22%20%09%0A%3C\'b:b@c/%0D%0Ad/e?f' - }, - - // git urls used by npm - 'git+ssh://git@github.com:npm/npm': { - protocol: 'git+ssh:', - slashes: true, - auth: 'git', - host: 'github.com', - port: null, - hostname: 'github.com', - hash: null, - search: null, - query: null, - pathname: '/:npm/npm', - path: '/:npm/npm', - href: 'git+ssh://git@github.com/:npm/npm' - } - -}; - -Object.keys(parseTests).forEach(function(u) { - test('parse(' + u + ')', function() { - var actual = url.parse(u), - spaced = url.parse(' \t ' + u + '\n\t'); - expected = parseTests[u]; - - Object.keys(actual).forEach(function (i) { - if (expected[i] === undefined && actual[i] === null) { - expected[i] = null; - } - }); - - assert.deepEqual(actual, expected); - assert.deepEqual(spaced, expected); - - var expected = parseTests[u].href, - actual = url.format(parseTests[u]); - - assert.equal(actual, expected, - 'format(' + u + ') == ' + u + '\nactual:' + actual); - }); -}); - -var parseTestsWithQueryString = { - '/foo/bar?baz=quux#frag' : { - 'href': '/foo/bar?baz=quux#frag', - 'hash': '#frag', - 'search': '?baz=quux', - 'query': { - 'baz': 'quux' - }, - 'pathname': '/foo/bar', - 'path': '/foo/bar?baz=quux' - }, - 'http://example.com' : { - 'href': 'http://example.com/', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'query': {}, - 'search': '', - 'pathname': '/', - 'path': '/' - }, - '/example': { - protocol: null, - slashes: null, - auth: null, - host: null, - port: null, - hostname: null, - hash: null, - search: '', - query: {}, - pathname: '/example', - path: '/example', - href: '/example' - }, - '/example?query=value':{ - protocol: null, - slashes: null, - auth: null, - host: null, - port: null, - hostname: null, - hash: null, - search: '?query=value', - query: { query: 'value' }, - pathname: '/example', - path: '/example?query=value', - href: '/example?query=value' - } -}; - -Object.keys(parseTestsWithQueryString).forEach(function(u) { - test('parse(' + u + ')', function() { - var actual = url.parse(u, true); - var expected = parseTestsWithQueryString[u]; - for (var i in actual) { - if (actual[i] === null && expected[i] === undefined) { - expected[i] = null; - } - } - - assert.deepEqual(actual, expected); - }); -}); - -// some extra formatting tests, just to verify -// that it'll format slightly wonky content to a valid url. -var formatTests = { - 'http://example.com?' : { - 'href': 'http://example.com/?', - 'protocol': 'http:', - 'slashes': true, - 'host': 'example.com', - 'hostname': 'example.com', - 'search': '?', - 'query': {}, - 'pathname': '/' - }, - 'http://example.com?foo=bar#frag' : { - 'href': 'http://example.com/?foo=bar#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=bar', - 'query': 'foo=bar', - 'pathname': '/' - }, - 'http://example.com?foo=@bar#frag' : { - 'href': 'http://example.com/?foo=@bar#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=@bar', - 'query': 'foo=@bar', - 'pathname': '/' - }, - 'http://example.com?foo=/bar/#frag' : { - 'href': 'http://example.com/?foo=/bar/#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=/bar/', - 'query': 'foo=/bar/', - 'pathname': '/' - }, - 'http://example.com?foo=?bar/#frag' : { - 'href': 'http://example.com/?foo=?bar/#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag', - 'search': '?foo=?bar/', - 'query': 'foo=?bar/', - 'pathname': '/' - }, - 'http://example.com#frag=?bar/#frag' : { - 'href': 'http://example.com/#frag=?bar/#frag', - 'protocol': 'http:', - 'host': 'example.com', - 'hostname': 'example.com', - 'hash': '#frag=?bar/#frag', - 'pathname': '/' - }, - 'http://google.com" onload="alert(42)/' : { - 'href': 'http://google.com/%22%20onload=%22alert(42)/', - 'protocol': 'http:', - 'host': 'google.com', - 'pathname': '/%22%20onload=%22alert(42)/' - }, - 'http://a.com/a/b/c?s#h' : { - 'href': 'http://a.com/a/b/c?s#h', - 'protocol': 'http', - 'host': 'a.com', - 'pathname': 'a/b/c', - 'hash': 'h', - 'search': 's' - }, - 'xmpp:isaacschlueter@jabber.org' : { - 'href': 'xmpp:isaacschlueter@jabber.org', - 'protocol': 'xmpp:', - 'host': 'jabber.org', - 'auth': 'isaacschlueter', - 'hostname': 'jabber.org' - }, - 'http://atpass:foo%40bar@127.0.0.1/' : { - 'href': 'http://atpass:foo%40bar@127.0.0.1/', - 'auth': 'atpass:foo@bar', - 'hostname': '127.0.0.1', - 'protocol': 'http:', - 'pathname': '/' - }, - 'http://atslash%2F%40:%2F%40@foo/' : { - 'href': 'http://atslash%2F%40:%2F%40@foo/', - 'auth': 'atslash/@:/@', - 'hostname': 'foo', - 'protocol': 'http:', - 'pathname': '/' - }, - 'svn+ssh://foo/bar': { - 'href': 'svn+ssh://foo/bar', - 'hostname': 'foo', - 'protocol': 'svn+ssh:', - 'pathname': '/bar', - 'slashes': true - }, - 'dash-test://foo/bar': { - 'href': 'dash-test://foo/bar', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar', - 'slashes': true - }, - 'dash-test:foo/bar': { - 'href': 'dash-test:foo/bar', - 'hostname': 'foo', - 'protocol': 'dash-test:', - 'pathname': '/bar' - }, - 'dot.test://foo/bar': { - 'href': 'dot.test://foo/bar', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar', - 'slashes': true - }, - 'dot.test:foo/bar': { - 'href': 'dot.test:foo/bar', - 'hostname': 'foo', - 'protocol': 'dot.test:', - 'pathname': '/bar' - }, - // ipv6 support - 'coap:u:p@[::1]:61616/.well-known/r?n=Temperature': { - 'href': 'coap:u:p@[::1]:61616/.well-known/r?n=Temperature', - 'protocol': 'coap:', - 'auth': 'u:p', - 'hostname': '::1', - 'port': '61616', - 'pathname': '/.well-known/r', - 'search': 'n=Temperature' - }, - 'coap:[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616/s/stopButton': { - 'href': 'coap:[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616/s/stopButton', - 'protocol': 'coap', - 'host': '[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616', - 'pathname': '/s/stopButton' - }, - - // encode context-specific delimiters in path and query, but do not touch - // other non-delimiter chars like `%`. - // - - // `#`,`?` in path - '/path/to/%%23%3F+=&.txt?foo=theA1#bar' : { - href : '/path/to/%%23%3F+=&.txt?foo=theA1#bar', - pathname: '/path/to/%#?+=&.txt', - query: { - foo: 'theA1' - }, - hash: "#bar" - }, - - // `#`,`?` in path + `#` in query - '/path/to/%%23%3F+=&.txt?foo=the%231#bar' : { - href : '/path/to/%%23%3F+=&.txt?foo=the%231#bar', - pathname: '/path/to/%#?+=&.txt', - query: { - foo: 'the#1' - }, - hash: "#bar" - }, - - // `?` and `#` in path and search - 'http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag': { - href: 'http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag', - protocol: 'http:', - hostname: 'ex.com', - hash: '#frag', - search: '?abc=the#1?&foo=bar', - pathname: '/foo?100%m#r', - }, - - // `?` and `#` in search only - 'http://ex.com/fooA100%mBr?abc=the%231?&foo=bar#frag': { - href: 'http://ex.com/fooA100%mBr?abc=the%231?&foo=bar#frag', - protocol: 'http:', - hostname: 'ex.com', - hash: '#frag', - search: '?abc=the#1?&foo=bar', - pathname: '/fooA100%mBr', - } -}; - -Object.keys(formatTests).forEach(function(u) { - test('format(' + u + ')', function() { - var expect = formatTests[u].href; - delete formatTests[u].href; - var actual = url.format(u); - var actualObj = url.format(formatTests[u]); - assert.equal(actual, expect, - 'wonky format(' + u + ') == ' + expect + - '\nactual:' + actual); - assert.equal(actualObj, expect, - 'wonky format(' + JSON.stringify(formatTests[u]) + - ') == ' + expect + - '\nactual: ' + actualObj); - }); -}); - -/* - [from, path, expected] -*/ -var relativeTests = [ - ['/foo/bar/baz', 'quux', '/foo/bar/quux'], - ['/foo/bar/baz', 'quux/asdf', '/foo/bar/quux/asdf'], - ['/foo/bar/baz', 'quux/baz', '/foo/bar/quux/baz'], - ['/foo/bar/baz', '../quux/baz', '/foo/quux/baz'], - ['/foo/bar/baz', '/bar', '/bar'], - ['/foo/bar/baz/', 'quux', '/foo/bar/baz/quux'], - ['/foo/bar/baz/', 'quux/baz', '/foo/bar/baz/quux/baz'], - ['/foo/bar/baz', '../../../../../../../../quux/baz', '/quux/baz'], - ['/foo/bar/baz', '../../../../../../../quux/baz', '/quux/baz'], - ['/foo', '.', '/'], - ['/foo', '..', '/'], - ['/foo/', '.', '/foo/'], - ['/foo/', '..', '/'], - ['/foo/bar', '.', '/foo/'], - ['/foo/bar', '..', '/'], - ['/foo/bar/', '.', '/foo/bar/'], - ['/foo/bar/', '..', '/foo/'], - ['foo/bar', '../../../baz', '../../baz'], - ['foo/bar/', '../../../baz', '../baz'], - ['http://example.com/b//c//d;p?q#blarg', 'https:#hash2', 'https:///#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'https:/p/a/t/h?s#hash2', - 'https://p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'https://u:p@h.com/p/a/t/h?s#hash2', - 'https://u:p@h.com/p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'https:/a/b/c/d', - 'https://a/b/c/d'], - ['http://example.com/b//c//d;p?q#blarg', - 'http:#hash2', - 'http://example.com/b//c//d;p?q#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'http:/p/a/t/h?s#hash2', - 'http://example.com/p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'http://u:p@h.com/p/a/t/h?s#hash2', - 'http://u:p@h.com/p/a/t/h?s#hash2'], - ['http://example.com/b//c//d;p?q#blarg', - 'http:/a/b/c/d', - 'http://example.com/a/b/c/d'], - ['/foo/bar/baz', '/../etc/passwd', '/etc/passwd'] -]; - -relativeTests.forEach(function(relativeTest) { - test('resolve(' + [relativeTest[0], relativeTest[1]] + ')', function() { - var a = url.resolve(relativeTest[0], relativeTest[1]), - e = relativeTest[2]; - assert.equal(a, e, - 'resolve(' + [relativeTest[0], relativeTest[1]] + ') == ' + e + - '\n actual=' + a); - }); -}); - - -// https://github.com/joyent/node/issues/568 -[ - undefined, - null, - true, - false, - 0.0, - 0, - [], - {} -].forEach(function(val) { - test('parse(' + val + ')', function() { - assert.throws(function() { url.parse(val); }, TypeError); - }); -}); - - -// -// Tests below taken from Chiron -// http://code.google.com/p/chironjs/source/browse/trunk/src/test/http/url.js -// -// Copyright (c) 2002-2008 Kris Kowal -// used with permission under MIT License -// -// Changes marked with @isaacs - -var bases = [ - 'http://a/b/c/d;p?q', - 'http://a/b/c/d;p?q=1/2', - 'http://a/b/c/d;p=1/2?q', - 'fred:///s//a/b/c', - 'http:///s//a/b/c' -]; - -//[to, from, result] -var relativeTests2 = [ - // http://lists.w3.org/Archives/Public/uri/2004Feb/0114.html - ['../c', 'foo:a/b', 'foo:c'], - ['foo:.', 'foo:a', 'foo:'], - ['/foo/../../../bar', 'zz:abc', 'zz:/bar'], - ['/foo/../bar', 'zz:abc', 'zz:/bar'], - // @isaacs Disagree. Not how web browsers resolve this. - ['foo/../../../bar', 'zz:abc', 'zz:bar'], - // ['foo/../../../bar', 'zz:abc', 'zz:../../bar'], // @isaacs Added - ['foo/../bar', 'zz:abc', 'zz:bar'], - ['zz:.', 'zz:abc', 'zz:'], - ['/.', bases[0], 'http://a/'], - ['/.foo', bases[0], 'http://a/.foo'], - ['.foo', bases[0], 'http://a/b/c/.foo'], - - // http://gbiv.com/protocols/uri/test/rel_examples1.html - // examples from RFC 2396 - ['g:h', bases[0], 'g:h'], - ['g', bases[0], 'http://a/b/c/g'], - ['./g', bases[0], 'http://a/b/c/g'], - ['g/', bases[0], 'http://a/b/c/g/'], - ['/g', bases[0], 'http://a/g'], - ['//g', bases[0], 'http://g/'], - // changed with RFC 2396bis - //('?y', bases[0], 'http://a/b/c/d;p?y'], - ['?y', bases[0], 'http://a/b/c/d;p?y'], - ['g?y', bases[0], 'http://a/b/c/g?y'], - // changed with RFC 2396bis - //('#s', bases[0], CURRENT_DOC_URI + '#s'], - ['#s', bases[0], 'http://a/b/c/d;p?q#s'], - ['g#s', bases[0], 'http://a/b/c/g#s'], - ['g?y#s', bases[0], 'http://a/b/c/g?y#s'], - [';x', bases[0], 'http://a/b/c/;x'], - ['g;x', bases[0], 'http://a/b/c/g;x'], - ['g;x?y#s' , bases[0], 'http://a/b/c/g;x?y#s'], - // changed with RFC 2396bis - //('', bases[0], CURRENT_DOC_URI], - ['', bases[0], 'http://a/b/c/d;p?q'], - ['.', bases[0], 'http://a/b/c/'], - ['./', bases[0], 'http://a/b/c/'], - ['..', bases[0], 'http://a/b/'], - ['../', bases[0], 'http://a/b/'], - ['../g', bases[0], 'http://a/b/g'], - ['../..', bases[0], 'http://a/'], - ['../../', bases[0], 'http://a/'], - ['../../g' , bases[0], 'http://a/g'], - ['../../../g', bases[0], ('http://a/../g', 'http://a/g')], - ['../../../../g', bases[0], ('http://a/../../g', 'http://a/g')], - // changed with RFC 2396bis - //('/./g', bases[0], 'http://a/./g'], - ['/./g', bases[0], 'http://a/g'], - // changed with RFC 2396bis - //('/../g', bases[0], 'http://a/../g'], - ['/../g', bases[0], 'http://a/g'], - ['g.', bases[0], 'http://a/b/c/g.'], - ['.g', bases[0], 'http://a/b/c/.g'], - ['g..', bases[0], 'http://a/b/c/g..'], - ['..g', bases[0], 'http://a/b/c/..g'], - ['./../g', bases[0], 'http://a/b/g'], - ['./g/.', bases[0], 'http://a/b/c/g/'], - ['g/./h', bases[0], 'http://a/b/c/g/h'], - ['g/../h', bases[0], 'http://a/b/c/h'], - ['g;x=1/./y', bases[0], 'http://a/b/c/g;x=1/y'], - ['g;x=1/../y', bases[0], 'http://a/b/c/y'], - ['g?y/./x', bases[0], 'http://a/b/c/g?y/./x'], - ['g?y/../x', bases[0], 'http://a/b/c/g?y/../x'], - ['g#s/./x', bases[0], 'http://a/b/c/g#s/./x'], - ['g#s/../x', bases[0], 'http://a/b/c/g#s/../x'], - ['http:g', bases[0], ('http:g', 'http://a/b/c/g')], - ['http:', bases[0], ('http:', bases[0])], - // not sure where this one originated - ['/a/b/c/./../../g', bases[0], 'http://a/a/g'], - - // http://gbiv.com/protocols/uri/test/rel_examples2.html - // slashes in base URI's query args - ['g', bases[1], 'http://a/b/c/g'], - ['./g', bases[1], 'http://a/b/c/g'], - ['g/', bases[1], 'http://a/b/c/g/'], - ['/g', bases[1], 'http://a/g'], - ['//g', bases[1], 'http://g/'], - // changed in RFC 2396bis - //('?y', bases[1], 'http://a/b/c/?y'], - ['?y', bases[1], 'http://a/b/c/d;p?y'], - ['g?y', bases[1], 'http://a/b/c/g?y'], - ['g?y/./x' , bases[1], 'http://a/b/c/g?y/./x'], - ['g?y/../x', bases[1], 'http://a/b/c/g?y/../x'], - ['g#s', bases[1], 'http://a/b/c/g#s'], - ['g#s/./x' , bases[1], 'http://a/b/c/g#s/./x'], - ['g#s/../x', bases[1], 'http://a/b/c/g#s/../x'], - ['./', bases[1], 'http://a/b/c/'], - ['../', bases[1], 'http://a/b/'], - ['../g', bases[1], 'http://a/b/g'], - ['../../', bases[1], 'http://a/'], - ['../../g' , bases[1], 'http://a/g'], - - // http://gbiv.com/protocols/uri/test/rel_examples3.html - // slashes in path params - // all of these changed in RFC 2396bis - ['g', bases[2], 'http://a/b/c/d;p=1/g'], - ['./g', bases[2], 'http://a/b/c/d;p=1/g'], - ['g/', bases[2], 'http://a/b/c/d;p=1/g/'], - ['g?y', bases[2], 'http://a/b/c/d;p=1/g?y'], - [';x', bases[2], 'http://a/b/c/d;p=1/;x'], - ['g;x', bases[2], 'http://a/b/c/d;p=1/g;x'], - ['g;x=1/./y', bases[2], 'http://a/b/c/d;p=1/g;x=1/y'], - ['g;x=1/../y', bases[2], 'http://a/b/c/d;p=1/y'], - ['./', bases[2], 'http://a/b/c/d;p=1/'], - ['../', bases[2], 'http://a/b/c/'], - ['../g', bases[2], 'http://a/b/c/g'], - ['../../', bases[2], 'http://a/b/'], - ['../../g' , bases[2], 'http://a/b/g'], - - // http://gbiv.com/protocols/uri/test/rel_examples4.html - // double and triple slash, unknown scheme - ['g:h', bases[3], 'g:h'], - ['g', bases[3], 'fred:///s//a/b/g'], - ['./g', bases[3], 'fred:///s//a/b/g'], - ['g/', bases[3], 'fred:///s//a/b/g/'], - ['/g', bases[3], 'fred:///g'], // may change to fred:///s//a/g - ['//g', bases[3], 'fred://g'], // may change to fred:///s//g - ['//g/x', bases[3], 'fred://g/x'], // may change to fred:///s//g/x - ['///g', bases[3], 'fred:///g'], - ['./', bases[3], 'fred:///s//a/b/'], - ['../', bases[3], 'fred:///s//a/'], - ['../g', bases[3], 'fred:///s//a/g'], - - ['../../', bases[3], 'fred:///s//'], - ['../../g' , bases[3], 'fred:///s//g'], - ['../../../g', bases[3], 'fred:///s/g'], - // may change to fred:///s//a/../../../g - ['../../../../g', bases[3], 'fred:///g'], - - // http://gbiv.com/protocols/uri/test/rel_examples5.html - // double and triple slash, well-known scheme - ['g:h', bases[4], 'g:h'], - ['g', bases[4], 'http:///s//a/b/g'], - ['./g', bases[4], 'http:///s//a/b/g'], - ['g/', bases[4], 'http:///s//a/b/g/'], - ['/g', bases[4], 'http:///g'], // may change to http:///s//a/g - ['//g', bases[4], 'http://g/'], // may change to http:///s//g - ['//g/x', bases[4], 'http://g/x'], // may change to http:///s//g/x - ['///g', bases[4], 'http:///g'], - ['./', bases[4], 'http:///s//a/b/'], - ['../', bases[4], 'http:///s//a/'], - ['../g', bases[4], 'http:///s//a/g'], - ['../../', bases[4], 'http:///s//'], - ['../../g' , bases[4], 'http:///s//g'], - // may change to http:///s//a/../../g - ['../../../g', bases[4], 'http:///s/g'], - // may change to http:///s//a/../../../g - ['../../../../g', bases[4], 'http:///g'], - - // from Dan Connelly's tests in http://www.w3.org/2000/10/swap/uripath.py - ['bar:abc', 'foo:xyz', 'bar:abc'], - ['../abc', 'http://example/x/y/z', 'http://example/x/abc'], - ['http://example/x/abc', 'http://example2/x/y/z', 'http://example/x/abc'], - ['../r', 'http://ex/x/y/z', 'http://ex/x/r'], - ['q/r', 'http://ex/x/y', 'http://ex/x/q/r'], - ['q/r#s', 'http://ex/x/y', 'http://ex/x/q/r#s'], - ['q/r#s/t', 'http://ex/x/y', 'http://ex/x/q/r#s/t'], - ['ftp://ex/x/q/r', 'http://ex/x/y', 'ftp://ex/x/q/r'], - ['', 'http://ex/x/y', 'http://ex/x/y'], - ['', 'http://ex/x/y/', 'http://ex/x/y/'], - ['', 'http://ex/x/y/pdq', 'http://ex/x/y/pdq'], - ['z/', 'http://ex/x/y/', 'http://ex/x/y/z/'], - ['#Animal', - 'file:/swap/test/animal.rdf', - 'file:/swap/test/animal.rdf#Animal'], - ['../abc', 'file:/e/x/y/z', 'file:/e/x/abc'], - ['/example/x/abc', 'file:/example2/x/y/z', 'file:/example/x/abc'], - ['../r', 'file:/ex/x/y/z', 'file:/ex/x/r'], - ['/r', 'file:/ex/x/y/z', 'file:/r'], - ['q/r', 'file:/ex/x/y', 'file:/ex/x/q/r'], - ['q/r#s', 'file:/ex/x/y', 'file:/ex/x/q/r#s'], - ['q/r#', 'file:/ex/x/y', 'file:/ex/x/q/r#'], - ['q/r#s/t', 'file:/ex/x/y', 'file:/ex/x/q/r#s/t'], - ['ftp://ex/x/q/r', 'file:/ex/x/y', 'ftp://ex/x/q/r'], - ['', 'file:/ex/x/y', 'file:/ex/x/y'], - ['', 'file:/ex/x/y/', 'file:/ex/x/y/'], - ['', 'file:/ex/x/y/pdq', 'file:/ex/x/y/pdq'], - ['z/', 'file:/ex/x/y/', 'file:/ex/x/y/z/'], - ['file://meetings.example.com/cal#m1', - 'file:/devel/WWW/2000/10/swap/test/reluri-1.n3', - 'file://meetings.example.com/cal#m1'], - ['file://meetings.example.com/cal#m1', - 'file:/home/connolly/w3ccvs/WWW/2000/10/swap/test/reluri-1.n3', - 'file://meetings.example.com/cal#m1'], - ['./#blort', 'file:/some/dir/foo', 'file:/some/dir/#blort'], - ['./#', 'file:/some/dir/foo', 'file:/some/dir/#'], - // Ryan Lee - ['./', 'http://example/x/abc.efg', 'http://example/x/'], - - - // Graham Klyne's tests - // http://www.ninebynine.org/Software/HaskellUtils/Network/UriTest.xls - // 01-31 are from Connelly's cases - - // 32-49 - ['./q:r', 'http://ex/x/y', 'http://ex/x/q:r'], - ['./p=q:r', 'http://ex/x/y', 'http://ex/x/p=q:r'], - ['?pp/rr', 'http://ex/x/y?pp/qq', 'http://ex/x/y?pp/rr'], - ['y/z', 'http://ex/x/y?pp/qq', 'http://ex/x/y/z'], - ['local/qual@domain.org#frag', - 'mailto:local', - 'mailto:local/qual@domain.org#frag'], - ['more/qual2@domain2.org#frag', - 'mailto:local/qual1@domain1.org', - 'mailto:local/more/qual2@domain2.org#frag'], - ['y?q', 'http://ex/x/y?q', 'http://ex/x/y?q'], - ['/x/y?q', 'http://ex?p', 'http://ex/x/y?q'], - ['c/d', 'foo:a/b', 'foo:a/c/d'], - ['/c/d', 'foo:a/b', 'foo:/c/d'], - ['', 'foo:a/b?c#d', 'foo:a/b?c'], - ['b/c', 'foo:a', 'foo:b/c'], - ['../b/c', 'foo:/a/y/z', 'foo:/a/b/c'], - ['./b/c', 'foo:a', 'foo:b/c'], - ['/./b/c', 'foo:a', 'foo:/b/c'], - ['../../d', 'foo://a//b/c', 'foo://a/d'], - ['.', 'foo:a', 'foo:'], - ['..', 'foo:a', 'foo:'], - - // 50-57[cf. TimBL comments -- - // http://lists.w3.org/Archives/Public/uri/2003Feb/0028.html, - // http://lists.w3.org/Archives/Public/uri/2003Jan/0008.html) - ['abc', 'http://example/x/y%2Fz', 'http://example/x/abc'], - ['../../x%2Fabc', 'http://example/a/x/y/z', 'http://example/a/x%2Fabc'], - ['../x%2Fabc', 'http://example/a/x/y%2Fz', 'http://example/a/x%2Fabc'], - ['abc', 'http://example/x%2Fy/z', 'http://example/x%2Fy/abc'], - ['q%3Ar', 'http://ex/x/y', 'http://ex/x/q%3Ar'], - ['/x%2Fabc', 'http://example/x/y%2Fz', 'http://example/x%2Fabc'], - ['/x%2Fabc', 'http://example/x/y/z', 'http://example/x%2Fabc'], - ['/x%2Fabc', 'http://example/x/y%2Fz', 'http://example/x%2Fabc'], - - // 70-77 - ['local2@domain2', 'mailto:local1@domain1?query1', 'mailto:local2@domain2'], - ['local2@domain2?query2', - 'mailto:local1@domain1', - 'mailto:local2@domain2?query2'], - ['local2@domain2?query2', - 'mailto:local1@domain1?query1', - 'mailto:local2@domain2?query2'], - ['?query2', 'mailto:local@domain?query1', 'mailto:local@domain?query2'], - ['local@domain?query2', 'mailto:?query1', 'mailto:local@domain?query2'], - ['?query2', 'mailto:local@domain?query1', 'mailto:local@domain?query2'], - ['http://example/a/b?c/../d', 'foo:bar', 'http://example/a/b?c/../d'], - ['http://example/a/b#c/../d', 'foo:bar', 'http://example/a/b#c/../d'], - - // 82-88 - // @isaacs Disagree. Not how browsers do it. - // ['http:this', 'http://example.org/base/uri', 'http:this'], - // @isaacs Added - ['http:this', 'http://example.org/base/uri', 'http://example.org/base/this'], - ['http:this', 'http:base', 'http:this'], - ['.//g', 'f:/a', 'f://g'], - ['b/c//d/e', 'f://example.org/base/a', 'f://example.org/base/b/c//d/e'], - ['m2@example.ord/c2@example.org', - 'mid:m@example.ord/c@example.org', - 'mid:m@example.ord/m2@example.ord/c2@example.org'], - ['mini1.xml', - 'file:///C:/DEV/Haskell/lib/HXmlToolbox-3.01/examples/', - 'file:///C:/DEV/Haskell/lib/HXmlToolbox-3.01/examples/mini1.xml'], - ['../b/c', 'foo:a/y/z', 'foo:a/b/c'], - - //changeing auth - ['http://diff:auth@www.example.com', - 'http://asdf:qwer@www.example.com', - 'http://diff:auth@www.example.com/'] -]; - -relativeTests2.forEach(function(relativeTest) { - test('resolve(' + [relativeTest[1], relativeTest[0]] + ')', function() { - var a = url.resolve(relativeTest[1], relativeTest[0]), - e = relativeTest[2]; - assert.equal(a, e, - 'resolve(' + [relativeTest[1], relativeTest[0]] + ') == ' + e + - '\n actual=' + a); - }); -}); - -//if format and parse are inverse operations then -//resolveObject(parse(x), y) == parse(resolve(x, y)) - -//host and hostname are special, in this case a '' value is important -var emptyIsImportant = {'host': true, 'hostname': ''}; - -//format: [from, path, expected] -relativeTests.forEach(function(relativeTest) { -test('resolveObject(' + [relativeTest[0], relativeTest[1]] + ')', function() { - var actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]), - expected = url.parse(relativeTest[2]); - - - assert.deepEqual(actual, expected); - - expected = relativeTest[2]; - actual = url.format(actual); - - assert.equal(actual, expected, - 'format(' + actual + ') == ' + expected + '\nactual:' + actual); - }); -}); - -//format: [to, from, result] -// the test: ['.//g', 'f:/a', 'f://g'] is a fundamental problem -// url.parse('f:/a') does not have a host -// url.resolve('f:/a', './/g') does not have a host because you have moved -// down to the g directory. i.e. f: //g, however when this url is parsed -// f:// will indicate that the host is g which is not the case. -// it is unclear to me how to keep this information from being lost -// it may be that a pathname of ////g should collapse to /g but this seems -// to be a lot of work for an edge case. Right now I remove the test -if (relativeTests2[181][0] === './/g' && - relativeTests2[181][1] === 'f:/a' && - relativeTests2[181][2] === 'f://g') { - relativeTests2.splice(181, 1); -} - -relativeTests2.forEach(function(relativeTest) { - test('resolveObject(' + [relativeTest[1], relativeTest[0]] + ')', function() { - var actual = url.resolveObject(url.parse(relativeTest[1]), relativeTest[0]), - expected = url.parse(relativeTest[2]); - - assert.deepEqual(actual, expected); - - var expected = relativeTest[2], - actual = url.format(actual); - - assert.equal(actual, expected, - 'format(' + relativeTest[1] + ') == ' + expected + - '\nactual:' + actual); - }); -}); diff --git a/node_modules/url/url.js b/node_modules/url/url.js deleted file mode 100644 index 23ac6f5..0000000 --- a/node_modules/url/url.js +++ /dev/null @@ -1,732 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var punycode = require('punycode'); -var util = require('./util'); - -exports.parse = urlParse; -exports.resolve = urlResolve; -exports.resolveObject = urlResolveObject; -exports.format = urlFormat; - -exports.Url = Url; - -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -// define these here so at least they only have to be -// compiled once on the first module load. -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - - // Special case for a simple path URL - simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, - - // RFC 2396: characters reserved for delimiting URLs. - // We actually just auto-escape these. - delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], - - // RFC 2396: characters not allowed for various reasons. - unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), - - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - // Characters that are never ever allowed in a hostname. - // Note that any invalid chars are also handled, but these - // are the ones that are *expected* to be seen, so we fast-path - // them. - nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), - hostEndingChars = ['/', '?', '#'], - hostnameMaxLen = 255, - hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - 'http': true, - 'https': true, - 'ftp': true, - 'gopher': true, - 'file': true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }, - querystring = require('querystring'); - -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && util.isObject(url) && url instanceof Url) return url; - - var u = new Url; - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} - -Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { - if (!util.isString(url)) { - throw new TypeError("Parameter 'url' must be a string, not " + typeof url); - } - - // Copy chrome, IE, opera backslash-handling behavior. - // Back slashes before the query string get converted to forward slashes - // See: https://code.google.com/p/chromium/issues/detail?id=25916 - var queryIndex = url.indexOf('?'), - splitter = - (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', - uSplit = url.split(splitter), - slashRegex = /\\/g; - uSplit[0] = uSplit[0].replace(slashRegex, '/'); - url = uSplit.join(splitter); - - var rest = url; - - // trim before proceeding. - // This is to support parse stuff like " http://foo.com \n" - rest = rest.trim(); - - if (!slashesDenoteHost && url.split('#').length === 1) { - // Try fast path regexp - var simplePath = simplePathPattern.exec(rest); - if (simplePath) { - this.path = rest; - this.href = rest; - this.pathname = simplePath[1]; - if (simplePath[2]) { - this.search = simplePath[2]; - if (parseQueryString) { - this.query = querystring.parse(this.search.substr(1)); - } else { - this.query = this.search.substr(1); - } - } else if (parseQueryString) { - this.search = ''; - this.query = {}; - } - return this; - } - } - - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - // figure out if it's got a host - // user@server is *always* interpreted as a hostname, and url - // resolution will treat //foo/bar as host=foo,path=bar because that's - // how the browser resolves relative URLs. - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } - } - - if (!hostlessProtocol[proto] && - (slashes || (proto && !slashedProtocol[proto]))) { - - // there's a hostname. - // the first instance of /, ?, ;, or # ends the host. - // - // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the last @ sign, unless some host-ending character - // comes *before* the @-sign. - // URLs are obnoxious. - // - // ex: - // http://a@b@c/ => user:a@b host:c - // http://a@b?@c => user:a host:c path:/?@c - - // v0.12 TODO(isaacs): This is not quite how Chrome does things. - // Review our test case against browsers more comprehensively. - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (var i = 0; i < hostEndingChars.length; i++) { - var hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - - // at this point, either we have an explicit point where the - // auth portion cannot go past, or the last @ char is the decider. - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - // atSign must be in auth portion. - // http://a@b/c@d => host:b auth:a path:/c@d - atSign = rest.lastIndexOf('@', hostEnd); - } - - // Now we have a portion which is definitely the auth. - // Pull that off. - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (var i = 0; i < nonHostChars.length; i++) { - var hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) - hostEnd = rest.length; - - this.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - this.parseHost(); - - // we've indicated that there is a hostname, - // so even if it's empty, it has to be present. - this.hostname = this.hostname || ''; - - // if hostname begins with [ and ends with ] - // assume that it's an IPv6 address. - var ipv6Hostname = this.hostname[0] === '[' && - this.hostname[this.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = this.hostname.split(/\./); - for (var i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) continue; - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - // we replace non-ASCII char with a temporary placeholder - // we need this to make sure size of hostname is not - // broken by replacing non-ASCII by nothing - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - this.hostname = validParts.join('.'); - break; - } - } - } - } - - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ''; - } else { - // hostnames are always lower case. - this.hostname = this.hostname.toLowerCase(); - } - - if (!ipv6Hostname) { - // IDNA Support: Returns a punycoded representation of "domain". - // It only converts parts of the domain name that - // have non-ASCII characters, i.e. it doesn't matter if - // you call it with a domain that already is ASCII-only. - this.hostname = punycode.toASCII(this.hostname); - } - - var p = this.port ? ':' + this.port : ''; - var h = this.hostname || ''; - this.host = h + p; - this.href += this.host; - - // strip [ and ] from the hostname - // the host field still retains them, though - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - // now rest is set to the post-host stuff. - // chop off any delim chars. - if (!unsafeProtocol[lowerProto]) { - - // First, make 100% sure that any "autoEscape" chars get - // escaped, even if encodeURIComponent doesn't think they - // need to be. - for (var i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - if (rest.indexOf(ae) === -1) - continue; - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - this.search = rest.substr(qm); - this.query = rest.substr(qm + 1); - if (parseQueryString) { - this.query = querystring.parse(this.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - this.search = ''; - this.query = {}; - } - if (rest) this.pathname = rest; - if (slashedProtocol[lowerProto] && - this.hostname && !this.pathname) { - this.pathname = '/'; - } - - //to support http.request - if (this.pathname || this.search) { - var p = this.pathname || ''; - var s = this.search || ''; - this.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - this.href = this.format(); - return this; -}; - -// format a parsed object into a url string -function urlFormat(obj) { - // ensure it's an object, and not a string url. - // If it's an obj, this is a no-op. - // this way, you can call url_format() on strings - // to clean up potentially wonky urls. - if (util.isString(obj)) obj = urlParse(obj); - if (!(obj instanceof Url)) return Url.prototype.format.call(obj); - return obj.format(); -} - -Url.prototype.format = function() { - var auth = this.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - - var protocol = this.protocol || '', - pathname = this.pathname || '', - hash = this.hash || '', - host = false, - query = ''; - - if (this.host) { - host = auth + this.host; - } else if (this.hostname) { - host = auth + (this.hostname.indexOf(':') === -1 ? - this.hostname : - '[' + this.hostname + ']'); - if (this.port) { - host += ':' + this.port; - } - } - - if (this.query && - util.isObject(this.query) && - Object.keys(this.query).length) { - query = querystring.stringify(this.query); - } - - var search = this.search || (query && ('?' + query)) || ''; - - if (protocol && protocol.substr(-1) !== ':') protocol += ':'; - - // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - // unless they had them to begin with. - if (this.slashes || - (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; - } else if (!host) { - host = ''; - } - - if (hash && hash.charAt(0) !== '#') hash = '#' + hash; - if (search && search.charAt(0) !== '?') search = '?' + search; - - pathname = pathname.replace(/[?#]/g, function(match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - - return protocol + host + pathname + search + hash; -}; - -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} - -Url.prototype.resolve = function(relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; - -function urlResolveObject(source, relative) { - if (!source) return relative; - return urlParse(source, false, true).resolveObject(relative); -} - -Url.prototype.resolveObject = function(relative) { - if (util.isString(relative)) { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - - var result = new Url(); - var tkeys = Object.keys(this); - for (var tk = 0; tk < tkeys.length; tk++) { - var tkey = tkeys[tk]; - result[tkey] = this[tkey]; - } - - // hash is always overridden, no matter what. - // even href="" will remove it. - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - var rkeys = Object.keys(relative); - for (var rk = 0; rk < rkeys.length; rk++) { - var rkey = rkeys[rk]; - if (rkey !== 'protocol') - result[rkey] = relative[rkey]; - } - - //urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && - result.hostname && !result.pathname) { - result.path = result.pathname = '/'; - } - - result.href = result.format(); - return result; - } - - if (relative.protocol && relative.protocol !== result.protocol) { - // if it's a known url protocol, then changing - // the protocol does weird things - // first, if it's not file:, then we MUST have a host, - // and if there was a path - // to begin with, then we MUST have a path. - // if it is file:, then the host is dropped, - // because that's known to be hostless. - // anything else is assumed to be absolute. - if (!slashedProtocol[relative.protocol]) { - var keys = Object.keys(relative); - for (var v = 0; v < keys.length; v++) { - var k = keys[v]; - result[k] = relative[k]; - } - result.href = result.format(); - return result; - } - - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - var relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())); - if (!relative.host) relative.host = ''; - if (!relative.hostname) relative.hostname = ''; - if (relPath[0] !== '') relPath.unshift(''); - if (relPath.length < 2) relPath.unshift(''); - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - - var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), - isRelAbs = ( - relative.host || - relative.pathname && relative.pathname.charAt(0) === '/' - ), - mustEndAbs = (isRelAbs || isSourceAbs || - (result.host && relative.pathname)), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - relPath = relative.pathname && relative.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - - // if the url is a non-slashed url, then relative - // links like ../.. should be able - // to crawl up to the hostname, as well. This is strange. - // result.protocol has already been set by now. - // Later on, put the first path part into the host field. - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') srcPath[0] = result.host; - else srcPath.unshift(result.host); - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') relPath[0] = relative.host; - else relPath.unshift(relative.host); - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - - if (isRelAbs) { - // it's absolute. - result.host = (relative.host || relative.host === '') ? - relative.host : result.host; - result.hostname = (relative.hostname || relative.hostname === '') ? - relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - // it's relative - // throw away the existing file, and take the new path instead. - if (!srcPath) srcPath = []; - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (!util.isNullOrUndefined(relative.search)) { - // just pull out the search. - // like href='?foo'. - // Put this after the other two cases because it simplifies the booleans - if (psychotic) { - result.hostname = result.host = srcPath.shift(); - //occationaly the auth can get stuck only in host - //this especially happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - var authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - result.search = relative.search; - result.query = relative.query; - //to support http.request - if (!util.isNull(result.pathname) || !util.isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - - if (!srcPath.length) { - // no path at all. easy. - // we've already handled the other stuff above. - result.pathname = null; - //to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - // if a url ENDs in . or .., then it must get a trailing slash. - // however, if it ends in anything else non-slashy, - // then it must NOT get a trailing slash. - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = ( - (result.host || relative.host || srcPath.length > 1) && - (last === '.' || last === '..') || last === ''); - - // strip single dots, resolve double dots to parent dir - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last === '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - - if (mustEndAbs && srcPath[0] !== '' && - (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - - if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { - srcPath.push(''); - } - - var isAbsolute = srcPath[0] === '' || - (srcPath[0] && srcPath[0].charAt(0) === '/'); - - // put the host back - if (psychotic) { - result.hostname = result.host = isAbsolute ? '' : - srcPath.length ? srcPath.shift() : ''; - //occationaly the auth can get stuck only in host - //this especially happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - var authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - - mustEndAbs = mustEndAbs || (result.host && srcPath.length); - - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - - if (!srcPath.length) { - result.pathname = null; - result.path = null; - } else { - result.pathname = srcPath.join('/'); - } - - //to support request.http - if (!util.isNull(result.pathname) || !util.isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; -}; - -Url.prototype.parseHost = function() { - var host = this.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - this.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); - } - if (host) this.hostname = host; -}; diff --git a/node_modules/url/util.js b/node_modules/url/util.js deleted file mode 100644 index 97dcf31..0000000 --- a/node_modules/url/util.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -module.exports = { - isString: function(arg) { - return typeof(arg) === 'string'; - }, - isObject: function(arg) { - return typeof(arg) === 'object' && arg !== null; - }, - isNull: function(arg) { - return arg === null; - }, - isNullOrUndefined: function(arg) { - return arg == null; - } -}; diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675..0000000 --- a/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c..0000000 --- a/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa..0000000 --- a/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f..0000000 --- a/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff..0000000 --- a/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json deleted file mode 100644 index e295134..0000000 --- a/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "util-deprecate@~1.0.1", - "_id": "util-deprecate@1.0.2", - "_inBundle": false, - "_integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "_location": "/util-deprecate", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "util-deprecate@~1.0.1", - "name": "util-deprecate", - "escapedName": "util-deprecate", - "rawSpec": "~1.0.1", - "saveSpec": null, - "fetchSpec": "~1.0.1" - }, - "_requiredBy": [ - "/readable-stream", - "/stream-http/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_spec": "util-deprecate@~1.0.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/readable-stream", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The Node.js `util.deprecate()` function with browser support", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "name": "util-deprecate", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/node_modules/util/LICENSE b/node_modules/util/LICENSE deleted file mode 100644 index e3d4e69..0000000 --- a/node_modules/util/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/util/README.md b/node_modules/util/README.md deleted file mode 100644 index 1c473d2..0000000 --- a/node_modules/util/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# util - -[![Build Status](https://travis-ci.org/defunctzombie/node-util.png?branch=master)](https://travis-ci.org/defunctzombie/node-util) - -node.js [util](http://nodejs.org/api/util.html) module as a module - -## install via [npm](npmjs.org) - -```shell -npm install util -``` - -## browser support - -This module also works in modern browsers. If you need legacy browser support you will need to polyfill ES5 features. diff --git a/node_modules/util/node_modules/inherits/LICENSE b/node_modules/util/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/node_modules/util/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/util/node_modules/inherits/README.md b/node_modules/util/node_modules/inherits/README.md deleted file mode 100644 index b1c5665..0000000 --- a/node_modules/util/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/util/node_modules/inherits/inherits.js b/node_modules/util/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763..0000000 --- a/node_modules/util/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/util/node_modules/inherits/inherits_browser.js b/node_modules/util/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a7..0000000 --- a/node_modules/util/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/util/node_modules/inherits/package.json b/node_modules/util/node_modules/inherits/package.json deleted file mode 100644 index 52af042..0000000 --- a/node_modules/util/node_modules/inherits/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "inherits@2.0.3", - "_id": "inherits@2.0.3", - "_inBundle": false, - "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "_location": "/util/inherits", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "inherits@2.0.3", - "name": "inherits", - "escapedName": "inherits", - "rawSpec": "2.0.3", - "saveSpec": null, - "fetchSpec": "2.0.3" - }, - "_requiredBy": [ - "/util" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_spec": "inherits@2.0.3", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/util", - "browser": "./inherits_browser.js", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "homepage": "https://github.com/isaacs/inherits#readme", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "license": "ISC", - "main": "./inherits.js", - "name": "inherits", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "scripts": { - "test": "node test" - }, - "version": "2.0.3" -} diff --git a/node_modules/util/package.json b/node_modules/util/package.json deleted file mode 100644 index a17f86e..0000000 --- a/node_modules/util/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "util@~0.10.1", - "_id": "util@0.10.4", - "_inBundle": false, - "_integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "_location": "/util", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "util@~0.10.1", - "name": "util", - "escapedName": "util", - "rawSpec": "~0.10.1", - "saveSpec": null, - "fetchSpec": "~0.10.1" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "_shasum": "3aa0125bfe668a4672de58857d3ace27ecb76901", - "_spec": "util@~0.10.1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Joyent", - "url": "http://www.joyent.com" - }, - "browser": { - "./support/isBuffer.js": "./support/isBufferBrowser.js" - }, - "bugs": { - "url": "https://github.com/defunctzombie/node-util/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "2.0.3" - }, - "deprecated": false, - "description": "Node.JS util module", - "devDependencies": { - "zuul": "~1.0.9" - }, - "files": [ - "util.js", - "support" - ], - "homepage": "https://github.com/defunctzombie/node-util", - "keywords": [ - "util" - ], - "license": "MIT", - "main": "./util.js", - "name": "util", - "repository": { - "type": "git", - "url": "git://github.com/defunctzombie/node-util.git" - }, - "scripts": { - "test": "node test/node/*.js && zuul test/browser/*.js" - }, - "version": "0.10.4" -} diff --git a/node_modules/util/support/isBuffer.js b/node_modules/util/support/isBuffer.js deleted file mode 100644 index ace9ac0..0000000 --- a/node_modules/util/support/isBuffer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function isBuffer(arg) { - return arg instanceof Buffer; -} diff --git a/node_modules/util/support/isBufferBrowser.js b/node_modules/util/support/isBufferBrowser.js deleted file mode 100644 index 0e1bee1..0000000 --- a/node_modules/util/support/isBufferBrowser.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} \ No newline at end of file diff --git a/node_modules/util/util.js b/node_modules/util/util.js deleted file mode 100644 index e0ea321..0000000 --- a/node_modules/util/util.js +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} diff --git a/node_modules/vm-browserify/.github/FUNDING.yml b/node_modules/vm-browserify/.github/FUNDING.yml deleted file mode 100644 index 9f67277..0000000 --- a/node_modules/vm-browserify/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/vm-browserify -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/vm-browserify/.travis.yml b/node_modules/vm-browserify/.travis.yml deleted file mode 100644 index c4b192d..0000000 --- a/node_modules/vm-browserify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -dist: xenial -node_js: - - "stable" -script: - - xvfb-run --auto-servernum npm test -services: - - xvfb diff --git a/node_modules/vm-browserify/CHANGELOG.md b/node_modules/vm-browserify/CHANGELOG.md deleted file mode 100644 index 5fb4425..0000000 --- a/node_modules/vm-browserify/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -# vm-browserify Change Log -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -## 1.1.2 - 2019-11-04 -* Update another jQuery reference in the readme. (https://github.com/browserify/vm-browserify/pull/27) -* Get rid of jQuery references altogether from samples and readme. (https://github.com/browserify/vm-browserify/commit/d509e8e5afb7b1ead191cbbd49c37a3fb934b2dc) - -## 1.1.1 - 2019-11-04 -* Update a reference to jQuery in an example file that was setting off some security software. (https://github.com/browserify/vm-browserify/pull/22) - -## 1.1.0 - 2018-06-15 -* Add `vm.isContext(sandbox)`. (https://github.com/browserify/vm-browserify/commit/038c3cb33edcad9eec33aa8a8beae31b15c1a006) - -## 1.0.1 - 2018-04-13 -* Remove the `component-indexof` dependency. (https://github.com/browserify/vm-browserify/commit/0d9bd4c99f80db12c5c45e260a23ebfc51ec850d) - -## 1.0.0 - 2018-03-23 - -(This is not a breaking change.) - -* Make the `sandbox` argument to `runInNewContext` optional, like in Node. (https://github.com/browserify/vm-browserify/pull/13) -* Substituting `component-indexof` for deprecated `indexof`. (https://github.com/browserify/vm-browserify/pull/14) diff --git a/node_modules/vm-browserify/LICENSE b/node_modules/vm-browserify/LICENSE deleted file mode 100644 index b8f727e..0000000 --- a/node_modules/vm-browserify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/vm-browserify/example/run/bundle.js b/node_modules/vm-browserify/example/run/bundle.js deleted file mode 100644 index 49a9848..0000000 --- a/node_modules/vm-browserify/example/run/bundle.js +++ /dev/null @@ -1,160 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i - - - - - result = - - diff --git a/node_modules/vm-browserify/example/run/server.js b/node_modules/vm-browserify/example/run/server.js deleted file mode 100644 index 339d3ee..0000000 --- a/node_modules/vm-browserify/example/run/server.js +++ /dev/null @@ -1,6 +0,0 @@ -var ecstatic = require('ecstatic')(__dirname); -var http = require('http'); -http.createServer(ecstatic).listen(8000); - -console.log('listening on :8000'); -console.log('# remember to run browserify entry.js -o bundle.js'); diff --git a/node_modules/vm-browserify/index.js b/node_modules/vm-browserify/index.js deleted file mode 100644 index 4292de7..0000000 --- a/node_modules/vm-browserify/index.js +++ /dev/null @@ -1,149 +0,0 @@ -var indexOf = function (xs, item) { - if (xs.indexOf) return xs.indexOf(item); - else for (var i = 0; i < xs.length; i++) { - if (xs[i] === item) return i; - } - return -1; -}; -var Object_keys = function (obj) { - if (Object.keys) return Object.keys(obj) - else { - var res = []; - for (var key in obj) res.push(key) - return res; - } -}; - -var forEach = function (xs, fn) { - if (xs.forEach) return xs.forEach(fn) - else for (var i = 0; i < xs.length; i++) { - fn(xs[i], i, xs); - } -}; - -var defineProp = (function() { - try { - Object.defineProperty({}, '_', {}); - return function(obj, name, value) { - Object.defineProperty(obj, name, { - writable: true, - enumerable: false, - configurable: true, - value: value - }) - }; - } catch(e) { - return function(obj, name, value) { - obj[name] = value; - }; - } -}()); - -var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function', -'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError', -'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError', -'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', -'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; - -function Context() {} -Context.prototype = {}; - -var Script = exports.Script = function NodeScript (code) { - if (!(this instanceof Script)) return new Script(code); - this.code = code; -}; - -Script.prototype.runInContext = function (context) { - if (!(context instanceof Context)) { - throw new TypeError("needs a 'context' argument."); - } - - var iframe = document.createElement('iframe'); - if (!iframe.style) iframe.style = {}; - iframe.style.display = 'none'; - - document.body.appendChild(iframe); - - var win = iframe.contentWindow; - var wEval = win.eval, wExecScript = win.execScript; - - if (!wEval && wExecScript) { - // win.eval() magically appears when this is called in IE: - wExecScript.call(win, 'null'); - wEval = win.eval; - } - - forEach(Object_keys(context), function (key) { - win[key] = context[key]; - }); - forEach(globals, function (key) { - if (context[key]) { - win[key] = context[key]; - } - }); - - var winKeys = Object_keys(win); - - var res = wEval.call(win, this.code); - - forEach(Object_keys(win), function (key) { - // Avoid copying circular objects like `top` and `window` by only - // updating existing context properties or new properties in the `win` - // that was only introduced after the eval. - if (key in context || indexOf(winKeys, key) === -1) { - context[key] = win[key]; - } - }); - - forEach(globals, function (key) { - if (!(key in context)) { - defineProp(context, key, win[key]); - } - }); - - document.body.removeChild(iframe); - - return res; -}; - -Script.prototype.runInThisContext = function () { - return eval(this.code); // maybe... -}; - -Script.prototype.runInNewContext = function (context) { - var ctx = Script.createContext(context); - var res = this.runInContext(ctx); - - if (context) { - forEach(Object_keys(ctx), function (key) { - context[key] = ctx[key]; - }); - } - - return res; -}; - -forEach(Object_keys(Script.prototype), function (name) { - exports[name] = Script[name] = function (code) { - var s = Script(code); - return s[name].apply(s, [].slice.call(arguments, 1)); - }; -}); - -exports.isContext = function (context) { - return context instanceof Context; -}; - -exports.createScript = function (code) { - return exports.Script(code); -}; - -exports.createContext = Script.createContext = function (context) { - var copy = new Context(); - if(typeof context === 'object') { - forEach(Object_keys(context), function (key) { - copy[key] = context[key]; - }); - } - return copy; -}; diff --git a/node_modules/vm-browserify/package.json b/node_modules/vm-browserify/package.json deleted file mode 100644 index 01421b5..0000000 --- a/node_modules/vm-browserify/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "vm-browserify@^1.0.0", - "_id": "vm-browserify@1.1.2", - "_inBundle": false, - "_integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "_location": "/vm-browserify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "vm-browserify@^1.0.0", - "name": "vm-browserify", - "escapedName": "vm-browserify", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/browserify" - ], - "_resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "_shasum": "78641c488b8e6ca91a75f511e7a3b32a86e5dda0", - "_spec": "vm-browserify@^1.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/vm-browserify/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "vm module for the browser", - "devDependencies": { - "browserify": "^16.1.1", - "tape": "^4.11.0", - "tape-run": "^6.0.1" - }, - "homepage": "https://github.com/substack/vm-browserify#readme", - "keywords": [ - "vm", - "browser", - "eval" - ], - "license": "MIT", - "main": "index.js", - "name": "vm-browserify", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/substack/vm-browserify.git" - }, - "scripts": { - "test": "browserify test/vm.js | tape-run" - }, - "version": "1.1.2" -} diff --git a/node_modules/vm-browserify/readme.markdown b/node_modules/vm-browserify/readme.markdown deleted file mode 100644 index bc0bfe2..0000000 --- a/node_modules/vm-browserify/readme.markdown +++ /dev/null @@ -1,66 +0,0 @@ -# vm-browserify - -emulate node's vm module for the browser - -[![Build Status](https://travis-ci.org/browserify/vm-browserify.svg?branch=master)](https://travis-ci.org/browserify/vm-browserify) - -# example - -Just write some client-side javascript: - -``` js -var vm = require('vm'); - -window.addEventListener('load', function () { - var res = vm.runInNewContext('a + 5', { a : 100 }); - document.querySelector('#res').textContent = res; -}); -``` - -compile it with [browserify](http://github.com/substack/node-browserify): - -``` -browserify entry.js -o bundle.js -``` - -then whip up some html: - -``` html - - - - - - result = - - -``` - -and when you load the page you should see: - -``` -result = 105 -``` - -# methods - -## vm.runInNewContext(code, context={}) - -Evaluate some `code` in a new iframe with a `context`. - -Contexts are like wrapping your code in a `with()` except slightly less terrible -because the code is sandboxed into a new iframe. - -# install - -This module is depended upon by browserify, so you should just be able to -`require('vm')` and it will just work. However if you want to use this module -directly you can install it with [npm](http://npmjs.org): - -``` -npm install vm-browserify -``` - -# license - -MIT diff --git a/node_modules/vm-browserify/security.md b/node_modules/vm-browserify/security.md deleted file mode 100644 index a14ace6..0000000 --- a/node_modules/vm-browserify/security.md +++ /dev/null @@ -1,10 +0,0 @@ -# Security Policy - -## Supported Versions -Only the latest major version is supported at any given time. - -## Reporting a Vulnerability - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/vm-browserify/test/vm.js b/node_modules/vm-browserify/test/vm.js deleted file mode 100644 index ea8cd31..0000000 --- a/node_modules/vm-browserify/test/vm.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var vm = require('../'); - -test('vmRunInNewContext', function (t) { - t.plan(6); - - t.equal(vm.runInNewContext('a + 5', { a : 100 }), 105); - - (function () { - var vars = { x : 10 }; - t.equal(vm.runInNewContext('x++', vars), 10); - t.equal(vars.x, 11); - })(); - - (function () { - var vars = { x : 10 }; - t.equal(vm.runInNewContext('var y = 3; y + x++', vars), 13); - t.equal(vars.x, 11); - t.equal(vars.y, 3); - })(); - - t.end(); -}); - -test('vmRunInContext', function (t) { - t.plan(2); - - var context = vm.createContext({ foo: 1 }); - - vm.runInContext('var x = 1', context); - t.deepEqual(context, { foo: 1, x: 1 }); - - vm.runInContext('var y = 1', context); - t.deepEqual(context, { foo: 1, x: 1, y: 1 }); -}); diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md deleted file mode 100644 index 98eab25..0000000 --- a/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json deleted file mode 100644 index 25a0f6c..0000000 --- a/node_modules/wrappy/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "wrappy@1", - "_id": "wrappy@1.0.2", - "_inBundle": false, - "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "_location": "/wrappy", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "wrappy@1", - "name": "wrappy", - "escapedName": "wrappy", - "rawSpec": "1", - "saveSpec": null, - "fetchSpec": "1" - }, - "_requiredBy": [ - "/inflight", - "/once" - ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_spec": "wrappy@1", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/inflight", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Callback wrapping utility", - "devDependencies": { - "tap": "^2.3.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "wrappy.js" - ], - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "name": "wrappy", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.0.2" -} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6..0000000 --- a/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/xtend/.jshintrc b/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5..0000000 --- a/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/xtend/LICENSE b/node_modules/xtend/LICENSE deleted file mode 100644 index 0099f4f..0000000 --- a/node_modules/xtend/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2012-2014 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/xtend/README.md b/node_modules/xtend/README.md deleted file mode 100644 index 4a2703c..0000000 --- a/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: "c" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licensed - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/xtend/immutable.js b/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9..0000000 --- a/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/xtend/mutable.js b/node_modules/xtend/mutable.js deleted file mode 100644 index 72debed..0000000 --- a/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/xtend/package.json b/node_modules/xtend/package.json deleted file mode 100644 index 9aa89cf..0000000 --- a/node_modules/xtend/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_from": "xtend@^4.0.0", - "_id": "xtend@4.0.2", - "_inBundle": false, - "_integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "_location": "/xtend", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "xtend@^4.0.0", - "name": "xtend", - "escapedName": "xtend", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/acorn-node", - "/browserify", - "/insert-module-globals", - "/module-deps", - "/stream-http", - "/through2", - "/undeclared-identifiers" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "_shasum": "bb72779f5fa465186b1f438f674fa347fdb5db54", - "_spec": "xtend@^4.0.0", - "_where": "/Users/heekyun/Kadena/transfer/node_modules/browserify", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "engines": { - "node": ">=0.4" - }, - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "license": "MIT", - "main": "immutable", - "name": "xtend", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "version": "4.0.2" -} diff --git a/node_modules/xtend/test.js b/node_modules/xtend/test.js deleted file mode 100644 index b895b42..0000000 --- a/node_modules/xtend/test.js +++ /dev/null @@ -1,103 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("prototype pollution", function (assert) { - var a = {} - var maliciousPayload = '{"__proto__":{"oops":"It works!"}}' - - assert.strictEqual(a.oops, undefined) - extend({}, maliciousPayload) - assert.strictEqual(a.oops, undefined) - assert.end() -}) - -test("prototype pollution mutable", function (assert) { - var a = {} - var maliciousPayload = '{"__proto__":{"oops":"It works!"}}' - - assert.strictEqual(a.oops, undefined) - mutableExtend({}, maliciousPayload) - assert.strictEqual(a.oops, undefined) - assert.end() -}) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..6564fd8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,248 @@ +{ + "name": "kadena-transfer-js", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ledgerhq/devices": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.20.0.tgz", + "integrity": "sha512-WehM7HGdb+nSUzyUlz1t2qJ8Tg4I+rQkOJJsx0/Dpjkx6/+1hHcX6My/apPuwh39qahqwYhjszq0H1YzGDS0Yg==", + "requires": { + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/logs": "^6.10.0", + "rxjs": "6", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@ledgerhq/errors": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", + "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" + }, + "@ledgerhq/hw-transport": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.20.0.tgz", + "integrity": "sha512-5KS0Y6CbWRDOv3FgNIfk53ViQOIZqMxAw0RuOexreW5GMwuYfK7ddGi4142qcu7YrxkGo7cNe42wBbx1hdXl0Q==", + "requires": { + "@ledgerhq/devices": "^6.20.0", + "@ledgerhq/errors": "^6.10.0", + "events": "^3.3.0" + } + }, + "@ledgerhq/hw-transport-webhid": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.20.0.tgz", + "integrity": "sha512-vpbeKmvlQQHQIT7MOAt8TJV7706YkvfEsW2it/vQKAKGjmAYWgrLDXLLgmA1rEDschq0w63crOSp0El4doy+JQ==", + "requires": { + "@ledgerhq/devices": "^6.20.0", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.20.0", + "@ledgerhq/logs": "^6.10.0" + } + }, + "@ledgerhq/logs": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", + "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tsconfig": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", + "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", + "requires": { + "any-promise": "^1.3.0", + "parse-json": "^2.2.0", + "strip-bom": "^2.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "tsify": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/tsify/-/tsify-5.0.4.tgz", + "integrity": "sha512-XAZtQ5OMPsJFclkZ9xMZWkSNyMhMxEPsz3D2zu79yoKorH9j/DT4xCloJeXk5+cDhosEibu4bseMVjyPOAyLJA==", + "requires": { + "convert-source-map": "^1.1.0", + "fs.realpath": "^1.0.0", + "object-assign": "^4.1.0", + "semver": "^6.1.0", + "through2": "^2.0.0", + "tsconfig": "^5.0.3" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/package.json b/package.json index fc89948..c8ad957 100644 --- a/package.json +++ b/package.json @@ -4,26 +4,29 @@ "description": "Simple Javascript tools to transfer Kadena coins", "main": "scripts", "scripts": { + "build-ledger": "cd packages/bundle; yarn; yarn build; cp dist/main.js ../../util/ledger-os.js", "transfer-online": "node ./scripts/transfer-online.js", "transfer-create-online": "node ./scripts/transfer-create-online.js", "transfer-offline": "node ./scripts/transfer-offline.js", "transfer-create-offline": "node ./scripts/transfer-create-offline.js", "cross-chain-transfer-offline": "node ./scripts/cross-chain-transfer-offline.js" }, - "repository": { - "type": "git", - "url": "github.com/kadena-community/kadena-transfer-js" - }, + "repository": "github.com/kadena-community/kadena-transfer-js", "author": "Hee Kyun Yun", "license": "UNLICENSED", "dependencies": { + "@ledgerhq/hw-transport-webhid": "^6.20.0", "base64-url": "^2.2.1", "blakejs": "^1.0.1", "browserify": "^16.2.3", "node-fetch": "^2.6.0", "pact-lang-api": "^3.2.0", "readline": "^1.3.0", + "tsify": "^5.0.4", "tweetnacl": "^0.14.5" }, - "devDependencies": {} + "devDependencies": { + "lerna": "^4.0.0", + "live-server": "^1.2.1" + } } diff --git a/packages/bundle/.babelrc b/packages/bundle/.babelrc new file mode 100644 index 0000000..f2c9da3 --- /dev/null +++ b/packages/bundle/.babelrc @@ -0,0 +1,11 @@ +{ + "plugins": ["@babel/syntax-dynamic-import"], + "presets": [ + [ + "@babel/preset-env", + { + "modules": false + } + ] + ] +} diff --git a/packages/bundle/README.md b/packages/bundle/README.md new file mode 100644 index 0000000..fa32788 --- /dev/null +++ b/packages/bundle/README.md @@ -0,0 +1,15 @@ +# 🚀 Welcome to your new awesome project! + +This project has been created using **webpack-cli**, you can now run + +``` +npm run build +``` + +or + +``` +yarn build +``` + +to bundle your application diff --git a/packages/bundle/build.js b/packages/bundle/build.js new file mode 100644 index 0000000..5c0740b --- /dev/null +++ b/packages/bundle/build.js @@ -0,0 +1,27 @@ +import webpack from 'webpack'; + +const compiler = webpack({}); + +compiler.run((err, stats) => { + console.log("Compiling/minifying dist/main.js"); + console.log("Stats: ", stats); + + if (err) { + console.error(err.stack || err); + if (err.details) { + console.error(err.details); + } + return; + } + + /* + compiler.close((closeErr) => { + if (closeErr) { + console.log(closeErr); + return; + } + + console.log("Compilation complete"); + }); + */ +}); diff --git a/packages/bundle/dank.dan.js b/packages/bundle/dank.dan.js new file mode 100644 index 0000000..45c3f23 --- /dev/null +++ b/packages/bundle/dank.dan.js @@ -0,0 +1,52 @@ +// Generated using webpack-cli https://github.com/webpack/webpack-cli +const webpack = require('webpack'); +const path = require("path"); + +const isProduction = true; + // process.env.NODE_ENV == "production"; + +const config = { + entry: "./src/index.js", + output: { + path: path.resolve(__dirname, "doink"), + filename: 'bundle.js', + library: "Ledger", // Important + libraryTarget: 'umd', // Important + umdNamedDefine: true // Important + }, + resolve: { + extensions: [ '.ts', '.js' ], + fallback: { + buffer: require.resolve('buffer/'), + }, + }, + plugins: [ + new webpack.ProvidePlugin({ + Buffer: ['buffer', 'Buffer'], + }), + ], + module: { + rules: [ + { + test: /\.(js|jsx)$/i, + loader: "babel-loader", + }, + { + test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: "asset", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ + ], + }, +}; + +module.exports = () => { + if (isProduction) { + config.mode = "production"; + } else { + config.mode = "development"; + } + return config; +}; diff --git a/packages/bundle/index.html b/packages/bundle/index.html new file mode 100644 index 0000000..e3df316 --- /dev/null +++ b/packages/bundle/index.html @@ -0,0 +1,12 @@ + + + + + Webpack App + + +

Hello world!

+

Tip: Check your console

+ + + diff --git a/packages/bundle/index.js b/packages/bundle/index.js new file mode 100644 index 0000000..658ecaa --- /dev/null +++ b/packages/bundle/index.js @@ -0,0 +1,14 @@ +import SpeculosTransport from "@ledgerhq/hw-transport-node-speculos"; +import Kadena from "@ledgerhq/hw-app-kda"; + +const apduPort = 9999; + +export default async function (thingToSign) { + const transport = await SpeculosTransport.default.open({apduPort}); + const kadena = new Kadena.default(transport); + + const result = await kadena.signHash("", thingToSign); + console.log(result); + + return result; +} diff --git a/packages/bundle/package-lock.json b/packages/bundle/package-lock.json new file mode 100644 index 0000000..fe6233c --- /dev/null +++ b/packages/bundle/package-lock.json @@ -0,0 +1,16051 @@ +{ + "name": "bundle", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "bundle", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@ledgerhq/hw-transport-webhid": "^6.7.0", + "@webpack-cli/generators": "^2.4.0", + "tsc": "^2.0.3", + "typescript": "^4.4.3" + }, + "devDependencies": { + "@babel/core": "^7.15.8", + "@babel/preset-env": "^7.15.8", + "@ledgerhq/hw-app-kda": "git+ssh://git@github.com:obsidiansystems/hw-app-kda", + "@ledgerhq/hw-transport-node-speculos": "^6.7.0", + "babel-loader": "^8.2.2", + "buffer": "^6.0.3", + "Buffer": "^0.0.0", + "live-server": "^1.2.1", + "process": "^0.11.10", + "webpack": "^4.42.0", + "webpack-cli": "^4.9.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", + "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.8.tgz", + "integrity": "sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.15.8", + "@babel/generator": "^7.15.8", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.8", + "@babel/helpers": "^7.15.4", + "@babel/parser": "^7.15.8", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", + "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.6", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", + "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", + "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", + "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", + "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz", + "integrity": "sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.15.7", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", + "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-wrap-function": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", + "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", + "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", + "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz", + "integrity": "sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4", + "@babel/plugin-proposal-optional-chaining": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.8.tgz", + "integrity": "sha512-2Z5F2R2ibINTc63mY7FLqGfEbmofrHU9FitJW1Q7aPaKFhiPvSq6QEt/BoWN5oME3GVyjcRuNNSRbb9LC0CSWA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.15.4", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz", + "integrity": "sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", + "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz", + "integrity": "sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-create-class-features-plugin": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", + "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", + "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", + "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.15.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", + "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", + "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "dev": true, + "dependencies": { + "regenerator-transform": "^0.14.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.15.8.tgz", + "integrity": "sha512-/daZ8s2tNaRekl9YJa9X4bzjpeRZLt122cpgFnQPLGUe61PH8zMEBmYqKkW5xF5JUEh5buEGXJoQpqBmIbpmEQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.8.tgz", + "integrity": "sha512-rCC0wH8husJgY4FPbHsiYyiLxSY8oMDJH7Rl6RQMknbN9oDDHhM9RDFvnGM2MgkbUJzSQB4gtuwygY5mCqGSsA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.15.4", + "@babel/plugin-proposal-async-generator-functions": "^7.15.8", + "@babel/plugin-proposal-class-properties": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.15.4", + "@babel/plugin-proposal-dynamic-import": "^7.14.5", + "@babel/plugin-proposal-export-namespace-from": "^7.14.5", + "@babel/plugin-proposal-json-strings": "^7.14.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-proposal-object-rest-spread": "^7.15.6", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-private-methods": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.15.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.14.5", + "@babel/plugin-transform-async-to-generator": "^7.14.5", + "@babel/plugin-transform-block-scoped-functions": "^7.14.5", + "@babel/plugin-transform-block-scoping": "^7.15.3", + "@babel/plugin-transform-classes": "^7.15.4", + "@babel/plugin-transform-computed-properties": "^7.14.5", + "@babel/plugin-transform-destructuring": "^7.14.7", + "@babel/plugin-transform-dotall-regex": "^7.14.5", + "@babel/plugin-transform-duplicate-keys": "^7.14.5", + "@babel/plugin-transform-exponentiation-operator": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.15.4", + "@babel/plugin-transform-function-name": "^7.14.5", + "@babel/plugin-transform-literals": "^7.14.5", + "@babel/plugin-transform-member-expression-literals": "^7.14.5", + "@babel/plugin-transform-modules-amd": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.4", + "@babel/plugin-transform-modules-systemjs": "^7.15.4", + "@babel/plugin-transform-modules-umd": "^7.14.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", + "@babel/plugin-transform-new-target": "^7.14.5", + "@babel/plugin-transform-object-super": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.15.4", + "@babel/plugin-transform-property-literals": "^7.14.5", + "@babel/plugin-transform-regenerator": "^7.14.5", + "@babel/plugin-transform-reserved-words": "^7.14.5", + "@babel/plugin-transform-shorthand-properties": "^7.14.5", + "@babel/plugin-transform-spread": "^7.15.8", + "@babel/plugin-transform-sticky-regex": "^7.14.5", + "@babel/plugin-transform-template-literals": "^7.14.5", + "@babel/plugin-transform-typeof-symbol": "^7.14.5", + "@babel/plugin-transform-unicode-escapes": "^7.14.5", + "@babel/plugin-transform-unicode-regex": "^7.14.5", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.15.6", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.5", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "core-js-compat": "^3.16.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", + "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz", + "integrity": "sha512-6nFkfkmSeV/rqSaS4oWHgmpnYw194f6hmWF5is6b0J1naJZoiD0NTc9AiUwPHvWsowkjuHErCZT1wa0jg+BLIA==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@ledgerhq/devices": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.7.0.tgz", + "integrity": "sha512-FWJfmdl8V300++OXLgBLpIi+IJoR/srWvxpXrWkc9hd3cNMxgeCl9opm84Y0oJDLBQL9AaERMrb+Cb1nZZR9Tw==", + "dependencies": { + "@ledgerhq/errors": "^6.2.0", + "@ledgerhq/logs": "^6.2.0", + "rxjs": "6", + "semver": "^7.3.5" + } + }, + "node_modules/@ledgerhq/devices/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@ledgerhq/devices/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@ledgerhq/devices/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/@ledgerhq/errors": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.2.0.tgz", + "integrity": "sha512-eO03x8HJmG60WtlrMuahigW/rwywFdcGzCnihta/MjkM8BD9A660cKVkyIuheCcpaB7UV/r+QsRl9abHbjjaag==" + }, + "node_modules/@ledgerhq/hw-app-kda": { + "name": "hw-app-kda", + "version": "0.0.0", + "resolved": "git+ssh://git@github.com/obsidiansystems/hw-app-kda.git#93f80afb601a92c4186fd48980c41fe9f57c80f5", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@ledgerhq/hw-transport": "^6.3.0" + }, + "bin": { + "kda-cli": "main.js" + } + }, + "node_modules/@ledgerhq/hw-transport": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.7.0.tgz", + "integrity": "sha512-w+PhW6Y4KXYdoCykkE1zt0VL6Ryf72RP8sZP8OH1O90hX/R/q9BMYKl8VNqTbqlrOrORgATlKkbmIJBjbngZew==", + "dependencies": { + "@ledgerhq/devices": "^6.7.0", + "@ledgerhq/errors": "^6.2.0", + "events": "^3.3.0" + } + }, + "node_modules/@ledgerhq/hw-transport-node-speculos": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.7.0.tgz", + "integrity": "sha512-RgFom5N6XLQ3xSl+pFWZmmxQxsBdAVJTpyPoClYNoH/ETif2gQHRE1AhtYpSHeJRRMUsioZEMSqW3l8qqdjclA==", + "dev": true, + "dependencies": { + "@ledgerhq/errors": "^6.2.0", + "@ledgerhq/hw-transport": "^6.7.0", + "@ledgerhq/logs": "^6.2.0", + "rxjs": "6" + } + }, + "node_modules/@ledgerhq/hw-transport-webhid": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.7.0.tgz", + "integrity": "sha512-FmTQUKENVEIwEM2XT6PIBDbXvdyFjmz3g+Oq5Gn8c4m3knT3h0ehb+Mx5dKlYEg/6Y7vESGUiNZdEQGGieUI/Q==", + "dependencies": { + "@ledgerhq/devices": "^6.7.0", + "@ledgerhq/errors": "^6.2.0", + "@ledgerhq/hw-transport": "^6.7.0", + "@ledgerhq/logs": "^6.2.0" + } + }, + "node_modules/@ledgerhq/logs": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.2.0.tgz", + "integrity": "sha512-SLyFyD7ElMhgKWPYedFGCT/ilcbGPgL5hXXYHxOM79Fs5fWi0zaUpt5oGqGMsOAAFaMa9/rbun0pokzPhEFz8A==" + }, + "node_modules/@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dependencies": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" + }, + "node_modules/@types/node": { + "version": "16.10.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", + "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dependencies": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==" + }, + "node_modules/@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dependencies": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "node_modules/@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==" + }, + "node_modules/@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "node_modules/@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.0.tgz", + "integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg==", + "peerDependencies": { + "webpack": "4.x.x || 5.x.x", + "webpack-cli": "4.x.x" + } + }, + "node_modules/@webpack-cli/generators": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/generators/-/generators-2.4.0.tgz", + "integrity": "sha512-HaS4ru2PrZMeVQbMCnxNiDsnTb4KXHKUh1g1mPXDxKmpHTQz4IXn6YqNOgnKYagJ/JohZfG4DTh1ObqCD6fMBw==", + "dependencies": { + "webpack-cli": "^4.9.0", + "yeoman-environment": "^2.10.3", + "yeoman-generator": "^4.12.0" + }, + "peerDependencies": { + "webpack": "4.x.x || 5.x.x" + }, + "peerDependenciesMeta": { + "prettier": { + "optional": true + } + } + }, + "node_modules/@webpack-cli/info": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.0.tgz", + "integrity": "sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw==", + "dependencies": { + "envinfo": "^7.7.3" + }, + "peerDependencies": { + "webpack-cli": "4.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.0.tgz", + "integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==", + "peerDependencies": { + "webpack-cli": "4.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "peerDependencies": { + "ajv": ">=5.0.0" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "devOptional": true, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "devOptional": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/apache-crypt": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.5.tgz", + "integrity": "sha512-ICnYQH+DFVmw+S4Q0QY2XRXD8Ne8ewh8HgbuFH4K7022zCxgHM0Hz1xkRnUlEfAXNbwp1Cnhbedu60USIfDxvg==", + "dev": true, + "dependencies": { + "unix-crypt-td-js": "^1.1.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/apache-md5": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.7.tgz", + "integrity": "sha512-JtHjzZmJxtzfTSjsCyHgPR155HBe5WGyUyHTaEkfy46qhwCFKx1Epm6nAxgUG3WfUZP1dWhGqj9Z2NOBeZ+uBw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dependencies": { + "object-assign": "^4.1.1", + "util": "0.10.3" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dependencies": { + "inherits": "2.0.1" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "devOptional": true + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "dev": true, + "dependencies": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + }, + "engines": { + "node": ">= 8.9" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "webpack": ">=2" + } + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.5.tgz", + "integrity": "sha512-ninF5MQNwAX9Z7c9ED+H2pGt1mXdP4TqzlHKyPIYmJIYz0N+++uwdM7RnJukklhzJ54Q84vA4ZJkgs7lu5vqcw==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.16.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.2.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=", + "dev": true + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/binaryextensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", + "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==", + "engines": { + "node": ">=0.8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/browserslist": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.3.tgz", + "integrity": "sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001264", + "electron-to-chromium": "^1.3.857", + "escalade": "^3.1.1", + "node-releases": "^1.1.77", + "picocolors": "^0.2.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/Buffer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/Buffer/-/Buffer-0.0.0.tgz", + "integrity": "sha1-gs+OmGohCf9tHW8cQ25H0HEnrqQ=", + "dev": true, + "engines": { + "node": ">= 0.2.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "node_modules/cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dependencies": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001265", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz", + "integrity": "sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", + "devOptional": true, + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.6.tgz", + "integrity": "sha512-ZkNZbnZjKERTY5NwC2SeMeLeifSPq/pubeRoTpdr3WchLlnZg6hEgvHkK5zL7KNFdd9PmHN8lxrENUwI3cE8vQ==", + "dependencies": { + "colors": "1.0.3" + }, + "engines": { + "node": ">= 0.2.0" + } + }, + "node_modules/cli-table/node_modules/colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "node_modules/cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/colorette": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.15.tgz", + "integrity": "sha512-lIFQhufWaVvwi4wOlX9Gx5b0Nmw3XAZ8HzHNH9dfxhe+JaKNTmX6QLk4o7UHyI+tUY8ClvyfaHUm5bf61O3psA==" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dependencies": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js-compat": { + "version": "3.18.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.18.2.tgz", + "integrity": "sha512-25VJYCJtGjZwLguj7d66oiHfmnVw3TMOZ0zV8DyMJp/aeQ3OjR519iOOeck08HMyVVRAqXxafc2Hl+5QstJrsQ==", + "dev": true, + "dependencies": { + "browserslist": "^4.17.3", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dependencies": { + "capture-stack-trace": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" + }, + "node_modules/dargs": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-6.1.0.tgz", + "integrity": "sha512-5dVBvpBLBnPwSsYXqfybFyehMmC/EenKEcf23AhCTgTf48JFBbmJKqoZBsERDnjL0FyiVTYWdFsRfTLHxLyKdQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dependencies": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/download-stats": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/download-stats/-/download-stats-0.3.4.tgz", + "integrity": "sha512-ic2BigbyUWx7/CBbsfGjf71zUNZB4edBGC3oRliSzsoNmvyVx3Ycfp1w3vp2Y78Ee0eIIkjIEO5KzW0zThDGaA==", + "dependencies": { + "JSONStream": "^1.2.1", + "lazy-cache": "^2.0.1", + "moment": "^2.15.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/editions": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz", + "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==", + "dependencies": { + "errlop": "^2.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=0.8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "node_modules/ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", + "hasInstallScript": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.3.862", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.862.tgz", + "integrity": "sha512-o+FMbCD+hAUJ9S8bfz/FaqA0gE8OpCCm58KhhGogOEqiA1BLFSoVYLi+tW+S/ZavnqBn++n0XZm7HQiBVPs8Jg==", + "dev": true + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/enhanced-resolve/node_modules/memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/errlop": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/errlop/-/errlop-2.2.0.tgz", + "integrity": "sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw==", + "engines": { + "node": ">=0.8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "dependencies": { + "string-template": "~0.2.1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dependencies": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==" + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "node_modules/filelist": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz", + "integrity": "sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==", + "dependencies": { + "minimatch": "^3.0.4" + } + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "dependencies": { + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/follow-redirects": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dependencies": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gh-got": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-5.0.0.tgz", + "integrity": "sha1-7pW+NxBv2HSKlvjR20uuqJ4b+oo=", + "dependencies": { + "got": "^6.2.0", + "is-plain-obj": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/github-username": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/github-username/-/github-username-3.0.0.tgz", + "integrity": "sha1-CnciGbMTB0NCnyRW0L3T21Xc57E=", + "dependencies": { + "gh-got": "^5.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", + "dependencies": { + "array-union": "^1.0.1", + "dir-glob": "2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dependencies": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/got/node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "engines": { + "node": ">=4" + } + }, + "node_modules/got/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "node_modules/grouped-queue": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-1.1.0.tgz", + "integrity": "sha512-rZOFKfCqLhsu5VqjBjEWiwrYqJR07KxIkH4mLZlNlGDfntbb4FbMyGFP14TlvRPrU9S3Hnn/sgxbC5ZeN0no3Q==", + "dependencies": { + "lodash": "^4.17.15" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "node_modules/http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha1-lFz63WZSHq+PfISRPTd9exXyTjE=", + "dev": true, + "dependencies": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + }, + "engines": { + "node": ">=4.6.1" + } + }, + "node_modules/http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", + "dev": true + }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "node_modules/ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + }, + "node_modules/import-local": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", + "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/inquirer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/inquirer/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "devOptional": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-core-module": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", + "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-scoped": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "dependencies": { + "scoped-regex": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/isbinaryfile": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", + "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==", + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istextorbinary": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.6.0.tgz", + "integrity": "sha512-+XRlFseT8B3L9KyjxxLjfXSLMuErKDsd8DBNrsaxoViABMEZlOSCstwmw0qpoFX3+U6yWU1yhLudAe6/lETGGA==", + "dependencies": { + "binaryextensions": "^2.1.2", + "editions": "^2.2.0", + "textextensions": "^2.5.0" + }, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/jake": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", + "dependencies": { + "async": "0.9.x", + "chalk": "^2.4.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jake/node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "dependencies": { + "set-getter": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, + "node_modules/live-server": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.1.tgz", + "integrity": "sha512-Yn2XCVjErTkqnM3FfTmM7/kWy3zP7+cEtC7x6u+wUzlQ+1UW3zEYbbyJrc0jNDwiMDZI0m4a0i3dxlGHVyXczw==", + "dev": true, + "dependencies": { + "chokidar": "^2.0.4", + "colors": "latest", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "bin": { + "live-server": "live-server.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/loader-utils/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dependencies": { + "chalk": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/mem-fs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-1.2.0.tgz", + "integrity": "sha512-b8g0jWKdl8pM0LqAPdK9i8ERL7nYrzmJfRhxMiWH2uYdfYnb7uXnmwVb0ZGe7xyEl4lj+nLIU3yf4zPUT+XsVQ==", + "dependencies": { + "through2": "^3.0.0", + "vinyl": "^2.0.1", + "vinyl-file": "^3.0.0" + } + }, + "node_modules/mem-fs-editor": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-6.0.0.tgz", + "integrity": "sha512-e0WfJAMm8Gv1mP5fEq/Blzy6Lt1VbLg7gNnZmZak7nhrBTibs+c6nQ4SKs/ZyJYHS1mFgDJeopsLAv7Ow0FMFg==", + "dependencies": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^2.6.1", + "glob": "^7.1.4", + "globby": "^9.2.0", + "isbinaryfile": "^4.0.0", + "mkdirp": "^0.5.0", + "multimatch": "^4.0.0", + "rimraf": "^2.6.3", + "through2": "^3.0.1", + "vinyl": "^2.2.0" + } + }, + "node_modules/mem-fs-editor/node_modules/dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dependencies": { + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mem-fs-editor/node_modules/globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mem-fs-editor/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/mem-fs-editor/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/mem-fs-editor/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/mem-fs-editor/node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "node_modules/mem-fs/node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "node_modules/memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", + "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", + "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "dev": true, + "dependencies": { + "mime-db": "1.50.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dependencies": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", + "engines": { + "node": "*" + } + }, + "node_modules/morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/morgan/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dependencies": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "dependencies": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/multimatch/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/multimatch/node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "engines": { + "node": ">=8" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "node_modules/nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node_modules/node-fetch": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz", + "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dependencies": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + } + }, + "node_modules/node-libs-browser/node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/node-libs-browser/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "node_modules/node-releases": { + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-api": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-api/-/npm-api-1.0.1.tgz", + "integrity": "sha512-4sITrrzEbPcr0aNV28QyOmgn6C9yKiF8k92jn4buYAK8wmA5xo1qL3II5/gT1r7wxbXBflSduZ2K3FbtOrtGkA==", + "dependencies": { + "clone-deep": "^4.0.1", + "download-stats": "^0.3.4", + "JSONStream": "^1.3.5", + "moment": "^2.24.0", + "node-fetch": "^2.6.0", + "paged-request": "^2.0.1" + }, + "engines": { + "node": ">=10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "deprecated": "The package has been renamed to `open`", + "dev": true, + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/paged-request": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/paged-request/-/paged-request-2.0.2.tgz", + "integrity": "sha512-NWrGqneZImDdcMU/7vMcAOo1bIi5h/pmpJqe7/jdsy85BA/s5MSaU/KlpxwW/IVPmIwBcq2uKPrBWWhEWhtxag==", + "dependencies": { + "axios": "^0.21.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "node_modules/parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dependencies": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "node_modules/proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/pumpify/node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/read-chunk": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", + "dependencies": { + "pify": "^4.0.1", + "with-open-file": "^0.1.6" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-chunk/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-5.0.0.tgz", + "integrity": "sha512-XBQjqOBtTzyol2CpsQOw8LHV0XbDZVG7xMMjmXAJomlVY03WOBRmYgDJETlvcg0H63AJvPRwT7GFi5rvOzUOKg==", + "dependencies": { + "find-up": "^3.0.0", + "read-pkg": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "devOptional": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexpu-core": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated" + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dependencies": { + "aproba": "^1.1.1" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/scoped-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", + "engines": { + "node": ">=4" + } + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/send/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "node_modules/set-getter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", + "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", + "dependencies": { + "to-object-path": "^0.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "node_modules/setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/shelljs/node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/shelljs/node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/signal-exit": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", + "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" + }, + "node_modules/slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dependencies": { + "figgy-pudding": "^3.5.1" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dependencies": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom-buf": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", + "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", + "dependencies": { + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "dependencies": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dependencies": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "webpack": "^4.0.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } + }, + "node_modules/terser-webpack-plugin/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dependencies": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/terser-webpack-plugin/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/terser-webpack-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "node_modules/textextensions": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.6.0.tgz", + "integrity": "sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ==", + "engines": { + "node": ">=0.8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "node_modules/tsc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tsc/-/tsc-2.0.3.tgz", + "integrity": "sha512-SN+9zBUtrpUcOpaUO7GjkEHgWtf22c7FKbKCA4e858eEM7Qz86rRDpgOU2lBIDf0fLCsEg65ms899UMUIB2+Ow==", + "bin": { + "tsc": "bin/tsc" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "node_modules/typescript": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dependencies": { + "unique-slug": "^2.0.0" + } + }, + "node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dependencies": { + "imurmurhash": "^0.1.4" + } + }, + "node_modules/unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "engines": { + "node": ">=4" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "devOptional": true, + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated" + }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dependencies": { + "prepend-http": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-file": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz", + "integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=", + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "strip-bom-buf": "^1.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/vinyl-file/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + }, + "node_modules/watchpack": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "dependencies": { + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + }, + "optionalDependencies": { + "chokidar": "^3.4.1", + "watchpack-chokidar2": "^2.0.1" + } + }, + "node_modules/watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "optional": true, + "dependencies": { + "chokidar": "^2.1.8" + } + }, + "node_modules/watchpack/node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "optional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/watchpack/node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/watchpack/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/watchpack/node_modules/chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "optional": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/watchpack/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/watchpack/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/watchpack/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/watchpack/node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/watchpack/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/watchpack/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/watchpack/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/webpack": { + "version": "4.46.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", + "dependencies": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.5.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + }, + "webpack-command": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.0.tgz", + "integrity": "sha512-n/jZZBMzVEl4PYIBs+auy2WI0WTQ74EnJDiyD98O2JZY6IVIHJNitkYp/uTXOviIOMfgzrNvC9foKv/8o8KSZw==", + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.1.0", + "@webpack-cli/info": "^1.4.0", + "@webpack-cli/serve": "^1.6.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "webpack": "4.x.x || 5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "@webpack-cli/migrate": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/webpack-sources/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dependencies": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + }, + "node_modules/with-open-file": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz", + "integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==", + "dependencies": { + "p-finally": "^1.0.0", + "p-try": "^2.1.0", + "pify": "^4.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/with-open-file/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dependencies": { + "errno": "~0.1.7" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "node_modules/yeoman-environment": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.10.3.tgz", + "integrity": "sha512-pLIhhU9z/G+kjOXmJ2bPFm3nejfbH+f1fjYRSOteEXDBrv1EoJE/e+kuHixSXfCYfTkxjYsvRaDX+1QykLCnpQ==", + "dependencies": { + "chalk": "^2.4.1", + "debug": "^3.1.0", + "diff": "^3.5.0", + "escape-string-regexp": "^1.0.2", + "execa": "^4.0.0", + "globby": "^8.0.1", + "grouped-queue": "^1.1.0", + "inquirer": "^7.1.0", + "is-scoped": "^1.0.0", + "lodash": "^4.17.10", + "log-symbols": "^2.2.0", + "mem-fs": "^1.1.0", + "mem-fs-editor": "^6.0.0", + "npm-api": "^1.0.0", + "semver": "^7.1.3", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "untildify": "^3.0.3", + "yeoman-generator": "^4.8.2" + } + }, + "node_modules/yeoman-environment/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/yeoman-environment/node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/yeoman-environment/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yeoman-environment/node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/yeoman-environment/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yeoman-environment/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yeoman-environment/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yeoman-generator": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-4.13.0.tgz", + "integrity": "sha512-f2/5N5IR3M2Ozm+QocvZQudlQITv2DwI6Mcxfy7R7gTTzaKgvUpgo/pQMJ+WQKm0KN0YMWCFOZpj0xFGxevc1w==", + "dependencies": { + "async": "^2.6.2", + "chalk": "^2.4.2", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^6.1.0", + "dateformat": "^3.0.3", + "debug": "^4.1.1", + "diff": "^4.0.1", + "error": "^7.0.2", + "find-up": "^3.0.0", + "github-username": "^3.0.0", + "istextorbinary": "^2.5.1", + "lodash": "^4.17.11", + "make-dir": "^3.0.0", + "mem-fs-editor": "^7.0.1", + "minimist": "^1.2.5", + "pretty-bytes": "^5.2.0", + "read-chunk": "^3.2.0", + "read-pkg-up": "^5.0.0", + "rimraf": "^2.6.3", + "run-async": "^2.0.0", + "semver": "^7.2.1", + "shelljs": "^0.8.4", + "text-table": "^0.2.0", + "through2": "^3.0.1" + }, + "engines": { + "node": ">=10" + }, + "optionalDependencies": { + "grouped-queue": "^1.1.0", + "yeoman-environment": "^2.9.5" + } + }, + "node_modules/yeoman-generator/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/yeoman-generator/node_modules/cross-spawn/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/yeoman-generator/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/yeoman-generator/node_modules/dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dependencies": { + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/yeoman-generator/node_modules/ejs": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz", + "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==", + "dependencies": { + "jake": "^10.6.1" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yeoman-generator/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yeoman-generator/node_modules/globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yeoman-generator/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/yeoman-generator/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yeoman-generator/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yeoman-generator/node_modules/mem-fs-editor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-7.1.0.tgz", + "integrity": "sha512-BH6QEqCXSqGeX48V7zu+e3cMwHU7x640NB8Zk8VNvVZniz+p4FK60pMx/3yfkzo6miI6G3a8pH6z7FeuIzqrzA==", + "dependencies": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^3.1.5", + "glob": "^7.1.4", + "globby": "^9.2.0", + "isbinaryfile": "^4.0.0", + "mkdirp": "^1.0.0", + "multimatch": "^4.0.0", + "rimraf": "^3.0.0", + "through2": "^3.0.2", + "vinyl": "^2.2.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/yeoman-generator/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yeoman-generator/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yeoman-generator/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } + }, + "node_modules/yeoman-generator/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "engines": { + "node": ">=4" + } + }, + "node_modules/yeoman-generator/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/yeoman-generator/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yeoman-generator/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yeoman-generator/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yeoman-generator/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/yeoman-generator/node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "node_modules/yeoman-generator/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/yeoman-generator/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", + "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "@babel/compat-data": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "dev": true + }, + "@babel/core": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.8.tgz", + "integrity": "sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.15.8", + "@babel/generator": "^7.15.8", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.8", + "@babel/helpers": "^7.15.4", + "@babel/parser": "^7.15.8", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + } + }, + "@babel/generator": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", + "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "dev": true, + "requires": { + "@babel/types": "^7.15.6", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", + "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", + "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", + "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-function-name": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-module-imports": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-module-transforms": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz", + "integrity": "sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.15.7", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.6" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", + "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-wrap-function": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-replace-supers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", + "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" + }, + "@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", + "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helpers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "dev": true, + "requires": { + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", + "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "dev": true + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz", + "integrity": "sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4", + "@babel/plugin-proposal-optional-chaining": "^7.14.5" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.8.tgz", + "integrity": "sha512-2Z5F2R2ibINTc63mY7FLqGfEbmofrHU9FitJW1Q7aPaKFhiPvSq6QEt/BoWN5oME3GVyjcRuNNSRbb9LC0CSWA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.15.4", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz", + "integrity": "sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", + "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.15.4" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz", + "integrity": "sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-create-class-features-plugin": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", + "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", + "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", + "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.15.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", + "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", + "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.15.8.tgz", + "integrity": "sha512-/daZ8s2tNaRekl9YJa9X4bzjpeRZLt122cpgFnQPLGUe61PH8zMEBmYqKkW5xF5JUEh5buEGXJoQpqBmIbpmEQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/preset-env": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.8.tgz", + "integrity": "sha512-rCC0wH8husJgY4FPbHsiYyiLxSY8oMDJH7Rl6RQMknbN9oDDHhM9RDFvnGM2MgkbUJzSQB4gtuwygY5mCqGSsA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.15.4", + "@babel/plugin-proposal-async-generator-functions": "^7.15.8", + "@babel/plugin-proposal-class-properties": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.15.4", + "@babel/plugin-proposal-dynamic-import": "^7.14.5", + "@babel/plugin-proposal-export-namespace-from": "^7.14.5", + "@babel/plugin-proposal-json-strings": "^7.14.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-proposal-object-rest-spread": "^7.15.6", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-private-methods": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.15.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.14.5", + "@babel/plugin-transform-async-to-generator": "^7.14.5", + "@babel/plugin-transform-block-scoped-functions": "^7.14.5", + "@babel/plugin-transform-block-scoping": "^7.15.3", + "@babel/plugin-transform-classes": "^7.15.4", + "@babel/plugin-transform-computed-properties": "^7.14.5", + "@babel/plugin-transform-destructuring": "^7.14.7", + "@babel/plugin-transform-dotall-regex": "^7.14.5", + "@babel/plugin-transform-duplicate-keys": "^7.14.5", + "@babel/plugin-transform-exponentiation-operator": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.15.4", + "@babel/plugin-transform-function-name": "^7.14.5", + "@babel/plugin-transform-literals": "^7.14.5", + "@babel/plugin-transform-member-expression-literals": "^7.14.5", + "@babel/plugin-transform-modules-amd": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.4", + "@babel/plugin-transform-modules-systemjs": "^7.15.4", + "@babel/plugin-transform-modules-umd": "^7.14.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", + "@babel/plugin-transform-new-target": "^7.14.5", + "@babel/plugin-transform-object-super": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.15.4", + "@babel/plugin-transform-property-literals": "^7.14.5", + "@babel/plugin-transform-regenerator": "^7.14.5", + "@babel/plugin-transform-reserved-words": "^7.14.5", + "@babel/plugin-transform-shorthand-properties": "^7.14.5", + "@babel/plugin-transform-spread": "^7.15.8", + "@babel/plugin-transform-sticky-regex": "^7.14.5", + "@babel/plugin-transform-template-literals": "^7.14.5", + "@babel/plugin-transform-typeof-symbol": "^7.14.5", + "@babel/plugin-transform-unicode-escapes": "^7.14.5", + "@babel/plugin-transform-unicode-regex": "^7.14.5", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.15.6", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.5", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "core-js-compat": "^3.16.0", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", + "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/traverse": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + } + }, + "@discoveryjs/json-ext": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz", + "integrity": "sha512-6nFkfkmSeV/rqSaS4oWHgmpnYw194f6hmWF5is6b0J1naJZoiD0NTc9AiUwPHvWsowkjuHErCZT1wa0jg+BLIA==" + }, + "@ledgerhq/devices": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.7.0.tgz", + "integrity": "sha512-FWJfmdl8V300++OXLgBLpIi+IJoR/srWvxpXrWkc9hd3cNMxgeCl9opm84Y0oJDLBQL9AaERMrb+Cb1nZZR9Tw==", + "requires": { + "@ledgerhq/errors": "^6.2.0", + "@ledgerhq/logs": "^6.2.0", + "rxjs": "6", + "semver": "^7.3.5" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "@ledgerhq/errors": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.2.0.tgz", + "integrity": "sha512-eO03x8HJmG60WtlrMuahigW/rwywFdcGzCnihta/MjkM8BD9A660cKVkyIuheCcpaB7UV/r+QsRl9abHbjjaag==" + }, + "@ledgerhq/hw-app-kda": { + "version": "git+ssh://git@github.com/obsidiansystems/hw-app-kda.git#93f80afb601a92c4186fd48980c41fe9f57c80f5", + "dev": true, + "from": "@ledgerhq/hw-app-kda@git+ssh://git@github.com:obsidiansystems/hw-app-kda", + "requires": { + "@ledgerhq/hw-transport": "^6.3.0" + } + }, + "@ledgerhq/hw-transport": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.7.0.tgz", + "integrity": "sha512-w+PhW6Y4KXYdoCykkE1zt0VL6Ryf72RP8sZP8OH1O90hX/R/q9BMYKl8VNqTbqlrOrORgATlKkbmIJBjbngZew==", + "requires": { + "@ledgerhq/devices": "^6.7.0", + "@ledgerhq/errors": "^6.2.0", + "events": "^3.3.0" + } + }, + "@ledgerhq/hw-transport-node-speculos": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.7.0.tgz", + "integrity": "sha512-RgFom5N6XLQ3xSl+pFWZmmxQxsBdAVJTpyPoClYNoH/ETif2gQHRE1AhtYpSHeJRRMUsioZEMSqW3l8qqdjclA==", + "dev": true, + "requires": { + "@ledgerhq/errors": "^6.2.0", + "@ledgerhq/hw-transport": "^6.7.0", + "@ledgerhq/logs": "^6.2.0", + "rxjs": "6" + } + }, + "@ledgerhq/hw-transport-webhid": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.7.0.tgz", + "integrity": "sha512-FmTQUKENVEIwEM2XT6PIBDbXvdyFjmz3g+Oq5Gn8c4m3knT3h0ehb+Mx5dKlYEg/6Y7vESGUiNZdEQGGieUI/Q==", + "requires": { + "@ledgerhq/devices": "^6.7.0", + "@ledgerhq/errors": "^6.2.0", + "@ledgerhq/hw-transport": "^6.7.0", + "@ledgerhq/logs": "^6.2.0" + } + }, + "@ledgerhq/logs": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.2.0.tgz", + "integrity": "sha512-SLyFyD7ElMhgKWPYedFGCT/ilcbGPgL5hXXYHxOM79Fs5fWi0zaUpt5oGqGMsOAAFaMa9/rbun0pokzPhEFz8A==" + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" + }, + "@types/glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" + }, + "@types/node": { + "version": "16.10.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", + "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==" + }, + "@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" + }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==" + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==" + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==" + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "requires": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==" + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.0.tgz", + "integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg==", + "requires": {} + }, + "@webpack-cli/generators": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/generators/-/generators-2.4.0.tgz", + "integrity": "sha512-HaS4ru2PrZMeVQbMCnxNiDsnTb4KXHKUh1g1mPXDxKmpHTQz4IXn6YqNOgnKYagJ/JohZfG4DTh1ObqCD6fMBw==", + "requires": { + "webpack-cli": "^4.9.0", + "yeoman-environment": "^2.10.3", + "yeoman-generator": "^4.12.0" + } + }, + "@webpack-cli/info": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.0.tgz", + "integrity": "sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw==", + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.0.tgz", + "integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==", + "requires": {} + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "requires": {} + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "devOptional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "devOptional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "apache-crypt": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.5.tgz", + "integrity": "sha512-ICnYQH+DFVmw+S4Q0QY2XRXD8Ne8ewh8HgbuFH4K7022zCxgHM0Hz1xkRnUlEfAXNbwp1Cnhbedu60USIfDxvg==", + "dev": true, + "requires": { + "unix-crypt-td-js": "^1.1.4" + } + }, + "apache-md5": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.7.tgz", + "integrity": "sha512-JtHjzZmJxtzfTSjsCyHgPR155HBe5WGyUyHTaEkfy46qhwCFKx1Epm6nAxgUG3WfUZP1dWhGqj9Z2NOBeZ+uBw==", + "dev": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "devOptional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + }, + "babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.5.tgz", + "integrity": "sha512-ninF5MQNwAX9Z7c9ED+H2pGt1mXdP4TqzlHKyPIYmJIYz0N+++uwdM7RnJukklhzJ54Q84vA4ZJkgs7lu5vqcw==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.16.2" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "devOptional": true + }, + "binaryextensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", + "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.3.tgz", + "integrity": "sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001264", + "electron-to-chromium": "^1.3.857", + "escalade": "^3.1.1", + "node-releases": "^1.1.77", + "picocolors": "^0.2.1" + } + }, + "Buffer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/Buffer/-/Buffer-0.0.0.tgz", + "integrity": "sha1-gs+OmGohCf9tHW8cQ25H0HEnrqQ=", + "dev": true + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "caniuse-lite": { + "version": "1.0.30001265", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz", + "integrity": "sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw==", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "devOptional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-table": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.6.tgz", + "integrity": "sha512-ZkNZbnZjKERTY5NwC2SeMeLeifSPq/pubeRoTpdr3WchLlnZg6hEgvHkK5zL7KNFdd9PmHN8lxrENUwI3cE8vQ==", + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + } + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colorette": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.15.tgz", + "integrity": "sha512-lIFQhufWaVvwi4wOlX9Gx5b0Nmw3XAZ8HzHNH9dfxhe+JaKNTmX6QLk4o7UHyI+tUY8ClvyfaHUm5bf61O3psA==" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js-compat": { + "version": "3.18.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.18.2.tgz", + "integrity": "sha512-25VJYCJtGjZwLguj7d66oiHfmnVw3TMOZ0zV8DyMJp/aeQ3OjR519iOOeck08HMyVVRAqXxafc2Hl+5QstJrsQ==", + "dev": true, + "requires": { + "browserslist": "^4.17.3", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" + }, + "dargs": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-6.1.0.tgz", + "integrity": "sha512-5dVBvpBLBnPwSsYXqfybFyehMmC/EenKEcf23AhCTgTf48JFBbmJKqoZBsERDnjL0FyiVTYWdFsRfTLHxLyKdQ==" + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "requires": { + "ms": "2.1.2" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + }, + "download-stats": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/download-stats/-/download-stats-0.3.4.tgz", + "integrity": "sha512-ic2BigbyUWx7/CBbsfGjf71zUNZB4edBGC3oRliSzsoNmvyVx3Ycfp1w3vp2Y78Ee0eIIkjIEO5KzW0zThDGaA==", + "requires": { + "JSONStream": "^1.2.1", + "lazy-cache": "^2.0.1", + "moment": "^2.15.1" + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "editions": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz", + "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==", + "requires": { + "errlop": "^2.0.0", + "semver": "^6.3.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" + }, + "electron-to-chromium": { + "version": "1.3.862", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.862.tgz", + "integrity": "sha512-o+FMbCD+hAUJ9S8bfz/FaqA0gE8OpCCm58KhhGogOEqiA1BLFSoVYLi+tW+S/ZavnqBn++n0XZm7HQiBVPs8Jg==", + "dev": true + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } + } + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" + }, + "errlop": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/errlop/-/errlop-2.2.0.tgz", + "integrity": "sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw==" + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "requires": { + "prr": "~1.0.1" + } + }, + "error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "requires": { + "string-template": "~0.2.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" + }, + "faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==" + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "filelist": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz", + "integrity": "sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "requires": { + "readable-stream": "^2.0.2" + } + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "follow-redirects": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "gh-got": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-5.0.0.tgz", + "integrity": "sha1-7pW+NxBv2HSKlvjR20uuqJ4b+oo=", + "requires": { + "got": "^6.2.0", + "is-plain-obj": "^1.1.0" + } + }, + "github-username": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/github-username/-/github-username-3.0.0.tgz", + "integrity": "sha1-CnciGbMTB0NCnyRW0L3T21Xc57E=", + "requires": { + "gh-got": "^5.0.0" + } + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", + "requires": { + "array-union": "^1.0.1", + "dir-glob": "2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + } + } + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "grouped-queue": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-1.1.0.tgz", + "integrity": "sha512-rZOFKfCqLhsu5VqjBjEWiwrYqJR07KxIkH4mLZlNlGDfntbb4FbMyGFP14TlvRPrU9S3Hnn/sgxbC5ZeN0no3Q==", + "requires": { + "lodash": "^4.17.15" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha1-lFz63WZSHq+PfISRPTd9exXyTjE=", + "dev": true, + "requires": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + } + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + }, + "import-local": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", + "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==" + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "devOptional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-core-module": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", + "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-scoped": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "requires": { + "scoped-regex": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isbinaryfile": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", + "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "istextorbinary": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.6.0.tgz", + "integrity": "sha512-+XRlFseT8B3L9KyjxxLjfXSLMuErKDsd8DBNrsaxoViABMEZlOSCstwmw0qpoFX3+U6yWU1yhLudAe6/lETGGA==", + "requires": { + "binaryextensions": "^2.1.2", + "editions": "^2.2.0", + "textextensions": "^2.5.0" + } + }, + "jake": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", + "requires": { + "async": "0.9.x", + "chalk": "^2.4.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, + "live-server": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.1.tgz", + "integrity": "sha512-Yn2XCVjErTkqnM3FfTmM7/kWy3zP7+cEtC7x6u+wUzlQ+1UW3zEYbbyJrc0jNDwiMDZI0m4a0i3dxlGHVyXczw==", + "dev": true, + "requires": { + "chokidar": "^2.0.4", + "colors": "latest", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==" + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "requires": { + "chalk": "^2.0.1" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem-fs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-1.2.0.tgz", + "integrity": "sha512-b8g0jWKdl8pM0LqAPdK9i8ERL7nYrzmJfRhxMiWH2uYdfYnb7uXnmwVb0ZGe7xyEl4lj+nLIU3yf4zPUT+XsVQ==", + "requires": { + "through2": "^3.0.0", + "vinyl": "^2.0.1", + "vinyl-file": "^3.0.0" + }, + "dependencies": { + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + } + } + }, + "mem-fs-editor": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-6.0.0.tgz", + "integrity": "sha512-e0WfJAMm8Gv1mP5fEq/Blzy6Lt1VbLg7gNnZmZak7nhrBTibs+c6nQ4SKs/ZyJYHS1mFgDJeopsLAv7Ow0FMFg==", + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^2.6.1", + "glob": "^7.1.4", + "globby": "^9.2.0", + "isbinaryfile": "^4.0.0", + "mkdirp": "^0.5.0", + "multimatch": "^4.0.0", + "rimraf": "^2.6.3", + "through2": "^3.0.1", + "vinyl": "^2.2.0" + }, + "dependencies": { + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "requires": { + "path-type": "^3.0.0" + } + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + } + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", + "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", + "dev": true + }, + "mime-types": { + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", + "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "dev": true, + "requires": { + "mime-db": "1.50.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, + "morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "requires": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "requires": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" + } + } + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node-fetch": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz", + "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "node-releases": { + "version": "1.1.77", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", + "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "devOptional": true + }, + "npm-api": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-api/-/npm-api-1.0.1.tgz", + "integrity": "sha512-4sITrrzEbPcr0aNV28QyOmgn6C9yKiF8k92jn4buYAK8wmA5xo1qL3II5/gT1r7wxbXBflSduZ2K3FbtOrtGkA==", + "requires": { + "clone-deep": "^4.0.1", + "download-stats": "^0.3.4", + "JSONStream": "^1.3.5", + "moment": "^2.24.0", + "node-fetch": "^2.6.0", + "paged-request": "^2.0.1" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "paged-request": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/paged-request/-/paged-request-2.0.2.tgz", + "integrity": "sha512-NWrGqneZImDdcMU/7vMcAOo1bIi5h/pmpJqe7/jdsy85BA/s5MSaU/KlpxwW/IVPmIwBcq2uKPrBWWhEWhtxag==", + "requires": { + "axios": "^0.21.1" + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "^3.0.0" + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "optional": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "read-chunk": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", + "requires": { + "pify": "^4.0.1", + "with-open-file": "^0.1.6" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + } + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" + } + } + }, + "read-pkg-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-5.0.0.tgz", + "integrity": "sha512-XBQjqOBtTzyol2CpsQOw8LHV0XbDZVG7xMMjmXAJomlVY03WOBRmYgDJETlvcg0H63AJvPRwT7GFi5rvOzUOKg==", + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^5.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "devOptional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "requires": { + "resolve": "^1.9.0" + } + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "dev": true, + "requires": { + "regenerate": "^1.4.2" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "regexpu-core": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "dev": true, + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==" + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + }, + "scoped-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "set-getter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", + "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", + "requires": { + "to-object-path": "^0.3.0" + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "dependencies": { + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + } + } + }, + "signal-exit": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", + "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "~0.1.1" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-bom-buf": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", + "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", + "requires": { + "is-utf8": "^0.2.1" + } + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "requires": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "requires": { + "find-up": "^3.0.0" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "textextensions": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.6.0.tgz", + "integrity": "sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ==" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "tsc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tsc/-/tsc-2.0.3.tgz", + "integrity": "sha512-SN+9zBUtrpUcOpaUO7GjkEHgWtf22c7FKbKCA4e858eEM7Qz86rRDpgOU2lBIDf0fLCsEg65ms899UMUIB2+Ow==" + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==" + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==" + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "devOptional": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-file": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz", + "integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "strip-bom-buf": "^1.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + }, + "watchpack": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "requires": { + "chokidar": "^3.4.1", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.1" + }, + "dependencies": { + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "optional": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "optional": true, + "requires": { + "chokidar": "^2.1.8" + } + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "webpack": { + "version": "4.46.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.5.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "webpack-cli": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.0.tgz", + "integrity": "sha512-n/jZZBMzVEl4PYIBs+auy2WI0WTQ74EnJDiyD98O2JZY6IVIHJNitkYp/uTXOviIOMfgzrNvC9foKv/8o8KSZw==", + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.1.0", + "@webpack-cli/info": "^1.4.0", + "@webpack-cli/serve": "^1.6.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + }, + "with-open-file": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz", + "integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==", + "requires": { + "p-finally": "^1.0.0", + "p-try": "^2.1.0", + "pify": "^4.0.1" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + } + } + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "requires": { + "errno": "~0.1.7" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "yeoman-environment": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.10.3.tgz", + "integrity": "sha512-pLIhhU9z/G+kjOXmJ2bPFm3nejfbH+f1fjYRSOteEXDBrv1EoJE/e+kuHixSXfCYfTkxjYsvRaDX+1QykLCnpQ==", + "requires": { + "chalk": "^2.4.1", + "debug": "^3.1.0", + "diff": "^3.5.0", + "escape-string-regexp": "^1.0.2", + "execa": "^4.0.0", + "globby": "^8.0.1", + "grouped-queue": "^1.1.0", + "inquirer": "^7.1.0", + "is-scoped": "^1.0.0", + "lodash": "^4.17.10", + "log-symbols": "^2.2.0", + "mem-fs": "^1.1.0", + "mem-fs-editor": "^6.0.0", + "npm-api": "^1.0.0", + "semver": "^7.1.3", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "untildify": "^3.0.3", + "yeoman-generator": "^4.8.2" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "yeoman-generator": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-4.13.0.tgz", + "integrity": "sha512-f2/5N5IR3M2Ozm+QocvZQudlQITv2DwI6Mcxfy7R7gTTzaKgvUpgo/pQMJ+WQKm0KN0YMWCFOZpj0xFGxevc1w==", + "requires": { + "async": "^2.6.2", + "chalk": "^2.4.2", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^6.1.0", + "dateformat": "^3.0.3", + "debug": "^4.1.1", + "diff": "^4.0.1", + "error": "^7.0.2", + "find-up": "^3.0.0", + "github-username": "^3.0.0", + "grouped-queue": "^1.1.0", + "istextorbinary": "^2.5.1", + "lodash": "^4.17.11", + "make-dir": "^3.0.0", + "mem-fs-editor": "^7.0.1", + "minimist": "^1.2.5", + "pretty-bytes": "^5.2.0", + "read-chunk": "^3.2.0", + "read-pkg-up": "^5.0.0", + "rimraf": "^2.6.3", + "run-async": "^2.0.0", + "semver": "^7.2.1", + "shelljs": "^0.8.4", + "text-table": "^0.2.0", + "through2": "^3.0.1", + "yeoman-environment": "^2.9.5" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "requires": { + "path-type": "^3.0.0" + } + }, + "ejs": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz", + "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==", + "requires": { + "jake": "^10.6.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "mem-fs-editor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-7.1.0.tgz", + "integrity": "sha512-BH6QEqCXSqGeX48V7zu+e3cMwHU7x640NB8Zk8VNvVZniz+p4FK60pMx/3yfkzo6miI6G3a8pH6z7FeuIzqrzA==", + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^3.1.5", + "glob": "^7.1.4", + "globby": "^9.2.0", + "isbinaryfile": "^4.0.0", + "mkdirp": "^1.0.0", + "multimatch": "^4.0.0", + "rimraf": "^3.0.0", + "through2": "^3.0.2", + "vinyl": "^2.2.1" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + } + } +} diff --git a/packages/bundle/package.json b/packages/bundle/package.json new file mode 100644 index 0000000..d069ce4 --- /dev/null +++ b/packages/bundle/package.json @@ -0,0 +1,29 @@ +{ + "name": "bundle", + "version": "1.0.0", + "description": "Temp bundle until we have proper dependencies", + "main": "index.js", + "type": "module", + "scripts": { + "build": "yarn node build.js", + "pack": "yarn webpack", + "test": "yarn node test.js" + }, + "devDependencies": { + "@babel/core": "^7.15.8", + "@babel/preset-env": "^7.15.8", + "@ledgerhq/hw-app-kda": "git+ssh://git@github.com:obsidiansystems/hw-app-kda", + "@ledgerhq/hw-transport-node-speculos": "^6.7.0", + "babel-loader": "^8.2.2", + "buffer": "^6.0.3", + "live-server": "^1.2.1", + "process": "^0.11.10", + "webpack": "^4.42.0", + "webpack-cli": "^4.9.0" + }, + "license": "MIT", + "dependencies": { + "@ledgerhq/hw-transport-webhid": "^6.7.0", + "@webpack-cli/generators": "^2.4.0" + } +} diff --git a/packages/bundle/src/index.js b/packages/bundle/src/index.js new file mode 100644 index 0000000..01bb70b --- /dev/null +++ b/packages/bundle/src/index.js @@ -0,0 +1,12 @@ +import TransportWebHID from "@ledgerhq/hw-transport-webhid"; +import Kadena from "@ledgerhq/hw-app-kda"; + +export default async function (thingToSign) { + const transport = await TransportWebHID.default.request(); + const kadena = new Kadena.default(transport); + + const result = await kadena.signHash("", thingToSign); + console.log("Sign result: ", result); + + return result; +}; diff --git a/packages/bundle/test.js b/packages/bundle/test.js new file mode 100644 index 0000000..8c0fabb --- /dev/null +++ b/packages/bundle/test.js @@ -0,0 +1,16 @@ +import SpeculosTransport from "@ledgerhq/hw-transport-node-speculos"; + +import Kadena from "@ledgerhq/hw-app-kda"; + +const apduPort = 9999; + +const runTest = async () => { + const transport = await SpeculosTransport.default.open({apduPort}); + const kadena = new Kadena.default(transport); + + const result = await kadena.signHash("", "E6shRPKxtsnw61s0yi26Qfx5mqosQuAJAL-Swq54CQI"); + + console.log(result); +}; + +runTest().then(() => console.log("Test complete")).catch(err => console.log("Failure: ", err)); diff --git a/packages/bundle/webpack.config.js b/packages/bundle/webpack.config.js new file mode 100644 index 0000000..173368d --- /dev/null +++ b/packages/bundle/webpack.config.js @@ -0,0 +1,32 @@ +// Generated using webpack-cli https://github.com/webpack/webpack-cli +// const webpack = require('webpack'); +// const path = require("path"); + + // entry: "./src/index.js", + /* + output: { + path: path.resolve(__dirname, "doink"), + filename: 'bundle.js', + library: "Ledger", // Important + libraryTarget: 'umd', // Important + umdNamedDefine: true // Important + }, */ + /* + module: { + rules: [ + { + test: /\.(js|jsx)$/i, + loader: "babel-loader", + }, + { + test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, + type: "asset", + }, + + // Add your rules for custom modules here + // Learn more about loaders from https://webpack.js.org/loaders/ + ] + } + */ + +module.exports = {}; diff --git a/packages/bundle/yarn.lock b/packages/bundle/yarn.lock new file mode 100644 index 0000000..6df04e9 --- /dev/null +++ b/packages/bundle/yarn.lock @@ -0,0 +1,5493 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503" + integrity sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg== + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== + +"@babel/core@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10" + integrity sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og== + dependencies: + "@babel/code-frame" "^7.15.8" + "@babel/generator" "^7.15.8" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-module-transforms" "^7.15.8" + "@babel/helpers" "^7.15.4" + "@babel/parser" "^7.15.8" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@^7.15.4", "@babel/generator@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1" + integrity sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g== + dependencies: + "@babel/types" "^7.15.6" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.14.5", "@babel/helper-annotate-as-pure@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz#3d0e43b00c5e49fdb6c57e421601a7a658d5f835" + integrity sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.14.5": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz#21ad815f609b84ee0e3058676c33cf6d1670525f" + integrity sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz#cf6d94f30fbefc139123e27dd6b02f65aeedb7b9" + integrity sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ== + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz#7f977c17bd12a5fba363cb19bea090394bf37d2e" + integrity sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-member-expression-to-functions" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + +"@babel/helper-create-regexp-features-plugin@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" + integrity sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.14.5" + regexpu-core "^4.7.1" + +"@babel/helper-define-polyfill-provider@^0.2.2": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz#0525edec5094653a282688d34d846e4c75e9c0b6" + integrity sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew== + dependencies: + "@babel/helper-compilation-targets" "^7.13.0" + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/traverse" "^7.13.0" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + semver "^6.1.2" + +"@babel/helper-explode-assignable-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz#f9aec9d219f271eaf92b9f561598ca6b2682600c" + integrity sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-function-name@^7.14.5", "@babel/helper-function-name@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz#845744dafc4381a4a5fb6afa6c3d36f98a787ebc" + integrity sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw== + dependencies: + "@babel/helper-get-function-arity" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-get-function-arity@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" + integrity sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-hoist-variables@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz#09993a3259c0e918f99d104261dfdfc033f178df" + integrity sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-member-expression-to-functions@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" + integrity sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5", "@babel/helper-module-imports@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz#e18007d230632dea19b47853b984476e7b4e103f" + integrity sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.15.4", "@babel/helper-module-transforms@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2" + integrity sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg== + dependencies: + "@babel/helper-module-imports" "^7.15.4" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-simple-access" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/helper-validator-identifier" "^7.15.7" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + +"@babel/helper-optimise-call-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" + integrity sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== + +"@babel/helper-remap-async-to-generator@^7.14.5", "@babel/helper-remap-async-to-generator@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz#2637c0731e4c90fbf58ac58b50b2b5a192fc970f" + integrity sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.15.4" + "@babel/helper-wrap-function" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-replace-supers@^7.14.5", "@babel/helper-replace-supers@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz#52a8ab26ba918c7f6dee28628b07071ac7b7347a" + integrity sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-simple-access@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz#ac368905abf1de8e9781434b635d8f8674bcc13b" + integrity sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-skip-transparent-expression-wrappers@^7.14.5", "@babel/helper-skip-transparent-expression-wrappers@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz#707dbdba1f4ad0fa34f9114fc8197aec7d5da2eb" + integrity sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-split-export-declaration@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz#aecab92dcdbef6a10aa3b62ab204b085f776e257" + integrity sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== + +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== + +"@babel/helper-wrap-function@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz#6f754b2446cfaf3d612523e6ab8d79c27c3a3de7" + integrity sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw== + dependencies: + "@babel/helper-function-name" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helpers@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.4.tgz#5f40f02050a3027121a3cf48d497c05c555eaf43" + integrity sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ== + dependencies: + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.15.4", "@babel/parser@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" + integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA== + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz#dbdeabb1e80f622d9f0b583efb2999605e0a567e" + integrity sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.15.4" + "@babel/plugin-proposal-optional-chaining" "^7.14.5" + +"@babel/plugin-proposal-async-generator-functions@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.8.tgz#a3100f785fab4357987c4223ab1b02b599048403" + integrity sha512-2Z5F2R2ibINTc63mY7FLqGfEbmofrHU9FitJW1Q7aPaKFhiPvSq6QEt/BoWN5oME3GVyjcRuNNSRbb9LC0CSWA== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-remap-async-to-generator" "^7.15.4" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-proposal-class-properties@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz#40d1ee140c5b1e31a350f4f5eed945096559b42e" + integrity sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-proposal-class-static-block@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz#3e7ca6128453c089e8b477a99f970c63fc1cb8d7" + integrity sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + +"@babel/plugin-proposal-dynamic-import@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz#0c6617df461c0c1f8fff3b47cd59772360101d2c" + integrity sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + +"@babel/plugin-proposal-export-namespace-from@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz#dbad244310ce6ccd083072167d8cea83a52faf76" + integrity sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-proposal-json-strings@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz#38de60db362e83a3d8c944ac858ddf9f0c2239eb" + integrity sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-json-strings" "^7.8.3" + +"@babel/plugin-proposal-logical-assignment-operators@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz#6e6229c2a99b02ab2915f82571e0cc646a40c738" + integrity sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz#ee38589ce00e2cc59b299ec3ea406fcd3a0fdaf6" + integrity sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-numeric-separator@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz#83631bf33d9a51df184c2102a069ac0c58c05f18" + integrity sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-proposal-object-rest-spread@^7.15.6": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz#ef68050c8703d07b25af402cb96cf7f34a68ed11" + integrity sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg== + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.15.4" + +"@babel/plugin-proposal-optional-catch-binding@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz#939dd6eddeff3a67fdf7b3f044b5347262598c3c" + integrity sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-proposal-optional-chaining@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz#fa83651e60a360e3f13797eef00b8d519695b603" + integrity sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-methods@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz#37446495996b2945f30f5be5b60d5e2aa4f5792d" + integrity sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-proposal-private-property-in-object@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz#55c5e3b4d0261fd44fe637e3f624cfb0f484e3e5" + integrity sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.15.4" + "@babel/helper-create-class-features-plugin" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-proposal-unicode-property-regex@^7.14.5", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" + integrity sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-arrow-functions@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz#f7187d9588a768dd080bf4c9ffe117ea62f7862a" + integrity sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-async-to-generator@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz#72c789084d8f2094acb945633943ef8443d39e67" + integrity sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA== + dependencies: + "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-remap-async-to-generator" "^7.14.5" + +"@babel/plugin-transform-block-scoped-functions@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz#e48641d999d4bc157a67ef336aeb54bc44fd3ad4" + integrity sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-block-scoping@^7.15.3": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz#94c81a6e2fc230bcce6ef537ac96a1e4d2b3afaf" + integrity sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-classes@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz#50aee17aaf7f332ae44e3bce4c2e10534d5d3bf1" + integrity sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz#1b9d78987420d11223d41195461cc43b974b204f" + integrity sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-destructuring@^7.14.7": + version "7.14.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz#0ad58ed37e23e22084d109f185260835e5557576" + integrity sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-dotall-regex@^7.14.5", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" + integrity sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-duplicate-keys@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz#365a4844881bdf1501e3a9f0270e7f0f91177954" + integrity sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-exponentiation-operator@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz#5154b8dd6a3dfe6d90923d61724bd3deeb90b493" + integrity sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-for-of@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz#25c62cce2718cfb29715f416e75d5263fb36a8c2" + integrity sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-function-name@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz#e81c65ecb900746d7f31802f6bed1f52d915d6f2" + integrity sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ== + dependencies: + "@babel/helper-function-name" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-literals@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz#41d06c7ff5d4d09e3cf4587bd3ecf3930c730f78" + integrity sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-member-expression-literals@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz#b39cd5212a2bf235a617d320ec2b48bcc091b8a7" + integrity sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-modules-amd@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz#4fd9ce7e3411cb8b83848480b7041d83004858f7" + integrity sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g== + dependencies: + "@babel/helper-module-transforms" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-commonjs@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz#8201101240eabb5a76c08ef61b2954f767b6b4c1" + integrity sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA== + dependencies: + "@babel/helper-module-transforms" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-simple-access" "^7.15.4" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-systemjs@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz#b42890c7349a78c827719f1d2d0cd38c7d268132" + integrity sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw== + dependencies: + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-module-transforms" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-umd@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz#fb662dfee697cce274a7cda525190a79096aa6e0" + integrity sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA== + dependencies: + "@babel/helper-module-transforms" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz#c68f5c5d12d2ebaba3762e57c2c4f6347a46e7b2" + integrity sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + +"@babel/plugin-transform-new-target@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz#31bdae8b925dc84076ebfcd2a9940143aed7dbf8" + integrity sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-object-super@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz#d0b5faeac9e98597a161a9cf78c527ed934cdc45" + integrity sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-replace-supers" "^7.14.5" + +"@babel/plugin-transform-parameters@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz#5f2285cc3160bf48c8502432716b48504d29ed62" + integrity sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-property-literals@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz#0ddbaa1f83db3606f1cdf4846fa1dfb473458b34" + integrity sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-regenerator@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz#9676fd5707ed28f522727c5b3c0aa8544440b04f" + integrity sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg== + dependencies: + regenerator-transform "^0.14.2" + +"@babel/plugin-transform-reserved-words@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz#c44589b661cfdbef8d4300dcc7469dffa92f8304" + integrity sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-shorthand-properties@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz#97f13855f1409338d8cadcbaca670ad79e091a58" + integrity sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-spread@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.15.8.tgz#79d5aa27f68d700449b2da07691dfa32d2f6d468" + integrity sha512-/daZ8s2tNaRekl9YJa9X4bzjpeRZLt122cpgFnQPLGUe61PH8zMEBmYqKkW5xF5JUEh5buEGXJoQpqBmIbpmEQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.15.4" + +"@babel/plugin-transform-sticky-regex@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz#5b617542675e8b7761294381f3c28c633f40aeb9" + integrity sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-template-literals@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz#a5f2bc233937d8453885dc736bdd8d9ffabf3d93" + integrity sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-typeof-symbol@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz#39af2739e989a2bd291bf6b53f16981423d457d4" + integrity sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-unicode-escapes@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz#9d4bd2a681e3c5d7acf4f57fa9e51175d91d0c6b" + integrity sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-transform-unicode-regex@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz#4cd09b6c8425dd81255c7ceb3fb1836e7414382e" + integrity sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/preset-env@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.15.8.tgz#f527ce5bcb121cd199f6b502bf23e420b3ff8dba" + integrity sha512-rCC0wH8husJgY4FPbHsiYyiLxSY8oMDJH7Rl6RQMknbN9oDDHhM9RDFvnGM2MgkbUJzSQB4gtuwygY5mCqGSsA== + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.15.4" + "@babel/plugin-proposal-async-generator-functions" "^7.15.8" + "@babel/plugin-proposal-class-properties" "^7.14.5" + "@babel/plugin-proposal-class-static-block" "^7.15.4" + "@babel/plugin-proposal-dynamic-import" "^7.14.5" + "@babel/plugin-proposal-export-namespace-from" "^7.14.5" + "@babel/plugin-proposal-json-strings" "^7.14.5" + "@babel/plugin-proposal-logical-assignment-operators" "^7.14.5" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5" + "@babel/plugin-proposal-numeric-separator" "^7.14.5" + "@babel/plugin-proposal-object-rest-spread" "^7.15.6" + "@babel/plugin-proposal-optional-catch-binding" "^7.14.5" + "@babel/plugin-proposal-optional-chaining" "^7.14.5" + "@babel/plugin-proposal-private-methods" "^7.14.5" + "@babel/plugin-proposal-private-property-in-object" "^7.15.4" + "@babel/plugin-proposal-unicode-property-regex" "^7.14.5" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-transform-arrow-functions" "^7.14.5" + "@babel/plugin-transform-async-to-generator" "^7.14.5" + "@babel/plugin-transform-block-scoped-functions" "^7.14.5" + "@babel/plugin-transform-block-scoping" "^7.15.3" + "@babel/plugin-transform-classes" "^7.15.4" + "@babel/plugin-transform-computed-properties" "^7.14.5" + "@babel/plugin-transform-destructuring" "^7.14.7" + "@babel/plugin-transform-dotall-regex" "^7.14.5" + "@babel/plugin-transform-duplicate-keys" "^7.14.5" + "@babel/plugin-transform-exponentiation-operator" "^7.14.5" + "@babel/plugin-transform-for-of" "^7.15.4" + "@babel/plugin-transform-function-name" "^7.14.5" + "@babel/plugin-transform-literals" "^7.14.5" + "@babel/plugin-transform-member-expression-literals" "^7.14.5" + "@babel/plugin-transform-modules-amd" "^7.14.5" + "@babel/plugin-transform-modules-commonjs" "^7.15.4" + "@babel/plugin-transform-modules-systemjs" "^7.15.4" + "@babel/plugin-transform-modules-umd" "^7.14.5" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.9" + "@babel/plugin-transform-new-target" "^7.14.5" + "@babel/plugin-transform-object-super" "^7.14.5" + "@babel/plugin-transform-parameters" "^7.15.4" + "@babel/plugin-transform-property-literals" "^7.14.5" + "@babel/plugin-transform-regenerator" "^7.14.5" + "@babel/plugin-transform-reserved-words" "^7.14.5" + "@babel/plugin-transform-shorthand-properties" "^7.14.5" + "@babel/plugin-transform-spread" "^7.15.8" + "@babel/plugin-transform-sticky-regex" "^7.14.5" + "@babel/plugin-transform-template-literals" "^7.14.5" + "@babel/plugin-transform-typeof-symbol" "^7.14.5" + "@babel/plugin-transform-unicode-escapes" "^7.14.5" + "@babel/plugin-transform-unicode-regex" "^7.14.5" + "@babel/preset-modules" "^0.1.4" + "@babel/types" "^7.15.6" + babel-plugin-polyfill-corejs2 "^0.2.2" + babel-plugin-polyfill-corejs3 "^0.2.5" + babel-plugin-polyfill-regenerator "^0.2.2" + core-js-compat "^3.16.0" + semver "^6.3.0" + +"@babel/preset-modules@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" + integrity sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/runtime@^7.8.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" + integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.15.4.tgz#51898d35dcf3faa670c4ee6afcfd517ee139f194" + integrity sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/traverse@^7.13.0", "@babel/traverse@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" + integrity sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.4.4": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" + integrity sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig== + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.5" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz#9283c9ce5b289a3c4f61c12757469e59377f81f3" + integrity sha512-6nFkfkmSeV/rqSaS4oWHgmpnYw194f6hmWF5is6b0J1naJZoiD0NTc9AiUwPHvWsowkjuHErCZT1wa0jg+BLIA== + +"@ledgerhq/devices@^6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-6.7.0.tgz#90e8fef16e6d039dec64e8a7f1874031578e1973" + integrity sha512-FWJfmdl8V300++OXLgBLpIi+IJoR/srWvxpXrWkc9hd3cNMxgeCl9opm84Y0oJDLBQL9AaERMrb+Cb1nZZR9Tw== + dependencies: + "@ledgerhq/errors" "^6.2.0" + "@ledgerhq/logs" "^6.2.0" + rxjs "6" + semver "^7.3.5" + +"@ledgerhq/errors@^6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.2.0.tgz#7dc2b3bf6bdedccdaa1b97dccacfa912c4fc22f8" + integrity sha512-eO03x8HJmG60WtlrMuahigW/rwywFdcGzCnihta/MjkM8BD9A660cKVkyIuheCcpaB7UV/r+QsRl9abHbjjaag== + +"@ledgerhq/hw-app-kda@git+ssh://git@github.com:obsidiansystems/hw-app-kda": + version "0.0.0" + resolved "git+ssh://git@github.com:obsidiansystems/hw-app-kda#93f80afb601a92c4186fd48980c41fe9f57c80f5" + dependencies: + "@ledgerhq/hw-transport" "^6.3.0" + +"@ledgerhq/hw-transport-node-speculos@^6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.7.0.tgz#bcda216fdbf70cd408f533a13c66287b024f8f1e" + integrity sha512-RgFom5N6XLQ3xSl+pFWZmmxQxsBdAVJTpyPoClYNoH/ETif2gQHRE1AhtYpSHeJRRMUsioZEMSqW3l8qqdjclA== + dependencies: + "@ledgerhq/errors" "^6.2.0" + "@ledgerhq/hw-transport" "^6.7.0" + "@ledgerhq/logs" "^6.2.0" + rxjs "6" + +"@ledgerhq/hw-transport-webhid@^6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.7.0.tgz#10feb4b74ff35253ebebae2f01ec633f14c0330c" + integrity sha512-FmTQUKENVEIwEM2XT6PIBDbXvdyFjmz3g+Oq5Gn8c4m3knT3h0ehb+Mx5dKlYEg/6Y7vESGUiNZdEQGGieUI/Q== + dependencies: + "@ledgerhq/devices" "^6.7.0" + "@ledgerhq/errors" "^6.2.0" + "@ledgerhq/hw-transport" "^6.7.0" + "@ledgerhq/logs" "^6.2.0" + +"@ledgerhq/hw-transport@^6.3.0", "@ledgerhq/hw-transport@^6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.7.0.tgz#d1f0d70e21b91e6457a32d4c3cec0764e97461ff" + integrity sha512-w+PhW6Y4KXYdoCykkE1zt0VL6Ryf72RP8sZP8OH1O90hX/R/q9BMYKl8VNqTbqlrOrORgATlKkbmIJBjbngZew== + dependencies: + "@ledgerhq/devices" "^6.7.0" + "@ledgerhq/errors" "^6.2.0" + events "^3.3.0" + +"@ledgerhq/logs@^6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.2.0.tgz#9fb2d6f1811316697f7b3cc14607f6c608912419" + integrity sha512-SLyFyD7ElMhgKWPYedFGCT/ilcbGPgL5hXXYHxOM79Fs5fWi0zaUpt5oGqGMsOAAFaMa9/rbun0pokzPhEFz8A== + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + +"@types/glob@^7.1.1": + version "7.1.4" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" + integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/json-schema@^7.0.5": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + +"@types/minimatch@*", "@types/minimatch@^3.0.3": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== + +"@types/node@*": + version "16.10.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5" + integrity sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ== + +"@types/normalize-package-data@^2.4.0": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== + +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.1.0.tgz#8342bef0badfb7dfd3b576f2574ab80c725be043" + integrity sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg== + +"@webpack-cli/generators@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/generators/-/generators-2.4.0.tgz#05a51b53267044c947be346668c348c77a7d835b" + integrity sha512-HaS4ru2PrZMeVQbMCnxNiDsnTb4KXHKUh1g1mPXDxKmpHTQz4IXn6YqNOgnKYagJ/JohZfG4DTh1ObqCD6fMBw== + dependencies: + webpack-cli "^4.9.0" + yeoman-environment "^2.10.3" + yeoman-generator "^4.12.0" + +"@webpack-cli/info@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.4.0.tgz#b9179c3227ab09cbbb149aa733475fcf99430223" + integrity sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw== + dependencies: + envinfo "^7.7.3" + +"@webpack-cli/serve@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.6.0.tgz#2c275aa05c895eccebbfc34cfb223c6e8bd591a2" + integrity sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +JSONStream@^1.2.1, JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +accepts@~1.3.4: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn@^6.4.1: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== + +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +apache-crypt@^1.1.2: + version "1.2.5" + resolved "https://registry.yarnpkg.com/apache-crypt/-/apache-crypt-1.2.5.tgz#4eb6b6dbaed2041ce5bc2d802f4421f5fdadc25e" + integrity sha512-ICnYQH+DFVmw+S4Q0QY2XRXD8Ne8ewh8HgbuFH4K7022zCxgHM0Hz1xkRnUlEfAXNbwp1Cnhbedu60USIfDxvg== + dependencies: + unix-crypt-td-js "^1.1.4" + +apache-md5@^1.0.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/apache-md5/-/apache-md5-1.1.7.tgz#dcef1802700cc231d60c5e08fd088f2f9b36375a" + integrity sha512-JtHjzZmJxtzfTSjsCyHgPR155HBe5WGyUyHTaEkfy46qhwCFKx1Epm6nAxgUG3WfUZP1dWhGqj9Z2NOBeZ+uBw== + +aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-differ@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" + integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== + +array-union@^1.0.1, array-union@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async@0.9.x: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= + +async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +babel-loader@^8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" + integrity sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g== + dependencies: + find-cache-dir "^3.3.1" + loader-utils "^1.4.0" + make-dir "^3.1.0" + schema-utils "^2.6.5" + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-polyfill-corejs2@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz#e9124785e6fd94f94b618a7954e5693053bf5327" + integrity sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ== + dependencies: + "@babel/compat-data" "^7.13.11" + "@babel/helper-define-polyfill-provider" "^0.2.2" + semver "^6.1.1" + +babel-plugin-polyfill-corejs3@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.5.tgz#2779846a16a1652244ae268b1e906ada107faf92" + integrity sha512-ninF5MQNwAX9Z7c9ED+H2pGt1mXdP4TqzlHKyPIYmJIYz0N+++uwdM7RnJukklhzJ54Q84vA4ZJkgs7lu5vqcw== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.2.2" + core-js-compat "^3.16.2" + +babel-plugin-polyfill-regenerator@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz#b310c8d642acada348c1fa3b3e6ce0e851bee077" + integrity sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.2.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.0.2, base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +basic-auth@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" + integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== + dependencies: + safe-buffer "5.1.2" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= + +bcryptjs@^2.3.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.3.tgz#9ab5627b93e60621ff7cdac5da9733027df1d0cb" + integrity sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms= + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +binaryextensions@^2.1.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.3.0.tgz#1d269cbf7e6243ea886aa41453c3651ccbe13c22" + integrity sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.1: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +browserslist@^4.16.6, browserslist@^4.17.3: + version "4.17.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.3.tgz#2844cd6eebe14d12384b0122d217550160d2d624" + integrity sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ== + dependencies: + caniuse-lite "^1.0.30001264" + electron-to-chromium "^1.3.857" + escalade "^3.1.1" + node-releases "^1.1.77" + picocolors "^0.2.1" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +cacache@^12.0.2: + version "12.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" + integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caniuse-lite@^1.0.30001264: + version "1.0.30001265" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz#0613c9e6c922e422792e6fcefdf9a3afeee4f8c3" + integrity sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw== + +capture-stack-trace@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" + integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chokidar@^2.0.4, chokidar@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chokidar@^3.4.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-table@^0.3.1: + version "0.3.6" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.6.tgz#e9d6aa859c7fe636981fd3787378c2a20bce92fc" + integrity sha512-ZkNZbnZjKERTY5NwC2SeMeLeifSPq/pubeRoTpdr3WchLlnZg6hEgvHkK5zL7KNFdd9PmHN8lxrENUwI3cE8vQ== + dependencies: + colors "1.0.3" + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= + +clone@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + +cloneable-readable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" + integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== + dependencies: + inherits "^2.0.1" + process-nextick-args "^2.0.0" + readable-stream "^2.3.5" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.14: + version "2.0.15" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.15.tgz#8e634aa0429b110d24be82eac4d42f5ea65ab2d5" + integrity sha512-lIFQhufWaVvwi4wOlX9Gx5b0Nmw3XAZ8HzHNH9dfxhe+JaKNTmX6QLk4o7UHyI+tUY8ClvyfaHUm5bf61O3psA== + +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= + +colors@latest: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect@^3.6.6: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js-compat@^3.16.0, core-js-compat@^3.16.2: + version "3.18.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.2.tgz#e40c266fbd613948dd8d2d2156345da8ac03c142" + integrity sha512-25VJYCJtGjZwLguj7d66oiHfmnVw3TMOZ0zV8DyMJp/aeQ3OjR519iOOeck08HMyVVRAqXxafc2Hl+5QstJrsQ== + dependencies: + browserslist "^4.17.3" + semver "7.0.0" + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@latest: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-error-class@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= + dependencies: + capture-stack-trace "^1.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + +dargs@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-6.1.0.tgz#1f3b9b56393ecf8caa7cbfd6c31496ffcfb9b272" + integrity sha512-5dVBvpBLBnPwSsYXqfybFyehMmC/EenKEcf23AhCTgTf48JFBbmJKqoZBsERDnjL0FyiVTYWdFsRfTLHxLyKdQ== + +dateformat@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0, debug@^4.1.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +depd@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +diff@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + +dir-glob@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== + dependencies: + path-type "^3.0.0" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + +download-stats@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/download-stats/-/download-stats-0.3.4.tgz#67ea0c32f14acd9f639da704eef509684ba2dae7" + integrity sha512-ic2BigbyUWx7/CBbsfGjf71zUNZB4edBGC3oRliSzsoNmvyVx3Ycfp1w3vp2Y78Ee0eIIkjIEO5KzW0zThDGaA== + dependencies: + JSONStream "^1.2.1" + lazy-cache "^2.0.1" + moment "^2.15.1" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +duplexer@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +editions@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/editions/-/editions-2.3.1.tgz#3bc9962f1978e801312fbd0aebfed63b49bfe698" + integrity sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA== + dependencies: + errlop "^2.0.0" + semver "^6.3.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +ejs@^2.6.1: + version "2.7.4" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" + integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== + +ejs@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" + integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== + dependencies: + jake "^10.6.1" + +electron-to-chromium@^1.3.857: + version "1.3.862" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.862.tgz#c1c5d4382449e2c9b0e67fe1652f4fc451d6d8c0" + integrity sha512-o+FMbCD+hAUJ9S8bfz/FaqA0gE8OpCCm58KhhGogOEqiA1BLFSoVYLi+tW+S/ZavnqBn++n0XZm7HQiBVPs8Jg== + +elliptic@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" + integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +envinfo@^7.7.3: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + +errlop@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/errlop/-/errlop-2.2.0.tgz#1ff383f8f917ae328bebb802d6ca69666a42d21b" + integrity sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw== + +errno@^0.1.3, errno@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +error@^7.0.2: + version "7.2.1" + resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" + integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== + dependencies: + string-template "~0.2.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esrecurse@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +event-stream@3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + +events@^3.0.0, events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^2.0.2, fast-glob@^2.2.6: + version "2.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastest-levenshtein@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" + integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== + +faye-websocket@0.11.x: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== + dependencies: + websocket-driver ">=0.5.1" + +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +filelist@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" + integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== + dependencies: + minimatch "^3.0.4" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-cache-dir@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +first-chunk-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70" + integrity sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA= + dependencies: + readable-stream "^2.0.2" + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +follow-redirects@^1.14.0: + version "1.14.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379" + integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g== + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +from@~0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-intrinsic@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +gh-got@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/gh-got/-/gh-got-5.0.0.tgz#ee95be37106fd8748a96f8d1db4baea89e1bfa8a" + integrity sha1-7pW+NxBv2HSKlvjR20uuqJ4b+oo= + dependencies: + got "^6.2.0" + is-plain-obj "^1.1.0" + +github-username@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/github-username/-/github-username-3.0.0.tgz#0a772219b3130743429f2456d0bdd3db55dce7b1" + integrity sha1-CnciGbMTB0NCnyRW0L3T21Xc57E= + dependencies: + gh-got "^5.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + +glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" + integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== + dependencies: + array-union "^1.0.1" + dir-glob "2.0.0" + fast-glob "^2.0.2" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + +globby@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" + integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^1.0.2" + dir-glob "^2.2.2" + fast-glob "^2.2.6" + glob "^7.1.3" + ignore "^4.0.3" + pify "^4.0.1" + slash "^2.0.0" + +got@^6.2.0: + version "6.7.1" + resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= + dependencies: + create-error-class "^3.0.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-redirect "^1.0.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + lowercase-keys "^1.0.0" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + unzip-response "^2.0.1" + url-parse-lax "^1.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== + +grouped-queue@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-1.1.0.tgz#63e3f9ca90af952269d1d40879e41221eacc74cb" + integrity sha512-rZOFKfCqLhsu5VqjBjEWiwrYqJR07KxIkH4mLZlNlGDfntbb4FbMyGFP14TlvRPrU9S3Hnn/sgxbC5ZeN0no3Q== + dependencies: + lodash "^4.17.15" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +http-auth@3.1.x: + version "3.1.3" + resolved "https://registry.yarnpkg.com/http-auth/-/http-auth-3.1.3.tgz#945cfadd66521eaf8f7c84913d377d7b15f24e31" + integrity sha1-lFz63WZSHq+PfISRPTd9exXyTjE= + dependencies: + apache-crypt "^1.1.2" + apache-md5 "^1.0.6" + bcryptjs "^2.3.0" + uuid "^3.0.0" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-parser-js@>=0.5.1: + version "0.5.3" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" + integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.4, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + +ignore@^4.0.3: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-local@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.3.tgz#4d51c2c495ca9393da259ec66b62e022920211e0" + integrity sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +infer-owner@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +inquirer@^7.1.0: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +interpret@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" + integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-core-module@^2.2.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" + integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ== + dependencies: + has "^1.0.3" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-redirect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= + +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-scoped@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-scoped/-/is-scoped-1.0.0.tgz#449ca98299e713038256289ecb2b540dc437cb30" + integrity sha1-RJypgpnnEwOCViieyytUDcQ3yzA= + dependencies: + scoped-regex "^1.0.0" + +is-stream@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-utf8@^0.2.0, is-utf8@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isbinaryfile@^4.0.0: + version "4.0.8" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.8.tgz#5d34b94865bd4946633ecc78a026fc76c5b11fcf" + integrity sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +istextorbinary@^2.5.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.6.0.tgz#60776315fb0fa3999add276c02c69557b9ca28ab" + integrity sha512-+XRlFseT8B3L9KyjxxLjfXSLMuErKDsd8DBNrsaxoViABMEZlOSCstwmw0qpoFX3+U6yWU1yhLudAe6/lETGGA== + dependencies: + binaryextensions "^2.1.2" + editions "^2.2.0" + textextensions "^2.5.0" + +jake@^10.6.1: + version "10.8.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b" + integrity sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A== + dependencies: + async "0.9.x" + chalk "^2.4.2" + filelist "^1.0.1" + minimatch "^3.0.4" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +lazy-cache@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + integrity sha1-uRkKT5EzVGlIQIWfio9whNiCImQ= + dependencies: + set-getter "^0.1.0" + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +live-server@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/live-server/-/live-server-1.2.1.tgz#670630dd409d22fe9c513ab1c1894686c757153e" + integrity sha512-Yn2XCVjErTkqnM3FfTmM7/kWy3zP7+cEtC7x6u+wUzlQ+1UW3zEYbbyJrc0jNDwiMDZI0m4a0i3dxlGHVyXczw== + dependencies: + chokidar "^2.0.4" + colors latest + connect "^3.6.6" + cors latest + event-stream "3.3.4" + faye-websocket "0.11.x" + http-auth "3.1.x" + morgan "^1.9.1" + object-assign latest + opn latest + proxy-middleware latest + send latest + serve-index "^1.9.1" + +loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@^1.2.3, loader-utils@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= + +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +mem-fs-editor@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-6.0.0.tgz#d63607cf0a52fe6963fc376c6a7aa52db3edabab" + integrity sha512-e0WfJAMm8Gv1mP5fEq/Blzy6Lt1VbLg7gNnZmZak7nhrBTibs+c6nQ4SKs/ZyJYHS1mFgDJeopsLAv7Ow0FMFg== + dependencies: + commondir "^1.0.1" + deep-extend "^0.6.0" + ejs "^2.6.1" + glob "^7.1.4" + globby "^9.2.0" + isbinaryfile "^4.0.0" + mkdirp "^0.5.0" + multimatch "^4.0.0" + rimraf "^2.6.3" + through2 "^3.0.1" + vinyl "^2.2.0" + +mem-fs-editor@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-7.1.0.tgz#2a16f143228df87bf918874556723a7ee73bfe88" + integrity sha512-BH6QEqCXSqGeX48V7zu+e3cMwHU7x640NB8Zk8VNvVZniz+p4FK60pMx/3yfkzo6miI6G3a8pH6z7FeuIzqrzA== + dependencies: + commondir "^1.0.1" + deep-extend "^0.6.0" + ejs "^3.1.5" + glob "^7.1.4" + globby "^9.2.0" + isbinaryfile "^4.0.0" + mkdirp "^1.0.0" + multimatch "^4.0.0" + rimraf "^3.0.0" + through2 "^3.0.2" + vinyl "^2.2.1" + +mem-fs@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mem-fs/-/mem-fs-1.2.0.tgz#5f29b2d02a5875cd14cd836c388385892d556cde" + integrity sha512-b8g0jWKdl8pM0LqAPdK9i8ERL7nYrzmJfRhxMiWH2uYdfYnb7uXnmwVb0ZGe7xyEl4lj+nLIU3yf4zPUT+XsVQ== + dependencies: + through2 "^3.0.0" + vinyl "^2.0.1" + vinyl-file "^3.0.0" + +memory-fs@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.2.3: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.50.0: + version "1.50.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" + integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== + +mime-types@~2.1.17, mime-types@~2.1.24: + version "2.1.33" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" + integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== + dependencies: + mime-db "1.50.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mkdirp@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +moment@^2.15.1, moment@^2.24.0: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + +morgan@^1.9.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7" + integrity sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ== + dependencies: + basic-auth "~2.0.1" + debug "2.6.9" + depd "~2.0.0" + on-finished "~2.3.0" + on-headers "~1.0.2" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multimatch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" + integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== + dependencies: + "@types/minimatch" "^3.0.3" + array-differ "^3.0.0" + array-union "^2.1.0" + arrify "^2.0.1" + minimatch "^3.0.4" + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +nan@^2.12.1: + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.5.0, neo-async@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-fetch@^2.6.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.5.tgz#42735537d7f080a7e5f78b6c549b7146be1742fd" + integrity sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ== + dependencies: + whatwg-url "^5.0.0" + +node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + +node-releases@^1.1.77: + version "1.1.77" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" + integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== + +normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-api@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-api/-/npm-api-1.0.1.tgz#3def9b51afedca57db14ca0c970d92442d21c9c5" + integrity sha512-4sITrrzEbPcr0aNV28QyOmgn6C9yKiF8k92jn4buYAK8wmA5xo1qL3II5/gT1r7wxbXBflSduZ2K3FbtOrtGkA== + dependencies: + JSONStream "^1.3.5" + clone-deep "^4.0.1" + download-stats "^0.3.4" + moment "^2.24.0" + node-fetch "^2.6.0" + paged-request "^2.0.1" + +npm-run-path@^4.0.0, npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-assign@^4, object-assign@^4.1.1, object-assign@latest: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +opn@latest: + version "6.0.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-6.0.0.tgz#3c5b0db676d5f97da1233d1ed42d182bc5a27d2d" + integrity sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ== + dependencies: + is-wsl "^1.1.0" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0, p-try@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +paged-request@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/paged-request/-/paged-request-2.0.2.tgz#4d621a08b8d6bee4440a0a92112354eeece5b5b0" + integrity sha512-NWrGqneZImDdcMU/7vMcAOo1bIi5h/pmpJqe7/jdsy85BA/s5MSaU/KlpxwW/IVPmIwBcq2uKPrBWWhEWhtxag== + dependencies: + axios "^0.21.1" + +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= + dependencies: + through "~2.3" + +pbkdf2@^3.0.3: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +picocolors@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" + integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + +pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-dir@^4.1.0, pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +pretty-bytes@^5.2.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" + integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== + +process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +proxy-middleware@latest: + version "0.15.0" + resolved "https://registry.yarnpkg.com/proxy-middleware/-/proxy-middleware-0.15.0.tgz#a3fdf1befb730f951965872ac2f6074c61477a56" + integrity sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY= + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +read-chunk@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-3.2.0.tgz#2984afe78ca9bfbbdb74b19387bf9e86289c16ca" + integrity sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ== + dependencies: + pify "^4.0.1" + with-open-file "^0.1.6" + +read-pkg-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-5.0.0.tgz#b6a6741cb144ed3610554f40162aa07a6db621b8" + integrity sha512-XBQjqOBtTzyol2CpsQOw8LHV0XbDZVG7xMMjmXAJomlVY03WOBRmYgDJETlvcg0H63AJvPRwT7GFi5rvOzUOKg== + dependencies: + find-up "^3.0.0" + read-pkg "^5.0.0" + +read-pkg@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +"readable-stream@2 || 3", readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + +rechoir@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" + integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== + dependencies: + resolve "^1.9.0" + +regenerate-unicode-properties@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" + integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA== + dependencies: + regenerate "^1.4.2" + +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + +regenerator-transform@^0.14.2: + version "0.14.5" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" + integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== + dependencies: + "@babel/runtime" "^7.8.4" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^4.7.1: + version "4.8.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" + integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg== + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^9.0.0" + regjsgen "^0.5.2" + regjsparser "^0.7.0" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + +regjsgen@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== + +regjsparser@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968" + integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ== + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +replace-ext@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" + integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.9.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@^2.5.4, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +run-async@^2.0.0, run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + +rxjs@6, rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +schema-utils@^2.6.5: + version "2.7.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" + integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== + dependencies: + "@types/json-schema" "^7.0.5" + ajv "^6.12.4" + ajv-keywords "^3.5.2" + +scoped-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" + integrity sha1-o0a7Gs1CB65wvXwMfKnlZra63bg= + +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.1.3, semver@^7.2.1, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +send@latest: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +set-getter@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.1.tgz#a3110e1b461d31a9cfc8c5c9ee2e9737ad447102" + integrity sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw== + dependencies: + to-object-path "^0.3.0" + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shelljs@^0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.5" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" + integrity sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ== + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@~0.5.12: + version "0.5.20" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" + integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= + dependencies: + through "2" + +ssri@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== + dependencies: + figgy-pudding "^3.5.1" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= + dependencies: + duplexer "~0.1.1" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +string-template@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" + integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= + +string-width@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom-buf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572" + integrity sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI= + dependencies: + is-utf8 "^0.2.1" + +strip-bom-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca" + integrity sha1-+H217yYT9paKpUWr/h7HKLaoKco= + dependencies: + first-chunk-stream "^2.0.0" + strip-bom "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + +terser-webpack-plugin@^1.4.3: + version "1.4.5" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" + integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^4.0.0" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser@^4.1.2: + version "4.8.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +textextensions@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" + integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== + +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through2@^3.0.0, through2@^3.0.1, through2@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" + integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== + dependencies: + inherits "^2.0.4" + readable-stream "2 || 3" + +through@2, "through@>=2.2.7 <3", through@^2.3.6, through@~2.3, through@~2.3.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +timed-out@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +timers-browserify@^2.0.4: + version "2.0.12" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" + integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== + dependencies: + setimmediate "^1.0.4" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== + +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== + +unicode-property-aliases-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +unix-crypt-td-js@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz#4912dfad1c8aeb7d20fa0a39e4c31918c1d5d5dd" + integrity sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw== + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +untildify@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-3.0.3.tgz#1e7b42b140bcfd922b22e70ca1265bfe3634c7c9" + integrity sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA== + +unzip-response@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" + integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.0.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-compile-cache@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +vary@^1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +vinyl-file@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365" + integrity sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U= + dependencies: + graceful-fs "^4.1.2" + pify "^2.3.0" + strip-bom-buf "^1.0.0" + strip-bom-stream "^2.0.0" + vinyl "^2.0.1" + +vinyl@^2.0.1, vinyl@^2.2.0, vinyl@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" + integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + +watchpack-chokidar2@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" + integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== + dependencies: + chokidar "^2.1.8" + +watchpack@^1.7.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" + integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== + dependencies: + graceful-fs "^4.1.2" + neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.1" + watchpack-chokidar2 "^2.0.1" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +webpack-cli@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.0.tgz#dc43e6e0f80dd52e89cbf73d5294bcd7ad6eb343" + integrity sha512-n/jZZBMzVEl4PYIBs+auy2WI0WTQ74EnJDiyD98O2JZY6IVIHJNitkYp/uTXOviIOMfgzrNvC9foKv/8o8KSZw== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^1.1.0" + "@webpack-cli/info" "^1.4.0" + "@webpack-cli/serve" "^1.6.0" + colorette "^2.0.14" + commander "^7.0.0" + execa "^5.0.0" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^2.2.0" + rechoir "^0.7.0" + v8-compile-cache "^2.2.0" + webpack-merge "^5.7.3" + +webpack-merge@^5.7.3: + version "5.8.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + +webpack-sources@^1.4.0, webpack-sources@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^4.42.0: + version "4.46.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" + integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.5.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.7.4" + webpack-sources "^1.4.1" + +websocket-driver@>=0.5.1: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + +with-open-file@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/with-open-file/-/with-open-file-0.1.7.tgz#e2de8d974e8a8ae6e58886be4fe8e7465b58a729" + integrity sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA== + dependencies: + p-finally "^1.0.0" + p-try "^2.1.0" + pify "^4.0.1" + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== + dependencies: + errno "~0.1.7" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yeoman-environment@^2.10.3, yeoman-environment@^2.9.5: + version "2.10.3" + resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.10.3.tgz#9d8f42b77317414434cc0e51fb006a4bdd54688e" + integrity sha512-pLIhhU9z/G+kjOXmJ2bPFm3nejfbH+f1fjYRSOteEXDBrv1EoJE/e+kuHixSXfCYfTkxjYsvRaDX+1QykLCnpQ== + dependencies: + chalk "^2.4.1" + debug "^3.1.0" + diff "^3.5.0" + escape-string-regexp "^1.0.2" + execa "^4.0.0" + globby "^8.0.1" + grouped-queue "^1.1.0" + inquirer "^7.1.0" + is-scoped "^1.0.0" + lodash "^4.17.10" + log-symbols "^2.2.0" + mem-fs "^1.1.0" + mem-fs-editor "^6.0.0" + npm-api "^1.0.0" + semver "^7.1.3" + strip-ansi "^4.0.0" + text-table "^0.2.0" + untildify "^3.0.3" + yeoman-generator "^4.8.2" + +yeoman-generator@^4.12.0, yeoman-generator@^4.8.2: + version "4.13.0" + resolved "https://registry.yarnpkg.com/yeoman-generator/-/yeoman-generator-4.13.0.tgz#a6caeed8491fceea1f84f53e31795f25888b4672" + integrity sha512-f2/5N5IR3M2Ozm+QocvZQudlQITv2DwI6Mcxfy7R7gTTzaKgvUpgo/pQMJ+WQKm0KN0YMWCFOZpj0xFGxevc1w== + dependencies: + async "^2.6.2" + chalk "^2.4.2" + cli-table "^0.3.1" + cross-spawn "^6.0.5" + dargs "^6.1.0" + dateformat "^3.0.3" + debug "^4.1.1" + diff "^4.0.1" + error "^7.0.2" + find-up "^3.0.0" + github-username "^3.0.0" + istextorbinary "^2.5.1" + lodash "^4.17.11" + make-dir "^3.0.0" + mem-fs-editor "^7.0.1" + minimist "^1.2.5" + pretty-bytes "^5.2.0" + read-chunk "^3.2.0" + read-pkg-up "^5.0.0" + rimraf "^2.6.3" + run-async "^2.0.0" + semver "^7.2.1" + shelljs "^0.8.4" + text-table "^0.2.0" + through2 "^3.0.1" + optionalDependencies: + grouped-queue "^1.1.0" + yeoman-environment "^2.9.5" diff --git a/util/httptransp.js b/util/httptransp.js new file mode 100644 index 0000000..88e4a8b --- /dev/null +++ b/util/httptransp.js @@ -0,0 +1,5447 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +exports.__esModule = true; +var hw_transport_1 = require("@ledgerhq/hw-transport"); +var errors_1 = require("@ledgerhq/errors"); +var axios_1 = require("axios"); +var logs_1 = require("@ledgerhq/logs"); +var HttpTransport = /** @class */ (function (_super) { + __extends(HttpTransport, _super); + function HttpTransport(url) { + var _this = _super.call(this) || this; + _this.url = url; + return _this; + } + HttpTransport.open = function (url, timeout) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + // await HttpTransport.check(url, timeout); + return [2 /*return*/, new HttpTransport(url)]; + }); + }); + }; + HttpTransport.prototype.exchange = function (apdu) { + return __awaiter(this, void 0, void 0, function () { + var apduHex, response, body; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + apduHex = apdu.toString("hex"); + logs_1.log("apdu", "=> " + apduHex); + return [4 /*yield*/, axios_1["default"]({ + method: "POST", + url: this.url, + headers: { + Accept: "application/json", + "Content-Type": "application/json" + }, + data: { + data: apduHex + } + })]; + case 1: + response = _a.sent(); + if (response.status !== 200) { + throw errors_1.TransportError("failed to communicate to server. code=" + response.status, "HttpTransportStatus" + response.status); + } + return [4 /*yield*/, response.data]; + case 2: + body = (_a.sent()); + if (body.error) + throw body.error; + logs_1.log("apdu", "<= " + JSON.stringify(body)); + return [2 /*return*/, Buffer.from(body.data, "hex")]; + } + }); + }); + }; + HttpTransport.prototype.setScrambleKey = function () { }; + HttpTransport.prototype.close = function () { + return Promise.resolve(); + }; + HttpTransport.list = function () { return Promise.resolve([]); }; + HttpTransport.listen = function (_observer) { return ({ + unsubscribe: function () { } + }); }; + return HttpTransport; +}(hw_transport_1["default"])); +exports["default"] = HttpTransport; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":4,"@ledgerhq/hw-transport":5,"@ledgerhq/logs":6,"axios":7,"buffer":37}],2:[function(require,module,exports){ +var HttpTransp = require("./common.js").default; + +function load_modules(){ + window.HttpTransp = HttpTransp; +} + +load_modules(); + +},{"./common.js":1}],3:[function(require,module,exports){ +"use strict"; +/* eslint-disable no-continue */ +/* eslint-disable no-unused-vars */ +/* eslint-disable no-param-reassign */ +/* eslint-disable no-prototype-builtins */ +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +exports.__esModule = true; +exports.serializeError = exports.deserializeError = exports.createCustomErrorClass = exports.addCustomErrorDeserializer = void 0; +var errorClasses = {}; +var deserializers = {}; +var addCustomErrorDeserializer = function (name, deserializer) { + deserializers[name] = deserializer; +}; +exports.addCustomErrorDeserializer = addCustomErrorDeserializer; +var createCustomErrorClass = function (name) { + var C = function CustomError(message, fields) { + Object.assign(this, fields); + this.name = name; + this.message = message || name; + this.stack = new Error().stack; + }; + C.prototype = new Error(); + errorClasses[name] = C; + return C; +}; +exports.createCustomErrorClass = createCustomErrorClass; +// inspired from https://github.com/programble/errio/blob/master/index.js +var deserializeError = function (object) { + if (typeof object === "object" && object) { + try { + // $FlowFixMe FIXME HACK + var msg = JSON.parse(object.message); + if (msg.message && msg.name) { + object = msg; + } + } + catch (e) { + // nothing + } + var error = void 0; + if (typeof object.name === "string") { + var name_1 = object.name; + var des = deserializers[name_1]; + if (des) { + error = des(object); + } + else { + var constructor = name_1 === "Error" ? Error : errorClasses[name_1]; + if (!constructor) { + console.warn("deserializing an unknown class '" + name_1 + "'"); + constructor = exports.createCustomErrorClass(name_1); + } + error = Object.create(constructor.prototype); + try { + for (var prop in object) { + if (object.hasOwnProperty(prop)) { + error[prop] = object[prop]; + } + } + } + catch (e) { + // sometimes setting a property can fail (e.g. .name) + } + } + } + else { + error = new Error(object.message); + } + if (!error.stack && Error.captureStackTrace) { + Error.captureStackTrace(error, exports.deserializeError); + } + return error; + } + return new Error(String(object)); +}; +exports.deserializeError = deserializeError; +// inspired from https://github.com/sindresorhus/serialize-error/blob/master/index.js +var serializeError = function (value) { + if (!value) + return value; + if (typeof value === "object") { + return destroyCircular(value, []); + } + if (typeof value === "function") { + return "[Function: " + (value.name || "anonymous") + "]"; + } + return value; +}; +exports.serializeError = serializeError; +// https://www.npmjs.com/package/destroy-circular +function destroyCircular(from, seen) { + var e_1, _a; + var to = {}; + seen.push(from); + try { + for (var _b = __values(Object.keys(from)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + var value = from[key]; + if (typeof value === "function") { + continue; + } + if (!value || typeof value !== "object") { + to[key] = value; + continue; + } + if (seen.indexOf(from[key]) === -1) { + to[key] = destroyCircular(from[key], seen.slice(0)); + continue; + } + to[key] = "[Circular]"; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b["return"])) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (typeof from.name === "string") { + to.name = from.name; + } + if (typeof from.message === "string") { + to.message = from.message; + } + if (typeof from.stack === "string") { + to.stack = from.stack; + } + return to; +} + +},{}],4:[function(require,module,exports){ +"use strict"; +exports.__esModule = true; +exports.NotEnoughBalanceInParentAccount = exports.NotEnoughBalanceToDelegate = exports.NotEnoughBalance = exports.NoAddressesFound = exports.NetworkDown = exports.ManagerUninstallBTCDep = exports.ManagerNotEnoughSpaceError = exports.ManagerFirmwareNotEnoughSpaceError = exports.ManagerDeviceLockedError = exports.ManagerAppDepUninstallRequired = exports.ManagerAppDepInstallRequired = exports.ManagerAppRelyOnBTCError = exports.ManagerAppAlreadyInstalledError = exports.LedgerAPINotAvailable = exports.LedgerAPIErrorWithMessage = exports.LedgerAPIError = exports.UnknownMCU = exports.LatestMCUInstalledError = exports.InvalidAddressBecauseDestinationIsAlsoSource = exports.InvalidAddress = exports.InvalidXRPTag = exports.HardResetFail = exports.FirmwareNotRecognized = exports.FeeEstimationFailed = exports.EthAppPleaseEnableContractData = exports.EnpointConfigError = exports.DisconnectedDeviceDuringOperation = exports.DisconnectedDevice = exports.DeviceSocketNoBulkStatus = exports.DeviceSocketFail = exports.DeviceNameInvalid = exports.DeviceHalted = exports.DeviceInOSUExpected = exports.DeviceOnDashboardUnexpected = exports.DeviceOnDashboardExpected = exports.DeviceNotGenuineError = exports.DeviceGenuineSocketEarlyClose = exports.DeviceAppVerifyNotSupported = exports.CurrencyNotSupported = exports.CashAddrNotSupported = exports.CantOpenDevice = exports.BtcUnmatchedApp = exports.BluetoothRequired = exports.AmountRequired = exports.AccountNotSupported = exports.AccountNameRequiredError = exports.addCustomErrorDeserializer = exports.createCustomErrorClass = exports.deserializeError = exports.serializeError = void 0; +exports.StatusCodes = exports.TransportError = exports.DBNotReset = exports.DBWrongPassword = exports.NoDBPathGiven = exports.FirmwareOrAppUpdateRequired = exports.LedgerAPI5xx = exports.LedgerAPI4xx = exports.GenuineCheckFailed = exports.PairingFailed = exports.SyncError = exports.FeeTooHigh = exports.FeeRequired = exports.FeeNotLoaded = exports.CantScanQRCode = exports.ETHAddressNonEIP = exports.WrongAppForCurrency = exports.WrongDeviceForAccount = exports.WebsocketConnectionFailed = exports.WebsocketConnectionError = exports.DeviceShouldStayInApp = exports.TransportWebUSBGestureRequired = exports.TransportRaceCondition = exports.TransportInterfaceNotAvailable = exports.TransportOpenUserCancelled = exports.UserRefusedOnDevice = exports.UserRefusedAllowManager = exports.UserRefusedFirmwareUpdate = exports.UserRefusedAddress = exports.UserRefusedDeviceNameChange = exports.UpdateYourApp = exports.UpdateIncorrectSig = exports.UpdateIncorrectHash = exports.UpdateFetchFileFail = exports.UnavailableTezosOriginatedAccountSend = exports.UnavailableTezosOriginatedAccountReceive = exports.RecipientRequired = exports.MCUNotGenuineToDashboard = exports.UnexpectedBootloader = exports.TimeoutTagged = exports.RecommendUndelegation = exports.RecommendSubAccountsToEmpty = exports.PasswordIncorrectError = exports.PasswordsDontMatchError = exports.GasLessThanEstimate = exports.NotSupportedLegacyAddress = exports.NotEnoughGas = exports.NoAccessToCamera = exports.NotEnoughBalanceBecauseDestinationNotCreated = exports.NotEnoughSpendableBalance = void 0; +exports.TransportStatusError = exports.getAltStatusMessage = void 0; +var helpers_1 = require("./helpers"); +exports.serializeError = helpers_1.serializeError; +exports.deserializeError = helpers_1.deserializeError; +exports.createCustomErrorClass = helpers_1.createCustomErrorClass; +exports.addCustomErrorDeserializer = helpers_1.addCustomErrorDeserializer; +exports.AccountNameRequiredError = helpers_1.createCustomErrorClass("AccountNameRequired"); +exports.AccountNotSupported = helpers_1.createCustomErrorClass("AccountNotSupported"); +exports.AmountRequired = helpers_1.createCustomErrorClass("AmountRequired"); +exports.BluetoothRequired = helpers_1.createCustomErrorClass("BluetoothRequired"); +exports.BtcUnmatchedApp = helpers_1.createCustomErrorClass("BtcUnmatchedApp"); +exports.CantOpenDevice = helpers_1.createCustomErrorClass("CantOpenDevice"); +exports.CashAddrNotSupported = helpers_1.createCustomErrorClass("CashAddrNotSupported"); +exports.CurrencyNotSupported = helpers_1.createCustomErrorClass("CurrencyNotSupported"); +exports.DeviceAppVerifyNotSupported = helpers_1.createCustomErrorClass("DeviceAppVerifyNotSupported"); +exports.DeviceGenuineSocketEarlyClose = helpers_1.createCustomErrorClass("DeviceGenuineSocketEarlyClose"); +exports.DeviceNotGenuineError = helpers_1.createCustomErrorClass("DeviceNotGenuine"); +exports.DeviceOnDashboardExpected = helpers_1.createCustomErrorClass("DeviceOnDashboardExpected"); +exports.DeviceOnDashboardUnexpected = helpers_1.createCustomErrorClass("DeviceOnDashboardUnexpected"); +exports.DeviceInOSUExpected = helpers_1.createCustomErrorClass("DeviceInOSUExpected"); +exports.DeviceHalted = helpers_1.createCustomErrorClass("DeviceHalted"); +exports.DeviceNameInvalid = helpers_1.createCustomErrorClass("DeviceNameInvalid"); +exports.DeviceSocketFail = helpers_1.createCustomErrorClass("DeviceSocketFail"); +exports.DeviceSocketNoBulkStatus = helpers_1.createCustomErrorClass("DeviceSocketNoBulkStatus"); +exports.DisconnectedDevice = helpers_1.createCustomErrorClass("DisconnectedDevice"); +exports.DisconnectedDeviceDuringOperation = helpers_1.createCustomErrorClass("DisconnectedDeviceDuringOperation"); +exports.EnpointConfigError = helpers_1.createCustomErrorClass("EnpointConfig"); +exports.EthAppPleaseEnableContractData = helpers_1.createCustomErrorClass("EthAppPleaseEnableContractData"); +exports.FeeEstimationFailed = helpers_1.createCustomErrorClass("FeeEstimationFailed"); +exports.FirmwareNotRecognized = helpers_1.createCustomErrorClass("FirmwareNotRecognized"); +exports.HardResetFail = helpers_1.createCustomErrorClass("HardResetFail"); +exports.InvalidXRPTag = helpers_1.createCustomErrorClass("InvalidXRPTag"); +exports.InvalidAddress = helpers_1.createCustomErrorClass("InvalidAddress"); +exports.InvalidAddressBecauseDestinationIsAlsoSource = helpers_1.createCustomErrorClass("InvalidAddressBecauseDestinationIsAlsoSource"); +exports.LatestMCUInstalledError = helpers_1.createCustomErrorClass("LatestMCUInstalledError"); +exports.UnknownMCU = helpers_1.createCustomErrorClass("UnknownMCU"); +exports.LedgerAPIError = helpers_1.createCustomErrorClass("LedgerAPIError"); +exports.LedgerAPIErrorWithMessage = helpers_1.createCustomErrorClass("LedgerAPIErrorWithMessage"); +exports.LedgerAPINotAvailable = helpers_1.createCustomErrorClass("LedgerAPINotAvailable"); +exports.ManagerAppAlreadyInstalledError = helpers_1.createCustomErrorClass("ManagerAppAlreadyInstalled"); +exports.ManagerAppRelyOnBTCError = helpers_1.createCustomErrorClass("ManagerAppRelyOnBTC"); +exports.ManagerAppDepInstallRequired = helpers_1.createCustomErrorClass("ManagerAppDepInstallRequired"); +exports.ManagerAppDepUninstallRequired = helpers_1.createCustomErrorClass("ManagerAppDepUninstallRequired"); +exports.ManagerDeviceLockedError = helpers_1.createCustomErrorClass("ManagerDeviceLocked"); +exports.ManagerFirmwareNotEnoughSpaceError = helpers_1.createCustomErrorClass("ManagerFirmwareNotEnoughSpace"); +exports.ManagerNotEnoughSpaceError = helpers_1.createCustomErrorClass("ManagerNotEnoughSpace"); +exports.ManagerUninstallBTCDep = helpers_1.createCustomErrorClass("ManagerUninstallBTCDep"); +exports.NetworkDown = helpers_1.createCustomErrorClass("NetworkDown"); +exports.NoAddressesFound = helpers_1.createCustomErrorClass("NoAddressesFound"); +exports.NotEnoughBalance = helpers_1.createCustomErrorClass("NotEnoughBalance"); +exports.NotEnoughBalanceToDelegate = helpers_1.createCustomErrorClass("NotEnoughBalanceToDelegate"); +exports.NotEnoughBalanceInParentAccount = helpers_1.createCustomErrorClass("NotEnoughBalanceInParentAccount"); +exports.NotEnoughSpendableBalance = helpers_1.createCustomErrorClass("NotEnoughSpendableBalance"); +exports.NotEnoughBalanceBecauseDestinationNotCreated = helpers_1.createCustomErrorClass("NotEnoughBalanceBecauseDestinationNotCreated"); +exports.NoAccessToCamera = helpers_1.createCustomErrorClass("NoAccessToCamera"); +exports.NotEnoughGas = helpers_1.createCustomErrorClass("NotEnoughGas"); +exports.NotSupportedLegacyAddress = helpers_1.createCustomErrorClass("NotSupportedLegacyAddress"); +exports.GasLessThanEstimate = helpers_1.createCustomErrorClass("GasLessThanEstimate"); +exports.PasswordsDontMatchError = helpers_1.createCustomErrorClass("PasswordsDontMatch"); +exports.PasswordIncorrectError = helpers_1.createCustomErrorClass("PasswordIncorrect"); +exports.RecommendSubAccountsToEmpty = helpers_1.createCustomErrorClass("RecommendSubAccountsToEmpty"); +exports.RecommendUndelegation = helpers_1.createCustomErrorClass("RecommendUndelegation"); +exports.TimeoutTagged = helpers_1.createCustomErrorClass("TimeoutTagged"); +exports.UnexpectedBootloader = helpers_1.createCustomErrorClass("UnexpectedBootloader"); +exports.MCUNotGenuineToDashboard = helpers_1.createCustomErrorClass("MCUNotGenuineToDashboard"); +exports.RecipientRequired = helpers_1.createCustomErrorClass("RecipientRequired"); +exports.UnavailableTezosOriginatedAccountReceive = helpers_1.createCustomErrorClass("UnavailableTezosOriginatedAccountReceive"); +exports.UnavailableTezosOriginatedAccountSend = helpers_1.createCustomErrorClass("UnavailableTezosOriginatedAccountSend"); +exports.UpdateFetchFileFail = helpers_1.createCustomErrorClass("UpdateFetchFileFail"); +exports.UpdateIncorrectHash = helpers_1.createCustomErrorClass("UpdateIncorrectHash"); +exports.UpdateIncorrectSig = helpers_1.createCustomErrorClass("UpdateIncorrectSig"); +exports.UpdateYourApp = helpers_1.createCustomErrorClass("UpdateYourApp"); +exports.UserRefusedDeviceNameChange = helpers_1.createCustomErrorClass("UserRefusedDeviceNameChange"); +exports.UserRefusedAddress = helpers_1.createCustomErrorClass("UserRefusedAddress"); +exports.UserRefusedFirmwareUpdate = helpers_1.createCustomErrorClass("UserRefusedFirmwareUpdate"); +exports.UserRefusedAllowManager = helpers_1.createCustomErrorClass("UserRefusedAllowManager"); +exports.UserRefusedOnDevice = helpers_1.createCustomErrorClass("UserRefusedOnDevice"); // TODO rename because it's just for transaction refusal +exports.TransportOpenUserCancelled = helpers_1.createCustomErrorClass("TransportOpenUserCancelled"); +exports.TransportInterfaceNotAvailable = helpers_1.createCustomErrorClass("TransportInterfaceNotAvailable"); +exports.TransportRaceCondition = helpers_1.createCustomErrorClass("TransportRaceCondition"); +exports.TransportWebUSBGestureRequired = helpers_1.createCustomErrorClass("TransportWebUSBGestureRequired"); +exports.DeviceShouldStayInApp = helpers_1.createCustomErrorClass("DeviceShouldStayInApp"); +exports.WebsocketConnectionError = helpers_1.createCustomErrorClass("WebsocketConnectionError"); +exports.WebsocketConnectionFailed = helpers_1.createCustomErrorClass("WebsocketConnectionFailed"); +exports.WrongDeviceForAccount = helpers_1.createCustomErrorClass("WrongDeviceForAccount"); +exports.WrongAppForCurrency = helpers_1.createCustomErrorClass("WrongAppForCurrency"); +exports.ETHAddressNonEIP = helpers_1.createCustomErrorClass("ETHAddressNonEIP"); +exports.CantScanQRCode = helpers_1.createCustomErrorClass("CantScanQRCode"); +exports.FeeNotLoaded = helpers_1.createCustomErrorClass("FeeNotLoaded"); +exports.FeeRequired = helpers_1.createCustomErrorClass("FeeRequired"); +exports.FeeTooHigh = helpers_1.createCustomErrorClass("FeeTooHigh"); +exports.SyncError = helpers_1.createCustomErrorClass("SyncError"); +exports.PairingFailed = helpers_1.createCustomErrorClass("PairingFailed"); +exports.GenuineCheckFailed = helpers_1.createCustomErrorClass("GenuineCheckFailed"); +exports.LedgerAPI4xx = helpers_1.createCustomErrorClass("LedgerAPI4xx"); +exports.LedgerAPI5xx = helpers_1.createCustomErrorClass("LedgerAPI5xx"); +exports.FirmwareOrAppUpdateRequired = helpers_1.createCustomErrorClass("FirmwareOrAppUpdateRequired"); +// db stuff, no need to translate +exports.NoDBPathGiven = helpers_1.createCustomErrorClass("NoDBPathGiven"); +exports.DBWrongPassword = helpers_1.createCustomErrorClass("DBWrongPassword"); +exports.DBNotReset = helpers_1.createCustomErrorClass("DBNotReset"); +/** + * TransportError is used for any generic transport errors. + * e.g. Error thrown when data received by exchanges are incorrect or if exchanged failed to communicate with the device for various reason. + */ +function TransportError(message, id) { + this.name = "TransportError"; + this.message = message; + this.stack = new Error().stack; + this.id = id; +} +exports.TransportError = TransportError; +TransportError.prototype = new Error(); +helpers_1.addCustomErrorDeserializer("TransportError", function (e) { return new TransportError(e.message, e.id); }); +exports.StatusCodes = { + PIN_REMAINING_ATTEMPTS: 0x63c0, + INCORRECT_LENGTH: 0x6700, + MISSING_CRITICAL_PARAMETER: 0x6800, + COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 0x6981, + SECURITY_STATUS_NOT_SATISFIED: 0x6982, + CONDITIONS_OF_USE_NOT_SATISFIED: 0x6985, + INCORRECT_DATA: 0x6a80, + NOT_ENOUGH_MEMORY_SPACE: 0x6a84, + REFERENCED_DATA_NOT_FOUND: 0x6a88, + FILE_ALREADY_EXISTS: 0x6a89, + INCORRECT_P1_P2: 0x6b00, + INS_NOT_SUPPORTED: 0x6d00, + CLA_NOT_SUPPORTED: 0x6e00, + TECHNICAL_PROBLEM: 0x6f00, + OK: 0x9000, + MEMORY_PROBLEM: 0x9240, + NO_EF_SELECTED: 0x9400, + INVALID_OFFSET: 0x9402, + FILE_NOT_FOUND: 0x9404, + INCONSISTENT_FILE: 0x9408, + ALGORITHM_NOT_SUPPORTED: 0x9484, + INVALID_KCV: 0x9485, + CODE_NOT_INITIALIZED: 0x9802, + ACCESS_CONDITION_NOT_FULFILLED: 0x9804, + CONTRADICTION_SECRET_CODE_STATUS: 0x9808, + CONTRADICTION_INVALIDATION: 0x9810, + CODE_BLOCKED: 0x9840, + MAX_VALUE_REACHED: 0x9850, + GP_AUTH_FAILED: 0x6300, + LICENSING: 0x6f42, + HALTED: 0x6faa +}; +function getAltStatusMessage(code) { + switch (code) { + // improve text of most common errors + case 0x6700: + return "Incorrect length"; + case 0x6800: + return "Missing critical parameter"; + case 0x6982: + return "Security not satisfied (dongle locked or have invalid access rights)"; + case 0x6985: + return "Condition of use not satisfied (denied by the user?)"; + case 0x6a80: + return "Invalid data received"; + case 0x6b00: + return "Invalid parameter received"; + } + if (0x6f00 <= code && code <= 0x6fff) { + return "Internal error, please report"; + } +} +exports.getAltStatusMessage = getAltStatusMessage; +/** + * Error thrown when a device returned a non success status. + * the error.statusCode is one of the `StatusCodes` exported by this library. + */ +function TransportStatusError(statusCode) { + this.name = "TransportStatusError"; + var statusText = Object.keys(exports.StatusCodes).find(function (k) { return exports.StatusCodes[k] === statusCode; }) || + "UNKNOWN_ERROR"; + var smsg = getAltStatusMessage(statusCode) || statusText; + var statusCodeStr = statusCode.toString(16); + this.message = "Ledger device: " + smsg + " (0x" + statusCodeStr + ")"; + this.stack = new Error().stack; + this.statusCode = statusCode; + this.statusText = statusText; +} +exports.TransportStatusError = TransportStatusError; +TransportStatusError.prototype = new Error(); +helpers_1.addCustomErrorDeserializer("TransportStatusError", function (e) { return new TransportStatusError(e.statusCode); }); + +},{"./helpers":3}],5:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.getAltStatusMessage = exports.StatusCodes = exports.TransportStatusError = exports.TransportError = void 0; +var events_1 = __importDefault(require("events")); +var errors_1 = require("@ledgerhq/errors"); +exports.TransportError = errors_1.TransportError; +exports.StatusCodes = errors_1.StatusCodes; +exports.getAltStatusMessage = errors_1.getAltStatusMessage; +exports.TransportStatusError = errors_1.TransportStatusError; +/** + * Transport defines the generic interface to share between node/u2f impl + * A **Descriptor** is a parametric type that is up to be determined for the implementation. + * it can be for instance an ID, an file path, a URL,... + */ +var Transport = /** @class */ (function () { + function Transport() { + var _this = this; + this.exchangeTimeout = 30000; + this.unresponsiveTimeout = 15000; + this.deviceModel = null; + this._events = new events_1["default"](); + /** + * wrapper on top of exchange to simplify work of the implementation. + * @param cla + * @param ins + * @param p1 + * @param p2 + * @param data + * @param statusList is a list of accepted status code (shorts). [0x9000] by default + * @return a Promise of response buffer + */ + this.send = function (cla, ins, p1, p2, data, statusList) { + if (data === void 0) { data = Buffer.alloc(0); } + if (statusList === void 0) { statusList = [errors_1.StatusCodes.OK]; } + return __awaiter(_this, void 0, void 0, function () { + var response, sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (data.length >= 256) { + throw new errors_1.TransportError("data.length exceed 256 bytes limit. Got: " + data.length, "DataLengthTooBig"); + } + return [4 /*yield*/, this.exchange(Buffer.concat([ + Buffer.from([cla, ins, p1, p2]), + Buffer.from([data.length]), + data, + ]))]; + case 1: + response = _a.sent(); + sw = response.readUInt16BE(response.length - 2); + if (!statusList.some(function (s) { return s === sw; })) { + throw new errors_1.TransportStatusError(sw); + } + return [2 /*return*/, response]; + } + }); + }); + }; + this.exchangeAtomicImpl = function (f) { return __awaiter(_this, void 0, void 0, function () { + var resolveBusy, busyPromise, unresponsiveReached, timeout, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.exchangeBusyPromise) { + throw new errors_1.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect."); + } + busyPromise = new Promise(function (r) { + resolveBusy = r; + }); + this.exchangeBusyPromise = busyPromise; + unresponsiveReached = false; + timeout = setTimeout(function () { + unresponsiveReached = true; + _this.emit("unresponsive"); + }, this.unresponsiveTimeout); + _a.label = 1; + case 1: + _a.trys.push([1, , 3, 4]); + return [4 /*yield*/, f()]; + case 2: + res = _a.sent(); + if (unresponsiveReached) { + this.emit("responsive"); + } + return [2 /*return*/, res]; + case 3: + clearTimeout(timeout); + if (resolveBusy) + resolveBusy(); + this.exchangeBusyPromise = null; + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); }; + this._appAPIlock = null; + } + /** + * low level api to communicate with the device + * This method is for implementations to implement but should not be directly called. + * Instead, the recommanded way is to use send() method + * @param apdu the data to send + * @return a Promise of response data + */ + Transport.prototype.exchange = function (_apdu) { + throw new Error("exchange not implemented"); + }; + /** + * set the "scramble key" for the next exchanges with the device. + * Each App can have a different scramble key and they internally will set it at instanciation. + * @param key the scramble key + */ + Transport.prototype.setScrambleKey = function (_key) { }; + /** + * close the exchange with the device. + * @return a Promise that ends when the transport is closed. + */ + Transport.prototype.close = function () { + return Promise.resolve(); + }; + /** + * Listen to an event on an instance of transport. + * Transport implementation can have specific events. Here is the common events: + * * `"disconnect"` : triggered if Transport is disconnected + */ + Transport.prototype.on = function (eventName, cb) { + this._events.on(eventName, cb); + }; + /** + * Stop listening to an event on an instance of transport. + */ + Transport.prototype.off = function (eventName, cb) { + this._events.removeListener(eventName, cb); + }; + Transport.prototype.emit = function (event) { + var _a; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + (_a = this._events).emit.apply(_a, __spreadArray([event], __read(args), false)); + }; + /** + * Enable or not logs of the binary exchange + */ + Transport.prototype.setDebugMode = function () { + console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore."); + }; + /** + * Set a timeout (in milliseconds) for the exchange call. Only some transport might implement it. (e.g. U2F) + */ + Transport.prototype.setExchangeTimeout = function (exchangeTimeout) { + this.exchangeTimeout = exchangeTimeout; + }; + /** + * Define the delay before emitting "unresponsive" on an exchange that does not respond + */ + Transport.prototype.setExchangeUnresponsiveTimeout = function (unresponsiveTimeout) { + this.unresponsiveTimeout = unresponsiveTimeout; + }; + /** + * create() allows to open the first descriptor available or + * throw if there is none or if timeout is reached. + * This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase) + * @example + TransportFoo.create().then(transport => ...) + */ + Transport.create = function (openTimeout, listenTimeout) { + var _this = this; + if (openTimeout === void 0) { openTimeout = 3000; } + return new Promise(function (resolve, reject) { + var found = false; + var sub = _this.listen({ + next: function (e) { + found = true; + if (sub) + sub.unsubscribe(); + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + _this.open(e.descriptor, openTimeout).then(resolve, reject); + }, + error: function (e) { + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + reject(e); + }, + complete: function () { + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + if (!found) { + reject(new errors_1.TransportError(_this.ErrorMessage_NoDeviceFound, "NoDeviceFound")); + } + } + }); + var listenTimeoutId = listenTimeout + ? setTimeout(function () { + sub.unsubscribe(); + reject(new errors_1.TransportError(_this.ErrorMessage_ListenTimeout, "ListenTimeout")); + }, listenTimeout) + : null; + }); + }; + Transport.prototype.decorateAppAPIMethods = function (self, methods, scrambleKey) { + var e_1, _a; + try { + for (var methods_1 = __values(methods), methods_1_1 = methods_1.next(); !methods_1_1.done; methods_1_1 = methods_1.next()) { + var methodName = methods_1_1.value; + self[methodName] = this.decorateAppAPIMethod(methodName, self[methodName], self, scrambleKey); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (methods_1_1 && !methods_1_1.done && (_a = methods_1["return"])) _a.call(methods_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + Transport.prototype.decorateAppAPIMethod = function (methodName, f, ctx, scrambleKey) { + var _this = this; + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(_this, void 0, void 0, function () { + var _appAPIlock; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _appAPIlock = this._appAPIlock; + if (_appAPIlock) { + return [2 /*return*/, Promise.reject(new errors_1.TransportError("Ledger Device is busy (lock " + _appAPIlock + ")", "TransportLocked"))]; + } + _a.label = 1; + case 1: + _a.trys.push([1, , 3, 4]); + this._appAPIlock = methodName; + this.setScrambleKey(scrambleKey); + return [4 /*yield*/, f.apply(ctx, args)]; + case 2: return [2 /*return*/, _a.sent()]; + case 3: + this._appAPIlock = null; + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + }; + Transport.ErrorMessage_ListenTimeout = "No Ledger device found (timeout)"; + Transport.ErrorMessage_NoDeviceFound = "No Ledger device found"; + return Transport; +}()); +exports["default"] = Transport; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":4,"buffer":37,"events":38}],6:[function(require,module,exports){ +"use strict"; +exports.__esModule = true; +exports.listen = exports.log = void 0; +var id = 0; +var subscribers = []; +/** + * log something + * @param type a namespaced identifier of the log (it is not a level like "debug", "error" but more like "apdu-in", "apdu-out", etc...) + * @param message a clear message of the log associated to the type + */ +var log = function (type, message, data) { + var obj = { + type: type, + id: String(++id), + date: new Date() + }; + if (message) + obj.message = message; + if (data) + obj.data = data; + dispatch(obj); +}; +exports.log = log; +/** + * listen to logs. + * @param cb that is called for each future log() with the Log object + * @return a function that can be called to unsubscribe the listener + */ +var listen = function (cb) { + subscribers.push(cb); + return function () { + var i = subscribers.indexOf(cb); + if (i !== -1) { + // equivalent of subscribers.splice(i, 1) // https://twitter.com/Rich_Harris/status/1125850391155965952 + subscribers[i] = subscribers[subscribers.length - 1]; + subscribers.pop(); + } + }; +}; +exports.listen = listen; +function dispatch(log) { + for (var i = 0; i < subscribers.length; i++) { + try { + subscribers[i](log); + } + catch (e) { + console.error(e); + } + } +} +if (typeof window !== "undefined") { + window.__ledgerLogsListen = exports.listen; +} + +},{}],7:[function(require,module,exports){ +module.exports = require('./lib/axios'); +},{"./lib/axios":9}],8:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); +var settle = require('./../core/settle'); +var cookies = require('./../helpers/cookies'); +var buildURL = require('./../helpers/buildURL'); +var buildFullPath = require('../core/buildFullPath'); +var parseHeaders = require('./../helpers/parseHeaders'); +var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); +var createError = require('../core/createError'); +var defaults = require('../defaults'); +var Cancel = require('../cancel/Cancel'); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + var responseType = config.responseType; + var onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + var fullPath = buildFullPath(config.baseURL, config.url); + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(createError('Request aborted', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; + var transitional = config.transitional || defaults.transitional; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(createError( + timeoutErrorMessage, + config, + transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = function(cancel) { + if (!request) { + return; + } + reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel); + request.abort(); + request = null; + }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } + } + + if (!requestData) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; + +},{"../cancel/Cancel":10,"../core/buildFullPath":15,"../core/createError":16,"../defaults":22,"./../core/settle":20,"./../helpers/buildURL":25,"./../helpers/cookies":27,"./../helpers/isURLSameOrigin":30,"./../helpers/parseHeaders":32,"./../utils":35}],9:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var bind = require('./helpers/bind'); +var Axios = require('./core/Axios'); +var mergeConfig = require('./core/mergeConfig'); +var defaults = require('./defaults'); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +var axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.Cancel = require('./cancel/Cancel'); +axios.CancelToken = require('./cancel/CancelToken'); +axios.isCancel = require('./cancel/isCancel'); +axios.VERSION = require('./env/data').version; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = require('./helpers/spread'); + +// Expose isAxiosError +axios.isAxiosError = require('./helpers/isAxiosError'); + +module.exports = axios; + +// Allow use of default import syntax in TypeScript +module.exports.default = axios; + +},{"./cancel/Cancel":10,"./cancel/CancelToken":11,"./cancel/isCancel":12,"./core/Axios":13,"./core/mergeConfig":19,"./defaults":22,"./env/data":23,"./helpers/bind":24,"./helpers/isAxiosError":29,"./helpers/spread":33,"./utils":35}],10:[function(require,module,exports){ +'use strict'; + +/** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ +function Cancel(message) { + this.message = message; +} + +Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); +}; + +Cancel.prototype.__CANCEL__ = true; + +module.exports = Cancel; + +},{}],11:[function(require,module,exports){ +'use strict'; + +var Cancel = require('./Cancel'); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ +function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + + // eslint-disable-next-line func-names + this.promise.then(function(cancel) { + if (!token._listeners) return; + + var i; + var l = token._listeners.length; + + for (i = 0; i < l; i++) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = function(onfulfilled) { + var _resolve; + // eslint-disable-next-line func-names + var promise = new Promise(function(resolve) { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); +} + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } +}; + +/** + * Subscribe to the cancel signal + */ + +CancelToken.prototype.subscribe = function subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } +}; + +/** + * Unsubscribe from the cancel signal + */ + +CancelToken.prototype.unsubscribe = function unsubscribe(listener) { + if (!this._listeners) { + return; + } + var index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } +}; + +/** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ +CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; +}; + +module.exports = CancelToken; + +},{"./Cancel":10}],12:[function(require,module,exports){ +'use strict'; + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + +},{}],13:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); +var buildURL = require('../helpers/buildURL'); +var InterceptorManager = require('./InterceptorManager'); +var dispatchRequest = require('./dispatchRequest'); +var mergeConfig = require('./mergeConfig'); +var validator = require('../helpers/validator'); + +var validators = validator.validators; +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ +function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; +} + +/** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ +Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = arguments[1] || {}; + config.url = arguments[0]; + } else { + config = config || {}; + } + + config = mergeConfig(this.defaults, config); + + // Set config.method + if (config.method) { + config.method = config.method.toLowerCase(); + } else if (this.defaults.method) { + config.method = this.defaults.method.toLowerCase(); + } else { + config.method = 'get'; + } + + var transitional = config.transitional; + + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean) + }, false); + } + + // filter out skipped interceptors + var requestInterceptorChain = []; + var synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + var responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + var promise; + + if (!synchronousRequestInterceptors) { + var chain = [dispatchRequest, undefined]; + + Array.prototype.unshift.apply(chain, requestInterceptorChain); + chain = chain.concat(responseInterceptorChain); + + promise = Promise.resolve(config); + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + } + + + var newConfig = config; + while (requestInterceptorChain.length) { + var onFulfilled = requestInterceptorChain.shift(); + var onRejected = requestInterceptorChain.shift(); + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected(error); + break; + } + } + + try { + promise = dispatchRequest(newConfig); + } catch (error) { + return Promise.reject(error); + } + + while (responseInterceptorChain.length) { + promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); + } + + return promise; +}; + +Axios.prototype.getUri = function getUri(config) { + config = mergeConfig(this.defaults, config); + return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); +}; + +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: (config || {}).data + })); + }; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, data, config) { + return this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: data + })); + }; +}); + +module.exports = Axios; + +},{"../helpers/buildURL":25,"../helpers/validator":34,"./../utils":35,"./InterceptorManager":14,"./dispatchRequest":17,"./mergeConfig":19}],14:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; + +},{"./../utils":35}],15:[function(require,module,exports){ +'use strict'; + +var isAbsoluteURL = require('../helpers/isAbsoluteURL'); +var combineURLs = require('../helpers/combineURLs'); + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * @returns {string} The combined full path + */ +module.exports = function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +}; + +},{"../helpers/combineURLs":26,"../helpers/isAbsoluteURL":28}],16:[function(require,module,exports){ +'use strict'; + +var enhanceError = require('./enhanceError'); + +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); +}; + +},{"./enhanceError":18}],17:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); +var transformData = require('./transformData'); +var isCancel = require('../cancel/isCancel'); +var defaults = require('../defaults'); +var Cancel = require('../cancel/Cancel'); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new Cancel('canceled'); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData.call( + config, + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData.call( + config, + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; + +},{"../cancel/Cancel":10,"../cancel/isCancel":12,"../defaults":22,"./../utils":35,"./transformData":21}],18:[function(require,module,exports){ +'use strict'; + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + + error.request = request; + error.response = response; + error.isAxiosError = true; + + error.toJSON = function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: this.config, + code: this.code, + status: this.response && this.response.status ? this.response.status : null + }; + }; + return error; +}; + +},{}],19:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * @returns {Object} New object resulting from merging config2 to config1 + */ +module.exports = function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + var config = {}; + + function getMergedValue(target, source) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge(target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; + } + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(config1[prop], config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + return getMergedValue(undefined, config1[prop]); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(undefined, config2[prop]); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(undefined, config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + return getMergedValue(undefined, config1[prop]); + } + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(prop) { + if (prop in config2) { + return getMergedValue(config1[prop], config2[prop]); + } else if (prop in config1) { + return getMergedValue(undefined, config1[prop]); + } + } + + var mergeMap = { + 'url': valueFromConfig2, + 'method': valueFromConfig2, + 'data': valueFromConfig2, + 'baseURL': defaultToConfig2, + 'transformRequest': defaultToConfig2, + 'transformResponse': defaultToConfig2, + 'paramsSerializer': defaultToConfig2, + 'timeout': defaultToConfig2, + 'timeoutMessage': defaultToConfig2, + 'withCredentials': defaultToConfig2, + 'adapter': defaultToConfig2, + 'responseType': defaultToConfig2, + 'xsrfCookieName': defaultToConfig2, + 'xsrfHeaderName': defaultToConfig2, + 'onUploadProgress': defaultToConfig2, + 'onDownloadProgress': defaultToConfig2, + 'decompress': defaultToConfig2, + 'maxContentLength': defaultToConfig2, + 'maxBodyLength': defaultToConfig2, + 'transport': defaultToConfig2, + 'httpAgent': defaultToConfig2, + 'httpsAgent': defaultToConfig2, + 'cancelToken': defaultToConfig2, + 'socketPath': defaultToConfig2, + 'responseEncoding': defaultToConfig2, + 'validateStatus': mergeDirectKeys + }; + + utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { + var merge = mergeMap[prop] || mergeDeepProperties; + var configValue = merge(prop); + (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +}; + +},{"../utils":35}],20:[function(require,module,exports){ +'use strict'; + +var createError = require('./createError'); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response.request, + response + )); + } +}; + +},{"./createError":16}],21:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); +var defaults = require('./../defaults'); + +/** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ +module.exports = function transformData(data, headers, fns) { + var context = this || defaults; + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn.call(context, data, headers); + }); + + return data; +}; + +},{"./../defaults":22,"./../utils":35}],22:[function(require,module,exports){ +(function (process){(function (){ +'use strict'; + +var utils = require('./utils'); +var normalizeHeaderName = require('./helpers/normalizeHeaderName'); +var enhanceError = require('./core/enhanceError'); + +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = require('./adapters/xhr'); + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { + // For node use HTTP adapter + adapter = require('./adapters/http'); + } + return adapter; +} + +function stringifySafely(rawValue, parser, encoder) { + if (utils.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +var defaults = { + + transitional: { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false + }, + + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Accept'); + normalizeHeaderName(headers, 'Content-Type'); + + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) { + setContentTypeIfUnset(headers, 'application/json'); + return stringifySafely(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + var transitional = this.transitional || defaults.transitional; + var silentJSONParsing = transitional && transitional.silentJSONParsing; + var forcedJSONParsing = transitional && transitional.forcedJSONParsing; + var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; + + if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw enhanceError(e, this, 'E_JSON_PARSE'); + } + throw e; + } + } + } + + return data; + }], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*' + } + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; + +}).call(this)}).call(this,require('_process')) +},{"./adapters/http":8,"./adapters/xhr":8,"./core/enhanceError":18,"./helpers/normalizeHeaderName":31,"./utils":35,"_process":40}],23:[function(require,module,exports){ +module.exports = { + "version": "0.22.0" +}; +},{}],24:[function(require,module,exports){ +'use strict'; + +module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; +}; + +},{}],25:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); + +function encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } else { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + var hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; + +},{"./../utils":35}],26:[function(require,module,exports){ +'use strict'; + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + +},{}],27:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); + +},{"./../utils":35}],28:[function(require,module,exports){ +'use strict'; + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); +}; + +},{}],29:[function(require,module,exports){ +'use strict'; + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +module.exports = function isAxiosError(payload) { + return (typeof payload === 'object') && (payload.isAxiosError === true); +}; + +},{}],30:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); + +},{"./../utils":35}],31:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); + +module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); +}; + +},{"../utils":35}],32:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); + +// Headers whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]; + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + }); + + return parsed; +}; + +},{"./../utils":35}],33:[function(require,module,exports){ +'use strict'; + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +}; + +},{}],34:[function(require,module,exports){ +'use strict'; + +var VERSION = require('../env/data').version; + +var validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +var deprecatedWarnings = {}; + +/** + * Transitional option validator + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return function(value, opt, opts) { + if (validator === false) { + throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : ''))); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new TypeError('options must be an object'); + } + var keys = Object.keys(options); + var i = keys.length; + while (i-- > 0) { + var opt = keys[i]; + var validator = schema[opt]; + if (validator) { + var value = options[opt]; + var result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new TypeError('option ' + opt + ' must be ' + result); + } + continue; + } + if (allowUnknown !== true) { + throw Error('Unknown option ' + opt); + } + } +} + +module.exports = { + assertOptions: assertOptions, + validators: validators +}; + +},{"../env/data":23}],35:[function(require,module,exports){ +'use strict'; + +var bind = require('./helpers/bind'); + +// utils is a library of generic helper functions non-specific to axios + +var toString = Object.prototype.toString; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return toString.call(val) === '[object Array]'; +} + +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is a Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return (typeof FormData !== 'undefined') && (val instanceof FormData); +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} + +/** + * Determine if a value is a plain Object + * + * @param {Object} val The value to test + * @return {boolean} True if value is a plain Object, otherwise false + */ +function isPlainObject(val) { + if (toString.call(val) !== '[object Object]') { + return false; + } + + var prototype = Object.getPrototypeOf(val); + return prototype === null || prototype === Object.prototype; +} + +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} + +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} + +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} + +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} + +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || + navigator.product === 'NativeScript' || + navigator.product === 'NS')) { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); +} + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } +} + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (isPlainObject(result[key]) && isPlainObject(val)) { + result[key] = merge(result[key], val); + } else if (isPlainObject(val)) { + result[key] = merge({}, val); + } else if (isArray(val)) { + result[key] = val.slice(); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * @return {string} content value without BOM + */ +function stripBOM(content) { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isPlainObject: isPlainObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim, + stripBOM: stripBOM +}; + +},{"./helpers/bind":24}],36:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],37:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"base64-js":36,"buffer":37,"ieee754":39}],38:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} + +},{}],39:[function(require,module,exports){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],40:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // 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 + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // 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. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}]},{},[2]); diff --git a/util/ledger-os.js b/util/ledger-os.js new file mode 100644 index 0000000..480d0c6 --- /dev/null +++ b/util/ledger-os.js @@ -0,0 +1,12565 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i dataLength) { + data = data.slice(0, dataLength); + } + return { + data: data, + dataLength: dataLength, + sequence: sequence + }; + }, + getReducedResult: function (acc) { + if (acc && acc.dataLength === acc.data.length) { + return acc.data; + } + } + }; +}; +exports["default"] = createHIDframing; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":49,"buffer":165}],3:[function(require,module,exports){ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _a; +exports.__esModule = true; +exports.getInfosForServiceUuid = exports.getBluetoothServiceUuids = exports.identifyProductName = exports.identifyUSBProductId = exports.identifyTargetId = exports.getDeviceModel = exports.ledgerUSBVendorId = exports.DeviceModelId = exports.IIWebUSB = exports.IICCID = exports.IIU2F = exports.IIKeyboardHID = exports.IIGenericHID = void 0; +var semver_1 = __importDefault(require("semver")); +/** + * The USB product IDs will be defined as MMII, encoding a model (MM) and an interface bitfield (II) + * + ** Model + * Ledger Nano S : 0x10 + * Ledger Blue : 0x00 + * Ledger Nano X : 0x40 + * + ** Interface support bitfield + * Generic HID : 0x01 + * Keyboard HID : 0x02 + * U2F : 0x04 + * CCID : 0x08 + * WebUSB : 0x10 + */ +exports.IIGenericHID = 0x01; +exports.IIKeyboardHID = 0x02; +exports.IIU2F = 0x04; +exports.IICCID = 0x08; +exports.IIWebUSB = 0x10; +var DeviceModelId; +(function (DeviceModelId) { + DeviceModelId["blue"] = "blue"; + DeviceModelId["nanoS"] = "nanoS"; + DeviceModelId["nanoSP"] = "nanoSP"; + DeviceModelId["nanoX"] = "nanoX"; +})(DeviceModelId = exports.DeviceModelId || (exports.DeviceModelId = {})); +var devices = (_a = {}, + _a[DeviceModelId.blue] = { + id: DeviceModelId.blue, + productName: "Ledger Blue", + productIdMM: 0x00, + legacyUsbProductId: 0x0000, + usbOnly: true, + memorySize: 480 * 1024, + masks: [0x31000000, 0x31010000], + getBlockSize: function (_firwareVersion) { return 4 * 1024; } + }, + _a[DeviceModelId.nanoS] = { + id: DeviceModelId.nanoS, + productName: "Ledger Nano S", + productIdMM: 0x10, + legacyUsbProductId: 0x0001, + usbOnly: true, + memorySize: 320 * 1024, + masks: [0x31100000], + getBlockSize: function (firmwareVersion) { + var _a; + return semver_1["default"].lt((_a = semver_1["default"].coerce(firmwareVersion)) !== null && _a !== void 0 ? _a : "", "2.0.0") + ? 4 * 1024 + : 2 * 1024; + } + }, + _a[DeviceModelId.nanoSP] = { + id: DeviceModelId.nanoSP, + productName: "Ledger Nano SP", + productIdMM: 0x50, + legacyUsbProductId: 0x0005, + usbOnly: true, + memorySize: 1533 * 1024, + masks: [0x33100000], + getBlockSize: function (_firmwareVersion) { return 32; } + }, + _a[DeviceModelId.nanoX] = { + id: DeviceModelId.nanoX, + productName: "Ledger Nano X", + productIdMM: 0x40, + legacyUsbProductId: 0x0004, + usbOnly: false, + memorySize: 2 * 1024 * 1024, + masks: [0x33000000], + getBlockSize: function (_firwareVersion) { return 4 * 1024; }, + bluetoothSpec: [ + { + // this is the legacy one (prototype version). we will eventually drop it. + serviceUuid: "d973f2e0-b19e-11e2-9e96-0800200c9a66", + notifyUuid: "d973f2e1-b19e-11e2-9e96-0800200c9a66", + writeUuid: "d973f2e2-b19e-11e2-9e96-0800200c9a66", + writeCmdUuid: "d973f2e3-b19e-11e2-9e96-0800200c9a66" + }, + { + serviceUuid: "13d63400-2c97-0004-0000-4c6564676572", + notifyUuid: "13d63400-2c97-0004-0001-4c6564676572", + writeUuid: "13d63400-2c97-0004-0002-4c6564676572", + writeCmdUuid: "13d63400-2c97-0004-0003-4c6564676572" + }, + ] + }, + _a); +var productMap = { + Blue: DeviceModelId.blue, + "Nano S": DeviceModelId.nanoS, + "Nano X": DeviceModelId.nanoX +}; +var devicesList = Object.values(devices); +/** + * + */ +exports.ledgerUSBVendorId = 0x2c97; +/** + * + */ +var getDeviceModel = function (id) { + var info = devices[id]; + if (!info) + throw new Error("device '" + id + "' does not exist"); + return info; +}; +exports.getDeviceModel = getDeviceModel; +/** + * Given a `targetId`, return the deviceModel associated to it, + * based on the first two bytes. + */ +var identifyTargetId = function (targetId) { + var deviceModel = devicesList.find(function (_a) { + var masks = _a.masks; + return masks.find(function (mask) { return (targetId & 0xffff0000) === mask; }); + }); + return deviceModel; +}; +exports.identifyTargetId = identifyTargetId; +/** + * + */ +var identifyUSBProductId = function (usbProductId) { + var legacy = devicesList.find(function (d) { return d.legacyUsbProductId === usbProductId; }); + if (legacy) + return legacy; + var mm = usbProductId >> 8; + var deviceModel = devicesList.find(function (d) { return d.productIdMM === mm; }); + return deviceModel; +}; +exports.identifyUSBProductId = identifyUSBProductId; +var identifyProductName = function (productName) { + var productId = productMap[productName]; + if (!productId && productName.startsWith("Nano S")) { + productId = DeviceModelId.nanoSP; + } + var deviceModel = devicesList.find(function (d) { return d.id === productId; }); + return deviceModel; +}; +exports.identifyProductName = identifyProductName; +var bluetoothServices = []; +var serviceUuidToInfos = {}; +for (var id in devices) { + var deviceModel = devices[id]; + var bluetoothSpec = deviceModel.bluetoothSpec; + if (bluetoothSpec) { + for (var i = 0; i < bluetoothSpec.length; i++) { + var spec = bluetoothSpec[i]; + bluetoothServices.push(spec.serviceUuid); + serviceUuidToInfos[spec.serviceUuid] = serviceUuidToInfos[spec.serviceUuid.replace(/-/g, "")] = __assign({ deviceModel: deviceModel }, spec); + } + } +} +/** + * + */ +var getBluetoothServiceUuids = function () { return bluetoothServices; }; +exports.getBluetoothServiceUuids = getBluetoothServiceUuids; +/** + * + */ +var getInfosForServiceUuid = function (uuid) { return serviceUuidToInfos[uuid.toLowerCase()]; }; +exports.getInfosForServiceUuid = getInfosForServiceUuid; + +},{"semver":31}],4:[function(require,module,exports){ +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) + } + + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + + const sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + const sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + const sameSemVer = this.semver.version === comp.semver.version + const differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + const oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<') + const oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>') + + return ( + sameDirectionIncreasing || + sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || + oppositeDirectionsGreaterThan + ) + } +} + +module.exports = Comparator + +const parseOptions = require('../internal/parse-options') +const {re, t} = require('../internal/re') +const cmp = require('../functions/cmp') +const debug = require('../internal/debug') +const SemVer = require('./semver') +const Range = require('./range') + +},{"../functions/cmp":8,"../internal/debug":33,"../internal/parse-options":35,"../internal/re":36,"./range":5,"./semver":6}],5:[function(require,module,exports){ +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) + + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.format() + return this + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range + .split(/\s*\|\|\s*/) + // map the range to a 2d array of comparators + .map(range => this.parseRange(range.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`) + } + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) + this.set = [first] + else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + + this.format() + } + + format () { + this.range = this.set + .map((comps) => { + return comps.join(' ').trim() + }) + .join('||') + .trim() + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + range = range.trim() + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) + return cached + + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + // in loose mode, throw out any that are not valid comparators + .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) + .map(comp => new Comparator(comp, this.options)) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const l = rangeList.length + const rangeMap = new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) + rangeMap.delete('') + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } +} +module.exports = Range + +const LRU = require('lru-cache') +const cache = new LRU({ max: 1000 }) + +const parseOptions = require('../internal/parse-options') +const Comparator = require('./comparator') +const debug = require('../internal/debug') +const SemVer = require('./semver') +const { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace +} = require('../internal/re') + +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +const replaceTildes = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceTilde(comp, options) + }).join(' ') + +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +const replaceCarets = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceCaret(comp, options) + }).join(' ') + +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } + + debug('caret return', ret) + return ret + }) +} + +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map((comp) => { + return replaceXRange(comp, options) + }).join(' ') +} + +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + if (gtlt === '<') + pr = '-0' + + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp.trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + + return (`${from} ${to}`).trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +},{"../internal/debug":33,"../internal/parse-options":35,"../internal/re":36,"./comparator":4,"./semver":6,"lru-cache":58}],6:[function(require,module,exports){ +const debug = require('../internal/debug') +const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') +const { re, t } = require('../internal/re') + +const parseOptions = require('../internal/parse-options') +const { compareIdentifiers } = require('../internal/identifiers') +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid Version: ${version}`) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + + if (other.version === this.version) { + return 0 + } + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.format() + this.raw = this.version + return this + } +} + +module.exports = SemVer + +},{"../internal/constants":32,"../internal/debug":33,"../internal/identifiers":34,"../internal/parse-options":35,"../internal/re":36}],7:[function(require,module,exports){ +const parse = require('./parse') +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean + +},{"./parse":23}],8:[function(require,module,exports){ +const eq = require('./eq') +const neq = require('./neq') +const gt = require('./gt') +const gte = require('./gte') +const lt = require('./lt') +const lte = require('./lte') + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + +},{"./eq":14,"./gt":15,"./gte":16,"./lt":18,"./lte":19,"./neq":22}],9:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const parse = require('./parse') +const {re, t} = require('../internal/re') + +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + let next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) + return null + + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) +} +module.exports = coerce + +},{"../classes/semver":6,"../internal/re":36,"./parse":23}],10:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild + +},{"../classes/semver":6}],11:[function(require,module,exports){ +const compare = require('./compare') +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose + +},{"./compare":12}],12:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + +},{"../classes/semver":6}],13:[function(require,module,exports){ +const parse = require('./parse') +const eq = require('./eq') + +const diff = (version1, version2) => { + if (eq(version1, version2)) { + return null + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} +module.exports = diff + +},{"./eq":14,"./parse":23}],14:[function(require,module,exports){ +const compare = require('./compare') +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq + +},{"./compare":12}],15:[function(require,module,exports){ +const compare = require('./compare') +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt + +},{"./compare":12}],16:[function(require,module,exports){ +const compare = require('./compare') +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + +},{"./compare":12}],17:[function(require,module,exports){ +const SemVer = require('../classes/semver') + +const inc = (version, release, options, identifier) => { + if (typeof (options) === 'string') { + identifier = options + options = undefined + } + + try { + return new SemVer(version, options).inc(release, identifier).version + } catch (er) { + return null + } +} +module.exports = inc + +},{"../classes/semver":6}],18:[function(require,module,exports){ +const compare = require('./compare') +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt + +},{"./compare":12}],19:[function(require,module,exports){ +const compare = require('./compare') +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + +},{"./compare":12}],20:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major + +},{"../classes/semver":6}],21:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor + +},{"../classes/semver":6}],22:[function(require,module,exports){ +const compare = require('./compare') +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + +},{"./compare":12}],23:[function(require,module,exports){ +const {MAX_LENGTH} = require('../internal/constants') +const { re, t } = require('../internal/re') +const SemVer = require('../classes/semver') + +const parseOptions = require('../internal/parse-options') +const parse = (version, options) => { + options = parseOptions(options) + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +module.exports = parse + +},{"../classes/semver":6,"../internal/constants":32,"../internal/parse-options":35,"../internal/re":36}],24:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch + +},{"../classes/semver":6}],25:[function(require,module,exports){ +const parse = require('./parse') +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease + +},{"./parse":23}],26:[function(require,module,exports){ +const compare = require('./compare') +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare + +},{"./compare":12}],27:[function(require,module,exports){ +const compareBuild = require('./compare-build') +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort + +},{"./compare-build":10}],28:[function(require,module,exports){ +const Range = require('../classes/range') +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies + +},{"../classes/range":5}],29:[function(require,module,exports){ +const compareBuild = require('./compare-build') +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort + +},{"./compare-build":10}],30:[function(require,module,exports){ +const parse = require('./parse') +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid + +},{"./parse":23}],31:[function(require,module,exports){ +// just pre-load all the stuff that index.js lazily exports +const internalRe = require('./internal/re') +module.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION, + SemVer: require('./classes/semver'), + compareIdentifiers: require('./internal/identifiers').compareIdentifiers, + rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers, + parse: require('./functions/parse'), + valid: require('./functions/valid'), + clean: require('./functions/clean'), + inc: require('./functions/inc'), + diff: require('./functions/diff'), + major: require('./functions/major'), + minor: require('./functions/minor'), + patch: require('./functions/patch'), + prerelease: require('./functions/prerelease'), + compare: require('./functions/compare'), + rcompare: require('./functions/rcompare'), + compareLoose: require('./functions/compare-loose'), + compareBuild: require('./functions/compare-build'), + sort: require('./functions/sort'), + rsort: require('./functions/rsort'), + gt: require('./functions/gt'), + lt: require('./functions/lt'), + eq: require('./functions/eq'), + neq: require('./functions/neq'), + gte: require('./functions/gte'), + lte: require('./functions/lte'), + cmp: require('./functions/cmp'), + coerce: require('./functions/coerce'), + Comparator: require('./classes/comparator'), + Range: require('./classes/range'), + satisfies: require('./functions/satisfies'), + toComparators: require('./ranges/to-comparators'), + maxSatisfying: require('./ranges/max-satisfying'), + minSatisfying: require('./ranges/min-satisfying'), + minVersion: require('./ranges/min-version'), + validRange: require('./ranges/valid'), + outside: require('./ranges/outside'), + gtr: require('./ranges/gtr'), + ltr: require('./ranges/ltr'), + intersects: require('./ranges/intersects'), + simplifyRange: require('./ranges/simplify'), + subset: require('./ranges/subset'), +} + +},{"./classes/comparator":4,"./classes/range":5,"./classes/semver":6,"./functions/clean":7,"./functions/cmp":8,"./functions/coerce":9,"./functions/compare":12,"./functions/compare-build":10,"./functions/compare-loose":11,"./functions/diff":13,"./functions/eq":14,"./functions/gt":15,"./functions/gte":16,"./functions/inc":17,"./functions/lt":18,"./functions/lte":19,"./functions/major":20,"./functions/minor":21,"./functions/neq":22,"./functions/parse":23,"./functions/patch":24,"./functions/prerelease":25,"./functions/rcompare":26,"./functions/rsort":27,"./functions/satisfies":28,"./functions/sort":29,"./functions/valid":30,"./internal/constants":32,"./internal/identifiers":34,"./internal/re":36,"./ranges/gtr":37,"./ranges/intersects":38,"./ranges/ltr":39,"./ranges/max-satisfying":40,"./ranges/min-satisfying":41,"./ranges/min-version":42,"./ranges/outside":43,"./ranges/simplify":44,"./ranges/subset":45,"./ranges/to-comparators":46,"./ranges/valid":47}],32:[function(require,module,exports){ +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +module.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH +} + +},{}],33:[function(require,module,exports){ +(function (process){(function (){ +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} + +module.exports = debug + +}).call(this)}).call(this,require('_process')) +},{"_process":168}],34:[function(require,module,exports){ +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers +} + +},{}],35:[function(require,module,exports){ +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((options, k) => { + options[k] = true + return options + }, {}) +module.exports = parseOptions + +},{}],36:[function(require,module,exports){ +const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants') +const debug = require('./debug') +exports = module.exports = {} + +// The actual regexps go on exports.re +const re = exports.re = [] +const src = exports.src = [] +const t = exports.t = {} +let R = 0 + +const createToken = (name, value, isGlobal) => { + const index = R++ + debug(index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCE', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') + +},{"./constants":32,"./debug":33}],37:[function(require,module,exports){ +// Determine if version is greater than all the versions possible in the range. +const outside = require('./outside') +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr + +},{"./outside":43}],38:[function(require,module,exports){ +const Range = require('../classes/range') +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} +module.exports = intersects + +},{"../classes/range":5}],39:[function(require,module,exports){ +const outside = require('./outside') +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr + +},{"./outside":43}],40:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Range = require('../classes/range') + +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} +module.exports = maxSatisfying + +},{"../classes/range":5,"../classes/semver":6}],41:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Range = require('../classes/range') +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} +module.exports = minSatisfying + +},{"../classes/range":5,"../classes/semver":6}],42:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Range = require('../classes/range') +const gt = require('../functions/gt') + +const minVersion = (range, loose) => { + range = new Range(range, loose) + + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} +module.exports = minVersion + +},{"../classes/range":5,"../classes/semver":6,"../functions/gt":15}],43:[function(require,module,exports){ +const SemVer = require('../classes/semver') +const Comparator = require('../classes/comparator') +const {ANY} = Comparator +const Range = require('../classes/range') +const satisfies = require('../functions/satisfies') +const gt = require('../functions/gt') +const lt = require('../functions/lt') +const lte = require('../functions/lte') +const gte = require('../functions/gte') + +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) + + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let high = null + let low = null + + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +module.exports = outside + +},{"../classes/comparator":4,"../classes/range":5,"../classes/semver":6,"../functions/gt":15,"../functions/gte":16,"../functions/lt":18,"../functions/lte":19,"../functions/satisfies":28}],44:[function(require,module,exports){ +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = require('../functions/satisfies.js') +const compare = require('../functions/compare.js') +module.exports = (versions, range, options) => { + const set = [] + let min = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!min) + min = version + } else { + if (prev) { + set.push([min, prev]) + } + prev = null + min = null + } + } + if (min) + set.push([min, null]) + + const ranges = [] + for (const [min, max] of set) { + if (min === max) + ranges.push(min) + else if (!max && min === v[0]) + ranges.push('*') + else if (!max) + ranges.push(`>=${min}`) + else if (min === v[0]) + ranges.push(`<=${max}`) + else + ranges.push(`${min} - ${max}`) + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range +} + +},{"../functions/compare.js":12,"../functions/satisfies.js":28}],45:[function(require,module,exports){ +const Range = require('../classes/range.js') +const Comparator = require('../classes/comparator.js') +const { ANY } = Comparator +const satisfies = require('../functions/satisfies.js') +const compare = require('../functions/compare.js') + +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true + +const subset = (sub, dom, options = {}) => { + if (sub === dom) + return true + + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) + continue OUTER + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) + return false + } + return true +} + +const simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true + + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true + else if (options.includePrerelease) + sub = [ new Comparator('>=0.0.0-0') ] + else + sub = [ new Comparator('>=0.0.0') ] + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true + else + dom = [ new Comparator('>=0.0.0') ] + } + + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') + gt = higherGT(gt, c, options) + else if (c.operator === '<' || c.operator === '<=') + lt = lowerLT(lt, c, options) + else + eqSet.add(c.semver) + } + + if (eqSet.size > 1) + return null + + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) + return null + else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + return null + } + + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null + + if (lt && !satisfies(eq, String(lt), options)) + return null + + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false + } + + return true + } + + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) + return false + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + return false + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) + return false + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + return false + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false + } + + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false + + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) + return false + + return true +} + +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a +} + +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} + +module.exports = subset + +},{"../classes/comparator.js":4,"../classes/range.js":5,"../functions/compare.js":12,"../functions/satisfies.js":28}],46:[function(require,module,exports){ +const Range = require('../classes/range') + +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) + +module.exports = toComparators + +},{"../classes/range":5}],47:[function(require,module,exports){ +const Range = require('../classes/range') +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} +module.exports = validRange + +},{"../classes/range":5}],48:[function(require,module,exports){ +"use strict"; +/* eslint-disable no-continue */ +/* eslint-disable no-unused-vars */ +/* eslint-disable no-param-reassign */ +/* eslint-disable no-prototype-builtins */ +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +exports.__esModule = true; +exports.serializeError = exports.deserializeError = exports.createCustomErrorClass = exports.addCustomErrorDeserializer = void 0; +var errorClasses = {}; +var deserializers = {}; +var addCustomErrorDeserializer = function (name, deserializer) { + deserializers[name] = deserializer; +}; +exports.addCustomErrorDeserializer = addCustomErrorDeserializer; +var createCustomErrorClass = function (name) { + var C = function CustomError(message, fields) { + Object.assign(this, fields); + this.name = name; + this.message = message || name; + this.stack = new Error().stack; + }; + C.prototype = new Error(); + errorClasses[name] = C; + return C; +}; +exports.createCustomErrorClass = createCustomErrorClass; +// inspired from https://github.com/programble/errio/blob/master/index.js +var deserializeError = function (object) { + if (typeof object === "object" && object) { + try { + // $FlowFixMe FIXME HACK + var msg = JSON.parse(object.message); + if (msg.message && msg.name) { + object = msg; + } + } + catch (e) { + // nothing + } + var error = void 0; + if (typeof object.name === "string") { + var name_1 = object.name; + var des = deserializers[name_1]; + if (des) { + error = des(object); + } + else { + var constructor = name_1 === "Error" ? Error : errorClasses[name_1]; + if (!constructor) { + console.warn("deserializing an unknown class '" + name_1 + "'"); + constructor = (0, exports.createCustomErrorClass)(name_1); + } + error = Object.create(constructor.prototype); + try { + for (var prop in object) { + if (object.hasOwnProperty(prop)) { + error[prop] = object[prop]; + } + } + } + catch (e) { + // sometimes setting a property can fail (e.g. .name) + } + } + } + else { + error = new Error(object.message); + } + if (!error.stack && Error.captureStackTrace) { + Error.captureStackTrace(error, exports.deserializeError); + } + return error; + } + return new Error(String(object)); +}; +exports.deserializeError = deserializeError; +// inspired from https://github.com/sindresorhus/serialize-error/blob/master/index.js +var serializeError = function (value) { + if (!value) + return value; + if (typeof value === "object") { + return destroyCircular(value, []); + } + if (typeof value === "function") { + return "[Function: " + (value.name || "anonymous") + "]"; + } + return value; +}; +exports.serializeError = serializeError; +// https://www.npmjs.com/package/destroy-circular +function destroyCircular(from, seen) { + var e_1, _a; + var to = {}; + seen.push(from); + try { + for (var _b = __values(Object.keys(from)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + var value = from[key]; + if (typeof value === "function") { + continue; + } + if (!value || typeof value !== "object") { + to[key] = value; + continue; + } + if (seen.indexOf(from[key]) === -1) { + to[key] = destroyCircular(from[key], seen.slice(0)); + continue; + } + to[key] = "[Circular]"; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b["return"])) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (typeof from.name === "string") { + to.name = from.name; + } + if (typeof from.message === "string") { + to.message = from.message; + } + if (typeof from.stack === "string") { + to.stack = from.stack; + } + return to; +} + +},{}],49:[function(require,module,exports){ +"use strict"; +exports.__esModule = true; +exports.NotEnoughBalanceInParentAccount = exports.NotEnoughBalanceToDelegate = exports.NotEnoughBalance = exports.NoAddressesFound = exports.NetworkDown = exports.ManagerUninstallBTCDep = exports.ManagerNotEnoughSpaceError = exports.ManagerFirmwareNotEnoughSpaceError = exports.ManagerDeviceLockedError = exports.ManagerAppDepUninstallRequired = exports.ManagerAppDepInstallRequired = exports.ManagerAppRelyOnBTCError = exports.ManagerAppAlreadyInstalledError = exports.LedgerAPINotAvailable = exports.LedgerAPIErrorWithMessage = exports.LedgerAPIError = exports.UnknownMCU = exports.LatestMCUInstalledError = exports.InvalidAddressBecauseDestinationIsAlsoSource = exports.InvalidAddress = exports.InvalidXRPTag = exports.HardResetFail = exports.FirmwareNotRecognized = exports.FeeEstimationFailed = exports.EthAppPleaseEnableContractData = exports.EnpointConfigError = exports.DisconnectedDeviceDuringOperation = exports.DisconnectedDevice = exports.DeviceSocketNoBulkStatus = exports.DeviceSocketFail = exports.DeviceNameInvalid = exports.DeviceHalted = exports.DeviceInOSUExpected = exports.DeviceOnDashboardUnexpected = exports.DeviceOnDashboardExpected = exports.DeviceNotGenuineError = exports.DeviceGenuineSocketEarlyClose = exports.DeviceAppVerifyNotSupported = exports.CurrencyNotSupported = exports.CashAddrNotSupported = exports.CantOpenDevice = exports.BtcUnmatchedApp = exports.BluetoothRequired = exports.AmountRequired = exports.AccountNotSupported = exports.AccountNameRequiredError = exports.addCustomErrorDeserializer = exports.createCustomErrorClass = exports.deserializeError = exports.serializeError = void 0; +exports.StatusCodes = exports.TransportError = exports.DBNotReset = exports.DBWrongPassword = exports.NoDBPathGiven = exports.FirmwareOrAppUpdateRequired = exports.LedgerAPI5xx = exports.LedgerAPI4xx = exports.GenuineCheckFailed = exports.PairingFailed = exports.SyncError = exports.FeeTooHigh = exports.FeeRequired = exports.FeeNotLoaded = exports.CantScanQRCode = exports.ETHAddressNonEIP = exports.WrongAppForCurrency = exports.WrongDeviceForAccount = exports.WebsocketConnectionFailed = exports.WebsocketConnectionError = exports.DeviceShouldStayInApp = exports.TransportWebUSBGestureRequired = exports.TransportRaceCondition = exports.TransportInterfaceNotAvailable = exports.TransportOpenUserCancelled = exports.UserRefusedOnDevice = exports.UserRefusedAllowManager = exports.UserRefusedFirmwareUpdate = exports.UserRefusedAddress = exports.UserRefusedDeviceNameChange = exports.UpdateYourApp = exports.UpdateIncorrectSig = exports.UpdateIncorrectHash = exports.UpdateFetchFileFail = exports.UnavailableTezosOriginatedAccountSend = exports.UnavailableTezosOriginatedAccountReceive = exports.RecipientRequired = exports.MCUNotGenuineToDashboard = exports.UnexpectedBootloader = exports.TimeoutTagged = exports.RecommendUndelegation = exports.RecommendSubAccountsToEmpty = exports.PasswordIncorrectError = exports.PasswordsDontMatchError = exports.GasLessThanEstimate = exports.NotSupportedLegacyAddress = exports.NotEnoughGas = exports.NoAccessToCamera = exports.NotEnoughBalanceBecauseDestinationNotCreated = exports.NotEnoughSpendableBalance = void 0; +exports.TransportStatusError = exports.getAltStatusMessage = void 0; +var helpers_1 = require("./helpers"); +exports.serializeError = helpers_1.serializeError; +exports.deserializeError = helpers_1.deserializeError; +exports.createCustomErrorClass = helpers_1.createCustomErrorClass; +exports.addCustomErrorDeserializer = helpers_1.addCustomErrorDeserializer; +exports.AccountNameRequiredError = (0, helpers_1.createCustomErrorClass)("AccountNameRequired"); +exports.AccountNotSupported = (0, helpers_1.createCustomErrorClass)("AccountNotSupported"); +exports.AmountRequired = (0, helpers_1.createCustomErrorClass)("AmountRequired"); +exports.BluetoothRequired = (0, helpers_1.createCustomErrorClass)("BluetoothRequired"); +exports.BtcUnmatchedApp = (0, helpers_1.createCustomErrorClass)("BtcUnmatchedApp"); +exports.CantOpenDevice = (0, helpers_1.createCustomErrorClass)("CantOpenDevice"); +exports.CashAddrNotSupported = (0, helpers_1.createCustomErrorClass)("CashAddrNotSupported"); +exports.CurrencyNotSupported = (0, helpers_1.createCustomErrorClass)("CurrencyNotSupported"); +exports.DeviceAppVerifyNotSupported = (0, helpers_1.createCustomErrorClass)("DeviceAppVerifyNotSupported"); +exports.DeviceGenuineSocketEarlyClose = (0, helpers_1.createCustomErrorClass)("DeviceGenuineSocketEarlyClose"); +exports.DeviceNotGenuineError = (0, helpers_1.createCustomErrorClass)("DeviceNotGenuine"); +exports.DeviceOnDashboardExpected = (0, helpers_1.createCustomErrorClass)("DeviceOnDashboardExpected"); +exports.DeviceOnDashboardUnexpected = (0, helpers_1.createCustomErrorClass)("DeviceOnDashboardUnexpected"); +exports.DeviceInOSUExpected = (0, helpers_1.createCustomErrorClass)("DeviceInOSUExpected"); +exports.DeviceHalted = (0, helpers_1.createCustomErrorClass)("DeviceHalted"); +exports.DeviceNameInvalid = (0, helpers_1.createCustomErrorClass)("DeviceNameInvalid"); +exports.DeviceSocketFail = (0, helpers_1.createCustomErrorClass)("DeviceSocketFail"); +exports.DeviceSocketNoBulkStatus = (0, helpers_1.createCustomErrorClass)("DeviceSocketNoBulkStatus"); +exports.DisconnectedDevice = (0, helpers_1.createCustomErrorClass)("DisconnectedDevice"); +exports.DisconnectedDeviceDuringOperation = (0, helpers_1.createCustomErrorClass)("DisconnectedDeviceDuringOperation"); +exports.EnpointConfigError = (0, helpers_1.createCustomErrorClass)("EnpointConfig"); +exports.EthAppPleaseEnableContractData = (0, helpers_1.createCustomErrorClass)("EthAppPleaseEnableContractData"); +exports.FeeEstimationFailed = (0, helpers_1.createCustomErrorClass)("FeeEstimationFailed"); +exports.FirmwareNotRecognized = (0, helpers_1.createCustomErrorClass)("FirmwareNotRecognized"); +exports.HardResetFail = (0, helpers_1.createCustomErrorClass)("HardResetFail"); +exports.InvalidXRPTag = (0, helpers_1.createCustomErrorClass)("InvalidXRPTag"); +exports.InvalidAddress = (0, helpers_1.createCustomErrorClass)("InvalidAddress"); +exports.InvalidAddressBecauseDestinationIsAlsoSource = (0, helpers_1.createCustomErrorClass)("InvalidAddressBecauseDestinationIsAlsoSource"); +exports.LatestMCUInstalledError = (0, helpers_1.createCustomErrorClass)("LatestMCUInstalledError"); +exports.UnknownMCU = (0, helpers_1.createCustomErrorClass)("UnknownMCU"); +exports.LedgerAPIError = (0, helpers_1.createCustomErrorClass)("LedgerAPIError"); +exports.LedgerAPIErrorWithMessage = (0, helpers_1.createCustomErrorClass)("LedgerAPIErrorWithMessage"); +exports.LedgerAPINotAvailable = (0, helpers_1.createCustomErrorClass)("LedgerAPINotAvailable"); +exports.ManagerAppAlreadyInstalledError = (0, helpers_1.createCustomErrorClass)("ManagerAppAlreadyInstalled"); +exports.ManagerAppRelyOnBTCError = (0, helpers_1.createCustomErrorClass)("ManagerAppRelyOnBTC"); +exports.ManagerAppDepInstallRequired = (0, helpers_1.createCustomErrorClass)("ManagerAppDepInstallRequired"); +exports.ManagerAppDepUninstallRequired = (0, helpers_1.createCustomErrorClass)("ManagerAppDepUninstallRequired"); +exports.ManagerDeviceLockedError = (0, helpers_1.createCustomErrorClass)("ManagerDeviceLocked"); +exports.ManagerFirmwareNotEnoughSpaceError = (0, helpers_1.createCustomErrorClass)("ManagerFirmwareNotEnoughSpace"); +exports.ManagerNotEnoughSpaceError = (0, helpers_1.createCustomErrorClass)("ManagerNotEnoughSpace"); +exports.ManagerUninstallBTCDep = (0, helpers_1.createCustomErrorClass)("ManagerUninstallBTCDep"); +exports.NetworkDown = (0, helpers_1.createCustomErrorClass)("NetworkDown"); +exports.NoAddressesFound = (0, helpers_1.createCustomErrorClass)("NoAddressesFound"); +exports.NotEnoughBalance = (0, helpers_1.createCustomErrorClass)("NotEnoughBalance"); +exports.NotEnoughBalanceToDelegate = (0, helpers_1.createCustomErrorClass)("NotEnoughBalanceToDelegate"); +exports.NotEnoughBalanceInParentAccount = (0, helpers_1.createCustomErrorClass)("NotEnoughBalanceInParentAccount"); +exports.NotEnoughSpendableBalance = (0, helpers_1.createCustomErrorClass)("NotEnoughSpendableBalance"); +exports.NotEnoughBalanceBecauseDestinationNotCreated = (0, helpers_1.createCustomErrorClass)("NotEnoughBalanceBecauseDestinationNotCreated"); +exports.NoAccessToCamera = (0, helpers_1.createCustomErrorClass)("NoAccessToCamera"); +exports.NotEnoughGas = (0, helpers_1.createCustomErrorClass)("NotEnoughGas"); +exports.NotSupportedLegacyAddress = (0, helpers_1.createCustomErrorClass)("NotSupportedLegacyAddress"); +exports.GasLessThanEstimate = (0, helpers_1.createCustomErrorClass)("GasLessThanEstimate"); +exports.PasswordsDontMatchError = (0, helpers_1.createCustomErrorClass)("PasswordsDontMatch"); +exports.PasswordIncorrectError = (0, helpers_1.createCustomErrorClass)("PasswordIncorrect"); +exports.RecommendSubAccountsToEmpty = (0, helpers_1.createCustomErrorClass)("RecommendSubAccountsToEmpty"); +exports.RecommendUndelegation = (0, helpers_1.createCustomErrorClass)("RecommendUndelegation"); +exports.TimeoutTagged = (0, helpers_1.createCustomErrorClass)("TimeoutTagged"); +exports.UnexpectedBootloader = (0, helpers_1.createCustomErrorClass)("UnexpectedBootloader"); +exports.MCUNotGenuineToDashboard = (0, helpers_1.createCustomErrorClass)("MCUNotGenuineToDashboard"); +exports.RecipientRequired = (0, helpers_1.createCustomErrorClass)("RecipientRequired"); +exports.UnavailableTezosOriginatedAccountReceive = (0, helpers_1.createCustomErrorClass)("UnavailableTezosOriginatedAccountReceive"); +exports.UnavailableTezosOriginatedAccountSend = (0, helpers_1.createCustomErrorClass)("UnavailableTezosOriginatedAccountSend"); +exports.UpdateFetchFileFail = (0, helpers_1.createCustomErrorClass)("UpdateFetchFileFail"); +exports.UpdateIncorrectHash = (0, helpers_1.createCustomErrorClass)("UpdateIncorrectHash"); +exports.UpdateIncorrectSig = (0, helpers_1.createCustomErrorClass)("UpdateIncorrectSig"); +exports.UpdateYourApp = (0, helpers_1.createCustomErrorClass)("UpdateYourApp"); +exports.UserRefusedDeviceNameChange = (0, helpers_1.createCustomErrorClass)("UserRefusedDeviceNameChange"); +exports.UserRefusedAddress = (0, helpers_1.createCustomErrorClass)("UserRefusedAddress"); +exports.UserRefusedFirmwareUpdate = (0, helpers_1.createCustomErrorClass)("UserRefusedFirmwareUpdate"); +exports.UserRefusedAllowManager = (0, helpers_1.createCustomErrorClass)("UserRefusedAllowManager"); +exports.UserRefusedOnDevice = (0, helpers_1.createCustomErrorClass)("UserRefusedOnDevice"); // TODO rename because it's just for transaction refusal +exports.TransportOpenUserCancelled = (0, helpers_1.createCustomErrorClass)("TransportOpenUserCancelled"); +exports.TransportInterfaceNotAvailable = (0, helpers_1.createCustomErrorClass)("TransportInterfaceNotAvailable"); +exports.TransportRaceCondition = (0, helpers_1.createCustomErrorClass)("TransportRaceCondition"); +exports.TransportWebUSBGestureRequired = (0, helpers_1.createCustomErrorClass)("TransportWebUSBGestureRequired"); +exports.DeviceShouldStayInApp = (0, helpers_1.createCustomErrorClass)("DeviceShouldStayInApp"); +exports.WebsocketConnectionError = (0, helpers_1.createCustomErrorClass)("WebsocketConnectionError"); +exports.WebsocketConnectionFailed = (0, helpers_1.createCustomErrorClass)("WebsocketConnectionFailed"); +exports.WrongDeviceForAccount = (0, helpers_1.createCustomErrorClass)("WrongDeviceForAccount"); +exports.WrongAppForCurrency = (0, helpers_1.createCustomErrorClass)("WrongAppForCurrency"); +exports.ETHAddressNonEIP = (0, helpers_1.createCustomErrorClass)("ETHAddressNonEIP"); +exports.CantScanQRCode = (0, helpers_1.createCustomErrorClass)("CantScanQRCode"); +exports.FeeNotLoaded = (0, helpers_1.createCustomErrorClass)("FeeNotLoaded"); +exports.FeeRequired = (0, helpers_1.createCustomErrorClass)("FeeRequired"); +exports.FeeTooHigh = (0, helpers_1.createCustomErrorClass)("FeeTooHigh"); +exports.SyncError = (0, helpers_1.createCustomErrorClass)("SyncError"); +exports.PairingFailed = (0, helpers_1.createCustomErrorClass)("PairingFailed"); +exports.GenuineCheckFailed = (0, helpers_1.createCustomErrorClass)("GenuineCheckFailed"); +exports.LedgerAPI4xx = (0, helpers_1.createCustomErrorClass)("LedgerAPI4xx"); +exports.LedgerAPI5xx = (0, helpers_1.createCustomErrorClass)("LedgerAPI5xx"); +exports.FirmwareOrAppUpdateRequired = (0, helpers_1.createCustomErrorClass)("FirmwareOrAppUpdateRequired"); +// db stuff, no need to translate +exports.NoDBPathGiven = (0, helpers_1.createCustomErrorClass)("NoDBPathGiven"); +exports.DBWrongPassword = (0, helpers_1.createCustomErrorClass)("DBWrongPassword"); +exports.DBNotReset = (0, helpers_1.createCustomErrorClass)("DBNotReset"); +/** + * TransportError is used for any generic transport errors. + * e.g. Error thrown when data received by exchanges are incorrect or if exchanged failed to communicate with the device for various reason. + */ +function TransportError(message, id) { + this.name = "TransportError"; + this.message = message; + this.stack = new Error().stack; + this.id = id; +} +exports.TransportError = TransportError; +TransportError.prototype = new Error(); +(0, helpers_1.addCustomErrorDeserializer)("TransportError", function (e) { return new TransportError(e.message, e.id); }); +exports.StatusCodes = { + PIN_REMAINING_ATTEMPTS: 0x63c0, + INCORRECT_LENGTH: 0x6700, + MISSING_CRITICAL_PARAMETER: 0x6800, + COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 0x6981, + SECURITY_STATUS_NOT_SATISFIED: 0x6982, + CONDITIONS_OF_USE_NOT_SATISFIED: 0x6985, + INCORRECT_DATA: 0x6a80, + NOT_ENOUGH_MEMORY_SPACE: 0x6a84, + REFERENCED_DATA_NOT_FOUND: 0x6a88, + FILE_ALREADY_EXISTS: 0x6a89, + INCORRECT_P1_P2: 0x6b00, + INS_NOT_SUPPORTED: 0x6d00, + CLA_NOT_SUPPORTED: 0x6e00, + TECHNICAL_PROBLEM: 0x6f00, + OK: 0x9000, + MEMORY_PROBLEM: 0x9240, + NO_EF_SELECTED: 0x9400, + INVALID_OFFSET: 0x9402, + FILE_NOT_FOUND: 0x9404, + INCONSISTENT_FILE: 0x9408, + ALGORITHM_NOT_SUPPORTED: 0x9484, + INVALID_KCV: 0x9485, + CODE_NOT_INITIALIZED: 0x9802, + ACCESS_CONDITION_NOT_FULFILLED: 0x9804, + CONTRADICTION_SECRET_CODE_STATUS: 0x9808, + CONTRADICTION_INVALIDATION: 0x9810, + CODE_BLOCKED: 0x9840, + MAX_VALUE_REACHED: 0x9850, + GP_AUTH_FAILED: 0x6300, + LICENSING: 0x6f42, + HALTED: 0x6faa +}; +function getAltStatusMessage(code) { + switch (code) { + // improve text of most common errors + case 0x6700: + return "Incorrect length"; + case 0x6800: + return "Missing critical parameter"; + case 0x6982: + return "Security not satisfied (dongle locked or have invalid access rights)"; + case 0x6985: + return "Condition of use not satisfied (denied by the user?)"; + case 0x6a80: + return "Invalid data received"; + case 0x6b00: + return "Invalid parameter received"; + } + if (0x6f00 <= code && code <= 0x6fff) { + return "Internal error, please report"; + } +} +exports.getAltStatusMessage = getAltStatusMessage; +/** + * Error thrown when a device returned a non success status. + * the error.statusCode is one of the `StatusCodes` exported by this library. + */ +function TransportStatusError(statusCode) { + this.name = "TransportStatusError"; + var statusText = Object.keys(exports.StatusCodes).find(function (k) { return exports.StatusCodes[k] === statusCode; }) || + "UNKNOWN_ERROR"; + var smsg = getAltStatusMessage(statusCode) || statusText; + var statusCodeStr = statusCode.toString(16); + this.message = "Ledger device: " + smsg + " (0x" + statusCodeStr + ")"; + this.stack = new Error().stack; + this.statusCode = statusCode; + this.statusText = statusText; +} +exports.TransportStatusError = TransportStatusError; +TransportStatusError.prototype = new Error(); +(0, helpers_1.addCustomErrorDeserializer)("TransportStatusError", function (e) { return new TransportStatusError(e.statusCode); }); + +},{"./helpers":48}],50:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var rxjs_1 = require("rxjs"); +var net_1 = __importDefault(require("net")); +var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport")); +var errors_1 = require("@ledgerhq/errors"); +var logs_1 = require("@ledgerhq/logs"); +/** + * Speculos TCP transport implementation + * + * @example + * import SpeculosTransport from "@ledgerhq/hw-transport-node-speculos"; + * const transport = await SpeculosTransport.open({ apduPort }); + * const res = await transport.send(0xE0, 0x01, 0, 0); + */ +var SpeculosTransport = /** @class */ (function (_super) { + __extends(SpeculosTransport, _super); + function SpeculosTransport(apduSocket, opts) { + var _this = _super.call(this) || this; + _this.rejectExchange = function (_e) { }; + _this.resolveExchange = function (_b) { }; + _this.automationEvents = new rxjs_1.Subject(); + /** + * Send a speculos button command + * typically "Ll" would press and release the left button + * typically "Rr" would press and release the right button + * @param {*} command + */ + _this.button = function (command) { + return new Promise(function (resolve, reject) { + (0, logs_1.log)("speculos-button", command); + var _a = _this.opts, buttonPort = _a.buttonPort, host = _a.host; + if (!buttonPort) + throw new Error("buttonPort is missing"); + var socket = new net_1["default"].Socket(); + socket.on("error", function (e) { + socket.destroy(); + reject(e); + }); + socket.connect(buttonPort, host || "127.0.0.1", function () { + socket.write(Buffer.from(command, "ascii")); + socket.destroy(); + resolve(); + }); + }); + }; + _this.opts = opts; + _this.apduSocket = apduSocket; + apduSocket.on("error", function (e) { + _this.emit("disconnect", new errors_1.DisconnectedDevice(e.message)); + _this.rejectExchange(e); + _this.apduSocket.destroy(); + }); + apduSocket.on("end", function () { + _this.emit("disconnect", new errors_1.DisconnectedDevice()); + _this.rejectExchange(new errors_1.DisconnectedDeviceDuringOperation()); + }); + apduSocket.on("data", function (data) { + try { + _this.resolveExchange(decodeAPDUPayload(data)); + } + catch (e) { + _this.rejectExchange(e); + } + }); + var automationPort = opts.automationPort; + if (automationPort) { + var socket_1 = new net_1["default"].Socket(); + _this.automationSocket = socket_1; + socket_1.on("error", function (e) { + (0, logs_1.log)("speculos-automation-error", String(e)); + socket_1.destroy(); + }); + socket_1.on("data", function (data) { + (0, logs_1.log)("speculos-automation-data", data.toString("ascii")); + var split = data.toString("ascii").split("\n"); + split + .filter(function (ascii) { return !!ascii; }) + .forEach(function (ascii) { + var json = JSON.parse(ascii); + _this.automationEvents.next(json); + }); + }); + socket_1.connect(automationPort, opts.host || "127.0.0.1"); + } + return _this; + } + SpeculosTransport.prototype.exchange = function (apdu) { + return __awaiter(this, void 0, void 0, function () { + var hex, encoded, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + hex = apdu.toString("hex"); + (0, logs_1.log)("apdu", "=> " + hex); + encoded = encodeAPDU(apdu); + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.rejectExchange = reject; + _this.resolveExchange = resolve; + _this.apduSocket.write(encoded); + })]; + case 1: + res = _a.sent(); + (0, logs_1.log)("apdu", "<= " + res.toString("hex")); + return [2 /*return*/, res]; + } + }); + }); + }; + SpeculosTransport.prototype.setScrambleKey = function () { }; + SpeculosTransport.prototype.close = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (this.automationSocket) + this.automationSocket.destroy(); + this.apduSocket.destroy(); + return [2 /*return*/, Promise.resolve()]; + }); + }); + }; + SpeculosTransport.isSupported = function () { return Promise.resolve(true); }; + // this transport is not discoverable + SpeculosTransport.list = function () { return Promise.resolve([]); }; + SpeculosTransport.listen = function (_observer) { return ({ + unsubscribe: function () { } + }); }; + /** + * + */ + SpeculosTransport.open = function (opts) { + return new Promise(function (resolve, reject) { + var socket = new net_1["default"].Socket(); + socket.on("error", function (e) { + socket.destroy(); + reject(e); + }); + socket.on("end", function () { + reject(new errors_1.DisconnectedDevice("tcp closed")); + }); + socket.connect(opts.apduPort, opts.host || "127.0.0.1", function () { + // we delay a bit the transport creation to make sure the tcp does not hang up + setTimeout(function () { + resolve(new SpeculosTransport(socket, opts)); + }, 100); + }); + }); + }; + return SpeculosTransport; +}(hw_transport_1["default"])); +exports["default"] = SpeculosTransport; +function encodeAPDU(apdu) { + var size = Buffer.allocUnsafe(4); + size.writeUIntBE(apdu.length, 0, 4); + return Buffer.concat([size, apdu]); +} +function decodeAPDUPayload(data) { + var dataLength = data.readUIntBE(0, 4); // 4 bytes tells the data length + var size = dataLength + 2; // size does not include the status code so we add 2 + var payload = data.slice(4); + if (payload.length !== size) { + throw new errors_1.TransportError("Expected payload of length ".concat(size, " but got ").concat(payload.length), ""); + } + return payload; +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":49,"@ledgerhq/hw-transport":54,"@ledgerhq/logs":55,"buffer":165,"net":163,"rxjs":59}],51:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport")); +var hid_framing_1 = __importDefault(require("@ledgerhq/devices/lib/hid-framing")); +var devices_1 = require("@ledgerhq/devices"); +var logs_1 = require("@ledgerhq/logs"); +var errors_1 = require("@ledgerhq/errors"); +var ledgerDevices = [ + { + vendorId: devices_1.ledgerUSBVendorId + }, +]; +var isSupported = function () { + return Promise.resolve(!!(window.navigator && window.navigator.hid)); +}; +var getHID = function () { + // $FlowFixMe + var hid = navigator.hid; + if (!hid) + throw new errors_1.TransportError("navigator.hid is not supported", "HIDNotSupported"); + return hid; +}; +function requestLedgerDevices() { + return __awaiter(this, void 0, void 0, function () { + var device; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getHID().requestDevice({ + filters: ledgerDevices + })]; + case 1: + device = _a.sent(); + if (Array.isArray(device)) + return [2 /*return*/, device]; + return [2 /*return*/, [device]]; + } + }); + }); +} +function getLedgerDevices() { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getHID().getDevices()]; + case 1: + devices = _a.sent(); + return [2 /*return*/, devices.filter(function (d) { return d.vendorId === devices_1.ledgerUSBVendorId; })]; + } + }); + }); +} +function getFirstLedgerDevice() { + return __awaiter(this, void 0, void 0, function () { + var existingDevices, devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getLedgerDevices()]; + case 1: + existingDevices = _a.sent(); + if (existingDevices.length > 0) + return [2 /*return*/, existingDevices[0]]; + return [4 /*yield*/, requestLedgerDevices()]; + case 2: + devices = _a.sent(); + return [2 /*return*/, devices[0]]; + } + }); + }); +} +/** + * WebHID Transport implementation + * @example + * import TransportWebHID from "@ledgerhq/hw-transport-webhid"; + * ... + * TransportWebHID.create().then(transport => ...) + */ +var TransportWebHID = /** @class */ (function (_super) { + __extends(TransportWebHID, _super); + function TransportWebHID(device) { + var _this = _super.call(this) || this; + _this.channel = Math.floor(Math.random() * 0xffff); + _this.packetSize = 64; + _this.inputs = []; + _this.read = function () { + if (_this.inputs.length) { + return Promise.resolve(_this.inputs.shift()); + } + return new Promise(function (success) { + _this.inputCallback = success; + }); + }; + _this.onInputReport = function (e) { + var buffer = Buffer.from(e.data.buffer); + if (_this.inputCallback) { + _this.inputCallback(buffer); + _this.inputCallback = null; + } + else { + _this.inputs.push(buffer); + } + }; + _this._disconnectEmitted = false; + _this._emitDisconnect = function (e) { + if (_this._disconnectEmitted) + return; + _this._disconnectEmitted = true; + _this.emit("disconnect", e); + }; + /** + * Exchange with the device using APDU protocol. + * @param apdu + * @returns a promise of apdu response + */ + _this.exchange = function (apdu) { return __awaiter(_this, void 0, void 0, function () { + var b; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeAtomicImpl(function () { return __awaiter(_this, void 0, void 0, function () { + var _a, channel, packetSize, framing, blocks, i, result, acc, buffer; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this, channel = _a.channel, packetSize = _a.packetSize; + (0, logs_1.log)("apdu", "=> " + apdu.toString("hex")); + framing = (0, hid_framing_1["default"])(channel, packetSize); + blocks = framing.makeBlocks(apdu); + i = 0; + _b.label = 1; + case 1: + if (!(i < blocks.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, this.device.sendReport(0, blocks[i])]; + case 2: + _b.sent(); + _b.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: + if (!!(result = framing.getReducedResult(acc))) return [3 /*break*/, 6]; + return [4 /*yield*/, this.read()]; + case 5: + buffer = _b.sent(); + acc = framing.reduceResponse(acc, buffer); + return [3 /*break*/, 4]; + case 6: + (0, logs_1.log)("apdu", "<= " + result.toString("hex")); + return [2 /*return*/, result]; + } + }); + }); })["catch"](function (e) { + if (e && e.message && e.message.includes("write")) { + _this._emitDisconnect(e); + throw new errors_1.DisconnectedDeviceDuringOperation(e.message); + } + throw e; + })]; + case 1: + b = _a.sent(); + return [2 /*return*/, b]; + } + }); + }); }; + _this.device = device; + _this.deviceModel = + typeof device.productId === "number" + ? (0, devices_1.identifyUSBProductId)(device.productId) + : undefined; + device.addEventListener("inputreport", _this.onInputReport); + return _this; + } + /** + * Similar to create() except it will always display the device permission (even if some devices are already accepted). + */ + TransportWebHID.request = function () { + return __awaiter(this, void 0, void 0, function () { + var _a, device; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, requestLedgerDevices()]; + case 1: + _a = __read.apply(void 0, [_b.sent(), 1]), device = _a[0]; + return [2 /*return*/, TransportWebHID.open(device)]; + } + }); + }); + }; + /** + * Similar to create() except it will never display the device permission (it returns a Promise, null if it fails to find a device). + */ + TransportWebHID.openConnected = function () { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getLedgerDevices()]; + case 1: + devices = _a.sent(); + if (devices.length === 0) + return [2 /*return*/, null]; + return [2 /*return*/, TransportWebHID.open(devices[0])]; + } + }); + }); + }; + /** + * Create a Ledger transport with a HIDDevice + */ + TransportWebHID.open = function (device) { + return __awaiter(this, void 0, void 0, function () { + var transport, onDisconnect; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, device.open()]; + case 1: + _a.sent(); + transport = new TransportWebHID(device); + onDisconnect = function (e) { + if (device === e.device) { + getHID().removeEventListener("disconnect", onDisconnect); + transport._emitDisconnect(new errors_1.DisconnectedDevice()); + } + }; + getHID().addEventListener("disconnect", onDisconnect); + return [2 /*return*/, transport]; + } + }); + }); + }; + /** + * Release the transport device + */ + TransportWebHID.prototype.close = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeBusyPromise]; + case 1: + _a.sent(); + this.device.removeEventListener("inputreport", this.onInputReport); + return [4 /*yield*/, this.device.close()]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + TransportWebHID.prototype.setScrambleKey = function () { }; + /** + * Check if WebUSB transport is supported. + */ + TransportWebHID.isSupported = isSupported; + /** + * List the WebUSB devices that was previously authorized by the user. + */ + TransportWebHID.list = getLedgerDevices; + /** + * Actively listen to WebUSB devices and emit ONE device + * that was either accepted before, if not it will trigger the native permission UI. + * + * Important: it must be called in the context of a UI click! + */ + TransportWebHID.listen = function (observer) { + var unsubscribed = false; + getFirstLedgerDevice().then(function (device) { + if (!device) { + observer.error(new errors_1.TransportOpenUserCancelled("Access denied to use Ledger device")); + } + else if (!unsubscribed) { + var deviceModel = typeof device.productId === "number" + ? (0, devices_1.identifyUSBProductId)(device.productId) + : undefined; + observer.next({ + type: "add", + descriptor: device, + deviceModel: deviceModel + }); + observer.complete(); + } + }, function (error) { + observer.error(new errors_1.TransportOpenUserCancelled(error.message)); + }); + function unsubscribe() { + unsubscribed = true; + } + return { + unsubscribe: unsubscribe + }; + }; + return TransportWebHID; +}(hw_transport_1["default"])); +exports["default"] = TransportWebHID; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/devices":3,"@ledgerhq/devices/lib/hid-framing":2,"@ledgerhq/errors":49,"@ledgerhq/hw-transport":54,"@ledgerhq/logs":55,"buffer":165}],52:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport")); +var hid_framing_1 = __importDefault(require("@ledgerhq/devices/lib/hid-framing")); +var devices_1 = require("@ledgerhq/devices"); +var logs_1 = require("@ledgerhq/logs"); +var errors_1 = require("@ledgerhq/errors"); +var webusb_1 = require("./webusb"); +var configurationValue = 1; +var endpointNumber = 3; +/** + * WebUSB Transport implementation + * @example + * import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; + * ... + * TransportWebUSB.create().then(transport => ...) + */ +var TransportWebUSB = /** @class */ (function (_super) { + __extends(TransportWebUSB, _super); + function TransportWebUSB(device, interfaceNumber) { + var _this = _super.call(this) || this; + _this.channel = Math.floor(Math.random() * 0xffff); + _this.packetSize = 64; + _this._disconnectEmitted = false; + _this._emitDisconnect = function (e) { + if (_this._disconnectEmitted) + return; + _this._disconnectEmitted = true; + _this.emit("disconnect", e); + }; + _this.device = device; + _this.interfaceNumber = interfaceNumber; + _this.deviceModel = (0, devices_1.identifyUSBProductId)(device.productId); + return _this; + } + /** + * Similar to create() except it will always display the device permission (even if some devices are already accepted). + */ + TransportWebUSB.request = function () { + return __awaiter(this, void 0, void 0, function () { + var device; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, webusb_1.requestLedgerDevice)()]; + case 1: + device = _a.sent(); + return [2 /*return*/, TransportWebUSB.open(device)]; + } + }); + }); + }; + /** + * Similar to create() except it will never display the device permission (it returns a Promise, null if it fails to find a device). + */ + TransportWebUSB.openConnected = function () { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, webusb_1.getLedgerDevices)()]; + case 1: + devices = _a.sent(); + if (devices.length === 0) + return [2 /*return*/, null]; + return [2 /*return*/, TransportWebUSB.open(devices[0])]; + } + }); + }); + }; + /** + * Create a Ledger transport with a USBDevice + */ + TransportWebUSB.open = function (device) { + return __awaiter(this, void 0, void 0, function () { + var iface, interfaceNumber, e_1, transport, onDisconnect; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, device.open()]; + case 1: + _a.sent(); + if (!(device.configuration === null)) return [3 /*break*/, 3]; + return [4 /*yield*/, device.selectConfiguration(configurationValue)]; + case 2: + _a.sent(); + _a.label = 3; + case 3: return [4 /*yield*/, gracefullyResetDevice(device)]; + case 4: + _a.sent(); + iface = device.configurations[0].interfaces.find(function (_a) { + var alternates = _a.alternates; + return alternates.some(function (a) { return a.interfaceClass === 255; }); + }); + if (!iface) { + throw new errors_1.TransportInterfaceNotAvailable("No WebUSB interface found for your Ledger device. Please upgrade firmware or contact techsupport."); + } + interfaceNumber = iface.interfaceNumber; + _a.label = 5; + case 5: + _a.trys.push([5, 7, , 9]); + return [4 /*yield*/, device.claimInterface(interfaceNumber)]; + case 6: + _a.sent(); + return [3 /*break*/, 9]; + case 7: + e_1 = _a.sent(); + return [4 /*yield*/, device.close()]; + case 8: + _a.sent(); + throw new errors_1.TransportInterfaceNotAvailable(e_1.message); + case 9: + transport = new TransportWebUSB(device, interfaceNumber); + onDisconnect = function (e) { + if (device === e.device) { + // $FlowFixMe + navigator.usb.removeEventListener("disconnect", onDisconnect); + transport._emitDisconnect(new errors_1.DisconnectedDevice()); + } + }; + // $FlowFixMe + navigator.usb.addEventListener("disconnect", onDisconnect); + return [2 /*return*/, transport]; + } + }); + }); + }; + /** + * Release the transport device + */ + TransportWebUSB.prototype.close = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeBusyPromise]; + case 1: + _a.sent(); + return [4 /*yield*/, this.device.releaseInterface(this.interfaceNumber)]; + case 2: + _a.sent(); + return [4 /*yield*/, gracefullyResetDevice(this.device)]; + case 3: + _a.sent(); + return [4 /*yield*/, this.device.close()]; + case 4: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + /** + * Exchange with the device using APDU protocol. + * @param apdu + * @returns a promise of apdu response + */ + TransportWebUSB.prototype.exchange = function (apdu) { + return __awaiter(this, void 0, void 0, function () { + var b; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.exchangeAtomicImpl(function () { return __awaiter(_this, void 0, void 0, function () { + var _a, channel, packetSize, framing, blocks, i, result, acc, r, buffer; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this, channel = _a.channel, packetSize = _a.packetSize; + (0, logs_1.log)("apdu", "=> " + apdu.toString("hex")); + framing = (0, hid_framing_1["default"])(channel, packetSize); + blocks = framing.makeBlocks(apdu); + i = 0; + _b.label = 1; + case 1: + if (!(i < blocks.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, this.device.transferOut(endpointNumber, blocks[i])]; + case 2: + _b.sent(); + _b.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: + if (!!(result = framing.getReducedResult(acc))) return [3 /*break*/, 6]; + return [4 /*yield*/, this.device.transferIn(endpointNumber, packetSize)]; + case 5: + r = _b.sent(); + buffer = Buffer.from(r.data.buffer); + acc = framing.reduceResponse(acc, buffer); + return [3 /*break*/, 4]; + case 6: + (0, logs_1.log)("apdu", "<= " + result.toString("hex")); + return [2 /*return*/, result]; + } + }); + }); })["catch"](function (e) { + if (e && e.message && e.message.includes("disconnected")) { + _this._emitDisconnect(e); + throw new errors_1.DisconnectedDeviceDuringOperation(e.message); + } + throw e; + })]; + case 1: + b = _a.sent(); + return [2 /*return*/, b]; + } + }); + }); + }; + TransportWebUSB.prototype.setScrambleKey = function () { }; + /** + * Check if WebUSB transport is supported. + */ + TransportWebUSB.isSupported = webusb_1.isSupported; + /** + * List the WebUSB devices that was previously authorized by the user. + */ + TransportWebUSB.list = webusb_1.getLedgerDevices; + /** + * Actively listen to WebUSB devices and emit ONE device + * that was either accepted before, if not it will trigger the native permission UI. + * + * Important: it must be called in the context of a UI click! + */ + TransportWebUSB.listen = function (observer) { + var unsubscribed = false; + (0, webusb_1.getFirstLedgerDevice)().then(function (device) { + if (!unsubscribed) { + var deviceModel = (0, devices_1.identifyUSBProductId)(device.productId); + observer.next({ + type: "add", + descriptor: device, + deviceModel: deviceModel + }); + observer.complete(); + } + }, function (error) { + if (window.DOMException && + error instanceof window.DOMException && + error.code === 18) { + observer.error(new errors_1.TransportWebUSBGestureRequired(error.message)); + } + else { + observer.error(new errors_1.TransportOpenUserCancelled(error.message)); + } + }); + function unsubscribe() { + unsubscribed = true; + } + return { + unsubscribe: unsubscribe + }; + }; + return TransportWebUSB; +}(hw_transport_1["default"])); +exports["default"] = TransportWebUSB; +function gracefullyResetDevice(device) { + return __awaiter(this, void 0, void 0, function () { + var err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, device.reset()]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_1 = _a.sent(); + console.warn(err_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"./webusb":53,"@ledgerhq/devices":3,"@ledgerhq/devices/lib/hid-framing":2,"@ledgerhq/errors":49,"@ledgerhq/hw-transport":54,"@ledgerhq/logs":55,"buffer":165}],53:[function(require,module,exports){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +exports.__esModule = true; +exports.isSupported = exports.getFirstLedgerDevice = exports.getLedgerDevices = exports.requestLedgerDevice = void 0; +var devices_1 = require("@ledgerhq/devices"); +var ledgerDevices = [ + { + vendorId: devices_1.ledgerUSBVendorId + }, +]; +function requestLedgerDevice() { + return __awaiter(this, void 0, void 0, function () { + var device; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, navigator.usb.requestDevice({ + filters: ledgerDevices + })]; + case 1: + device = _a.sent(); + return [2 /*return*/, device]; + } + }); + }); +} +exports.requestLedgerDevice = requestLedgerDevice; +function getLedgerDevices() { + return __awaiter(this, void 0, void 0, function () { + var devices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, navigator.usb.getDevices()]; + case 1: + devices = _a.sent(); + return [2 /*return*/, devices.filter(function (d) { return d.vendorId === devices_1.ledgerUSBVendorId; })]; + } + }); + }); +} +exports.getLedgerDevices = getLedgerDevices; +function getFirstLedgerDevice() { + return __awaiter(this, void 0, void 0, function () { + var existingDevices; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getLedgerDevices()]; + case 1: + existingDevices = _a.sent(); + if (existingDevices.length > 0) + return [2 /*return*/, existingDevices[0]]; + return [2 /*return*/, requestLedgerDevice()]; + } + }); + }); +} +exports.getFirstLedgerDevice = getFirstLedgerDevice; +var isSupported = function () { + return Promise.resolve(!!navigator && + !!navigator.usb && + typeof navigator.usb.getDevices === "function"); +}; +exports.isSupported = isSupported; + +},{"@ledgerhq/devices":3}],54:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.getAltStatusMessage = exports.StatusCodes = exports.TransportStatusError = exports.TransportError = void 0; +var events_1 = __importDefault(require("events")); +var errors_1 = require("@ledgerhq/errors"); +exports.TransportError = errors_1.TransportError; +exports.StatusCodes = errors_1.StatusCodes; +exports.getAltStatusMessage = errors_1.getAltStatusMessage; +exports.TransportStatusError = errors_1.TransportStatusError; +/** + * Transport defines the generic interface to share between node/u2f impl + * A **Descriptor** is a parametric type that is up to be determined for the implementation. + * it can be for instance an ID, an file path, a URL,... + */ +var Transport = /** @class */ (function () { + function Transport() { + var _this = this; + this.exchangeTimeout = 30000; + this.unresponsiveTimeout = 15000; + this.deviceModel = null; + this._events = new events_1["default"](); + /** + * wrapper on top of exchange to simplify work of the implementation. + * @param cla + * @param ins + * @param p1 + * @param p2 + * @param data + * @param statusList is a list of accepted status code (shorts). [0x9000] by default + * @return a Promise of response buffer + */ + this.send = function (cla, ins, p1, p2, data, statusList) { + if (data === void 0) { data = Buffer.alloc(0); } + if (statusList === void 0) { statusList = [errors_1.StatusCodes.OK]; } + return __awaiter(_this, void 0, void 0, function () { + var response, sw; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (data.length >= 256) { + throw new errors_1.TransportError("data.length exceed 256 bytes limit. Got: " + data.length, "DataLengthTooBig"); + } + return [4 /*yield*/, this.exchange(Buffer.concat([ + Buffer.from([cla, ins, p1, p2]), + Buffer.from([data.length]), + data, + ]))]; + case 1: + response = _a.sent(); + sw = response.readUInt16BE(response.length - 2); + if (!statusList.some(function (s) { return s === sw; })) { + throw new errors_1.TransportStatusError(sw); + } + return [2 /*return*/, response]; + } + }); + }); + }; + this.exchangeAtomicImpl = function (f) { return __awaiter(_this, void 0, void 0, function () { + var resolveBusy, busyPromise, unresponsiveReached, timeout, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.exchangeBusyPromise) { + throw new errors_1.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect."); + } + busyPromise = new Promise(function (r) { + resolveBusy = r; + }); + this.exchangeBusyPromise = busyPromise; + unresponsiveReached = false; + timeout = setTimeout(function () { + unresponsiveReached = true; + _this.emit("unresponsive"); + }, this.unresponsiveTimeout); + _a.label = 1; + case 1: + _a.trys.push([1, , 3, 4]); + return [4 /*yield*/, f()]; + case 2: + res = _a.sent(); + if (unresponsiveReached) { + this.emit("responsive"); + } + return [2 /*return*/, res]; + case 3: + clearTimeout(timeout); + if (resolveBusy) + resolveBusy(); + this.exchangeBusyPromise = null; + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); }; + this._appAPIlock = null; + } + /** + * low level api to communicate with the device + * This method is for implementations to implement but should not be directly called. + * Instead, the recommanded way is to use send() method + * @param apdu the data to send + * @return a Promise of response data + */ + Transport.prototype.exchange = function (_apdu) { + throw new Error("exchange not implemented"); + }; + /** + * set the "scramble key" for the next exchanges with the device. + * Each App can have a different scramble key and they internally will set it at instanciation. + * @param key the scramble key + */ + Transport.prototype.setScrambleKey = function (_key) { }; + /** + * close the exchange with the device. + * @return a Promise that ends when the transport is closed. + */ + Transport.prototype.close = function () { + return Promise.resolve(); + }; + /** + * Listen to an event on an instance of transport. + * Transport implementation can have specific events. Here is the common events: + * * `"disconnect"` : triggered if Transport is disconnected + */ + Transport.prototype.on = function (eventName, cb) { + this._events.on(eventName, cb); + }; + /** + * Stop listening to an event on an instance of transport. + */ + Transport.prototype.off = function (eventName, cb) { + this._events.removeListener(eventName, cb); + }; + Transport.prototype.emit = function (event) { + var _a; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + (_a = this._events).emit.apply(_a, __spreadArray([event], __read(args), false)); + }; + /** + * Enable or not logs of the binary exchange + */ + Transport.prototype.setDebugMode = function () { + console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore."); + }; + /** + * Set a timeout (in milliseconds) for the exchange call. Only some transport might implement it. (e.g. U2F) + */ + Transport.prototype.setExchangeTimeout = function (exchangeTimeout) { + this.exchangeTimeout = exchangeTimeout; + }; + /** + * Define the delay before emitting "unresponsive" on an exchange that does not respond + */ + Transport.prototype.setExchangeUnresponsiveTimeout = function (unresponsiveTimeout) { + this.unresponsiveTimeout = unresponsiveTimeout; + }; + /** + * create() allows to open the first descriptor available or + * throw if there is none or if timeout is reached. + * This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase) + * @example + TransportFoo.create().then(transport => ...) + */ + Transport.create = function (openTimeout, listenTimeout) { + var _this = this; + if (openTimeout === void 0) { openTimeout = 3000; } + return new Promise(function (resolve, reject) { + var found = false; + var sub = _this.listen({ + next: function (e) { + found = true; + if (sub) + sub.unsubscribe(); + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + _this.open(e.descriptor, openTimeout).then(resolve, reject); + }, + error: function (e) { + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + reject(e); + }, + complete: function () { + if (listenTimeoutId) + clearTimeout(listenTimeoutId); + if (!found) { + reject(new errors_1.TransportError(_this.ErrorMessage_NoDeviceFound, "NoDeviceFound")); + } + } + }); + var listenTimeoutId = listenTimeout + ? setTimeout(function () { + sub.unsubscribe(); + reject(new errors_1.TransportError(_this.ErrorMessage_ListenTimeout, "ListenTimeout")); + }, listenTimeout) + : null; + }); + }; + Transport.prototype.decorateAppAPIMethods = function (self, methods, scrambleKey) { + var e_1, _a; + try { + for (var methods_1 = __values(methods), methods_1_1 = methods_1.next(); !methods_1_1.done; methods_1_1 = methods_1.next()) { + var methodName = methods_1_1.value; + self[methodName] = this.decorateAppAPIMethod(methodName, self[methodName], self, scrambleKey); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (methods_1_1 && !methods_1_1.done && (_a = methods_1["return"])) _a.call(methods_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + Transport.prototype.decorateAppAPIMethod = function (methodName, f, ctx, scrambleKey) { + var _this = this; + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return __awaiter(_this, void 0, void 0, function () { + var _appAPIlock; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _appAPIlock = this._appAPIlock; + if (_appAPIlock) { + return [2 /*return*/, Promise.reject(new errors_1.TransportError("Ledger Device is busy (lock " + _appAPIlock + ")", "TransportLocked"))]; + } + _a.label = 1; + case 1: + _a.trys.push([1, , 3, 4]); + this._appAPIlock = methodName; + this.setScrambleKey(scrambleKey); + return [4 /*yield*/, f.apply(ctx, args)]; + case 2: return [2 /*return*/, _a.sent()]; + case 3: + this._appAPIlock = null; + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + }; + Transport.ErrorMessage_ListenTimeout = "No Ledger device found (timeout)"; + Transport.ErrorMessage_NoDeviceFound = "No Ledger device found"; + return Transport; +}()); +exports["default"] = Transport; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@ledgerhq/errors":49,"buffer":165,"events":166}],55:[function(require,module,exports){ +"use strict"; +exports.__esModule = true; +exports.listen = exports.log = void 0; +var id = 0; +var subscribers = []; +/** + * log something + * @param type a namespaced identifier of the log (it is not a level like "debug", "error" but more like "apdu-in", "apdu-out", etc...) + * @param message a clear message of the log associated to the type + */ +var log = function (type, message, data) { + var obj = { + type: type, + id: String(++id), + date: new Date() + }; + if (message) + obj.message = message; + if (data) + obj.data = data; + dispatch(obj); +}; +exports.log = log; +/** + * listen to logs. + * @param cb that is called for each future log() with the Log object + * @return a function that can be called to unsubscribe the listener + */ +var listen = function (cb) { + subscribers.push(cb); + return function () { + var i = subscribers.indexOf(cb); + if (i !== -1) { + // equivalent of subscribers.splice(i, 1) // https://twitter.com/Rich_Harris/status/1125850391155965952 + subscribers[i] = subscribers[subscribers.length - 1]; + subscribers.pop(); + } + }; +}; +exports.listen = listen; +function dispatch(log) { + for (var i = 0; i < subscribers.length; i++) { + try { + subscribers[i](log); + } + catch (e) { + console.error(e); + } + } +} +if (typeof window !== "undefined") { + window.__ledgerLogsListen = exports.listen; +} + +},{}],56:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var hw_app_obsidian_common_1 = require("hw-app-obsidian-common"); +/** + * Kadena API + * + * @example + * import Kadena from "hw-app-kda"; + * const kda = new Kadena(transport) + */ +var Kadena = /** @class */ (function (_super) { + __extends(Kadena, _super); + function Kadena(transport) { + return _super.call(this, transport, "KDA") || this; + } + return Kadena; +}(hw_app_obsidian_common_1.Common)); +exports["default"] = Kadena; + +},{"hw-app-obsidian-common":57}],57:[function(require,module,exports){ +(function (Buffer){(function (){ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +exports.__esModule = true; +exports.Common = void 0; +/** + * Common API for ledger apps + * + * @example + * import Kadena from "hw-app-kda"; + * const kda = new Kadena(transport) + */ +var Common = /** @class */ (function () { + function Common(transport, scrambleKey, appName) { + if (appName === void 0) { appName = null; } + this.transport = transport; + this.appName = appName; + transport.decorateAppAPIMethods(this, ["menu", "getPublicKey", "signHash", "getVersion"], "KDA"); + } + /** + * Retrieves the public key associated with a particular BIP32 path from the ledger app. + * + * @param path - the path to retrieve. + */ + Common.prototype.getPublicKey = function (path) { + return __awaiter(this, void 0, void 0, function () { + var cla, ins, p1, p2, payload, response, responseSize, publicKey, res; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + cla = 0x00; + ins = 0x02; + p1 = 0; + p2 = 0; + payload = buildBip32KeyPayload(path); + return [4 /*yield*/, this.sendChunks(cla, ins, p1, p2, payload)]; + case 1: + response = _a.sent(); + responseSize = response[0]; + publicKey = response.slice(1, responseSize + 1); + res = { + publicKey: publicKey.toString("hex") + }; + return [2 /*return*/, res]; + } + }); + }); + }; + /** + * Sign a transaction with the key at a BIP32 path. + * + * @param txn - The transaction; this can be any of a node Buffer, Uint8Array, or a hexadecimal string, encoding the form of the transaction appropriate for hashing and signing. + * @param path - the path to use when signing the transaction. + */ + Common.prototype.signTransaction = function (path, txn) { + return __awaiter(this, void 0, void 0, function () { + var paths, cla, ins, p1, p2, rawTxn, hashSize, bip32KeyPayload, payload, response, signature; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + paths = splitPath(path); + cla = 0x00; + ins = 0x03; + p1 = 0; + p2 = 0; + rawTxn = typeof txn == "string" ? Buffer.from(txn, "hex") : Buffer.from(txn); + hashSize = Buffer.alloc(4); + hashSize.writeUInt32LE(rawTxn.length, 0); + bip32KeyPayload = buildBip32KeyPayload(path); + payload = Buffer.concat([hashSize, rawTxn, bip32KeyPayload]); + return [4 /*yield*/, this.sendChunks(cla, ins, p1, p2, payload)]; + case 1: + response = _a.sent(); + signature = response.slice(0, -2).toString("hex"); + return [2 /*return*/, { + signature: signature + }]; + } + }); + }); + }; + /** + * Retrieve the app version on the attached ledger device. + * @alpha TODO this doesn't exist yet + */ + Common.prototype.getVersion = function () { + return __awaiter(this, void 0, void 0, function () { + var _a, major, minor, patch, appName; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, this.transport.send(0x00, 0x00, 0x00, 0x00, Buffer.alloc(0))]; + case 1: + _a = __read.apply(void 0, [_b.sent()]), major = _a[0], minor = _a[1], patch = _a[2], appName = _a.slice(3); + return [2 /*return*/, { + major: major, + minor: minor, + patch: patch + }]; + } + }); + }); + }; + /** + * Send a raw payload as chunks to a particular APDU instruction. + * + * @remarks + * + * This is intended to be used to implement a more useful API in this class and subclasses of it, not for end use. + */ + Common.prototype.sendChunks = function (cla, ins, p1, p2, payload) { + return __awaiter(this, void 0, void 0, function () { + var rv, chunkSize, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + chunkSize = 230; + i = 0; + _a.label = 1; + case 1: + if (!(i < payload.length)) return [3 /*break*/, 4]; + return [4 /*yield*/, this.transport.send(cla, ins, p1, p2, payload.slice(i, i + chunkSize))]; + case 2: + rv = _a.sent(); + _a.label = 3; + case 3: + i += chunkSize; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, rv]; + } + }); + }); + }; + return Common; +}()); +exports.Common = Common; +function buildBip32KeyPayload(path) { + var paths = splitPath(path); + // Bip32Key payload is: + // 1 byte with number of elements in u32 array path + // Followed by the u32 array itself + var payload = Buffer.alloc(1 + paths.length * 4); + payload[0] = paths.length; + paths.forEach(function (element, index) { + payload.writeUInt32LE(element, 1 + 4 * index); + }); + return payload; +} +// TODO use bip32-path library +function splitPath(path) { + var result = []; + var components = path.split("/"); + components.forEach(function (element) { + var number = parseInt(element, 10); + if (isNaN(number)) { + return; // FIXME shouldn't it throws instead? + } + if (element.length > 1 && element[element.length - 1] === "'") { + number += 0x80000000; + } + result.push(number); + }); + return result; +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"buffer":165}],58:[function(require,module,exports){ +'use strict' + +// A linked list to keep track of recently-used-ness +const Yallist = require('yallist') + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache + +},{"yallist":162}],59:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("./internal/Observable"); +exports.Observable = Observable_1.Observable; +var ConnectableObservable_1 = require("./internal/observable/ConnectableObservable"); +exports.ConnectableObservable = ConnectableObservable_1.ConnectableObservable; +var groupBy_1 = require("./internal/operators/groupBy"); +exports.GroupedObservable = groupBy_1.GroupedObservable; +var observable_1 = require("./internal/symbol/observable"); +exports.observable = observable_1.observable; +var Subject_1 = require("./internal/Subject"); +exports.Subject = Subject_1.Subject; +var BehaviorSubject_1 = require("./internal/BehaviorSubject"); +exports.BehaviorSubject = BehaviorSubject_1.BehaviorSubject; +var ReplaySubject_1 = require("./internal/ReplaySubject"); +exports.ReplaySubject = ReplaySubject_1.ReplaySubject; +var AsyncSubject_1 = require("./internal/AsyncSubject"); +exports.AsyncSubject = AsyncSubject_1.AsyncSubject; +var asap_1 = require("./internal/scheduler/asap"); +exports.asap = asap_1.asap; +exports.asapScheduler = asap_1.asapScheduler; +var async_1 = require("./internal/scheduler/async"); +exports.async = async_1.async; +exports.asyncScheduler = async_1.asyncScheduler; +var queue_1 = require("./internal/scheduler/queue"); +exports.queue = queue_1.queue; +exports.queueScheduler = queue_1.queueScheduler; +var animationFrame_1 = require("./internal/scheduler/animationFrame"); +exports.animationFrame = animationFrame_1.animationFrame; +exports.animationFrameScheduler = animationFrame_1.animationFrameScheduler; +var VirtualTimeScheduler_1 = require("./internal/scheduler/VirtualTimeScheduler"); +exports.VirtualTimeScheduler = VirtualTimeScheduler_1.VirtualTimeScheduler; +exports.VirtualAction = VirtualTimeScheduler_1.VirtualAction; +var Scheduler_1 = require("./internal/Scheduler"); +exports.Scheduler = Scheduler_1.Scheduler; +var Subscription_1 = require("./internal/Subscription"); +exports.Subscription = Subscription_1.Subscription; +var Subscriber_1 = require("./internal/Subscriber"); +exports.Subscriber = Subscriber_1.Subscriber; +var Notification_1 = require("./internal/Notification"); +exports.Notification = Notification_1.Notification; +exports.NotificationKind = Notification_1.NotificationKind; +var pipe_1 = require("./internal/util/pipe"); +exports.pipe = pipe_1.pipe; +var noop_1 = require("./internal/util/noop"); +exports.noop = noop_1.noop; +var identity_1 = require("./internal/util/identity"); +exports.identity = identity_1.identity; +var isObservable_1 = require("./internal/util/isObservable"); +exports.isObservable = isObservable_1.isObservable; +var ArgumentOutOfRangeError_1 = require("./internal/util/ArgumentOutOfRangeError"); +exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; +var EmptyError_1 = require("./internal/util/EmptyError"); +exports.EmptyError = EmptyError_1.EmptyError; +var ObjectUnsubscribedError_1 = require("./internal/util/ObjectUnsubscribedError"); +exports.ObjectUnsubscribedError = ObjectUnsubscribedError_1.ObjectUnsubscribedError; +var UnsubscriptionError_1 = require("./internal/util/UnsubscriptionError"); +exports.UnsubscriptionError = UnsubscriptionError_1.UnsubscriptionError; +var TimeoutError_1 = require("./internal/util/TimeoutError"); +exports.TimeoutError = TimeoutError_1.TimeoutError; +var bindCallback_1 = require("./internal/observable/bindCallback"); +exports.bindCallback = bindCallback_1.bindCallback; +var bindNodeCallback_1 = require("./internal/observable/bindNodeCallback"); +exports.bindNodeCallback = bindNodeCallback_1.bindNodeCallback; +var combineLatest_1 = require("./internal/observable/combineLatest"); +exports.combineLatest = combineLatest_1.combineLatest; +var concat_1 = require("./internal/observable/concat"); +exports.concat = concat_1.concat; +var defer_1 = require("./internal/observable/defer"); +exports.defer = defer_1.defer; +var empty_1 = require("./internal/observable/empty"); +exports.empty = empty_1.empty; +var forkJoin_1 = require("./internal/observable/forkJoin"); +exports.forkJoin = forkJoin_1.forkJoin; +var from_1 = require("./internal/observable/from"); +exports.from = from_1.from; +var fromEvent_1 = require("./internal/observable/fromEvent"); +exports.fromEvent = fromEvent_1.fromEvent; +var fromEventPattern_1 = require("./internal/observable/fromEventPattern"); +exports.fromEventPattern = fromEventPattern_1.fromEventPattern; +var generate_1 = require("./internal/observable/generate"); +exports.generate = generate_1.generate; +var iif_1 = require("./internal/observable/iif"); +exports.iif = iif_1.iif; +var interval_1 = require("./internal/observable/interval"); +exports.interval = interval_1.interval; +var merge_1 = require("./internal/observable/merge"); +exports.merge = merge_1.merge; +var never_1 = require("./internal/observable/never"); +exports.never = never_1.never; +var of_1 = require("./internal/observable/of"); +exports.of = of_1.of; +var onErrorResumeNext_1 = require("./internal/observable/onErrorResumeNext"); +exports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext; +var pairs_1 = require("./internal/observable/pairs"); +exports.pairs = pairs_1.pairs; +var partition_1 = require("./internal/observable/partition"); +exports.partition = partition_1.partition; +var race_1 = require("./internal/observable/race"); +exports.race = race_1.race; +var range_1 = require("./internal/observable/range"); +exports.range = range_1.range; +var throwError_1 = require("./internal/observable/throwError"); +exports.throwError = throwError_1.throwError; +var timer_1 = require("./internal/observable/timer"); +exports.timer = timer_1.timer; +var using_1 = require("./internal/observable/using"); +exports.using = using_1.using; +var zip_1 = require("./internal/observable/zip"); +exports.zip = zip_1.zip; +var scheduled_1 = require("./internal/scheduled/scheduled"); +exports.scheduled = scheduled_1.scheduled; +var empty_2 = require("./internal/observable/empty"); +exports.EMPTY = empty_2.EMPTY; +var never_2 = require("./internal/observable/never"); +exports.NEVER = never_2.NEVER; +var config_1 = require("./internal/config"); +exports.config = config_1.config; + +},{"./internal/AsyncSubject":60,"./internal/BehaviorSubject":61,"./internal/Notification":63,"./internal/Observable":64,"./internal/ReplaySubject":67,"./internal/Scheduler":68,"./internal/Subject":69,"./internal/Subscriber":71,"./internal/Subscription":72,"./internal/config":73,"./internal/observable/ConnectableObservable":75,"./internal/observable/bindCallback":76,"./internal/observable/bindNodeCallback":77,"./internal/observable/combineLatest":78,"./internal/observable/concat":79,"./internal/observable/defer":80,"./internal/observable/empty":81,"./internal/observable/forkJoin":82,"./internal/observable/from":83,"./internal/observable/fromEvent":85,"./internal/observable/fromEventPattern":86,"./internal/observable/generate":87,"./internal/observable/iif":88,"./internal/observable/interval":89,"./internal/observable/merge":90,"./internal/observable/never":91,"./internal/observable/of":92,"./internal/observable/onErrorResumeNext":93,"./internal/observable/pairs":94,"./internal/observable/partition":95,"./internal/observable/race":96,"./internal/observable/range":97,"./internal/observable/throwError":98,"./internal/observable/timer":99,"./internal/observable/using":100,"./internal/observable/zip":101,"./internal/operators/groupBy":104,"./internal/scheduled/scheduled":114,"./internal/scheduler/VirtualTimeScheduler":124,"./internal/scheduler/animationFrame":125,"./internal/scheduler/asap":126,"./internal/scheduler/async":127,"./internal/scheduler/queue":128,"./internal/symbol/observable":130,"./internal/util/ArgumentOutOfRangeError":132,"./internal/util/EmptyError":133,"./internal/util/ObjectUnsubscribedError":135,"./internal/util/TimeoutError":136,"./internal/util/UnsubscriptionError":137,"./internal/util/identity":140,"./internal/util/isObservable":148,"./internal/util/noop":151,"./internal/util/pipe":153}],60:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("./Subject"); +var Subscription_1 = require("./Subscription"); +var AsyncSubject = (function (_super) { + __extends(AsyncSubject, _super); + function AsyncSubject() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.value = null; + _this.hasNext = false; + _this.hasCompleted = false; + return _this; + } + AsyncSubject.prototype._subscribe = function (subscriber) { + if (this.hasError) { + subscriber.error(this.thrownError); + return Subscription_1.Subscription.EMPTY; + } + else if (this.hasCompleted && this.hasNext) { + subscriber.next(this.value); + subscriber.complete(); + return Subscription_1.Subscription.EMPTY; + } + return _super.prototype._subscribe.call(this, subscriber); + }; + AsyncSubject.prototype.next = function (value) { + if (!this.hasCompleted) { + this.value = value; + this.hasNext = true; + } + }; + AsyncSubject.prototype.error = function (error) { + if (!this.hasCompleted) { + _super.prototype.error.call(this, error); + } + }; + AsyncSubject.prototype.complete = function () { + this.hasCompleted = true; + if (this.hasNext) { + _super.prototype.next.call(this, this.value); + } + _super.prototype.complete.call(this); + }; + return AsyncSubject; +}(Subject_1.Subject)); +exports.AsyncSubject = AsyncSubject; + +},{"./Subject":69,"./Subscription":72}],61:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("./Subject"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var BehaviorSubject = (function (_super) { + __extends(BehaviorSubject, _super); + function BehaviorSubject(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject.prototype, "value", { + get: function () { + return this.getValue(); + }, + enumerable: true, + configurable: true + }); + BehaviorSubject.prototype._subscribe = function (subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + if (subscription && !subscription.closed) { + subscriber.next(this._value); + } + return subscription; + }; + BehaviorSubject.prototype.getValue = function () { + if (this.hasError) { + throw this.thrownError; + } + else if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else { + return this._value; + } + }; + BehaviorSubject.prototype.next = function (value) { + _super.prototype.next.call(this, this._value = value); + }; + return BehaviorSubject; +}(Subject_1.Subject)); +exports.BehaviorSubject = BehaviorSubject; + +},{"./Subject":69,"./util/ObjectUnsubscribedError":135}],62:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("./Subscriber"); +var InnerSubscriber = (function (_super) { + __extends(InnerSubscriber, _super); + function InnerSubscriber(parent, outerValue, outerIndex) { + var _this = _super.call(this) || this; + _this.parent = parent; + _this.outerValue = outerValue; + _this.outerIndex = outerIndex; + _this.index = 0; + return _this; + } + InnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); + }; + InnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error, this); + this.unsubscribe(); + }; + InnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(this); + this.unsubscribe(); + }; + return InnerSubscriber; +}(Subscriber_1.Subscriber)); +exports.InnerSubscriber = InnerSubscriber; + +},{"./Subscriber":71}],63:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var empty_1 = require("./observable/empty"); +var of_1 = require("./observable/of"); +var throwError_1 = require("./observable/throwError"); +var NotificationKind; +(function (NotificationKind) { + NotificationKind["NEXT"] = "N"; + NotificationKind["ERROR"] = "E"; + NotificationKind["COMPLETE"] = "C"; +})(NotificationKind = exports.NotificationKind || (exports.NotificationKind = {})); +var Notification = (function () { + function Notification(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + Notification.prototype.observe = function (observer) { + switch (this.kind) { + case 'N': + return observer.next && observer.next(this.value); + case 'E': + return observer.error && observer.error(this.error); + case 'C': + return observer.complete && observer.complete(); + } + }; + Notification.prototype.do = function (next, error, complete) { + var kind = this.kind; + switch (kind) { + case 'N': + return next && next(this.value); + case 'E': + return error && error(this.error); + case 'C': + return complete && complete(); + } + }; + Notification.prototype.accept = function (nextOrObserver, error, complete) { + if (nextOrObserver && typeof nextOrObserver.next === 'function') { + return this.observe(nextOrObserver); + } + else { + return this.do(nextOrObserver, error, complete); + } + }; + Notification.prototype.toObservable = function () { + var kind = this.kind; + switch (kind) { + case 'N': + return of_1.of(this.value); + case 'E': + return throwError_1.throwError(this.error); + case 'C': + return empty_1.empty(); + } + throw new Error('unexpected notification kind value'); + }; + Notification.createNext = function (value) { + if (typeof value !== 'undefined') { + return new Notification('N', value); + } + return Notification.undefinedValueNotification; + }; + Notification.createError = function (err) { + return new Notification('E', undefined, err); + }; + Notification.createComplete = function () { + return Notification.completeNotification; + }; + Notification.completeNotification = new Notification('C'); + Notification.undefinedValueNotification = new Notification('N', undefined); + return Notification; +}()); +exports.Notification = Notification; + +},{"./observable/empty":81,"./observable/of":92,"./observable/throwError":98}],64:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var canReportError_1 = require("./util/canReportError"); +var toSubscriber_1 = require("./util/toSubscriber"); +var observable_1 = require("./symbol/observable"); +var pipe_1 = require("./util/pipe"); +var config_1 = require("./config"); +var Observable = (function () { + function Observable(subscribe) { + this._isScalar = false; + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var operator = this.operator; + var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete); + if (operator) { + sink.add(operator.call(sink, this.source)); + } + else { + sink.add(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? + this._subscribe(sink) : + this._trySubscribe(sink)); + } + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + if (sink.syncErrorThrowable) { + sink.syncErrorThrowable = false; + if (sink.syncErrorThrown) { + throw sink.syncErrorValue; + } + } + } + return sink; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + sink.syncErrorThrown = true; + sink.syncErrorValue = err; + } + if (canReportError_1.canReportError(sink)) { + sink.error(err); + } + else { + console.warn(err); + } + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscription; + subscription = _this.subscribe(function (value) { + try { + next(value); + } + catch (err) { + reject(err); + if (subscription) { + subscription.unsubscribe(); + } + } + }, reject, resolve); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var source = this.source; + return source && source.subscribe(subscriber); + }; + Observable.prototype[observable_1.observable] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + if (operations.length === 0) { + return this; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); +exports.Observable = Observable; +function getPromiseCtor(promiseCtor) { + if (!promiseCtor) { + promiseCtor = config_1.config.Promise || Promise; + } + if (!promiseCtor) { + throw new Error('no Promise impl found'); + } + return promiseCtor; +} + +},{"./config":73,"./symbol/observable":130,"./util/canReportError":138,"./util/pipe":153,"./util/toSubscriber":160}],65:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var config_1 = require("./config"); +var hostReportError_1 = require("./util/hostReportError"); +exports.empty = { + closed: true, + next: function (value) { }, + error: function (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + hostReportError_1.hostReportError(err); + } + }, + complete: function () { } +}; + +},{"./config":73,"./util/hostReportError":139}],66:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("./Subscriber"); +var OuterSubscriber = (function (_super) { + __extends(OuterSubscriber, _super); + function OuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + OuterSubscriber.prototype.notifyError = function (error, innerSub) { + this.destination.error(error); + }; + OuterSubscriber.prototype.notifyComplete = function (innerSub) { + this.destination.complete(); + }; + return OuterSubscriber; +}(Subscriber_1.Subscriber)); +exports.OuterSubscriber = OuterSubscriber; + +},{"./Subscriber":71}],67:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("./Subject"); +var queue_1 = require("./scheduler/queue"); +var Subscription_1 = require("./Subscription"); +var observeOn_1 = require("./operators/observeOn"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var SubjectSubscription_1 = require("./SubjectSubscription"); +var ReplaySubject = (function (_super) { + __extends(ReplaySubject, _super); + function ReplaySubject(bufferSize, windowTime, scheduler) { + if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; } + if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; } + var _this = _super.call(this) || this; + _this.scheduler = scheduler; + _this._events = []; + _this._infiniteTimeWindow = false; + _this._bufferSize = bufferSize < 1 ? 1 : bufferSize; + _this._windowTime = windowTime < 1 ? 1 : windowTime; + if (windowTime === Number.POSITIVE_INFINITY) { + _this._infiniteTimeWindow = true; + _this.next = _this.nextInfiniteTimeWindow; + } + else { + _this.next = _this.nextTimeWindow; + } + return _this; + } + ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) { + if (!this.isStopped) { + var _events = this._events; + _events.push(value); + if (_events.length > this._bufferSize) { + _events.shift(); + } + } + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype.nextTimeWindow = function (value) { + if (!this.isStopped) { + this._events.push(new ReplayEvent(this._getNow(), value)); + this._trimBufferThenGetEvents(); + } + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype._subscribe = function (subscriber) { + var _infiniteTimeWindow = this._infiniteTimeWindow; + var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents(); + var scheduler = this.scheduler; + var len = _events.length; + var subscription; + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else if (this.isStopped || this.hasError) { + subscription = Subscription_1.Subscription.EMPTY; + } + else { + this.observers.push(subscriber); + subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber); + } + if (scheduler) { + subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler)); + } + if (_infiniteTimeWindow) { + for (var i = 0; i < len && !subscriber.closed; i++) { + subscriber.next(_events[i]); + } + } + else { + for (var i = 0; i < len && !subscriber.closed; i++) { + subscriber.next(_events[i].value); + } + } + if (this.hasError) { + subscriber.error(this.thrownError); + } + else if (this.isStopped) { + subscriber.complete(); + } + return subscription; + }; + ReplaySubject.prototype._getNow = function () { + return (this.scheduler || queue_1.queue).now(); + }; + ReplaySubject.prototype._trimBufferThenGetEvents = function () { + var now = this._getNow(); + var _bufferSize = this._bufferSize; + var _windowTime = this._windowTime; + var _events = this._events; + var eventsCount = _events.length; + var spliceCount = 0; + while (spliceCount < eventsCount) { + if ((now - _events[spliceCount].time) < _windowTime) { + break; + } + spliceCount++; + } + if (eventsCount > _bufferSize) { + spliceCount = Math.max(spliceCount, eventsCount - _bufferSize); + } + if (spliceCount > 0) { + _events.splice(0, spliceCount); + } + return _events; + }; + return ReplaySubject; +}(Subject_1.Subject)); +exports.ReplaySubject = ReplaySubject; +var ReplayEvent = (function () { + function ReplayEvent(time, value) { + this.time = time; + this.value = value; + } + return ReplayEvent; +}()); + +},{"./Subject":69,"./SubjectSubscription":70,"./Subscription":72,"./operators/observeOn":108,"./scheduler/queue":128,"./util/ObjectUnsubscribedError":135}],68:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Scheduler = (function () { + function Scheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler.now; } + this.SchedulerAction = SchedulerAction; + this.now = now; + } + Scheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { delay = 0; } + return new this.SchedulerAction(this, work).schedule(state, delay); + }; + Scheduler.now = function () { return Date.now(); }; + return Scheduler; +}()); +exports.Scheduler = Scheduler; + +},{}],69:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("./Observable"); +var Subscriber_1 = require("./Subscriber"); +var Subscription_1 = require("./Subscription"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var SubjectSubscription_1 = require("./SubjectSubscription"); +var rxSubscriber_1 = require("../internal/symbol/rxSubscriber"); +var SubjectSubscriber = (function (_super) { + __extends(SubjectSubscriber, _super); + function SubjectSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + return _this; + } + return SubjectSubscriber; +}(Subscriber_1.Subscriber)); +exports.SubjectSubscriber = SubjectSubscriber; +var Subject = (function (_super) { + __extends(Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.observers = []; + _this.closed = false; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype[rxSubscriber_1.rxSubscriber] = function () { + return new SubjectSubscriber(this); + }; + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype.next = function (value) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + if (!this.isStopped) { + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].next(value); + } + } + }; + Subject.prototype.error = function (err) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + this.hasError = true; + this.thrownError = err; + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].error(err); + } + this.observers.length = 0; + }; + Subject.prototype.complete = function () { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].complete(); + } + this.observers.length = 0; + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = true; + this.closed = true; + this.observers = null; + }; + Subject.prototype._trySubscribe = function (subscriber) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else { + return _super.prototype._trySubscribe.call(this, subscriber); + } + }; + Subject.prototype._subscribe = function (subscriber) { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + else if (this.hasError) { + subscriber.error(this.thrownError); + return Subscription_1.Subscription.EMPTY; + } + else if (this.isStopped) { + subscriber.complete(); + return Subscription_1.Subscription.EMPTY; + } + else { + this.observers.push(subscriber); + return new SubjectSubscription_1.SubjectSubscription(this, subscriber); + } + }; + Subject.prototype.asObservable = function () { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(Observable_1.Observable)); +exports.Subject = Subject; +var AnonymousSubject = (function (_super) { + __extends(AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var destination = this.destination; + if (destination && destination.next) { + destination.next(value); + } + }; + AnonymousSubject.prototype.error = function (err) { + var destination = this.destination; + if (destination && destination.error) { + this.destination.error(err); + } + }; + AnonymousSubject.prototype.complete = function () { + var destination = this.destination; + if (destination && destination.complete) { + this.destination.complete(); + } + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var source = this.source; + if (source) { + return this.source.subscribe(subscriber); + } + else { + return Subscription_1.Subscription.EMPTY; + } + }; + return AnonymousSubject; +}(Subject)); +exports.AnonymousSubject = AnonymousSubject; + +},{"../internal/symbol/rxSubscriber":131,"./Observable":64,"./SubjectSubscription":70,"./Subscriber":71,"./Subscription":72,"./util/ObjectUnsubscribedError":135}],70:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscription_1 = require("./Subscription"); +var SubjectSubscription = (function (_super) { + __extends(SubjectSubscription, _super); + function SubjectSubscription(subject, subscriber) { + var _this = _super.call(this) || this; + _this.subject = subject; + _this.subscriber = subscriber; + _this.closed = false; + return _this; + } + SubjectSubscription.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.closed = true; + var subject = this.subject; + var observers = subject.observers; + this.subject = null; + if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { + return; + } + var subscriberIndex = observers.indexOf(this.subscriber); + if (subscriberIndex !== -1) { + observers.splice(subscriberIndex, 1); + } + }; + return SubjectSubscription; +}(Subscription_1.Subscription)); +exports.SubjectSubscription = SubjectSubscription; + +},{"./Subscription":72}],71:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var isFunction_1 = require("./util/isFunction"); +var Observer_1 = require("./Observer"); +var Subscription_1 = require("./Subscription"); +var rxSubscriber_1 = require("../internal/symbol/rxSubscriber"); +var config_1 = require("./config"); +var hostReportError_1 = require("./util/hostReportError"); +var Subscriber = (function (_super) { + __extends(Subscriber, _super); + function Subscriber(destinationOrNext, error, complete) { + var _this = _super.call(this) || this; + _this.syncErrorValue = null; + _this.syncErrorThrown = false; + _this.syncErrorThrowable = false; + _this.isStopped = false; + switch (arguments.length) { + case 0: + _this.destination = Observer_1.empty; + break; + case 1: + if (!destinationOrNext) { + _this.destination = Observer_1.empty; + break; + } + if (typeof destinationOrNext === 'object') { + if (destinationOrNext instanceof Subscriber) { + _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; + _this.destination = destinationOrNext; + destinationOrNext.add(_this); + } + else { + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext); + } + break; + } + default: + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete); + break; + } + return _this; + } + Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () { return this; }; + Subscriber.create = function (next, error, complete) { + var subscriber = new Subscriber(next, error, complete); + subscriber.syncErrorThrowable = false; + return subscriber; + }; + Subscriber.prototype.next = function (value) { + if (!this.isStopped) { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (!this.isStopped) { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (!this.isStopped) { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + this.destination.error(err); + this.unsubscribe(); + }; + Subscriber.prototype._complete = function () { + this.destination.complete(); + this.unsubscribe(); + }; + Subscriber.prototype._unsubscribeAndRecycle = function () { + var _parentOrParents = this._parentOrParents; + this._parentOrParents = null; + this.unsubscribe(); + this.closed = false; + this.isStopped = false; + this._parentOrParents = _parentOrParents; + return this; + }; + return Subscriber; +}(Subscription_1.Subscription)); +exports.Subscriber = Subscriber; +var SafeSubscriber = (function (_super) { + __extends(SafeSubscriber, _super); + function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) { + var _this = _super.call(this) || this; + _this._parentSubscriber = _parentSubscriber; + var next; + var context = _this; + if (isFunction_1.isFunction(observerOrNext)) { + next = observerOrNext; + } + else if (observerOrNext) { + next = observerOrNext.next; + error = observerOrNext.error; + complete = observerOrNext.complete; + if (observerOrNext !== Observer_1.empty) { + context = Object.create(observerOrNext); + if (isFunction_1.isFunction(context.unsubscribe)) { + _this.add(context.unsubscribe.bind(context)); + } + context.unsubscribe = _this.unsubscribe.bind(_this); + } + } + _this._context = context; + _this._next = next; + _this._error = error; + _this._complete = complete; + return _this; + } + SafeSubscriber.prototype.next = function (value) { + if (!this.isStopped && this._next) { + var _parentSubscriber = this._parentSubscriber; + if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._next, value); + } + else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.error = function (err) { + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + var useDeprecatedSynchronousErrorHandling = config_1.config.useDeprecatedSynchronousErrorHandling; + if (this._error) { + if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._error, err); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, this._error, err); + this.unsubscribe(); + } + } + else if (!_parentSubscriber.syncErrorThrowable) { + this.unsubscribe(); + if (useDeprecatedSynchronousErrorHandling) { + throw err; + } + hostReportError_1.hostReportError(err); + } + else { + if (useDeprecatedSynchronousErrorHandling) { + _parentSubscriber.syncErrorValue = err; + _parentSubscriber.syncErrorThrown = true; + } + else { + hostReportError_1.hostReportError(err); + } + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.complete = function () { + var _this = this; + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + if (this._complete) { + var wrappedComplete = function () { return _this._complete.call(_this._context); }; + if (!config_1.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(wrappedComplete); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, wrappedComplete); + this.unsubscribe(); + } + } + else { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { + try { + fn.call(this._context, value); + } + catch (err) { + this.unsubscribe(); + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + hostReportError_1.hostReportError(err); + } + } + }; + SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { + if (!config_1.config.useDeprecatedSynchronousErrorHandling) { + throw new Error('bad call'); + } + try { + fn.call(this._context, value); + } + catch (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + parent.syncErrorValue = err; + parent.syncErrorThrown = true; + return true; + } + else { + hostReportError_1.hostReportError(err); + return true; + } + } + return false; + }; + SafeSubscriber.prototype._unsubscribe = function () { + var _parentSubscriber = this._parentSubscriber; + this._context = null; + this._parentSubscriber = null; + _parentSubscriber.unsubscribe(); + }; + return SafeSubscriber; +}(Subscriber)); +exports.SafeSubscriber = SafeSubscriber; + +},{"../internal/symbol/rxSubscriber":131,"./Observer":65,"./Subscription":72,"./config":73,"./util/hostReportError":139,"./util/isFunction":143}],72:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var isArray_1 = require("./util/isArray"); +var isObject_1 = require("./util/isObject"); +var isFunction_1 = require("./util/isFunction"); +var UnsubscriptionError_1 = require("./util/UnsubscriptionError"); +var Subscription = (function () { + function Subscription(unsubscribe) { + this.closed = false; + this._parentOrParents = null; + this._subscriptions = null; + if (unsubscribe) { + this._ctorUnsubscribe = true; + this._unsubscribe = unsubscribe; + } + } + Subscription.prototype.unsubscribe = function () { + var errors; + if (this.closed) { + return; + } + var _a = this, _parentOrParents = _a._parentOrParents, _ctorUnsubscribe = _a._ctorUnsubscribe, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + this.closed = true; + this._parentOrParents = null; + this._subscriptions = null; + if (_parentOrParents instanceof Subscription) { + _parentOrParents.remove(this); + } + else if (_parentOrParents !== null) { + for (var index = 0; index < _parentOrParents.length; ++index) { + var parent_1 = _parentOrParents[index]; + parent_1.remove(this); + } + } + if (isFunction_1.isFunction(_unsubscribe)) { + if (_ctorUnsubscribe) { + this._unsubscribe = undefined; + } + try { + _unsubscribe.call(this); + } + catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e]; + } + } + if (isArray_1.isArray(_subscriptions)) { + var index = -1; + var len = _subscriptions.length; + while (++index < len) { + var sub = _subscriptions[index]; + if (isObject_1.isObject(sub)) { + try { + sub.unsubscribe(); + } + catch (e) { + errors = errors || []; + if (e instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = errors.concat(flattenUnsubscriptionErrors(e.errors)); + } + else { + errors.push(e); + } + } + } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + }; + Subscription.prototype.add = function (teardown) { + var subscription = teardown; + if (!teardown) { + return Subscription.EMPTY; + } + switch (typeof teardown) { + case 'function': + subscription = new Subscription(teardown); + case 'object': + if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') { + return subscription; + } + else if (this.closed) { + subscription.unsubscribe(); + return subscription; + } + else if (!(subscription instanceof Subscription)) { + var tmp = subscription; + subscription = new Subscription(); + subscription._subscriptions = [tmp]; + } + break; + default: { + throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); + } + } + var _parentOrParents = subscription._parentOrParents; + if (_parentOrParents === null) { + subscription._parentOrParents = this; + } + else if (_parentOrParents instanceof Subscription) { + if (_parentOrParents === this) { + return subscription; + } + subscription._parentOrParents = [_parentOrParents, this]; + } + else if (_parentOrParents.indexOf(this) === -1) { + _parentOrParents.push(this); + } + else { + return subscription; + } + var subscriptions = this._subscriptions; + if (subscriptions === null) { + this._subscriptions = [subscription]; + } + else { + subscriptions.push(subscription); + } + return subscription; + }; + Subscription.prototype.remove = function (subscription) { + var subscriptions = this._subscriptions; + if (subscriptions) { + var subscriptionIndex = subscriptions.indexOf(subscription); + if (subscriptionIndex !== -1) { + subscriptions.splice(subscriptionIndex, 1); + } + } + }; + Subscription.EMPTY = (function (empty) { + empty.closed = true; + return empty; + }(new Subscription())); + return Subscription; +}()); +exports.Subscription = Subscription; +function flattenUnsubscriptionErrors(errors) { + return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []); +} + +},{"./util/UnsubscriptionError":137,"./util/isArray":141,"./util/isFunction":143,"./util/isObject":147}],73:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var _enable_super_gross_mode_that_will_cause_bad_things = false; +exports.config = { + Promise: undefined, + set useDeprecatedSynchronousErrorHandling(value) { + if (value) { + var error = new Error(); + console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack); + } + else if (_enable_super_gross_mode_that_will_cause_bad_things) { + console.log('RxJS: Back to a better error behavior. Thank you. <3'); + } + _enable_super_gross_mode_that_will_cause_bad_things = value; + }, + get useDeprecatedSynchronousErrorHandling() { + return _enable_super_gross_mode_that_will_cause_bad_things; + }, +}; + +},{}],74:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("./Subscriber"); +var Observable_1 = require("./Observable"); +var subscribeTo_1 = require("./util/subscribeTo"); +var SimpleInnerSubscriber = (function (_super) { + __extends(SimpleInnerSubscriber, _super); + function SimpleInnerSubscriber(parent) { + var _this = _super.call(this) || this; + _this.parent = parent; + return _this; + } + SimpleInnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(value); + }; + SimpleInnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error); + this.unsubscribe(); + }; + SimpleInnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(); + this.unsubscribe(); + }; + return SimpleInnerSubscriber; +}(Subscriber_1.Subscriber)); +exports.SimpleInnerSubscriber = SimpleInnerSubscriber; +var ComplexInnerSubscriber = (function (_super) { + __extends(ComplexInnerSubscriber, _super); + function ComplexInnerSubscriber(parent, outerValue, outerIndex) { + var _this = _super.call(this) || this; + _this.parent = parent; + _this.outerValue = outerValue; + _this.outerIndex = outerIndex; + return _this; + } + ComplexInnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(this.outerValue, value, this.outerIndex, this); + }; + ComplexInnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error); + this.unsubscribe(); + }; + ComplexInnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(this); + this.unsubscribe(); + }; + return ComplexInnerSubscriber; +}(Subscriber_1.Subscriber)); +exports.ComplexInnerSubscriber = ComplexInnerSubscriber; +var SimpleOuterSubscriber = (function (_super) { + __extends(SimpleOuterSubscriber, _super); + function SimpleOuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + SimpleOuterSubscriber.prototype.notifyNext = function (innerValue) { + this.destination.next(innerValue); + }; + SimpleOuterSubscriber.prototype.notifyError = function (err) { + this.destination.error(err); + }; + SimpleOuterSubscriber.prototype.notifyComplete = function () { + this.destination.complete(); + }; + return SimpleOuterSubscriber; +}(Subscriber_1.Subscriber)); +exports.SimpleOuterSubscriber = SimpleOuterSubscriber; +var ComplexOuterSubscriber = (function (_super) { + __extends(ComplexOuterSubscriber, _super); + function ComplexOuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + ComplexOuterSubscriber.prototype.notifyNext = function (_outerValue, innerValue, _outerIndex, _innerSub) { + this.destination.next(innerValue); + }; + ComplexOuterSubscriber.prototype.notifyError = function (error) { + this.destination.error(error); + }; + ComplexOuterSubscriber.prototype.notifyComplete = function (_innerSub) { + this.destination.complete(); + }; + return ComplexOuterSubscriber; +}(Subscriber_1.Subscriber)); +exports.ComplexOuterSubscriber = ComplexOuterSubscriber; +function innerSubscribe(result, innerSubscriber) { + if (innerSubscriber.closed) { + return undefined; + } + if (result instanceof Observable_1.Observable) { + return result.subscribe(innerSubscriber); + } + var subscription; + try { + subscription = subscribeTo_1.subscribeTo(result)(innerSubscriber); + } + catch (error) { + innerSubscriber.error(error); + } + return subscription; +} +exports.innerSubscribe = innerSubscribe; + +},{"./Observable":64,"./Subscriber":71,"./util/subscribeTo":154}],75:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subject_1 = require("../Subject"); +var Observable_1 = require("../Observable"); +var Subscriber_1 = require("../Subscriber"); +var Subscription_1 = require("../Subscription"); +var refCount_1 = require("../operators/refCount"); +var ConnectableObservable = (function (_super) { + __extends(ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._refCount = 0; + _this._isComplete = false; + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable.prototype.connect = function () { + var connection = this._connection; + if (!connection) { + this._isComplete = false; + connection = this._connection = new Subscription_1.Subscription(); + connection.add(this.source + .subscribe(new ConnectableSubscriber(this.getSubject(), this))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable.prototype.refCount = function () { + return refCount_1.refCount()(this); + }; + return ConnectableObservable; +}(Observable_1.Observable)); +exports.ConnectableObservable = ConnectableObservable; +exports.connectableObservableDescriptor = (function () { + var connectableProto = ConnectableObservable.prototype; + return { + operator: { value: null }, + _refCount: { value: 0, writable: true }, + _subject: { value: null, writable: true }, + _connection: { value: null, writable: true }, + _subscribe: { value: connectableProto._subscribe }, + _isComplete: { value: connectableProto._isComplete, writable: true }, + getSubject: { value: connectableProto.getSubject }, + connect: { value: connectableProto.connect }, + refCount: { value: connectableProto.refCount } + }; +})(); +var ConnectableSubscriber = (function (_super) { + __extends(ConnectableSubscriber, _super); + function ConnectableSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + ConnectableSubscriber.prototype._error = function (err) { + this._unsubscribe(); + _super.prototype._error.call(this, err); + }; + ConnectableSubscriber.prototype._complete = function () { + this.connectable._isComplete = true; + this._unsubscribe(); + _super.prototype._complete.call(this); + }; + ConnectableSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (connectable) { + this.connectable = null; + var connection = connectable._connection; + connectable._refCount = 0; + connectable._subject = null; + connectable._connection = null; + if (connection) { + connection.unsubscribe(); + } + } + }; + return ConnectableSubscriber; +}(Subject_1.SubjectSubscriber)); +var RefCountOperator = (function () { + function RefCountOperator(connectable) { + this.connectable = connectable; + } + RefCountOperator.prototype.call = function (subscriber, source) { + var connectable = this.connectable; + connectable._refCount++; + var refCounter = new RefCountSubscriber(subscriber, connectable); + var subscription = source.subscribe(refCounter); + if (!refCounter.closed) { + refCounter.connection = connectable.connect(); + } + return subscription; + }; + return RefCountOperator; +}()); +var RefCountSubscriber = (function (_super) { + __extends(RefCountSubscriber, _super); + function RefCountSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + RefCountSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (!connectable) { + this.connection = null; + return; + } + this.connectable = null; + var refCount = connectable._refCount; + if (refCount <= 0) { + this.connection = null; + return; + } + connectable._refCount = refCount - 1; + if (refCount > 1) { + this.connection = null; + return; + } + var connection = this.connection; + var sharedConnection = connectable._connection; + this.connection = null; + if (sharedConnection && (!connection || sharedConnection === connection)) { + sharedConnection.unsubscribe(); + } + }; + return RefCountSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Observable":64,"../Subject":69,"../Subscriber":71,"../Subscription":72,"../operators/refCount":109}],76:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var AsyncSubject_1 = require("../AsyncSubject"); +var map_1 = require("../operators/map"); +var canReportError_1 = require("../util/canReportError"); +var isArray_1 = require("../util/isArray"); +var isScheduler_1 = require("../util/isScheduler"); +function bindCallback(callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + }; + } + } + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var context = this; + var subject; + var params = { + context: context, + subject: subject, + callbackFunc: callbackFunc, + scheduler: scheduler, + }; + return new Observable_1.Observable(function (subscriber) { + if (!scheduler) { + if (!subject) { + subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); + subject.complete(); + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + if (canReportError_1.canReportError(subject)) { + subject.error(err); + } + else { + console.warn(err); + } + } + } + return subject.subscribe(subscriber); + } + else { + var state = { + args: args, subscriber: subscriber, params: params, + }; + return scheduler.schedule(dispatch, 0, state); + } + }); + }; +} +exports.bindCallback = bindCallback; +function dispatch(state) { + var _this = this; + var self = this; + var args = state.args, subscriber = state.subscriber, params = state.params; + var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler; + var subject = params.subject; + if (!subject) { + subject = params.subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; + _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject })); + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + subject.error(err); + } + } + this.add(subject.subscribe(subscriber)); +} +function dispatchNext(state) { + var value = state.value, subject = state.subject; + subject.next(value); + subject.complete(); +} +function dispatchError(state) { + var err = state.err, subject = state.subject; + subject.error(err); +} + +},{"../AsyncSubject":60,"../Observable":64,"../operators/map":105,"../util/canReportError":138,"../util/isArray":141,"../util/isScheduler":150}],77:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var AsyncSubject_1 = require("../AsyncSubject"); +var map_1 = require("../operators/map"); +var canReportError_1 = require("../util/canReportError"); +var isScheduler_1 = require("../util/isScheduler"); +var isArray_1 = require("../util/isArray"); +function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + }; + } + } + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var params = { + subject: undefined, + args: args, + callbackFunc: callbackFunc, + scheduler: scheduler, + context: this, + }; + return new Observable_1.Observable(function (subscriber) { + var context = params.context; + var subject = params.subject; + if (!scheduler) { + if (!subject) { + subject = params.subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + var err = innerArgs.shift(); + if (err) { + subject.error(err); + return; + } + subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); + subject.complete(); + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + if (canReportError_1.canReportError(subject)) { + subject.error(err); + } + else { + console.warn(err); + } + } + } + return subject.subscribe(subscriber); + } + else { + return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context }); + } + }); + }; +} +exports.bindNodeCallback = bindNodeCallback; +function dispatch(state) { + var _this = this; + var params = state.params, subscriber = state.subscriber, context = state.context; + var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler; + var subject = params.subject; + if (!subject) { + subject = params.subject = new AsyncSubject_1.AsyncSubject(); + var handler = function () { + var innerArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + innerArgs[_i] = arguments[_i]; + } + var err = innerArgs.shift(); + if (err) { + _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject })); + } + else { + var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; + _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject })); + } + }; + try { + callbackFunc.apply(context, args.concat([handler])); + } + catch (err) { + this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject })); + } + } + this.add(subject.subscribe(subscriber)); +} +function dispatchNext(arg) { + var value = arg.value, subject = arg.subject; + subject.next(value); + subject.complete(); +} +function dispatchError(arg) { + var err = arg.err, subject = arg.subject; + subject.error(err); +} + +},{"../AsyncSubject":60,"../Observable":64,"../operators/map":105,"../util/canReportError":138,"../util/isArray":141,"../util/isScheduler":150}],78:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var isScheduler_1 = require("../util/isScheduler"); +var isArray_1 = require("../util/isArray"); +var OuterSubscriber_1 = require("../OuterSubscriber"); +var subscribeToResult_1 = require("../util/subscribeToResult"); +var fromArray_1 = require("./fromArray"); +var NONE = {}; +function combineLatest() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var resultSelector = undefined; + var scheduler = undefined; + if (isScheduler_1.isScheduler(observables[observables.length - 1])) { + scheduler = observables.pop(); + } + if (typeof observables[observables.length - 1] === 'function') { + resultSelector = observables.pop(); + } + if (observables.length === 1 && isArray_1.isArray(observables[0])) { + observables = observables[0]; + } + return fromArray_1.fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector)); +} +exports.combineLatest = combineLatest; +var CombineLatestOperator = (function () { + function CombineLatestOperator(resultSelector) { + this.resultSelector = resultSelector; + } + CombineLatestOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector)); + }; + return CombineLatestOperator; +}()); +exports.CombineLatestOperator = CombineLatestOperator; +var CombineLatestSubscriber = (function (_super) { + __extends(CombineLatestSubscriber, _super); + function CombineLatestSubscriber(destination, resultSelector) { + var _this = _super.call(this, destination) || this; + _this.resultSelector = resultSelector; + _this.active = 0; + _this.values = []; + _this.observables = []; + return _this; + } + CombineLatestSubscriber.prototype._next = function (observable) { + this.values.push(NONE); + this.observables.push(observable); + }; + CombineLatestSubscriber.prototype._complete = function () { + var observables = this.observables; + var len = observables.length; + if (len === 0) { + this.destination.complete(); + } + else { + this.active = len; + this.toRespond = len; + for (var i = 0; i < len; i++) { + var observable = observables[i]; + this.add(subscribeToResult_1.subscribeToResult(this, observable, undefined, i)); + } + } + }; + CombineLatestSubscriber.prototype.notifyComplete = function (unused) { + if ((this.active -= 1) === 0) { + this.destination.complete(); + } + }; + CombineLatestSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { + var values = this.values; + var oldVal = values[outerIndex]; + var toRespond = !this.toRespond + ? 0 + : oldVal === NONE ? --this.toRespond : this.toRespond; + values[outerIndex] = innerValue; + if (toRespond === 0) { + if (this.resultSelector) { + this._tryResultSelector(values); + } + else { + this.destination.next(values.slice()); + } + } + }; + CombineLatestSubscriber.prototype._tryResultSelector = function (values) { + var result; + try { + result = this.resultSelector.apply(this, values); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return CombineLatestSubscriber; +}(OuterSubscriber_1.OuterSubscriber)); +exports.CombineLatestSubscriber = CombineLatestSubscriber; + +},{"../OuterSubscriber":66,"../util/isArray":141,"../util/isScheduler":150,"../util/subscribeToResult":159,"./fromArray":84}],79:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var of_1 = require("./of"); +var concatAll_1 = require("../operators/concatAll"); +function concat() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(of_1.of.apply(void 0, observables)); +} +exports.concat = concat; + +},{"../operators/concatAll":102,"./of":92}],80:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var from_1 = require("./from"); +var empty_1 = require("./empty"); +function defer(observableFactory) { + return new Observable_1.Observable(function (subscriber) { + var input; + try { + input = observableFactory(); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var source = input ? from_1.from(input) : empty_1.empty(); + return source.subscribe(subscriber); + }); +} +exports.defer = defer; + +},{"../Observable":64,"./empty":81,"./from":83}],81:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +exports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); }); +function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports.EMPTY; +} +exports.empty = empty; +function emptyScheduled(scheduler) { + return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); +} + +},{"../Observable":64}],82:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isArray_1 = require("../util/isArray"); +var map_1 = require("../operators/map"); +var isObject_1 = require("../util/isObject"); +var from_1 = require("./from"); +function forkJoin() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + if (sources.length === 1) { + var first_1 = sources[0]; + if (isArray_1.isArray(first_1)) { + return forkJoinInternal(first_1, null); + } + if (isObject_1.isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) { + var keys = Object.keys(first_1); + return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys); + } + } + if (typeof sources[sources.length - 1] === 'function') { + var resultSelector_1 = sources.pop(); + sources = (sources.length === 1 && isArray_1.isArray(sources[0])) ? sources[0] : sources; + return forkJoinInternal(sources, null).pipe(map_1.map(function (args) { return resultSelector_1.apply(void 0, args); })); + } + return forkJoinInternal(sources, null); +} +exports.forkJoin = forkJoin; +function forkJoinInternal(sources, keys) { + return new Observable_1.Observable(function (subscriber) { + var len = sources.length; + if (len === 0) { + subscriber.complete(); + return; + } + var values = new Array(len); + var completed = 0; + var emitted = 0; + var _loop_1 = function (i) { + var source = from_1.from(sources[i]); + var hasValue = false; + subscriber.add(source.subscribe({ + next: function (value) { + if (!hasValue) { + hasValue = true; + emitted++; + } + values[i] = value; + }, + error: function (err) { return subscriber.error(err); }, + complete: function () { + completed++; + if (completed === len || !hasValue) { + if (emitted === len) { + subscriber.next(keys ? + keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) : + values); + } + subscriber.complete(); + } + } + })); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + }); +} + +},{"../Observable":64,"../operators/map":105,"../util/isArray":141,"../util/isObject":147,"./from":83}],83:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var subscribeTo_1 = require("../util/subscribeTo"); +var scheduled_1 = require("../scheduled/scheduled"); +function from(input, scheduler) { + if (!scheduler) { + if (input instanceof Observable_1.Observable) { + return input; + } + return new Observable_1.Observable(subscribeTo_1.subscribeTo(input)); + } + else { + return scheduled_1.scheduled(input, scheduler); + } +} +exports.from = from; + +},{"../Observable":64,"../scheduled/scheduled":114,"../util/subscribeTo":154}],84:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var subscribeToArray_1 = require("../util/subscribeToArray"); +var scheduleArray_1 = require("../scheduled/scheduleArray"); +function fromArray(input, scheduler) { + if (!scheduler) { + return new Observable_1.Observable(subscribeToArray_1.subscribeToArray(input)); + } + else { + return scheduleArray_1.scheduleArray(input, scheduler); + } +} +exports.fromArray = fromArray; + +},{"../Observable":64,"../scheduled/scheduleArray":110,"../util/subscribeToArray":155}],85:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isArray_1 = require("../util/isArray"); +var isFunction_1 = require("../util/isFunction"); +var map_1 = require("../operators/map"); +var toString = (function () { return Object.prototype.toString; })(); +function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + } + return new Observable_1.Observable(function (subscriber) { + function handler(e) { + if (arguments.length > 1) { + subscriber.next(Array.prototype.slice.call(arguments)); + } + else { + subscriber.next(e); + } + } + setupSubscription(target, eventName, handler, subscriber, options); + }); +} +exports.fromEvent = fromEvent; +function setupSubscription(sourceObj, eventName, handler, subscriber, options) { + var unsubscribe; + if (isEventTarget(sourceObj)) { + var source_1 = sourceObj; + sourceObj.addEventListener(eventName, handler, options); + unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); }; + } + else if (isJQueryStyleEventEmitter(sourceObj)) { + var source_2 = sourceObj; + sourceObj.on(eventName, handler); + unsubscribe = function () { return source_2.off(eventName, handler); }; + } + else if (isNodeStyleEventEmitter(sourceObj)) { + var source_3 = sourceObj; + sourceObj.addListener(eventName, handler); + unsubscribe = function () { return source_3.removeListener(eventName, handler); }; + } + else if (sourceObj && sourceObj.length) { + for (var i = 0, len = sourceObj.length; i < len; i++) { + setupSubscription(sourceObj[i], eventName, handler, subscriber, options); + } + } + else { + throw new TypeError('Invalid event target'); + } + subscriber.add(unsubscribe); +} +function isNodeStyleEventEmitter(sourceObj) { + return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function'; +} +function isJQueryStyleEventEmitter(sourceObj) { + return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function'; +} +function isEventTarget(sourceObj) { + return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function'; +} + +},{"../Observable":64,"../operators/map":105,"../util/isArray":141,"../util/isFunction":143}],86:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isArray_1 = require("../util/isArray"); +var isFunction_1 = require("../util/isFunction"); +var map_1 = require("../operators/map"); +function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(map_1.map(function (args) { return isArray_1.isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); })); + } + return new Observable_1.Observable(function (subscriber) { + var handler = function () { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue; + try { + retValue = addHandler(handler); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (!isFunction_1.isFunction(removeHandler)) { + return undefined; + } + return function () { return removeHandler(handler, retValue); }; + }); +} +exports.fromEventPattern = fromEventPattern; + +},{"../Observable":64,"../operators/map":105,"../util/isArray":141,"../util/isFunction":143}],87:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var identity_1 = require("../util/identity"); +var isScheduler_1 = require("../util/isScheduler"); +function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) { + var resultSelector; + var initialState; + if (arguments.length == 1) { + var options = initialStateOrOptions; + initialState = options.initialState; + condition = options.condition; + iterate = options.iterate; + resultSelector = options.resultSelector || identity_1.identity; + scheduler = options.scheduler; + } + else if (resultSelectorOrObservable === undefined || isScheduler_1.isScheduler(resultSelectorOrObservable)) { + initialState = initialStateOrOptions; + resultSelector = identity_1.identity; + scheduler = resultSelectorOrObservable; + } + else { + initialState = initialStateOrOptions; + resultSelector = resultSelectorOrObservable; + } + return new Observable_1.Observable(function (subscriber) { + var state = initialState; + if (scheduler) { + return scheduler.schedule(dispatch, 0, { + subscriber: subscriber, + iterate: iterate, + condition: condition, + resultSelector: resultSelector, + state: state + }); + } + do { + if (condition) { + var conditionResult = void 0; + try { + conditionResult = condition(state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (!conditionResult) { + subscriber.complete(); + break; + } + } + var value = void 0; + try { + value = resultSelector(state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + subscriber.next(value); + if (subscriber.closed) { + break; + } + try { + state = iterate(state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + } while (true); + return undefined; + }); +} +exports.generate = generate; +function dispatch(state) { + var subscriber = state.subscriber, condition = state.condition; + if (subscriber.closed) { + return undefined; + } + if (state.needIterate) { + try { + state.state = state.iterate(state.state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + } + else { + state.needIterate = true; + } + if (condition) { + var conditionResult = void 0; + try { + conditionResult = condition(state.state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (!conditionResult) { + subscriber.complete(); + return undefined; + } + if (subscriber.closed) { + return undefined; + } + } + var value; + try { + value = state.resultSelector(state.state); + } + catch (err) { + subscriber.error(err); + return undefined; + } + if (subscriber.closed) { + return undefined; + } + subscriber.next(value); + if (subscriber.closed) { + return undefined; + } + return this.schedule(state); +} + +},{"../Observable":64,"../util/identity":140,"../util/isScheduler":150}],88:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var defer_1 = require("./defer"); +var empty_1 = require("./empty"); +function iif(condition, trueResult, falseResult) { + if (trueResult === void 0) { trueResult = empty_1.EMPTY; } + if (falseResult === void 0) { falseResult = empty_1.EMPTY; } + return defer_1.defer(function () { return condition() ? trueResult : falseResult; }); +} +exports.iif = iif; + +},{"./defer":80,"./empty":81}],89:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var async_1 = require("../scheduler/async"); +var isNumeric_1 = require("../util/isNumeric"); +function interval(period, scheduler) { + if (period === void 0) { period = 0; } + if (scheduler === void 0) { scheduler = async_1.async; } + if (!isNumeric_1.isNumeric(period) || period < 0) { + period = 0; + } + if (!scheduler || typeof scheduler.schedule !== 'function') { + scheduler = async_1.async; + } + return new Observable_1.Observable(function (subscriber) { + subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period })); + return subscriber; + }); +} +exports.interval = interval; +function dispatch(state) { + var subscriber = state.subscriber, counter = state.counter, period = state.period; + subscriber.next(counter); + this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period); +} + +},{"../Observable":64,"../scheduler/async":127,"../util/isNumeric":146}],90:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var isScheduler_1 = require("../util/isScheduler"); +var mergeAll_1 = require("../operators/mergeAll"); +var fromArray_1 = require("./fromArray"); +function merge() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var concurrent = Number.POSITIVE_INFINITY; + var scheduler = null; + var last = observables[observables.length - 1]; + if (isScheduler_1.isScheduler(last)) { + scheduler = observables.pop(); + if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { + concurrent = observables.pop(); + } + } + else if (typeof last === 'number') { + concurrent = observables.pop(); + } + if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) { + return observables[0]; + } + return mergeAll_1.mergeAll(concurrent)(fromArray_1.fromArray(observables, scheduler)); +} +exports.merge = merge; + +},{"../Observable":64,"../operators/mergeAll":106,"../util/isScheduler":150,"./fromArray":84}],91:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var noop_1 = require("../util/noop"); +exports.NEVER = new Observable_1.Observable(noop_1.noop); +function never() { + return exports.NEVER; +} +exports.never = never; + +},{"../Observable":64,"../util/noop":151}],92:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var isScheduler_1 = require("../util/isScheduler"); +var fromArray_1 = require("./fromArray"); +var scheduleArray_1 = require("../scheduled/scheduleArray"); +function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args[args.length - 1]; + if (isScheduler_1.isScheduler(scheduler)) { + args.pop(); + return scheduleArray_1.scheduleArray(args, scheduler); + } + else { + return fromArray_1.fromArray(args); + } +} +exports.of = of; + +},{"../scheduled/scheduleArray":110,"../util/isScheduler":150,"./fromArray":84}],93:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var from_1 = require("./from"); +var isArray_1 = require("../util/isArray"); +var empty_1 = require("./empty"); +function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + if (sources.length === 0) { + return empty_1.EMPTY; + } + var first = sources[0], remainder = sources.slice(1); + if (sources.length === 1 && isArray_1.isArray(first)) { + return onErrorResumeNext.apply(void 0, first); + } + return new Observable_1.Observable(function (subscriber) { + var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); }; + return from_1.from(first).subscribe({ + next: function (value) { subscriber.next(value); }, + error: subNext, + complete: subNext, + }); + }); +} +exports.onErrorResumeNext = onErrorResumeNext; + +},{"../Observable":64,"../util/isArray":141,"./empty":81,"./from":83}],94:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +function pairs(obj, scheduler) { + if (!scheduler) { + return new Observable_1.Observable(function (subscriber) { + var keys = Object.keys(obj); + for (var i = 0; i < keys.length && !subscriber.closed; i++) { + var key = keys[i]; + if (obj.hasOwnProperty(key)) { + subscriber.next([key, obj[key]]); + } + } + subscriber.complete(); + }); + } + else { + return new Observable_1.Observable(function (subscriber) { + var keys = Object.keys(obj); + var subscription = new Subscription_1.Subscription(); + subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj })); + return subscription; + }); + } +} +exports.pairs = pairs; +function dispatch(state) { + var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj; + if (!subscriber.closed) { + if (index < keys.length) { + var key = keys[index]; + subscriber.next([key, obj[key]]); + subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj })); + } + else { + subscriber.complete(); + } + } +} +exports.dispatch = dispatch; + +},{"../Observable":64,"../Subscription":72}],95:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var not_1 = require("../util/not"); +var subscribeTo_1 = require("../util/subscribeTo"); +var filter_1 = require("../operators/filter"); +var Observable_1 = require("../Observable"); +function partition(source, predicate, thisArg) { + return [ + filter_1.filter(predicate, thisArg)(new Observable_1.Observable(subscribeTo_1.subscribeTo(source))), + filter_1.filter(not_1.not(predicate, thisArg))(new Observable_1.Observable(subscribeTo_1.subscribeTo(source))) + ]; +} +exports.partition = partition; + +},{"../Observable":64,"../operators/filter":103,"../util/not":152,"../util/subscribeTo":154}],96:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var isArray_1 = require("../util/isArray"); +var fromArray_1 = require("./fromArray"); +var OuterSubscriber_1 = require("../OuterSubscriber"); +var subscribeToResult_1 = require("../util/subscribeToResult"); +function race() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + if (observables.length === 1) { + if (isArray_1.isArray(observables[0])) { + observables = observables[0]; + } + else { + return observables[0]; + } + } + return fromArray_1.fromArray(observables, undefined).lift(new RaceOperator()); +} +exports.race = race; +var RaceOperator = (function () { + function RaceOperator() { + } + RaceOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new RaceSubscriber(subscriber)); + }; + return RaceOperator; +}()); +exports.RaceOperator = RaceOperator; +var RaceSubscriber = (function (_super) { + __extends(RaceSubscriber, _super); + function RaceSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.hasFirst = false; + _this.observables = []; + _this.subscriptions = []; + return _this; + } + RaceSubscriber.prototype._next = function (observable) { + this.observables.push(observable); + }; + RaceSubscriber.prototype._complete = function () { + var observables = this.observables; + var len = observables.length; + if (len === 0) { + this.destination.complete(); + } + else { + for (var i = 0; i < len && !this.hasFirst; i++) { + var observable = observables[i]; + var subscription = subscribeToResult_1.subscribeToResult(this, observable, undefined, i); + if (this.subscriptions) { + this.subscriptions.push(subscription); + } + this.add(subscription); + } + this.observables = null; + } + }; + RaceSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { + if (!this.hasFirst) { + this.hasFirst = true; + for (var i = 0; i < this.subscriptions.length; i++) { + if (i !== outerIndex) { + var subscription = this.subscriptions[i]; + subscription.unsubscribe(); + this.remove(subscription); + } + } + this.subscriptions = null; + } + this.destination.next(innerValue); + }; + return RaceSubscriber; +}(OuterSubscriber_1.OuterSubscriber)); +exports.RaceSubscriber = RaceSubscriber; + +},{"../OuterSubscriber":66,"../util/isArray":141,"../util/subscribeToResult":159,"./fromArray":84}],97:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function range(start, count, scheduler) { + if (start === void 0) { start = 0; } + return new Observable_1.Observable(function (subscriber) { + if (count === undefined) { + count = start; + start = 0; + } + var index = 0; + var current = start; + if (scheduler) { + return scheduler.schedule(dispatch, 0, { + index: index, count: count, start: start, subscriber: subscriber + }); + } + else { + do { + if (index++ >= count) { + subscriber.complete(); + break; + } + subscriber.next(current++); + if (subscriber.closed) { + break; + } + } while (true); + } + return undefined; + }); +} +exports.range = range; +function dispatch(state) { + var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber; + if (index >= count) { + subscriber.complete(); + return; + } + subscriber.next(start); + if (subscriber.closed) { + return; + } + state.index = index + 1; + state.start = start + 1; + this.schedule(state); +} +exports.dispatch = dispatch; + +},{"../Observable":64}],98:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function throwError(error, scheduler) { + if (!scheduler) { + return new Observable_1.Observable(function (subscriber) { return subscriber.error(error); }); + } + else { + return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); }); + } +} +exports.throwError = throwError; +function dispatch(_a) { + var error = _a.error, subscriber = _a.subscriber; + subscriber.error(error); +} + +},{"../Observable":64}],99:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var async_1 = require("../scheduler/async"); +var isNumeric_1 = require("../util/isNumeric"); +var isScheduler_1 = require("../util/isScheduler"); +function timer(dueTime, periodOrScheduler, scheduler) { + if (dueTime === void 0) { dueTime = 0; } + var period = -1; + if (isNumeric_1.isNumeric(periodOrScheduler)) { + period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler); + } + else if (isScheduler_1.isScheduler(periodOrScheduler)) { + scheduler = periodOrScheduler; + } + if (!isScheduler_1.isScheduler(scheduler)) { + scheduler = async_1.async; + } + return new Observable_1.Observable(function (subscriber) { + var due = isNumeric_1.isNumeric(dueTime) + ? dueTime + : (+dueTime - scheduler.now()); + return scheduler.schedule(dispatch, due, { + index: 0, period: period, subscriber: subscriber + }); + }); +} +exports.timer = timer; +function dispatch(state) { + var index = state.index, period = state.period, subscriber = state.subscriber; + subscriber.next(index); + if (subscriber.closed) { + return; + } + else if (period === -1) { + return subscriber.complete(); + } + state.index = index + 1; + this.schedule(state, period); +} + +},{"../Observable":64,"../scheduler/async":127,"../util/isNumeric":146,"../util/isScheduler":150}],100:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var from_1 = require("./from"); +var empty_1 = require("./empty"); +function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function (subscriber) { + var resource; + try { + resource = resourceFactory(); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var result; + try { + result = observableFactory(resource); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var source = result ? from_1.from(result) : empty_1.EMPTY; + var subscription = source.subscribe(subscriber); + return function () { + subscription.unsubscribe(); + if (resource) { + resource.unsubscribe(); + } + }; + }); +} +exports.using = using; + +},{"../Observable":64,"./empty":81,"./from":83}],101:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var fromArray_1 = require("./fromArray"); +var isArray_1 = require("../util/isArray"); +var Subscriber_1 = require("../Subscriber"); +var iterator_1 = require("../../internal/symbol/iterator"); +var innerSubscribe_1 = require("../innerSubscribe"); +function zip() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var resultSelector = observables[observables.length - 1]; + if (typeof resultSelector === 'function') { + observables.pop(); + } + return fromArray_1.fromArray(observables, undefined).lift(new ZipOperator(resultSelector)); +} +exports.zip = zip; +var ZipOperator = (function () { + function ZipOperator(resultSelector) { + this.resultSelector = resultSelector; + } + ZipOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector)); + }; + return ZipOperator; +}()); +exports.ZipOperator = ZipOperator; +var ZipSubscriber = (function (_super) { + __extends(ZipSubscriber, _super); + function ZipSubscriber(destination, resultSelector, values) { + if (values === void 0) { values = Object.create(null); } + var _this = _super.call(this, destination) || this; + _this.resultSelector = resultSelector; + _this.iterators = []; + _this.active = 0; + _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined; + return _this; + } + ZipSubscriber.prototype._next = function (value) { + var iterators = this.iterators; + if (isArray_1.isArray(value)) { + iterators.push(new StaticArrayIterator(value)); + } + else if (typeof value[iterator_1.iterator] === 'function') { + iterators.push(new StaticIterator(value[iterator_1.iterator]())); + } + else { + iterators.push(new ZipBufferIterator(this.destination, this, value)); + } + }; + ZipSubscriber.prototype._complete = function () { + var iterators = this.iterators; + var len = iterators.length; + this.unsubscribe(); + if (len === 0) { + this.destination.complete(); + return; + } + this.active = len; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + if (iterator.stillUnsubscribed) { + var destination = this.destination; + destination.add(iterator.subscribe()); + } + else { + this.active--; + } + } + }; + ZipSubscriber.prototype.notifyInactive = function () { + this.active--; + if (this.active === 0) { + this.destination.complete(); + } + }; + ZipSubscriber.prototype.checkIterators = function () { + var iterators = this.iterators; + var len = iterators.length; + var destination = this.destination; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) { + return; + } + } + var shouldComplete = false; + var args = []; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + var result = iterator.next(); + if (iterator.hasCompleted()) { + shouldComplete = true; + } + if (result.done) { + destination.complete(); + return; + } + args.push(result.value); + } + if (this.resultSelector) { + this._tryresultSelector(args); + } + else { + destination.next(args); + } + if (shouldComplete) { + destination.complete(); + } + }; + ZipSubscriber.prototype._tryresultSelector = function (args) { + var result; + try { + result = this.resultSelector.apply(this, args); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return ZipSubscriber; +}(Subscriber_1.Subscriber)); +exports.ZipSubscriber = ZipSubscriber; +var StaticIterator = (function () { + function StaticIterator(iterator) { + this.iterator = iterator; + this.nextResult = iterator.next(); + } + StaticIterator.prototype.hasValue = function () { + return true; + }; + StaticIterator.prototype.next = function () { + var result = this.nextResult; + this.nextResult = this.iterator.next(); + return result; + }; + StaticIterator.prototype.hasCompleted = function () { + var nextResult = this.nextResult; + return Boolean(nextResult && nextResult.done); + }; + return StaticIterator; +}()); +var StaticArrayIterator = (function () { + function StaticArrayIterator(array) { + this.array = array; + this.index = 0; + this.length = 0; + this.length = array.length; + } + StaticArrayIterator.prototype[iterator_1.iterator] = function () { + return this; + }; + StaticArrayIterator.prototype.next = function (value) { + var i = this.index++; + var array = this.array; + return i < this.length ? { value: array[i], done: false } : { value: null, done: true }; + }; + StaticArrayIterator.prototype.hasValue = function () { + return this.array.length > this.index; + }; + StaticArrayIterator.prototype.hasCompleted = function () { + return this.array.length === this.index; + }; + return StaticArrayIterator; +}()); +var ZipBufferIterator = (function (_super) { + __extends(ZipBufferIterator, _super); + function ZipBufferIterator(destination, parent, observable) { + var _this = _super.call(this, destination) || this; + _this.parent = parent; + _this.observable = observable; + _this.stillUnsubscribed = true; + _this.buffer = []; + _this.isComplete = false; + return _this; + } + ZipBufferIterator.prototype[iterator_1.iterator] = function () { + return this; + }; + ZipBufferIterator.prototype.next = function () { + var buffer = this.buffer; + if (buffer.length === 0 && this.isComplete) { + return { value: null, done: true }; + } + else { + return { value: buffer.shift(), done: false }; + } + }; + ZipBufferIterator.prototype.hasValue = function () { + return this.buffer.length > 0; + }; + ZipBufferIterator.prototype.hasCompleted = function () { + return this.buffer.length === 0 && this.isComplete; + }; + ZipBufferIterator.prototype.notifyComplete = function () { + if (this.buffer.length > 0) { + this.isComplete = true; + this.parent.notifyInactive(); + } + else { + this.destination.complete(); + } + }; + ZipBufferIterator.prototype.notifyNext = function (innerValue) { + this.buffer.push(innerValue); + this.parent.checkIterators(); + }; + ZipBufferIterator.prototype.subscribe = function () { + return innerSubscribe_1.innerSubscribe(this.observable, new innerSubscribe_1.SimpleInnerSubscriber(this)); + }; + return ZipBufferIterator; +}(innerSubscribe_1.SimpleOuterSubscriber)); + +},{"../../internal/symbol/iterator":129,"../Subscriber":71,"../innerSubscribe":74,"../util/isArray":141,"./fromArray":84}],102:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var mergeAll_1 = require("./mergeAll"); +function concatAll() { + return mergeAll_1.mergeAll(1); +} +exports.concatAll = concatAll; + +},{"./mergeAll":106}],103:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function filter(predicate, thisArg) { + return function filterOperatorFunction(source) { + return source.lift(new FilterOperator(predicate, thisArg)); + }; +} +exports.filter = filter; +var FilterOperator = (function () { + function FilterOperator(predicate, thisArg) { + this.predicate = predicate; + this.thisArg = thisArg; + } + FilterOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg)); + }; + return FilterOperator; +}()); +var FilterSubscriber = (function (_super) { + __extends(FilterSubscriber, _super); + function FilterSubscriber(destination, predicate, thisArg) { + var _this = _super.call(this, destination) || this; + _this.predicate = predicate; + _this.thisArg = thisArg; + _this.count = 0; + return _this; + } + FilterSubscriber.prototype._next = function (value) { + var result; + try { + result = this.predicate.call(this.thisArg, value, this.count++); + } + catch (err) { + this.destination.error(err); + return; + } + if (result) { + this.destination.next(value); + } + }; + return FilterSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Subscriber":71}],104:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +var Subscription_1 = require("../Subscription"); +var Observable_1 = require("../Observable"); +var Subject_1 = require("../Subject"); +function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) { + return function (source) { + return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector)); + }; +} +exports.groupBy = groupBy; +var GroupByOperator = (function () { + function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) { + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.durationSelector = durationSelector; + this.subjectSelector = subjectSelector; + } + GroupByOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)); + }; + return GroupByOperator; +}()); +var GroupBySubscriber = (function (_super) { + __extends(GroupBySubscriber, _super); + function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) { + var _this = _super.call(this, destination) || this; + _this.keySelector = keySelector; + _this.elementSelector = elementSelector; + _this.durationSelector = durationSelector; + _this.subjectSelector = subjectSelector; + _this.groups = null; + _this.attemptedToUnsubscribe = false; + _this.count = 0; + return _this; + } + GroupBySubscriber.prototype._next = function (value) { + var key; + try { + key = this.keySelector(value); + } + catch (err) { + this.error(err); + return; + } + this._group(value, key); + }; + GroupBySubscriber.prototype._group = function (value, key) { + var groups = this.groups; + if (!groups) { + groups = this.groups = new Map(); + } + var group = groups.get(key); + var element; + if (this.elementSelector) { + try { + element = this.elementSelector(value); + } + catch (err) { + this.error(err); + } + } + else { + element = value; + } + if (!group) { + group = (this.subjectSelector ? this.subjectSelector() : new Subject_1.Subject()); + groups.set(key, group); + var groupedObservable = new GroupedObservable(key, group, this); + this.destination.next(groupedObservable); + if (this.durationSelector) { + var duration = void 0; + try { + duration = this.durationSelector(new GroupedObservable(key, group)); + } + catch (err) { + this.error(err); + return; + } + this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this))); + } + } + if (!group.closed) { + group.next(element); + } + }; + GroupBySubscriber.prototype._error = function (err) { + var groups = this.groups; + if (groups) { + groups.forEach(function (group, key) { + group.error(err); + }); + groups.clear(); + } + this.destination.error(err); + }; + GroupBySubscriber.prototype._complete = function () { + var groups = this.groups; + if (groups) { + groups.forEach(function (group, key) { + group.complete(); + }); + groups.clear(); + } + this.destination.complete(); + }; + GroupBySubscriber.prototype.removeGroup = function (key) { + this.groups.delete(key); + }; + GroupBySubscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.attemptedToUnsubscribe = true; + if (this.count === 0) { + _super.prototype.unsubscribe.call(this); + } + } + }; + return GroupBySubscriber; +}(Subscriber_1.Subscriber)); +var GroupDurationSubscriber = (function (_super) { + __extends(GroupDurationSubscriber, _super); + function GroupDurationSubscriber(key, group, parent) { + var _this = _super.call(this, group) || this; + _this.key = key; + _this.group = group; + _this.parent = parent; + return _this; + } + GroupDurationSubscriber.prototype._next = function (value) { + this.complete(); + }; + GroupDurationSubscriber.prototype._unsubscribe = function () { + var _a = this, parent = _a.parent, key = _a.key; + this.key = this.parent = null; + if (parent) { + parent.removeGroup(key); + } + }; + return GroupDurationSubscriber; +}(Subscriber_1.Subscriber)); +var GroupedObservable = (function (_super) { + __extends(GroupedObservable, _super); + function GroupedObservable(key, groupSubject, refCountSubscription) { + var _this = _super.call(this) || this; + _this.key = key; + _this.groupSubject = groupSubject; + _this.refCountSubscription = refCountSubscription; + return _this; + } + GroupedObservable.prototype._subscribe = function (subscriber) { + var subscription = new Subscription_1.Subscription(); + var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject; + if (refCountSubscription && !refCountSubscription.closed) { + subscription.add(new InnerRefCountSubscription(refCountSubscription)); + } + subscription.add(groupSubject.subscribe(subscriber)); + return subscription; + }; + return GroupedObservable; +}(Observable_1.Observable)); +exports.GroupedObservable = GroupedObservable; +var InnerRefCountSubscription = (function (_super) { + __extends(InnerRefCountSubscription, _super); + function InnerRefCountSubscription(parent) { + var _this = _super.call(this) || this; + _this.parent = parent; + parent.count++; + return _this; + } + InnerRefCountSubscription.prototype.unsubscribe = function () { + var parent = this.parent; + if (!parent.closed && !this.closed) { + _super.prototype.unsubscribe.call(this); + parent.count -= 1; + if (parent.count === 0 && parent.attemptedToUnsubscribe) { + parent.unsubscribe(); + } + } + }; + return InnerRefCountSubscription; +}(Subscription_1.Subscription)); + +},{"../Observable":64,"../Subject":69,"../Subscriber":71,"../Subscription":72}],105:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function map(project, thisArg) { + return function mapOperation(source) { + if (typeof project !== 'function') { + throw new TypeError('argument is not a function. Are you looking for `mapTo()`?'); + } + return source.lift(new MapOperator(project, thisArg)); + }; +} +exports.map = map; +var MapOperator = (function () { + function MapOperator(project, thisArg) { + this.project = project; + this.thisArg = thisArg; + } + MapOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg)); + }; + return MapOperator; +}()); +exports.MapOperator = MapOperator; +var MapSubscriber = (function (_super) { + __extends(MapSubscriber, _super); + function MapSubscriber(destination, project, thisArg) { + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.count = 0; + _this.thisArg = thisArg || _this; + return _this; + } + MapSubscriber.prototype._next = function (value) { + var result; + try { + result = this.project.call(this.thisArg, value, this.count++); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return MapSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Subscriber":71}],106:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var mergeMap_1 = require("./mergeMap"); +var identity_1 = require("../util/identity"); +function mergeAll(concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); +} +exports.mergeAll = mergeAll; + +},{"../util/identity":140,"./mergeMap":107}],107:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var map_1 = require("./map"); +var from_1 = require("../observable/from"); +var innerSubscribe_1 = require("../innerSubscribe"); +function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + if (typeof resultSelector === 'function') { + return function (source) { return source.pipe(mergeMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); }; + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); }; +} +exports.mergeMap = mergeMap; +var MergeMapOperator = (function () { + function MergeMapOperator(project, concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + this.project = project; + this.concurrent = concurrent; + } + MergeMapOperator.prototype.call = function (observer, source) { + return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent)); + }; + return MergeMapOperator; +}()); +exports.MergeMapOperator = MergeMapOperator; +var MergeMapSubscriber = (function (_super) { + __extends(MergeMapSubscriber, _super); + function MergeMapSubscriber(destination, project, concurrent) { + if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.concurrent = concurrent; + _this.hasCompleted = false; + _this.buffer = []; + _this.active = 0; + _this.index = 0; + return _this; + } + MergeMapSubscriber.prototype._next = function (value) { + if (this.active < this.concurrent) { + this._tryNext(value); + } + else { + this.buffer.push(value); + } + }; + MergeMapSubscriber.prototype._tryNext = function (value) { + var result; + var index = this.index++; + try { + result = this.project(value, index); + } + catch (err) { + this.destination.error(err); + return; + } + this.active++; + this._innerSub(result); + }; + MergeMapSubscriber.prototype._innerSub = function (ish) { + var innerSubscriber = new innerSubscribe_1.SimpleInnerSubscriber(this); + var destination = this.destination; + destination.add(innerSubscriber); + var innerSubscription = innerSubscribe_1.innerSubscribe(ish, innerSubscriber); + if (innerSubscription !== innerSubscriber) { + destination.add(innerSubscription); + } + }; + MergeMapSubscriber.prototype._complete = function () { + this.hasCompleted = true; + if (this.active === 0 && this.buffer.length === 0) { + this.destination.complete(); + } + this.unsubscribe(); + }; + MergeMapSubscriber.prototype.notifyNext = function (innerValue) { + this.destination.next(innerValue); + }; + MergeMapSubscriber.prototype.notifyComplete = function () { + var buffer = this.buffer; + this.active--; + if (buffer.length > 0) { + this._next(buffer.shift()); + } + else if (this.active === 0 && this.hasCompleted) { + this.destination.complete(); + } + }; + return MergeMapSubscriber; +}(innerSubscribe_1.SimpleOuterSubscriber)); +exports.MergeMapSubscriber = MergeMapSubscriber; +exports.flatMap = mergeMap; + +},{"../innerSubscribe":74,"../observable/from":83,"./map":105}],108:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +var Notification_1 = require("../Notification"); +function observeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return function observeOnOperatorFunction(source) { + return source.lift(new ObserveOnOperator(scheduler, delay)); + }; +} +exports.observeOn = observeOn; +var ObserveOnOperator = (function () { + function ObserveOnOperator(scheduler, delay) { + if (delay === void 0) { delay = 0; } + this.scheduler = scheduler; + this.delay = delay; + } + ObserveOnOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay)); + }; + return ObserveOnOperator; +}()); +exports.ObserveOnOperator = ObserveOnOperator; +var ObserveOnSubscriber = (function (_super) { + __extends(ObserveOnSubscriber, _super); + function ObserveOnSubscriber(destination, scheduler, delay) { + if (delay === void 0) { delay = 0; } + var _this = _super.call(this, destination) || this; + _this.scheduler = scheduler; + _this.delay = delay; + return _this; + } + ObserveOnSubscriber.dispatch = function (arg) { + var notification = arg.notification, destination = arg.destination; + notification.observe(destination); + this.unsubscribe(); + }; + ObserveOnSubscriber.prototype.scheduleMessage = function (notification) { + var destination = this.destination; + destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination))); + }; + ObserveOnSubscriber.prototype._next = function (value) { + this.scheduleMessage(Notification_1.Notification.createNext(value)); + }; + ObserveOnSubscriber.prototype._error = function (err) { + this.scheduleMessage(Notification_1.Notification.createError(err)); + this.unsubscribe(); + }; + ObserveOnSubscriber.prototype._complete = function () { + this.scheduleMessage(Notification_1.Notification.createComplete()); + this.unsubscribe(); + }; + return ObserveOnSubscriber; +}(Subscriber_1.Subscriber)); +exports.ObserveOnSubscriber = ObserveOnSubscriber; +var ObserveOnMessage = (function () { + function ObserveOnMessage(notification, destination) { + this.notification = notification; + this.destination = destination; + } + return ObserveOnMessage; +}()); +exports.ObserveOnMessage = ObserveOnMessage; + +},{"../Notification":63,"../Subscriber":71}],109:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function refCount() { + return function refCountOperatorFunction(source) { + return source.lift(new RefCountOperator(source)); + }; +} +exports.refCount = refCount; +var RefCountOperator = (function () { + function RefCountOperator(connectable) { + this.connectable = connectable; + } + RefCountOperator.prototype.call = function (subscriber, source) { + var connectable = this.connectable; + connectable._refCount++; + var refCounter = new RefCountSubscriber(subscriber, connectable); + var subscription = source.subscribe(refCounter); + if (!refCounter.closed) { + refCounter.connection = connectable.connect(); + } + return subscription; + }; + return RefCountOperator; +}()); +var RefCountSubscriber = (function (_super) { + __extends(RefCountSubscriber, _super); + function RefCountSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + RefCountSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (!connectable) { + this.connection = null; + return; + } + this.connectable = null; + var refCount = connectable._refCount; + if (refCount <= 0) { + this.connection = null; + return; + } + connectable._refCount = refCount - 1; + if (refCount > 1) { + this.connection = null; + return; + } + var connection = this.connection; + var sharedConnection = connectable._connection; + this.connection = null; + if (sharedConnection && (!connection || sharedConnection === connection)) { + sharedConnection.unsubscribe(); + } + }; + return RefCountSubscriber; +}(Subscriber_1.Subscriber)); + +},{"../Subscriber":71}],110:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +function scheduleArray(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + var i = 0; + sub.add(scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + return; + } + subscriber.next(input[i++]); + if (!subscriber.closed) { + sub.add(this.schedule()); + } + })); + return sub; + }); +} +exports.scheduleArray = scheduleArray; + +},{"../Observable":64,"../Subscription":72}],111:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +var iterator_1 = require("../symbol/iterator"); +function scheduleIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + var iterator; + sub.add(function () { + if (iterator && typeof iterator.return === 'function') { + iterator.return(); + } + }); + sub.add(scheduler.schedule(function () { + iterator = input[iterator_1.iterator](); + sub.add(scheduler.schedule(function () { + if (subscriber.closed) { + return; + } + var value; + var done; + try { + var result = iterator.next(); + value = result.value; + done = result.done; + } + catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } + else { + subscriber.next(value); + this.schedule(); + } + })); + })); + return sub; + }); +} +exports.scheduleIterable = scheduleIterable; + +},{"../Observable":64,"../Subscription":72,"../symbol/iterator":129}],112:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +var observable_1 = require("../symbol/observable"); +function scheduleObservable(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function () { + var observable = input[observable_1.observable](); + sub.add(observable.subscribe({ + next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); }, + error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); }, + complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); }, + })); + })); + return sub; + }); +} +exports.scheduleObservable = scheduleObservable; + +},{"../Observable":64,"../Subscription":72,"../symbol/observable":130}],113:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +function schedulePromise(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function () { return input.then(function (value) { + sub.add(scheduler.schedule(function () { + subscriber.next(value); + sub.add(scheduler.schedule(function () { return subscriber.complete(); })); + })); + }, function (err) { + sub.add(scheduler.schedule(function () { return subscriber.error(err); })); + }); })); + return sub; + }); +} +exports.schedulePromise = schedulePromise; + +},{"../Observable":64,"../Subscription":72}],114:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var scheduleObservable_1 = require("./scheduleObservable"); +var schedulePromise_1 = require("./schedulePromise"); +var scheduleArray_1 = require("./scheduleArray"); +var scheduleIterable_1 = require("./scheduleIterable"); +var isInteropObservable_1 = require("../util/isInteropObservable"); +var isPromise_1 = require("../util/isPromise"); +var isArrayLike_1 = require("../util/isArrayLike"); +var isIterable_1 = require("../util/isIterable"); +function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + else if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + else if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + else if (isIterable_1.isIterable(input) || typeof input === 'string') { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + } + throw new TypeError((input !== null && typeof input || input) + ' is not observable'); +} +exports.scheduled = scheduled; + +},{"../util/isArrayLike":142,"../util/isInteropObservable":144,"../util/isIterable":145,"../util/isPromise":149,"./scheduleArray":110,"./scheduleIterable":111,"./scheduleObservable":112,"./schedulePromise":113}],115:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscription_1 = require("../Subscription"); +var Action = (function (_super) { + __extends(Action, _super); + function Action(scheduler, work) { + return _super.call(this) || this; + } + Action.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + return this; + }; + return Action; +}(Subscription_1.Subscription)); +exports.Action = Action; + +},{"../Subscription":72}],116:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var AnimationFrameAction = (function (_super) { + __extends(AnimationFrameAction, _super); + function AnimationFrameAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); })); + }; + AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + cancelAnimationFrame(id); + scheduler.scheduled = undefined; + } + return undefined; + }; + return AnimationFrameAction; +}(AsyncAction_1.AsyncAction)); +exports.AnimationFrameAction = AnimationFrameAction; + +},{"./AsyncAction":120}],117:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AnimationFrameScheduler = (function (_super) { + __extends(AnimationFrameScheduler, _super); + function AnimationFrameScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler.prototype.flush = function (action) { + this.active = true; + this.scheduled = undefined; + var actions = this.actions; + var error; + var index = -1; + var count = actions.length; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this.active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AnimationFrameScheduler = AnimationFrameScheduler; + +},{"./AsyncScheduler":121}],118:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Immediate_1 = require("../util/Immediate"); +var AsyncAction_1 = require("./AsyncAction"); +var AsapAction = (function (_super) { + __extends(AsapAction, _super); + function AsapAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler.scheduled || (scheduler.scheduled = Immediate_1.Immediate.setImmediate(scheduler.flush.bind(scheduler, null))); + }; + AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + Immediate_1.Immediate.clearImmediate(id); + scheduler.scheduled = undefined; + } + return undefined; + }; + return AsapAction; +}(AsyncAction_1.AsyncAction)); +exports.AsapAction = AsapAction; + +},{"../util/Immediate":134,"./AsyncAction":120}],119:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AsapScheduler = (function (_super) { + __extends(AsapScheduler, _super); + function AsapScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler.prototype.flush = function (action) { + this.active = true; + this.scheduled = undefined; + var actions = this.actions; + var error; + var index = -1; + var count = actions.length; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this.active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AsapScheduler = AsapScheduler; + +},{"./AsyncScheduler":121}],120:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Action_1 = require("./Action"); +var AsyncAction = (function (_super) { + __extends(AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && this.delay === delay && this.pending === false) { + return id; + } + clearInterval(id); + return undefined; + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, delay) { + var errored = false; + var errorValue = undefined; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = !!e && e || new Error(e); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype._unsubscribe = function () { + var id = this.id; + var scheduler = this.scheduler; + var actions = scheduler.actions; + var index = actions.indexOf(this); + this.work = null; + this.state = null; + this.pending = false; + this.scheduler = null; + if (index !== -1) { + actions.splice(index, 1); + } + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + }; + return AsyncAction; +}(Action_1.Action)); +exports.AsyncAction = AsyncAction; + +},{"./Action":115}],121:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Scheduler_1 = require("../Scheduler"); +var AsyncScheduler = (function (_super) { + __extends(AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler_1.Scheduler.now; } + var _this = _super.call(this, SchedulerAction, function () { + if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) { + return AsyncScheduler.delegate.now(); + } + else { + return now(); + } + }) || this; + _this.actions = []; + _this.active = false; + _this.scheduled = undefined; + return _this; + } + AsyncScheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { delay = 0; } + if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { + return AsyncScheduler.delegate.schedule(work, delay, state); + } + else { + return _super.prototype.schedule.call(this, work, delay, state); + } + }; + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this.active) { + actions.push(action); + return; + } + var error; + this.active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this.active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; +}(Scheduler_1.Scheduler)); +exports.AsyncScheduler = AsyncScheduler; + +},{"../Scheduler":68}],122:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var QueueAction = (function (_super) { + __extends(QueueAction, _super); + function QueueAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction.prototype.execute = function (state, delay) { + return (delay > 0 || this.closed) ? + _super.prototype.execute.call(this, state, delay) : + this._execute(state, delay); + }; + QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + return scheduler.flush(this); + }; + return QueueAction; +}(AsyncAction_1.AsyncAction)); +exports.QueueAction = QueueAction; + +},{"./AsyncAction":120}],123:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var QueueScheduler = (function (_super) { + __extends(QueueScheduler, _super); + function QueueScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.QueueScheduler = QueueScheduler; + +},{"./AsyncScheduler":121}],124:[function(require,module,exports){ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var VirtualTimeScheduler = (function (_super) { + __extends(VirtualTimeScheduler, _super); + function VirtualTimeScheduler(SchedulerAction, maxFrames) { + if (SchedulerAction === void 0) { SchedulerAction = VirtualAction; } + if (maxFrames === void 0) { maxFrames = Number.POSITIVE_INFINITY; } + var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler.prototype.flush = function () { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error, action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if (error = action.execute(action.state, action.delay)) { + break; + } + } + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler.frameTimeFactor = 10; + return VirtualTimeScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.VirtualTimeScheduler = VirtualTimeScheduler; +var VirtualAction = (function (_super) { + __extends(VirtualAction, _super); + function VirtualAction(scheduler, work, index) { + if (index === void 0) { index = scheduler.index += 1; } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + }; + VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction.sortActions); + return true; + }; + VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return undefined; + }; + VirtualAction.prototype._execute = function (state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction.sortActions = function (a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + }; + return VirtualAction; +}(AsyncAction_1.AsyncAction)); +exports.VirtualAction = VirtualAction; + +},{"./AsyncAction":120,"./AsyncScheduler":121}],125:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AnimationFrameAction_1 = require("./AnimationFrameAction"); +var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler"); +exports.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); +exports.animationFrame = exports.animationFrameScheduler; + +},{"./AnimationFrameAction":116,"./AnimationFrameScheduler":117}],126:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AsapAction_1 = require("./AsapAction"); +var AsapScheduler_1 = require("./AsapScheduler"); +exports.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); +exports.asap = exports.asapScheduler; + +},{"./AsapAction":118,"./AsapScheduler":119}],127:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AsyncAction_1 = require("./AsyncAction"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +exports.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); +exports.async = exports.asyncScheduler; + +},{"./AsyncAction":120,"./AsyncScheduler":121}],128:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var QueueAction_1 = require("./QueueAction"); +var QueueScheduler_1 = require("./QueueScheduler"); +exports.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); +exports.queue = exports.queueScheduler; + +},{"./QueueAction":122,"./QueueScheduler":123}],129:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +exports.getSymbolIterator = getSymbolIterator; +exports.iterator = getSymbolIterator(); +exports.$$iterator = exports.iterator; + +},{}],130:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.observable = (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })(); + +},{}],131:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rxSubscriber = (function () { + return typeof Symbol === 'function' + ? Symbol('rxSubscriber') + : '@@rxSubscriber_' + Math.random(); +})(); +exports.$$rxSubscriber = exports.rxSubscriber; + +},{}],132:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ArgumentOutOfRangeErrorImpl = (function () { + function ArgumentOutOfRangeErrorImpl() { + Error.call(this); + this.message = 'argument out of range'; + this.name = 'ArgumentOutOfRangeError'; + return this; + } + ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype); + return ArgumentOutOfRangeErrorImpl; +})(); +exports.ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; + +},{}],133:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var EmptyErrorImpl = (function () { + function EmptyErrorImpl() { + Error.call(this); + this.message = 'no elements in sequence'; + this.name = 'EmptyError'; + return this; + } + EmptyErrorImpl.prototype = Object.create(Error.prototype); + return EmptyErrorImpl; +})(); +exports.EmptyError = EmptyErrorImpl; + +},{}],134:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var nextHandle = 1; +var RESOLVED = (function () { return Promise.resolve(); })(); +var activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +exports.Immediate = { + setImmediate: function (cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); }); + return handle; + }, + clearImmediate: function (handle) { + findAndClearHandle(handle); + }, +}; +exports.TestTools = { + pending: function () { + return Object.keys(activeHandles).length; + } +}; + +},{}],135:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ObjectUnsubscribedErrorImpl = (function () { + function ObjectUnsubscribedErrorImpl() { + Error.call(this); + this.message = 'object unsubscribed'; + this.name = 'ObjectUnsubscribedError'; + return this; + } + ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype); + return ObjectUnsubscribedErrorImpl; +})(); +exports.ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; + +},{}],136:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var TimeoutErrorImpl = (function () { + function TimeoutErrorImpl() { + Error.call(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + return this; + } + TimeoutErrorImpl.prototype = Object.create(Error.prototype); + return TimeoutErrorImpl; +})(); +exports.TimeoutError = TimeoutErrorImpl; + +},{}],137:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var UnsubscriptionErrorImpl = (function () { + function UnsubscriptionErrorImpl(errors) { + Error.call(this); + this.message = errors ? + errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + return this; + } + UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype); + return UnsubscriptionErrorImpl; +})(); +exports.UnsubscriptionError = UnsubscriptionErrorImpl; + +},{}],138:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +function canReportError(observer) { + while (observer) { + var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped; + if (closed_1 || isStopped) { + return false; + } + else if (destination && destination instanceof Subscriber_1.Subscriber) { + observer = destination; + } + else { + observer = null; + } + } + return true; +} +exports.canReportError = canReportError; + +},{"../Subscriber":71}],139:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function hostReportError(err) { + setTimeout(function () { throw err; }, 0); +} +exports.hostReportError = hostReportError; + +},{}],140:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function identity(x) { + return x; +} +exports.identity = identity; + +},{}],141:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArray = (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })(); + +},{}],142:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); + +},{}],143:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isFunction(x) { + return typeof x === 'function'; +} +exports.isFunction = isFunction; + +},{}],144:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var observable_1 = require("../symbol/observable"); +function isInteropObservable(input) { + return input && typeof input[observable_1.observable] === 'function'; +} +exports.isInteropObservable = isInteropObservable; + +},{"../symbol/observable":130}],145:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var iterator_1 = require("../symbol/iterator"); +function isIterable(input) { + return input && typeof input[iterator_1.iterator] === 'function'; +} +exports.isIterable = isIterable; + +},{"../symbol/iterator":129}],146:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var isArray_1 = require("./isArray"); +function isNumeric(val) { + return !isArray_1.isArray(val) && (val - parseFloat(val) + 1) >= 0; +} +exports.isNumeric = isNumeric; + +},{"./isArray":141}],147:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isObject(x) { + return x !== null && typeof x === 'object'; +} +exports.isObject = isObject; + +},{}],148:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')); +} +exports.isObservable = isObservable; + +},{"../Observable":64}],149:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isPromise(value) { + return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; +} +exports.isPromise = isPromise; + +},{}],150:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isScheduler(value) { + return value && typeof value.schedule === 'function'; +} +exports.isScheduler = isScheduler; + +},{}],151:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function noop() { } +exports.noop = noop; + +},{}],152:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function not(pred, thisArg) { + function notPred() { + return !(notPred.pred.apply(notPred.thisArg, arguments)); + } + notPred.pred = pred; + notPred.thisArg = thisArg; + return notPred; +} +exports.not = not; + +},{}],153:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var identity_1 = require("./identity"); +function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); +} +exports.pipe = pipe; +function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; +} +exports.pipeFromArray = pipeFromArray; + +},{"./identity":140}],154:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var subscribeToArray_1 = require("./subscribeToArray"); +var subscribeToPromise_1 = require("./subscribeToPromise"); +var subscribeToIterable_1 = require("./subscribeToIterable"); +var subscribeToObservable_1 = require("./subscribeToObservable"); +var isArrayLike_1 = require("./isArrayLike"); +var isPromise_1 = require("./isPromise"); +var isObject_1 = require("./isObject"); +var iterator_1 = require("../symbol/iterator"); +var observable_1 = require("../symbol/observable"); +exports.subscribeTo = function (result) { + if (!!result && typeof result[observable_1.observable] === 'function') { + return subscribeToObservable_1.subscribeToObservable(result); + } + else if (isArrayLike_1.isArrayLike(result)) { + return subscribeToArray_1.subscribeToArray(result); + } + else if (isPromise_1.isPromise(result)) { + return subscribeToPromise_1.subscribeToPromise(result); + } + else if (!!result && typeof result[iterator_1.iterator] === 'function') { + return subscribeToIterable_1.subscribeToIterable(result); + } + else { + var value = isObject_1.isObject(result) ? 'an invalid object' : "'" + result + "'"; + var msg = "You provided " + value + " where a stream was expected." + + ' You can provide an Observable, Promise, Array, or Iterable.'; + throw new TypeError(msg); + } +}; + +},{"../symbol/iterator":129,"../symbol/observable":130,"./isArrayLike":142,"./isObject":147,"./isPromise":149,"./subscribeToArray":155,"./subscribeToIterable":156,"./subscribeToObservable":157,"./subscribeToPromise":158}],155:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.subscribeToArray = function (array) { return function (subscriber) { + for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); +}; }; + +},{}],156:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var iterator_1 = require("../symbol/iterator"); +exports.subscribeToIterable = function (iterable) { return function (subscriber) { + var iterator = iterable[iterator_1.iterator](); + do { + var item = void 0; + try { + item = iterator.next(); + } + catch (err) { + subscriber.error(err); + return subscriber; + } + if (item.done) { + subscriber.complete(); + break; + } + subscriber.next(item.value); + if (subscriber.closed) { + break; + } + } while (true); + if (typeof iterator.return === 'function') { + subscriber.add(function () { + if (iterator.return) { + iterator.return(); + } + }); + } + return subscriber; +}; }; + +},{"../symbol/iterator":129}],157:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var observable_1 = require("../symbol/observable"); +exports.subscribeToObservable = function (obj) { return function (subscriber) { + var obs = obj[observable_1.observable](); + if (typeof obs.subscribe !== 'function') { + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + } + else { + return obs.subscribe(subscriber); + } +}; }; + +},{"../symbol/observable":130}],158:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var hostReportError_1 = require("./hostReportError"); +exports.subscribeToPromise = function (promise) { return function (subscriber) { + promise.then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, hostReportError_1.hostReportError); + return subscriber; +}; }; + +},{"./hostReportError":139}],159:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var InnerSubscriber_1 = require("../InnerSubscriber"); +var subscribeTo_1 = require("./subscribeTo"); +var Observable_1 = require("../Observable"); +function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) { + if (innerSubscriber === void 0) { innerSubscriber = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); } + if (innerSubscriber.closed) { + return undefined; + } + if (result instanceof Observable_1.Observable) { + return result.subscribe(innerSubscriber); + } + return subscribeTo_1.subscribeTo(result)(innerSubscriber); +} +exports.subscribeToResult = subscribeToResult; + +},{"../InnerSubscriber":62,"../Observable":64,"./subscribeTo":154}],160:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Subscriber_1 = require("../Subscriber"); +var rxSubscriber_1 = require("../symbol/rxSubscriber"); +var Observer_1 = require("../Observer"); +function toSubscriber(nextOrObserver, error, complete) { + if (nextOrObserver) { + if (nextOrObserver instanceof Subscriber_1.Subscriber) { + return nextOrObserver; + } + if (nextOrObserver[rxSubscriber_1.rxSubscriber]) { + return nextOrObserver[rxSubscriber_1.rxSubscriber](); + } + } + if (!nextOrObserver && !error && !complete) { + return new Subscriber_1.Subscriber(Observer_1.empty); + } + return new Subscriber_1.Subscriber(nextOrObserver, error, complete); +} +exports.toSubscriber = toSubscriber; + +},{"../Observer":65,"../Subscriber":71,"../symbol/rxSubscriber":131}],161:[function(require,module,exports){ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} + +},{}],162:[function(require,module,exports){ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} + +},{"./iterator.js":161}],163:[function(require,module,exports){ + +},{}],164:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],165:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"base64-js":164,"buffer":165,"ieee754":167}],166:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} + +},{}],167:[function(require,module,exports){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],168:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // 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 + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // 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. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}]},{},[1]); diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..ac6e015 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,6624 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + "integrity" "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==" + "resolved" "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz" + "version" "7.15.8" + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/helper-validator-identifier@^7.14.5": + "integrity" "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" + "resolved" "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz" + "version" "7.15.7" + +"@babel/highlight@^7.14.5": + "integrity" "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==" + "resolved" "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz" + "version" "7.14.5" + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + "chalk" "^2.0.0" + "js-tokens" "^4.0.0" + +"@gar/promisify@^1.0.1": + "integrity" "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==" + "resolved" "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz" + "version" "1.1.2" + +"@hutson/parse-repository-url@^3.0.0": + "integrity" "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==" + "resolved" "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz" + "version" "3.0.2" + +"@lerna/add@4.0.0": + "integrity" "sha512-cpmAH1iS3k8JBxNvnMqrGTTjbY/ZAiKa1ChJzFevMYY3eeqbvhsBKnBcxjRXtdrJ6bd3dCQM+ZtK+0i682Fhng==" + "resolved" "https://registry.npmjs.org/@lerna/add/-/add-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/bootstrap" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/validation-error" "4.0.0" + "dedent" "^0.7.0" + "npm-package-arg" "^8.1.0" + "p-map" "^4.0.0" + "pacote" "^11.2.6" + "semver" "^7.3.4" + +"@lerna/bootstrap@4.0.0": + "integrity" "sha512-RkS7UbeM2vu+kJnHzxNRCLvoOP9yGNgkzRdy4UV2hNalD7EP41bLvRVOwRYQ7fhc2QcbhnKNdOBihYRL0LcKtw==" + "resolved" "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/has-npm-version" "4.0.0" + "@lerna/npm-install" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/rimraf-dir" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/symlink-binary" "4.0.0" + "@lerna/symlink-dependencies" "4.0.0" + "@lerna/validation-error" "4.0.0" + "dedent" "^0.7.0" + "get-port" "^5.1.1" + "multimatch" "^5.0.0" + "npm-package-arg" "^8.1.0" + "npmlog" "^4.1.2" + "p-map" "^4.0.0" + "p-map-series" "^2.1.0" + "p-waterfall" "^2.1.1" + "read-package-tree" "^5.3.1" + "semver" "^7.3.4" + +"@lerna/changed@4.0.0": + "integrity" "sha512-cD+KuPRp6qiPOD+BO6S6SN5cARspIaWSOqGBpGnYzLb4uWT8Vk4JzKyYtc8ym1DIwyoFXHosXt8+GDAgR8QrgQ==" + "resolved" "https://registry.npmjs.org/@lerna/changed/-/changed-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/listable" "4.0.0" + "@lerna/output" "4.0.0" + +"@lerna/check-working-tree@4.0.0": + "integrity" "sha512-/++bxM43jYJCshBiKP5cRlCTwSJdRSxVmcDAXM+1oUewlZJVSVlnks5eO0uLxokVFvLhHlC5kHMc7gbVFPHv6Q==" + "resolved" "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/collect-uncommitted" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "@lerna/validation-error" "4.0.0" + +"@lerna/child-process@4.0.0": + "integrity" "sha512-XtCnmCT9eyVsUUHx6y/CTBYdV9g2Cr/VxyseTWBgfIur92/YKClfEtJTbOh94jRT62hlKLqSvux/UhxXVh613Q==" + "resolved" "https://registry.npmjs.org/@lerna/child-process/-/child-process-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "chalk" "^4.1.0" + "execa" "^5.0.0" + "strong-log-transformer" "^2.1.0" + +"@lerna/clean@4.0.0": + "integrity" "sha512-uugG2iN9k45ITx2jtd8nEOoAtca8hNlDCUM0N3lFgU/b1mEQYAPRkqr1qs4FLRl/Y50ZJ41wUz1eazS+d/0osA==" + "resolved" "https://registry.npmjs.org/@lerna/clean/-/clean-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/rimraf-dir" "4.0.0" + "p-map" "^4.0.0" + "p-map-series" "^2.1.0" + "p-waterfall" "^2.1.1" + +"@lerna/cli@4.0.0": + "integrity" "sha512-Neaw3GzFrwZiRZv2g7g6NwFjs3er1vhraIniEs0jjVLPMNC4eata0na3GfE5yibkM/9d3gZdmihhZdZ3EBdvYA==" + "resolved" "https://registry.npmjs.org/@lerna/cli/-/cli-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/global-options" "4.0.0" + "dedent" "^0.7.0" + "npmlog" "^4.1.2" + "yargs" "^16.2.0" + +"@lerna/collect-uncommitted@4.0.0": + "integrity" "sha512-ufSTfHZzbx69YNj7KXQ3o66V4RC76ffOjwLX0q/ab//61bObJ41n03SiQEhSlmpP+gmFbTJ3/7pTe04AHX9m/g==" + "resolved" "https://registry.npmjs.org/@lerna/collect-uncommitted/-/collect-uncommitted-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "chalk" "^4.1.0" + "npmlog" "^4.1.2" + +"@lerna/collect-updates@4.0.0": + "integrity" "sha512-bnNGpaj4zuxsEkyaCZLka9s7nMs58uZoxrRIPJ+nrmrZYp1V5rrd+7/NYTuunOhY2ug1sTBvTAxj3NZQ+JKnOw==" + "resolved" "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "minimatch" "^3.0.4" + "npmlog" "^4.1.2" + "slash" "^3.0.0" + +"@lerna/command@4.0.0": + "integrity" "sha512-LM9g3rt5FsPNFqIHUeRwWXLNHJ5NKzOwmVKZ8anSp4e1SPrv2HNc1V02/9QyDDZK/w+5POXH5lxZUI1CHaOK/A==" + "resolved" "https://registry.npmjs.org/@lerna/command/-/command-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/project" "4.0.0" + "@lerna/validation-error" "4.0.0" + "@lerna/write-log-file" "4.0.0" + "clone-deep" "^4.0.1" + "dedent" "^0.7.0" + "execa" "^5.0.0" + "is-ci" "^2.0.0" + "npmlog" "^4.1.2" + +"@lerna/conventional-commits@4.0.0": + "integrity" "sha512-CSUQRjJHFrH8eBn7+wegZLV3OrNc0Y1FehYfYGhjLE2SIfpCL4bmfu/ViYuHh9YjwHaA+4SX6d3hR+xkeseKmw==" + "resolved" "https://registry.npmjs.org/@lerna/conventional-commits/-/conventional-commits-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/validation-error" "4.0.0" + "conventional-changelog-angular" "^5.0.12" + "conventional-changelog-core" "^4.2.2" + "conventional-recommended-bump" "^6.1.0" + "fs-extra" "^9.1.0" + "get-stream" "^6.0.0" + "lodash.template" "^4.5.0" + "npm-package-arg" "^8.1.0" + "npmlog" "^4.1.2" + "pify" "^5.0.0" + "semver" "^7.3.4" + +"@lerna/create-symlink@4.0.0": + "integrity" "sha512-I0phtKJJdafUiDwm7BBlEUOtogmu8+taxq6PtIrxZbllV9hWg59qkpuIsiFp+no7nfRVuaasNYHwNUhDAVQBig==" + "resolved" "https://registry.npmjs.org/@lerna/create-symlink/-/create-symlink-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "cmd-shim" "^4.1.0" + "fs-extra" "^9.1.0" + "npmlog" "^4.1.2" + +"@lerna/create@4.0.0": + "integrity" "sha512-mVOB1niKByEUfxlbKTM1UNECWAjwUdiioIbRQZEeEabtjCL69r9rscIsjlGyhGWCfsdAG5wfq4t47nlDXdLLag==" + "resolved" "https://registry.npmjs.org/@lerna/create/-/create-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/validation-error" "4.0.0" + "dedent" "^0.7.0" + "fs-extra" "^9.1.0" + "globby" "^11.0.2" + "init-package-json" "^2.0.2" + "npm-package-arg" "^8.1.0" + "p-reduce" "^2.1.0" + "pacote" "^11.2.6" + "pify" "^5.0.0" + "semver" "^7.3.4" + "slash" "^3.0.0" + "validate-npm-package-license" "^3.0.4" + "validate-npm-package-name" "^3.0.0" + "whatwg-url" "^8.4.0" + "yargs-parser" "20.2.4" + +"@lerna/describe-ref@4.0.0": + "integrity" "sha512-eTU5+xC4C5Gcgz+Ey4Qiw9nV2B4JJbMulsYJMW8QjGcGh8zudib7Sduj6urgZXUYNyhYpRs+teci9M2J8u+UvQ==" + "resolved" "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "npmlog" "^4.1.2" + +"@lerna/diff@4.0.0": + "integrity" "sha512-jYPKprQVg41+MUMxx6cwtqsNm0Yxx9GDEwdiPLwcUTFx+/qKCEwifKNJ1oGIPBxyEHX2PFCOjkK39lHoj2qiag==" + "resolved" "https://registry.npmjs.org/@lerna/diff/-/diff-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/validation-error" "4.0.0" + "npmlog" "^4.1.2" + +"@lerna/exec@4.0.0": + "integrity" "sha512-VGXtL/b/JfY84NB98VWZpIExfhLOzy0ozm/0XaS4a2SmkAJc5CeUfrhvHxxkxiTBLkU+iVQUyYEoAT0ulQ8PCw==" + "resolved" "https://registry.npmjs.org/@lerna/exec/-/exec-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/profiler" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + "p-map" "^4.0.0" + +"@lerna/filter-options@4.0.0": + "integrity" "sha512-vV2ANOeZhOqM0rzXnYcFFCJ/kBWy/3OA58irXih9AMTAlQLymWAK0akWybl++sUJ4HB9Hx12TOqaXbYS2NM5uw==" + "resolved" "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/collect-updates" "4.0.0" + "@lerna/filter-packages" "4.0.0" + "dedent" "^0.7.0" + "npmlog" "^4.1.2" + +"@lerna/filter-packages@4.0.0": + "integrity" "sha512-+4AJIkK7iIiOaqCiVTYJxh/I9qikk4XjNQLhE3kixaqgMuHl1NQ99qXRR0OZqAWB9mh8Z1HA9bM5K1HZLBTOqA==" + "resolved" "https://registry.npmjs.org/@lerna/filter-packages/-/filter-packages-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/validation-error" "4.0.0" + "multimatch" "^5.0.0" + "npmlog" "^4.1.2" + +"@lerna/get-npm-exec-opts@4.0.0": + "integrity" "sha512-yvmkerU31CTWS2c7DvmAWmZVeclPBqI7gPVr5VATUKNWJ/zmVcU4PqbYoLu92I9Qc4gY1TuUplMNdNuZTSL7IQ==" + "resolved" "https://registry.npmjs.org/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "npmlog" "^4.1.2" + +"@lerna/get-packed@4.0.0": + "integrity" "sha512-rfWONRsEIGyPJTxFzC8ECb3ZbsDXJbfqWYyeeQQDrJRPnEJErlltRLPLgC2QWbxFgFPsoDLeQmFHJnf0iDfd8w==" + "resolved" "https://registry.npmjs.org/@lerna/get-packed/-/get-packed-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "fs-extra" "^9.1.0" + "ssri" "^8.0.1" + "tar" "^6.1.0" + +"@lerna/github-client@4.0.0": + "integrity" "sha512-2jhsldZtTKXYUBnOm23Lb0Fx8G4qfSXF9y7UpyUgWUj+YZYd+cFxSuorwQIgk5P4XXrtVhsUesIsli+BYSThiw==" + "resolved" "https://registry.npmjs.org/@lerna/github-client/-/github-client-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@octokit/plugin-enterprise-rest" "^6.0.1" + "@octokit/rest" "^18.1.0" + "git-url-parse" "^11.4.4" + "npmlog" "^4.1.2" + +"@lerna/gitlab-client@4.0.0": + "integrity" "sha512-OMUpGSkeDWFf7BxGHlkbb35T7YHqVFCwBPSIR6wRsszY8PAzCYahtH3IaJzEJyUg6vmZsNl0FSr3pdA2skhxqA==" + "resolved" "https://registry.npmjs.org/@lerna/gitlab-client/-/gitlab-client-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "node-fetch" "^2.6.1" + "npmlog" "^4.1.2" + "whatwg-url" "^8.4.0" + +"@lerna/global-options@4.0.0": + "integrity" "sha512-TRMR8afAHxuYBHK7F++Ogop2a82xQjoGna1dvPOY6ltj/pEx59pdgcJfYcynYqMkFIk8bhLJJN9/ndIfX29FTQ==" + "resolved" "https://registry.npmjs.org/@lerna/global-options/-/global-options-4.0.0.tgz" + "version" "4.0.0" + +"@lerna/has-npm-version@4.0.0": + "integrity" "sha512-LQ3U6XFH8ZmLCsvsgq1zNDqka0Xzjq5ibVN+igAI5ccRWNaUsE/OcmsyMr50xAtNQMYMzmpw5GVLAivT2/YzCg==" + "resolved" "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "semver" "^7.3.4" + +"@lerna/import@4.0.0": + "integrity" "sha512-FaIhd+4aiBousKNqC7TX1Uhe97eNKf5/SC7c5WZANVWtC7aBWdmswwDt3usrzCNpj6/Wwr9EtEbYROzxKH8ffg==" + "resolved" "https://registry.npmjs.org/@lerna/import/-/import-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/validation-error" "4.0.0" + "dedent" "^0.7.0" + "fs-extra" "^9.1.0" + "p-map-series" "^2.1.0" + +"@lerna/info@4.0.0": + "integrity" "sha512-8Uboa12kaCSZEn4XRfPz5KU9XXoexSPS4oeYGj76s2UQb1O1GdnEyfjyNWoUl1KlJ2i/8nxUskpXIftoFYH0/Q==" + "resolved" "https://registry.npmjs.org/@lerna/info/-/info-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/command" "4.0.0" + "@lerna/output" "4.0.0" + "envinfo" "^7.7.4" + +"@lerna/init@4.0.0": + "integrity" "sha512-wY6kygop0BCXupzWj5eLvTUqdR7vIAm0OgyV9WHpMYQGfs1V22jhztt8mtjCloD/O0nEe4tJhdG62XU5aYmPNQ==" + "resolved" "https://registry.npmjs.org/@lerna/init/-/init-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "fs-extra" "^9.1.0" + "p-map" "^4.0.0" + "write-json-file" "^4.3.0" + +"@lerna/link@4.0.0": + "integrity" "sha512-KlvPi7XTAcVOByfaLlOeYOfkkDcd+bejpHMCd1KcArcFTwijOwXOVi24DYomIeHvy6HsX/IUquJ4PPUJIeB4+w==" + "resolved" "https://registry.npmjs.org/@lerna/link/-/link-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/command" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/symlink-dependencies" "4.0.0" + "p-map" "^4.0.0" + "slash" "^3.0.0" + +"@lerna/list@4.0.0": + "integrity" "sha512-L2B5m3P+U4Bif5PultR4TI+KtW+SArwq1i75QZ78mRYxPc0U/piau1DbLOmwrdqr99wzM49t0Dlvl6twd7GHFg==" + "resolved" "https://registry.npmjs.org/@lerna/list/-/list-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/listable" "4.0.0" + "@lerna/output" "4.0.0" + +"@lerna/listable@4.0.0": + "integrity" "sha512-/rPOSDKsOHs5/PBLINZOkRIX1joOXUXEtyUs5DHLM8q6/RP668x/1lFhw6Dx7/U+L0+tbkpGtZ1Yt0LewCLgeQ==" + "resolved" "https://registry.npmjs.org/@lerna/listable/-/listable-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/query-graph" "4.0.0" + "chalk" "^4.1.0" + "columnify" "^1.5.4" + +"@lerna/log-packed@4.0.0": + "integrity" "sha512-+dpCiWbdzgMAtpajLToy9PO713IHoE6GV/aizXycAyA07QlqnkpaBNZ8DW84gHdM1j79TWockGJo9PybVhrrZQ==" + "resolved" "https://registry.npmjs.org/@lerna/log-packed/-/log-packed-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "byte-size" "^7.0.0" + "columnify" "^1.5.4" + "has-unicode" "^2.0.1" + "npmlog" "^4.1.2" + +"@lerna/npm-conf@4.0.0": + "integrity" "sha512-uS7H02yQNq3oejgjxAxqq/jhwGEE0W0ntr8vM3EfpCW1F/wZruwQw+7bleJQ9vUBjmdXST//tk8mXzr5+JXCfw==" + "resolved" "https://registry.npmjs.org/@lerna/npm-conf/-/npm-conf-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "config-chain" "^1.1.12" + "pify" "^5.0.0" + +"@lerna/npm-dist-tag@4.0.0": + "integrity" "sha512-F20sg28FMYTgXqEQihgoqSfwmq+Id3zT23CnOwD+XQMPSy9IzyLf1fFVH319vXIw6NF6Pgs4JZN2Qty6/CQXGw==" + "resolved" "https://registry.npmjs.org/@lerna/npm-dist-tag/-/npm-dist-tag-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/otplease" "4.0.0" + "npm-package-arg" "^8.1.0" + "npm-registry-fetch" "^9.0.0" + "npmlog" "^4.1.2" + +"@lerna/npm-install@4.0.0": + "integrity" "sha512-aKNxq2j3bCH3eXl3Fmu4D54s/YLL9WSwV8W7X2O25r98wzrO38AUN6AB9EtmAx+LV/SP15et7Yueg9vSaanRWg==" + "resolved" "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/get-npm-exec-opts" "4.0.0" + "fs-extra" "^9.1.0" + "npm-package-arg" "^8.1.0" + "npmlog" "^4.1.2" + "signal-exit" "^3.0.3" + "write-pkg" "^4.0.0" + +"@lerna/npm-publish@4.0.0": + "integrity" "sha512-vQb7yAPRo5G5r77DRjHITc9piR9gvEKWrmfCH7wkfBnGWEqu7n8/4bFQ7lhnkujvc8RXOsYpvbMQkNfkYibD/w==" + "resolved" "https://registry.npmjs.org/@lerna/npm-publish/-/npm-publish-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/otplease" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "fs-extra" "^9.1.0" + "libnpmpublish" "^4.0.0" + "npm-package-arg" "^8.1.0" + "npmlog" "^4.1.2" + "pify" "^5.0.0" + "read-package-json" "^3.0.0" + +"@lerna/npm-run-script@4.0.0": + "integrity" "sha512-Jmyh9/IwXJjOXqKfIgtxi0bxi1pUeKe5bD3S81tkcy+kyng/GNj9WSqD5ZggoNP2NP//s4CLDAtUYLdP7CU9rA==" + "resolved" "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/get-npm-exec-opts" "4.0.0" + "npmlog" "^4.1.2" + +"@lerna/otplease@4.0.0": + "integrity" "sha512-Sgzbqdk1GH4psNiT6hk+BhjOfIr/5KhGBk86CEfHNJTk9BK4aZYyJD4lpDbDdMjIV4g03G7pYoqHzH765T4fxw==" + "resolved" "https://registry.npmjs.org/@lerna/otplease/-/otplease-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/prompt" "4.0.0" + +"@lerna/output@4.0.0": + "integrity" "sha512-Un1sHtO1AD7buDQrpnaYTi2EG6sLF+KOPEAMxeUYG5qG3khTs2Zgzq5WE3dt2N/bKh7naESt20JjIW6tBELP0w==" + "resolved" "https://registry.npmjs.org/@lerna/output/-/output-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "npmlog" "^4.1.2" + +"@lerna/pack-directory@4.0.0": + "integrity" "sha512-NJrmZNmBHS+5aM+T8N6FVbaKFScVqKlQFJNY2k7nsJ/uklNKsLLl6VhTQBPwMTbf6Tf7l6bcKzpy7aePuq9UiQ==" + "resolved" "https://registry.npmjs.org/@lerna/pack-directory/-/pack-directory-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/get-packed" "4.0.0" + "@lerna/package" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "npm-packlist" "^2.1.4" + "npmlog" "^4.1.2" + "tar" "^6.1.0" + "temp-write" "^4.0.0" + +"@lerna/package-graph@4.0.0": + "integrity" "sha512-QED2ZCTkfXMKFoTGoccwUzjHtZMSf3UKX14A4/kYyBms9xfFsesCZ6SLI5YeySEgcul8iuIWfQFZqRw+Qrjraw==" + "resolved" "https://registry.npmjs.org/@lerna/package-graph/-/package-graph-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/validation-error" "4.0.0" + "npm-package-arg" "^8.1.0" + "npmlog" "^4.1.2" + "semver" "^7.3.4" + +"@lerna/package@4.0.0": + "integrity" "sha512-l0M/izok6FlyyitxiQKr+gZLVFnvxRQdNhzmQ6nRnN9dvBJWn+IxxpM+cLqGACatTnyo9LDzNTOj2Db3+s0s8Q==" + "resolved" "https://registry.npmjs.org/@lerna/package/-/package-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "load-json-file" "^6.2.0" + "npm-package-arg" "^8.1.0" + "write-pkg" "^4.0.0" + +"@lerna/prerelease-id-from-version@4.0.0": + "integrity" "sha512-GQqguzETdsYRxOSmdFZ6zDBXDErIETWOqomLERRY54f4p+tk4aJjoVdd9xKwehC9TBfIFvlRbL1V9uQGHh1opg==" + "resolved" "https://registry.npmjs.org/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "semver" "^7.3.4" + +"@lerna/profiler@4.0.0": + "integrity" "sha512-/BaEbqnVh1LgW/+qz8wCuI+obzi5/vRE8nlhjPzdEzdmWmZXuCKyWSEzAyHOJWw1ntwMiww5dZHhFQABuoFz9Q==" + "resolved" "https://registry.npmjs.org/@lerna/profiler/-/profiler-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "fs-extra" "^9.1.0" + "npmlog" "^4.1.2" + "upath" "^2.0.1" + +"@lerna/project@4.0.0": + "integrity" "sha512-o0MlVbDkD5qRPkFKlBZsXZjoNTWPyuL58564nSfZJ6JYNmgAptnWPB2dQlAc7HWRZkmnC2fCkEdoU+jioPavbg==" + "resolved" "https://registry.npmjs.org/@lerna/project/-/project-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/package" "4.0.0" + "@lerna/validation-error" "4.0.0" + "cosmiconfig" "^7.0.0" + "dedent" "^0.7.0" + "dot-prop" "^6.0.1" + "glob-parent" "^5.1.1" + "globby" "^11.0.2" + "load-json-file" "^6.2.0" + "npmlog" "^4.1.2" + "p-map" "^4.0.0" + "resolve-from" "^5.0.0" + "write-json-file" "^4.3.0" + +"@lerna/prompt@4.0.0": + "integrity" "sha512-4Ig46oCH1TH5M7YyTt53fT6TuaKMgqUUaqdgxvp6HP6jtdak6+amcsqB8YGz2eQnw/sdxunx84DfI9XpoLj4bQ==" + "resolved" "https://registry.npmjs.org/@lerna/prompt/-/prompt-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "inquirer" "^7.3.3" + "npmlog" "^4.1.2" + +"@lerna/publish@4.0.0": + "integrity" "sha512-K8jpqjHrChH22qtkytA5GRKIVFEtqBF6JWj1I8dWZtHs4Jywn8yB1jQ3BAMLhqmDJjWJtRck0KXhQQKzDK2UPg==" + "resolved" "https://registry.npmjs.org/@lerna/publish/-/publish-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/check-working-tree" "4.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "@lerna/log-packed" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/npm-dist-tag" "4.0.0" + "@lerna/npm-publish" "4.0.0" + "@lerna/otplease" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/pack-directory" "4.0.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + "@lerna/version" "4.0.0" + "fs-extra" "^9.1.0" + "libnpmaccess" "^4.0.1" + "npm-package-arg" "^8.1.0" + "npm-registry-fetch" "^9.0.0" + "npmlog" "^4.1.2" + "p-map" "^4.0.0" + "p-pipe" "^3.1.0" + "pacote" "^11.2.6" + "semver" "^7.3.4" + +"@lerna/pulse-till-done@4.0.0": + "integrity" "sha512-Frb4F7QGckaybRhbF7aosLsJ5e9WuH7h0KUkjlzSByVycxY91UZgaEIVjS2oN9wQLrheLMHl6SiFY0/Pvo0Cxg==" + "resolved" "https://registry.npmjs.org/@lerna/pulse-till-done/-/pulse-till-done-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "npmlog" "^4.1.2" + +"@lerna/query-graph@4.0.0": + "integrity" "sha512-YlP6yI3tM4WbBmL9GCmNDoeQyzcyg1e4W96y/PKMZa5GbyUvkS2+Jc2kwPD+5KcXou3wQZxSPzR3Te5OenaDdg==" + "resolved" "https://registry.npmjs.org/@lerna/query-graph/-/query-graph-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/package-graph" "4.0.0" + +"@lerna/resolve-symlink@4.0.0": + "integrity" "sha512-RtX8VEUzqT+uLSCohx8zgmjc6zjyRlh6i/helxtZTMmc4+6O4FS9q5LJas2uGO2wKvBlhcD6siibGt7dIC3xZA==" + "resolved" "https://registry.npmjs.org/@lerna/resolve-symlink/-/resolve-symlink-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "fs-extra" "^9.1.0" + "npmlog" "^4.1.2" + "read-cmd-shim" "^2.0.0" + +"@lerna/rimraf-dir@4.0.0": + "integrity" "sha512-QNH9ABWk9mcMJh2/muD9iYWBk1oQd40y6oH+f3wwmVGKYU5YJD//+zMiBI13jxZRtwBx0vmBZzkBkK1dR11cBg==" + "resolved" "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/child-process" "4.0.0" + "npmlog" "^4.1.2" + "path-exists" "^4.0.0" + "rimraf" "^3.0.2" + +"@lerna/run-lifecycle@4.0.0": + "integrity" "sha512-IwxxsajjCQQEJAeAaxF8QdEixfI7eLKNm4GHhXHrgBu185JcwScFZrj9Bs+PFKxwb+gNLR4iI5rpUdY8Y0UdGQ==" + "resolved" "https://registry.npmjs.org/@lerna/run-lifecycle/-/run-lifecycle-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/npm-conf" "4.0.0" + "npm-lifecycle" "^3.1.5" + "npmlog" "^4.1.2" + +"@lerna/run-topologically@4.0.0": + "integrity" "sha512-EVZw9hGwo+5yp+VL94+NXRYisqgAlj0jWKWtAIynDCpghRxCE5GMO3xrQLmQgqkpUl9ZxQFpICgYv5DW4DksQA==" + "resolved" "https://registry.npmjs.org/@lerna/run-topologically/-/run-topologically-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/query-graph" "4.0.0" + "p-queue" "^6.6.2" + +"@lerna/run@4.0.0": + "integrity" "sha512-9giulCOzlMPzcZS/6Eov6pxE9gNTyaXk0Man+iCIdGJNMrCnW7Dme0Z229WWP/UoxDKg71F2tMsVVGDiRd8fFQ==" + "resolved" "https://registry.npmjs.org/@lerna/run/-/run-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/npm-run-script" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/profiler" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/timer" "4.0.0" + "@lerna/validation-error" "4.0.0" + "p-map" "^4.0.0" + +"@lerna/symlink-binary@4.0.0": + "integrity" "sha512-zualodWC4q1QQc1pkz969hcFeWXOsVYZC5AWVtAPTDfLl+TwM7eG/O6oP+Rr3fFowspxo6b1TQ6sYfDV6HXNWA==" + "resolved" "https://registry.npmjs.org/@lerna/symlink-binary/-/symlink-binary-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/create-symlink" "4.0.0" + "@lerna/package" "4.0.0" + "fs-extra" "^9.1.0" + "p-map" "^4.0.0" + +"@lerna/symlink-dependencies@4.0.0": + "integrity" "sha512-BABo0MjeUHNAe2FNGty1eantWp8u83BHSeIMPDxNq0MuW2K3CiQRaeWT3EGPAzXpGt0+hVzBrA6+OT0GPn7Yuw==" + "resolved" "https://registry.npmjs.org/@lerna/symlink-dependencies/-/symlink-dependencies-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/create-symlink" "4.0.0" + "@lerna/resolve-symlink" "4.0.0" + "@lerna/symlink-binary" "4.0.0" + "fs-extra" "^9.1.0" + "p-map" "^4.0.0" + "p-map-series" "^2.1.0" + +"@lerna/timer@4.0.0": + "integrity" "sha512-WFsnlaE7SdOvjuyd05oKt8Leg3ENHICnvX3uYKKdByA+S3g+TCz38JsNs7OUZVt+ba63nC2nbXDlUnuT2Xbsfg==" + "resolved" "https://registry.npmjs.org/@lerna/timer/-/timer-4.0.0.tgz" + "version" "4.0.0" + +"@lerna/validation-error@4.0.0": + "integrity" "sha512-1rBOM5/koiVWlRi3V6dB863E1YzJS8v41UtsHgMr6gB2ncJ2LsQtMKlJpi3voqcgh41H8UsPXR58RrrpPpufyw==" + "resolved" "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "npmlog" "^4.1.2" + +"@lerna/version@4.0.0": + "integrity" "sha512-otUgiqs5W9zGWJZSCCMRV/2Zm2A9q9JwSDS7s/tlKq4mWCYriWo7+wsHEA/nPTMDyYyBO5oyZDj+3X50KDUzeA==" + "resolved" "https://registry.npmjs.org/@lerna/version/-/version-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/check-working-tree" "4.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/conventional-commits" "4.0.0" + "@lerna/github-client" "4.0.0" + "@lerna/gitlab-client" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + "chalk" "^4.1.0" + "dedent" "^0.7.0" + "load-json-file" "^6.2.0" + "minimatch" "^3.0.4" + "npmlog" "^4.1.2" + "p-map" "^4.0.0" + "p-pipe" "^3.1.0" + "p-reduce" "^2.1.0" + "p-waterfall" "^2.1.1" + "semver" "^7.3.4" + "slash" "^3.0.0" + "temp-write" "^4.0.0" + "write-json-file" "^4.3.0" + +"@lerna/write-log-file@4.0.0": + "integrity" "sha512-XRG5BloiArpXRakcnPHmEHJp+4AtnhRtpDIHSghmXD5EichI1uD73J7FgPp30mm2pDRq3FdqB0NbwSEsJ9xFQg==" + "resolved" "https://registry.npmjs.org/@lerna/write-log-file/-/write-log-file-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "npmlog" "^4.1.2" + "write-file-atomic" "^3.0.3" + +"@nodelib/fs.scandir@2.1.5": + "integrity" "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==" + "resolved" "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + "version" "2.1.5" + dependencies: + "@nodelib/fs.stat" "2.0.5" + "run-parallel" "^1.1.9" + +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": + "integrity" "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + "resolved" "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + "version" "2.0.5" + +"@nodelib/fs.walk@^1.2.3": + "integrity" "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==" + "resolved" "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" + "version" "1.2.8" + dependencies: + "@nodelib/fs.scandir" "2.1.5" + "fastq" "^1.6.0" + +"@npmcli/ci-detect@^1.0.0": + "integrity" "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==" + "resolved" "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz" + "version" "1.3.0" + +"@npmcli/fs@^1.0.0": + "integrity" "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==" + "resolved" "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "@gar/promisify" "^1.0.1" + "semver" "^7.3.5" + +"@npmcli/git@^2.1.0": + "integrity" "sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw==" + "resolved" "https://registry.npmjs.org/@npmcli/git/-/git-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "@npmcli/promise-spawn" "^1.3.2" + "lru-cache" "^6.0.0" + "mkdirp" "^1.0.4" + "npm-pick-manifest" "^6.1.1" + "promise-inflight" "^1.0.1" + "promise-retry" "^2.0.1" + "semver" "^7.3.5" + "which" "^2.0.2" + +"@npmcli/installed-package-contents@^1.0.6": + "integrity" "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==" + "resolved" "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz" + "version" "1.0.7" + dependencies: + "npm-bundled" "^1.1.1" + "npm-normalize-package-bin" "^1.0.1" + +"@npmcli/move-file@^1.0.1": + "integrity" "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==" + "resolved" "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "mkdirp" "^1.0.4" + "rimraf" "^3.0.2" + +"@npmcli/node-gyp@^1.0.2": + "integrity" "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==" + "resolved" "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz" + "version" "1.0.3" + +"@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": + "integrity" "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==" + "resolved" "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz" + "version" "1.3.2" + dependencies: + "infer-owner" "^1.0.4" + +"@npmcli/run-script@^1.8.2": + "integrity" "sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g==" + "resolved" "https://registry.npmjs.org/@npmcli/run-script/-/run-script-1.8.6.tgz" + "version" "1.8.6" + dependencies: + "@npmcli/node-gyp" "^1.0.2" + "@npmcli/promise-spawn" "^1.3.2" + "node-gyp" "^7.1.0" + "read-package-json-fast" "^2.0.1" + +"@octokit/auth-token@^2.4.4": + "integrity" "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==" + "resolved" "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.5.1", "@octokit/core@>=2", "@octokit/core@>=3": + "integrity" "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==" + "resolved" "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz" + "version" "3.5.1" + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.6.0" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + "before-after-hook" "^2.2.0" + "universal-user-agent" "^6.0.0" + +"@octokit/endpoint@^6.0.1": + "integrity" "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==" + "resolved" "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz" + "version" "6.0.12" + dependencies: + "@octokit/types" "^6.0.3" + "is-plain-object" "^5.0.0" + "universal-user-agent" "^6.0.0" + +"@octokit/graphql@^4.5.8": + "integrity" "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==" + "resolved" "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz" + "version" "4.8.0" + dependencies: + "@octokit/request" "^5.6.0" + "@octokit/types" "^6.0.3" + "universal-user-agent" "^6.0.0" + +"@octokit/openapi-types@^11.1.0": + "integrity" "sha512-dWZfYvCCdjZzDYA3lIAMF72Q0jld8xidqCq5Ryw09eBJXZdcM6he0vWBTvw/b5UnGYqexxOyHWgfrsTlUJL3Gw==" + "resolved" "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.1.0.tgz" + "version" "11.1.0" + +"@octokit/plugin-enterprise-rest@^6.0.1": + "integrity" "sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==" + "resolved" "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz" + "version" "6.0.1" + +"@octokit/plugin-paginate-rest@^2.16.8": + "integrity" "sha512-gfSCMgz5scFKsR0dW4jaYsDJVt/UwCHp4dF7sHlmSekZvwzvLiOAGZ4MQkEsL5DW9hIk2W+UQkYZMTA1b6Wsqw==" + "resolved" "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.9.tgz" + "version" "2.16.9" + dependencies: + "@octokit/types" "^6.33.0" + +"@octokit/plugin-request-log@^1.0.4": + "integrity" "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==" + "resolved" "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz" + "version" "1.0.4" + +"@octokit/plugin-rest-endpoint-methods@^5.12.0": + "integrity" "sha512-0nY3htfl6x9UkPcqv8pm9vOC/bTA7f4IMDWln13neHRdNWQvOQgZ9fRxK7BAc74rye4yVINEFi9Yb9rnGUvosA==" + "resolved" "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz" + "version" "5.12.1" + dependencies: + "@octokit/types" "^6.33.0" + "deprecation" "^2.3.1" + +"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": + "integrity" "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==" + "resolved" "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "@octokit/types" "^6.0.3" + "deprecation" "^2.0.0" + "once" "^1.4.0" + +"@octokit/request@^5.6.0": + "integrity" "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==" + "resolved" "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz" + "version" "5.6.2" + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + "is-plain-object" "^5.0.0" + "node-fetch" "^2.6.1" + "universal-user-agent" "^6.0.0" + +"@octokit/rest@^18.1.0": + "integrity" "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==" + "resolved" "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz" + "version" "18.12.0" + dependencies: + "@octokit/core" "^3.5.1" + "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/plugin-request-log" "^1.0.4" + "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.33.0": + "integrity" "sha512-0zffZ048M0UhthyPXQHLz4038Ak46nMWZXkzlXvXB/M/L1jYPBceq4iZj4qjKVrvveaJrrgKdJ9+3yUuITfcCw==" + "resolved" "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz" + "version" "6.33.0" + dependencies: + "@octokit/openapi-types" "^11.1.0" + +"@tootallnate/once@1": + "integrity" "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" + "resolved" "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz" + "version" "1.1.2" + +"@types/minimatch@^3.0.3": + "integrity" "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" + "resolved" "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz" + "version" "3.0.5" + +"@types/minimist@^1.2.0": + "integrity" "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" + "resolved" "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz" + "version" "1.2.2" + +"@types/normalize-package-data@^2.4.0": + "integrity" "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" + "resolved" "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz" + "version" "2.4.1" + +"@types/parse-json@^4.0.0": + "integrity" "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + "resolved" "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz" + "version" "4.0.0" + +"abbrev@1": + "integrity" "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "resolved" "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" + "version" "1.1.1" + +"accepts@~1.3.4": + "integrity" "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==" + "resolved" "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz" + "version" "1.3.7" + dependencies: + "mime-types" "~2.1.24" + "negotiator" "0.6.2" + +"acorn-node@^1.2.0", "acorn-node@^1.3.0", "acorn-node@^1.5.2", "acorn-node@^1.6.1": + "integrity" "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==" + "resolved" "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz" + "version" "1.8.2" + dependencies: + "acorn" "^7.0.0" + "acorn-walk" "^7.0.0" + "xtend" "^4.0.2" + +"acorn-walk@^7.0.0": + "integrity" "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==" + "resolved" "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz" + "version" "7.2.0" + +"acorn@^7.0.0": + "integrity" "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + "resolved" "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" + "version" "7.4.1" + +"add-stream@^1.0.0": + "integrity" "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=" + "resolved" "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz" + "version" "1.0.0" + +"agent-base@^6.0.2", "agent-base@6": + "integrity" "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==" + "resolved" "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + "version" "6.0.2" + dependencies: + "debug" "4" + +"agentkeepalive@^4.1.3": + "integrity" "sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ==" + "resolved" "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.4.tgz" + "version" "4.1.4" + dependencies: + "debug" "^4.1.0" + "depd" "^1.1.2" + "humanize-ms" "^1.2.1" + +"aggregate-error@^3.0.0": + "integrity" "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==" + "resolved" "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "clean-stack" "^2.0.0" + "indent-string" "^4.0.0" + +"ajv@^6.12.3": + "integrity" "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==" + "resolved" "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + "version" "6.12.6" + dependencies: + "fast-deep-equal" "^3.1.1" + "fast-json-stable-stringify" "^2.0.0" + "json-schema-traverse" "^0.4.1" + "uri-js" "^4.2.2" + +"ansi-escapes@^4.2.1": + "integrity" "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==" + "resolved" "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" + "version" "4.3.2" + dependencies: + "type-fest" "^0.21.3" + +"ansi-regex@^2.0.0": + "integrity" "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + "version" "2.1.1" + +"ansi-regex@^3.0.0": + "integrity" "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" + "version" "3.0.0" + +"ansi-regex@^5.0.1": + "integrity" "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + "version" "5.0.1" + +"ansi-styles@^3.2.1": + "integrity" "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + "version" "3.2.1" + dependencies: + "color-convert" "^1.9.0" + +"ansi-styles@^4.0.0", "ansi-styles@^4.1.0": + "integrity" "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + "version" "4.3.0" + dependencies: + "color-convert" "^2.0.1" + +"anymatch@^2.0.0": + "integrity" "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==" + "resolved" "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "micromatch" "^3.1.4" + "normalize-path" "^2.1.1" + +"apache-crypt@^1.1.2": + "integrity" "sha512-ICnYQH+DFVmw+S4Q0QY2XRXD8Ne8ewh8HgbuFH4K7022zCxgHM0Hz1xkRnUlEfAXNbwp1Cnhbedu60USIfDxvg==" + "resolved" "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.5.tgz" + "version" "1.2.5" + dependencies: + "unix-crypt-td-js" "^1.1.4" + +"apache-md5@^1.0.6": + "integrity" "sha512-JtHjzZmJxtzfTSjsCyHgPR155HBe5WGyUyHTaEkfy46qhwCFKx1Epm6nAxgUG3WfUZP1dWhGqj9Z2NOBeZ+uBw==" + "resolved" "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.7.tgz" + "version" "1.1.7" + +"aproba@^1.0.3": + "integrity" "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + "resolved" "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz" + "version" "1.2.0" + +"aproba@^2.0.0": + "integrity" "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + "resolved" "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz" + "version" "2.0.0" + +"are-we-there-yet@~1.1.2": + "integrity" "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==" + "resolved" "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz" + "version" "1.1.7" + dependencies: + "delegates" "^1.0.0" + "readable-stream" "^2.0.6" + +"arr-diff@^4.0.0": + "integrity" "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + "resolved" "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz" + "version" "4.0.0" + +"arr-flatten@^1.1.0": + "integrity" "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "resolved" "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz" + "version" "1.1.0" + +"arr-union@^3.1.0": + "integrity" "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + "resolved" "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz" + "version" "3.1.0" + +"array-differ@^3.0.0": + "integrity" "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" + "resolved" "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz" + "version" "3.0.0" + +"array-ify@^1.0.0": + "integrity" "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=" + "resolved" "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz" + "version" "1.0.0" + +"array-union@^2.1.0": + "integrity" "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + "resolved" "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + "version" "2.1.0" + +"array-unique@^0.3.2": + "integrity" "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + "resolved" "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz" + "version" "0.3.2" + +"arrify@^1.0.1": + "integrity" "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + "resolved" "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + "version" "1.0.1" + +"arrify@^2.0.1": + "integrity" "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" + "resolved" "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz" + "version" "2.0.1" + +"asap@^2.0.0": + "integrity" "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + "resolved" "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" + "version" "2.0.6" + +"asn1.js@^5.2.0": + "integrity" "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==" + "resolved" "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz" + "version" "5.4.1" + dependencies: + "bn.js" "^4.0.0" + "inherits" "^2.0.1" + "minimalistic-assert" "^1.0.0" + "safer-buffer" "^2.1.0" + +"asn1@~0.2.3": + "integrity" "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==" + "resolved" "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz" + "version" "0.2.4" + dependencies: + "safer-buffer" "~2.1.0" + +"assert-plus@^1.0.0", "assert-plus@1.0.0": + "integrity" "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "resolved" "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + "version" "1.0.0" + +"assert@^1.4.0": + "integrity" "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==" + "resolved" "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz" + "version" "1.5.0" + dependencies: + "object-assign" "^4.1.1" + "util" "0.10.3" + +"assign-symbols@^1.0.0": + "integrity" "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + "resolved" "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz" + "version" "1.0.0" + +"async-each@^1.0.1": + "integrity" "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + "resolved" "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz" + "version" "1.0.3" + +"asynckit@^0.4.0": + "integrity" "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "resolved" "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + "version" "0.4.0" + +"at-least-node@^1.0.0": + "integrity" "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + "resolved" "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz" + "version" "1.0.0" + +"atob@^2.1.2": + "integrity" "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + "resolved" "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz" + "version" "2.1.2" + +"aws-sign2@~0.7.0": + "integrity" "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "resolved" "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" + "version" "0.7.0" + +"aws4@^1.8.0": + "integrity" "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + "resolved" "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz" + "version" "1.11.0" + +"balanced-match@^1.0.0": + "integrity" "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + "version" "1.0.2" + +"base@^0.11.1": + "integrity" "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==" + "resolved" "https://registry.npmjs.org/base/-/base-0.11.2.tgz" + "version" "0.11.2" + dependencies: + "cache-base" "^1.0.1" + "class-utils" "^0.3.5" + "component-emitter" "^1.2.1" + "define-property" "^1.0.0" + "isobject" "^3.0.1" + "mixin-deep" "^1.2.0" + "pascalcase" "^0.1.1" + +"base64-js@^1.0.2": + "integrity" "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + "resolved" "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + "version" "1.5.1" + +"base64-url@^2.2.1": + "integrity" "sha512-dLMhIsK7OplcDauDH/tZLvK7JmUZK3A7KiQpjNzsBrM6Etw7hzNI1tLEywqJk9NnwkgWuFKSlx/IUO7vF6Mo8Q==" + "resolved" "https://registry.npmjs.org/base64-url/-/base64-url-2.3.3.tgz" + "version" "2.3.3" + +"basic-auth@~2.0.1": + "integrity" "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==" + "resolved" "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "safe-buffer" "5.1.2" + +"batch@0.6.1": + "integrity" "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + "resolved" "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" + "version" "0.6.1" + +"bcrypt-pbkdf@^1.0.0": + "integrity" "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=" + "resolved" "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "tweetnacl" "^0.14.3" + +"bcryptjs@^2.3.0": + "integrity" "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" + "resolved" "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz" + "version" "2.4.3" + +"before-after-hook@^2.2.0": + "integrity" "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + "resolved" "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz" + "version" "2.2.2" + +"binary-extensions@^1.0.0": + "integrity" "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + "resolved" "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz" + "version" "1.13.1" + +"blakejs@^1.0.1": + "integrity" "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + "resolved" "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz" + "version" "1.1.1" + +"blue-tape@^1.0.0": + "integrity" "sha1-dYHQTAc5XJXEJrLtbR7bRUp2uSs=" + "resolved" "https://registry.npmjs.org/blue-tape/-/blue-tape-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "tape" ">=2.0.0 <5.0.0" + +"bn.js@^4.0.0": + "integrity" "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" + "version" "4.12.0" + +"bn.js@^4.1.0": + "integrity" "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" + "version" "4.12.0" + +"bn.js@^4.11.9": + "integrity" "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" + "version" "4.12.0" + +"bn.js@^5.0.0", "bn.js@^5.1.1": + "integrity" "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz" + "version" "5.2.0" + +"brace-expansion@^1.1.7": + "integrity" "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==" + "resolved" "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + "version" "1.1.11" + dependencies: + "balanced-match" "^1.0.0" + "concat-map" "0.0.1" + +"braces@^2.3.1", "braces@^2.3.2": + "integrity" "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==" + "resolved" "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz" + "version" "2.3.2" + dependencies: + "arr-flatten" "^1.1.0" + "array-unique" "^0.3.2" + "extend-shallow" "^2.0.1" + "fill-range" "^4.0.0" + "isobject" "^3.0.1" + "repeat-element" "^1.1.2" + "snapdragon" "^0.8.1" + "snapdragon-node" "^2.0.1" + "split-string" "^3.0.2" + "to-regex" "^3.0.1" + +"braces@^3.0.1": + "integrity" "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==" + "resolved" "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + "version" "3.0.2" + dependencies: + "fill-range" "^7.0.1" + +"brorand@^1.0.1", "brorand@^1.1.0": + "integrity" "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "resolved" "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" + "version" "1.1.0" + +"browser-pack@^6.0.1": + "integrity" "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==" + "resolved" "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "combine-source-map" "~0.8.0" + "defined" "^1.0.0" + "JSONStream" "^1.0.3" + "safe-buffer" "^5.1.1" + "through2" "^2.0.0" + "umd" "^3.0.0" + +"browser-resolve@^2.0.0": + "integrity" "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==" + "resolved" "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "resolve" "^1.17.0" + +"browserify-aes@^1.0.0", "browserify-aes@^1.0.4": + "integrity" "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==" + "resolved" "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "buffer-xor" "^1.0.3" + "cipher-base" "^1.0.0" + "create-hash" "^1.1.0" + "evp_bytestokey" "^1.0.3" + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"browserify-cipher@^1.0.0": + "integrity" "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==" + "resolved" "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "browserify-aes" "^1.0.4" + "browserify-des" "^1.0.0" + "evp_bytestokey" "^1.0.0" + +"browserify-des@^1.0.0": + "integrity" "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==" + "resolved" "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "cipher-base" "^1.0.1" + "des.js" "^1.0.0" + "inherits" "^2.0.1" + "safe-buffer" "^5.1.2" + +"browserify-rsa@^4.0.0", "browserify-rsa@^4.0.1": + "integrity" "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==" + "resolved" "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "bn.js" "^5.0.0" + "randombytes" "^2.0.1" + +"browserify-sign@^4.0.0": + "integrity" "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==" + "resolved" "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz" + "version" "4.2.1" + dependencies: + "bn.js" "^5.1.1" + "browserify-rsa" "^4.0.1" + "create-hash" "^1.2.0" + "create-hmac" "^1.1.7" + "elliptic" "^6.5.3" + "inherits" "^2.0.4" + "parse-asn1" "^5.1.5" + "readable-stream" "^3.6.0" + "safe-buffer" "^5.2.0" + +"browserify-zlib@~0.2.0": + "integrity" "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==" + "resolved" "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz" + "version" "0.2.0" + dependencies: + "pako" "~1.0.5" + +"browserify@^16.2.3": + "integrity" "sha512-TkOR1cQGdmXU9zW4YukWzWVSJwrxmNdADFbqbE3HFgQWe5wqZmOawqZ7J/8MPCwk/W8yY7Y0h+7mOtcZxLP23g==" + "resolved" "https://registry.npmjs.org/browserify/-/browserify-16.5.2.tgz" + "version" "16.5.2" + dependencies: + "assert" "^1.4.0" + "browser-pack" "^6.0.1" + "browser-resolve" "^2.0.0" + "browserify-zlib" "~0.2.0" + "buffer" "~5.2.1" + "cached-path-relative" "^1.0.0" + "concat-stream" "^1.6.0" + "console-browserify" "^1.1.0" + "constants-browserify" "~1.0.0" + "crypto-browserify" "^3.0.0" + "defined" "^1.0.0" + "deps-sort" "^2.0.0" + "domain-browser" "^1.2.0" + "duplexer2" "~0.1.2" + "events" "^2.0.0" + "glob" "^7.1.0" + "has" "^1.0.0" + "htmlescape" "^1.1.0" + "https-browserify" "^1.0.0" + "inherits" "~2.0.1" + "insert-module-globals" "^7.0.0" + "JSONStream" "^1.0.3" + "labeled-stream-splicer" "^2.0.0" + "mkdirp-classic" "^0.5.2" + "module-deps" "^6.2.3" + "os-browserify" "~0.3.0" + "parents" "^1.0.1" + "path-browserify" "~0.0.0" + "process" "~0.11.0" + "punycode" "^1.3.2" + "querystring-es3" "~0.2.0" + "read-only-stream" "^2.0.0" + "readable-stream" "^2.0.2" + "resolve" "^1.1.4" + "shasum" "^1.0.0" + "shell-quote" "^1.6.1" + "stream-browserify" "^2.0.0" + "stream-http" "^3.0.0" + "string_decoder" "^1.1.1" + "subarg" "^1.0.0" + "syntax-error" "^1.1.1" + "through2" "^2.0.0" + "timers-browserify" "^1.0.1" + "tty-browserify" "0.0.1" + "url" "~0.11.0" + "util" "~0.10.1" + "vm-browserify" "^1.0.0" + "xtend" "^4.0.0" + +"buffer-from@^1.0.0": + "integrity" "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "resolved" "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + "version" "1.1.2" + +"buffer-xor@^1.0.3": + "integrity" "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "resolved" "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + "version" "1.0.3" + +"buffer@~5.2.1": + "integrity" "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==" + "resolved" "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz" + "version" "5.2.1" + dependencies: + "base64-js" "^1.0.2" + "ieee754" "^1.1.4" + +"builtin-status-codes@^3.0.0": + "integrity" "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + "resolved" "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz" + "version" "3.0.0" + +"builtins@^1.0.3": + "integrity" "sha1-y5T662HIaWRR2zZTThQi+U8K7og=" + "resolved" "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz" + "version" "1.0.3" + +"byline@^5.0.0": + "integrity" "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=" + "resolved" "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz" + "version" "5.0.0" + +"byte-size@^7.0.0": + "integrity" "sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A==" + "resolved" "https://registry.npmjs.org/byte-size/-/byte-size-7.0.1.tgz" + "version" "7.0.1" + +"cacache@^15.0.5", "cacache@^15.2.0": + "integrity" "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==" + "resolved" "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz" + "version" "15.3.0" + dependencies: + "@npmcli/fs" "^1.0.0" + "@npmcli/move-file" "^1.0.1" + "chownr" "^2.0.0" + "fs-minipass" "^2.0.0" + "glob" "^7.1.4" + "infer-owner" "^1.0.4" + "lru-cache" "^6.0.0" + "minipass" "^3.1.1" + "minipass-collect" "^1.0.2" + "minipass-flush" "^1.0.5" + "minipass-pipeline" "^1.2.2" + "mkdirp" "^1.0.3" + "p-map" "^4.0.0" + "promise-inflight" "^1.0.1" + "rimraf" "^3.0.2" + "ssri" "^8.0.1" + "tar" "^6.0.2" + "unique-filename" "^1.1.1" + +"cache-base@^1.0.1": + "integrity" "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==" + "resolved" "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "collection-visit" "^1.0.0" + "component-emitter" "^1.2.1" + "get-value" "^2.0.6" + "has-value" "^1.0.0" + "isobject" "^3.0.1" + "set-value" "^2.0.0" + "to-object-path" "^0.3.0" + "union-value" "^1.0.0" + "unset-value" "^1.0.0" + +"cached-path-relative@^1.0.0", "cached-path-relative@^1.0.2": + "integrity" "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==" + "resolved" "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz" + "version" "1.0.2" + +"call-bind@^1.0.0", "call-bind@^1.0.2", "call-bind@~1.0.2": + "integrity" "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==" + "resolved" "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "function-bind" "^1.1.1" + "get-intrinsic" "^1.0.2" + +"callsites@^3.0.0": + "integrity" "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "resolved" "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + "version" "3.1.0" + +"camelcase-keys@^6.2.2": + "integrity" "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==" + "resolved" "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz" + "version" "6.2.2" + dependencies: + "camelcase" "^5.3.1" + "map-obj" "^4.0.0" + "quick-lru" "^4.0.1" + +"camelcase@^5.3.1": + "integrity" "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + "version" "5.3.1" + +"caseless@~0.12.0": + "integrity" "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "resolved" "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" + "version" "0.12.0" + +"chalk@^2.0.0": + "integrity" "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==" + "resolved" "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" + "version" "2.4.2" + dependencies: + "ansi-styles" "^3.2.1" + "escape-string-regexp" "^1.0.5" + "supports-color" "^5.3.0" + +"chalk@^4.1.0": + "integrity" "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==" + "resolved" "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + "version" "4.1.2" + dependencies: + "ansi-styles" "^4.1.0" + "supports-color" "^7.1.0" + +"chardet@^0.7.0": + "integrity" "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + "resolved" "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" + "version" "0.7.0" + +"chokidar@^2.0.4": + "integrity" "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==" + "resolved" "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz" + "version" "2.1.8" + dependencies: + "anymatch" "^2.0.0" + "async-each" "^1.0.1" + "braces" "^2.3.2" + "glob-parent" "^3.1.0" + "inherits" "^2.0.3" + "is-binary-path" "^1.0.0" + "is-glob" "^4.0.0" + "normalize-path" "^3.0.0" + "path-is-absolute" "^1.0.0" + "readdirp" "^2.2.1" + "upath" "^1.1.1" + optionalDependencies: + "fsevents" "^1.2.7" + +"chownr@^1.1.4": + "integrity" "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "resolved" "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" + "version" "1.1.4" + +"chownr@^2.0.0": + "integrity" "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + "resolved" "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" + "version" "2.0.0" + +"ci-info@^2.0.0": + "integrity" "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + "resolved" "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" + "version" "2.0.0" + +"cipher-base@^1.0.0", "cipher-base@^1.0.1", "cipher-base@^1.0.3": + "integrity" "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==" + "resolved" "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"class-utils@^0.3.5": + "integrity" "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==" + "resolved" "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz" + "version" "0.3.6" + dependencies: + "arr-union" "^3.1.0" + "define-property" "^0.2.5" + "isobject" "^3.0.0" + "static-extend" "^0.1.1" + +"clean-stack@^2.0.0": + "integrity" "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "resolved" "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" + "version" "2.2.0" + +"cli-cursor@^3.1.0": + "integrity" "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==" + "resolved" "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "restore-cursor" "^3.1.0" + +"cli-width@^3.0.0": + "integrity" "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" + "resolved" "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz" + "version" "3.0.0" + +"cliui@^7.0.2": + "integrity" "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==" + "resolved" "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + "version" "7.0.4" + dependencies: + "string-width" "^4.2.0" + "strip-ansi" "^6.0.0" + "wrap-ansi" "^7.0.0" + +"clone-deep@^4.0.1": + "integrity" "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==" + "resolved" "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "is-plain-object" "^2.0.4" + "kind-of" "^6.0.2" + "shallow-clone" "^3.0.0" + +"clone@^1.0.2": + "integrity" "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + "resolved" "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" + "version" "1.0.4" + +"cmd-shim@^4.1.0": + "integrity" "sha512-lb9L7EM4I/ZRVuljLPEtUJOP+xiQVknZ4ZMpMgEp4JzNldPb27HU03hi6K1/6CoIuit/Zm/LQXySErFeXxDprw==" + "resolved" "https://registry.npmjs.org/cmd-shim/-/cmd-shim-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "mkdirp-infer-owner" "^2.0.0" + +"code-point-at@^1.0.0": + "integrity" "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "resolved" "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" + "version" "1.1.0" + +"collection-visit@^1.0.0": + "integrity" "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=" + "resolved" "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "map-visit" "^1.0.0" + "object-visit" "^1.0.0" + +"color-convert@^1.9.0": + "integrity" "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==" + "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + "version" "1.9.3" + dependencies: + "color-name" "1.1.3" + +"color-convert@^2.0.1": + "integrity" "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==" + "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "color-name" "~1.1.4" + +"color-name@~1.1.4": + "integrity" "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + "version" "1.1.4" + +"color-name@1.1.3": + "integrity" "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + "version" "1.1.3" + +"colors@latest": + "integrity" "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + "resolved" "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz" + "version" "1.4.0" + +"columnify@^1.5.4": + "integrity" "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=" + "resolved" "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" + "version" "1.5.4" + dependencies: + "strip-ansi" "^3.0.0" + "wcwidth" "^1.0.0" + +"combine-source-map@^0.8.0", "combine-source-map@~0.8.0": + "integrity" "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=" + "resolved" "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz" + "version" "0.8.0" + dependencies: + "convert-source-map" "~1.1.0" + "inline-source-map" "~0.6.0" + "lodash.memoize" "~3.0.3" + "source-map" "~0.5.3" + +"combined-stream@^1.0.6", "combined-stream@~1.0.6": + "integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==" + "resolved" "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" + "version" "1.0.8" + dependencies: + "delayed-stream" "~1.0.0" + +"compare-func@^2.0.0": + "integrity" "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==" + "resolved" "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "array-ify" "^1.0.0" + "dot-prop" "^5.1.0" + +"component-emitter@^1.2.1": + "integrity" "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + "resolved" "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz" + "version" "1.3.0" + +"concat-map@0.0.1": + "integrity" "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "resolved" "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "version" "0.0.1" + +"concat-stream@^1.6.0", "concat-stream@^1.6.1", "concat-stream@~1.6.0": + "integrity" "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==" + "resolved" "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" + "version" "1.6.2" + dependencies: + "buffer-from" "^1.0.0" + "inherits" "^2.0.3" + "readable-stream" "^2.2.2" + "typedarray" "^0.0.6" + +"concat-stream@^2.0.0": + "integrity" "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==" + "resolved" "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "buffer-from" "^1.0.0" + "inherits" "^2.0.3" + "readable-stream" "^3.0.2" + "typedarray" "^0.0.6" + +"config-chain@^1.1.12": + "integrity" "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==" + "resolved" "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz" + "version" "1.1.13" + dependencies: + "ini" "^1.3.4" + "proto-list" "~1.2.1" + +"connect@^3.6.6": + "integrity" "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==" + "resolved" "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz" + "version" "3.7.0" + dependencies: + "debug" "2.6.9" + "finalhandler" "1.1.2" + "parseurl" "~1.3.3" + "utils-merge" "1.0.1" + +"console-browserify@^1.1.0": + "integrity" "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + "resolved" "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz" + "version" "1.2.0" + +"console-control-strings@^1.0.0", "console-control-strings@~1.1.0": + "integrity" "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "resolved" "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" + "version" "1.1.0" + +"constants-browserify@~1.0.0": + "integrity" "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + "resolved" "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz" + "version" "1.0.0" + +"conventional-changelog-angular@^5.0.12": + "integrity" "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==" + "resolved" "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz" + "version" "5.0.13" + dependencies: + "compare-func" "^2.0.0" + "q" "^1.5.1" + +"conventional-changelog-core@^4.2.2": + "integrity" "sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==" + "resolved" "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz" + "version" "4.2.4" + dependencies: + "add-stream" "^1.0.0" + "conventional-changelog-writer" "^5.0.0" + "conventional-commits-parser" "^3.2.0" + "dateformat" "^3.0.0" + "get-pkg-repo" "^4.0.0" + "git-raw-commits" "^2.0.8" + "git-remote-origin-url" "^2.0.0" + "git-semver-tags" "^4.1.1" + "lodash" "^4.17.15" + "normalize-package-data" "^3.0.0" + "q" "^1.5.1" + "read-pkg" "^3.0.0" + "read-pkg-up" "^3.0.0" + "through2" "^4.0.0" + +"conventional-changelog-preset-loader@^2.3.4": + "integrity" "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==" + "resolved" "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz" + "version" "2.3.4" + +"conventional-changelog-writer@^5.0.0": + "integrity" "sha512-HnDh9QHLNWfL6E1uHz6krZEQOgm8hN7z/m7tT16xwd802fwgMN0Wqd7AQYVkhpsjDUx/99oo+nGgvKF657XP5g==" + "resolved" "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "conventional-commits-filter" "^2.0.7" + "dateformat" "^3.0.0" + "handlebars" "^4.7.6" + "json-stringify-safe" "^5.0.1" + "lodash" "^4.17.15" + "meow" "^8.0.0" + "semver" "^6.0.0" + "split" "^1.0.0" + "through2" "^4.0.0" + +"conventional-commits-filter@^2.0.7": + "integrity" "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==" + "resolved" "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz" + "version" "2.0.7" + dependencies: + "lodash.ismatch" "^4.4.0" + "modify-values" "^1.0.0" + +"conventional-commits-parser@^3.2.0": + "integrity" "sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g==" + "resolved" "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "is-text-path" "^1.0.1" + "JSONStream" "^1.0.4" + "lodash" "^4.17.15" + "meow" "^8.0.0" + "split2" "^3.0.0" + "through2" "^4.0.0" + +"conventional-recommended-bump@^6.1.0": + "integrity" "sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw==" + "resolved" "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "concat-stream" "^2.0.0" + "conventional-changelog-preset-loader" "^2.3.4" + "conventional-commits-filter" "^2.0.7" + "conventional-commits-parser" "^3.2.0" + "git-raw-commits" "^2.0.8" + "git-semver-tags" "^4.1.1" + "meow" "^8.0.0" + "q" "^1.5.1" + +"convert-source-map@~1.1.0": + "integrity" "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" + "resolved" "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" + "version" "1.1.3" + +"copy-descriptor@^0.1.0": + "integrity" "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + "resolved" "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz" + "version" "0.1.1" + +"core-util-is@~1.0.0": + "integrity" "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "resolved" "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" + "version" "1.0.3" + +"core-util-is@1.0.2": + "integrity" "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "resolved" "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "version" "1.0.2" + +"cors@latest": + "integrity" "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==" + "resolved" "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" + "version" "2.8.5" + dependencies: + "object-assign" "^4" + "vary" "^1" + +"cosmiconfig@^7.0.0": + "integrity" "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==" + "resolved" "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz" + "version" "7.0.1" + dependencies: + "@types/parse-json" "^4.0.0" + "import-fresh" "^3.2.1" + "parse-json" "^5.0.0" + "path-type" "^4.0.0" + "yaml" "^1.10.0" + +"create-ecdh@^4.0.0": + "integrity" "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==" + "resolved" "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz" + "version" "4.0.4" + dependencies: + "bn.js" "^4.1.0" + "elliptic" "^6.5.3" + +"create-hash@^1.1.0", "create-hash@^1.1.2", "create-hash@^1.2.0": + "integrity" "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==" + "resolved" "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "cipher-base" "^1.0.1" + "inherits" "^2.0.1" + "md5.js" "^1.3.4" + "ripemd160" "^2.0.1" + "sha.js" "^2.4.0" + +"create-hmac@^1.1.0", "create-hmac@^1.1.4", "create-hmac@^1.1.7": + "integrity" "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==" + "resolved" "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" + "version" "1.1.7" + dependencies: + "cipher-base" "^1.0.3" + "create-hash" "^1.1.0" + "inherits" "^2.0.1" + "ripemd160" "^2.0.0" + "safe-buffer" "^5.0.1" + "sha.js" "^2.4.8" + +"cross-spawn@^7.0.3": + "integrity" "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==" + "resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + "version" "7.0.3" + dependencies: + "path-key" "^3.1.0" + "shebang-command" "^2.0.0" + "which" "^2.0.1" + +"crypto-browserify@^3.0.0": + "integrity" "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==" + "resolved" "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz" + "version" "3.12.0" + dependencies: + "browserify-cipher" "^1.0.0" + "browserify-sign" "^4.0.0" + "create-ecdh" "^4.0.0" + "create-hash" "^1.1.0" + "create-hmac" "^1.1.0" + "diffie-hellman" "^5.0.0" + "inherits" "^2.0.1" + "pbkdf2" "^3.0.3" + "public-encrypt" "^4.0.0" + "randombytes" "^2.0.0" + "randomfill" "^1.0.3" + +"dargs@^7.0.0": + "integrity" "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==" + "resolved" "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz" + "version" "7.0.0" + +"dash-ast@^1.0.0": + "integrity" "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==" + "resolved" "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz" + "version" "1.0.0" + +"dashdash@^1.12.0": + "integrity" "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=" + "resolved" "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" + "version" "1.14.1" + dependencies: + "assert-plus" "^1.0.0" + +"dateformat@^3.0.0": + "integrity" "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + "resolved" "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz" + "version" "3.0.3" + +"debug@^2.2.0", "debug@^2.3.3", "debug@2.6.9": + "integrity" "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==" + "resolved" "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + "version" "2.6.9" + dependencies: + "ms" "2.0.0" + +"debug@^4.1.0": + "integrity" "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==" + "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" + "version" "4.3.2" + dependencies: + "ms" "2.1.2" + +"debug@^4.3.1": + "integrity" "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==" + "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" + "version" "4.3.2" + dependencies: + "ms" "2.1.2" + +"debug@4": + "integrity" "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==" + "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" + "version" "4.3.2" + dependencies: + "ms" "2.1.2" + +"debuglog@^1.0.1": + "integrity" "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=" + "resolved" "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz" + "version" "1.0.1" + +"decamelize-keys@^1.1.0": + "integrity" "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=" + "resolved" "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "decamelize" "^1.1.0" + "map-obj" "^1.0.0" + +"decamelize@^1.1.0": + "integrity" "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "resolved" "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + "version" "1.2.0" + +"decode-uri-component@^0.2.0": + "integrity" "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "resolved" "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" + "version" "0.2.0" + +"dedent@^0.7.0": + "integrity" "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" + "resolved" "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" + "version" "0.7.0" + +"deep-equal@~1.1.1": + "integrity" "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==" + "resolved" "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "is-arguments" "^1.0.4" + "is-date-object" "^1.0.1" + "is-regex" "^1.0.4" + "object-is" "^1.0.1" + "object-keys" "^1.1.1" + "regexp.prototype.flags" "^1.2.0" + +"defaults@^1.0.3": + "integrity" "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=" + "resolved" "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "clone" "^1.0.2" + +"define-properties@^1.1.3": + "integrity" "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" + "resolved" "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" + "version" "1.1.3" + dependencies: + "object-keys" "^1.0.12" + +"define-property@^0.2.5": + "integrity" "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=" + "resolved" "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz" + "version" "0.2.5" + dependencies: + "is-descriptor" "^0.1.0" + +"define-property@^1.0.0": + "integrity" "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=" + "resolved" "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "is-descriptor" "^1.0.0" + +"define-property@^2.0.2": + "integrity" "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==" + "resolved" "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "is-descriptor" "^1.0.2" + "isobject" "^3.0.1" + +"defined@^1.0.0", "defined@~1.0.0": + "integrity" "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + "resolved" "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + "version" "1.0.0" + +"delayed-stream@~1.0.0": + "integrity" "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + "version" "1.0.0" + +"delegates@^1.0.0": + "integrity" "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + "resolved" "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" + "version" "1.0.0" + +"depd@^1.1.2": + "integrity" "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "resolved" "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" + "version" "1.1.2" + +"depd@~1.1.2": + "integrity" "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "resolved" "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" + "version" "1.1.2" + +"depd@~2.0.0": + "integrity" "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + "resolved" "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + "version" "2.0.0" + +"deprecation@^2.0.0", "deprecation@^2.3.1": + "integrity" "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + "resolved" "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz" + "version" "2.3.1" + +"deps-sort@^2.0.0": + "integrity" "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==" + "resolved" "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "JSONStream" "^1.0.3" + "shasum-object" "^1.0.0" + "subarg" "^1.0.0" + "through2" "^2.0.0" + +"des.js@^1.0.0": + "integrity" "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==" + "resolved" "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "inherits" "^2.0.1" + "minimalistic-assert" "^1.0.0" + +"destroy@~1.0.4": + "integrity" "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "resolved" "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" + "version" "1.0.4" + +"detect-indent@^5.0.0": + "integrity" "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=" + "resolved" "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz" + "version" "5.0.0" + +"detect-indent@^6.0.0": + "integrity" "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==" + "resolved" "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz" + "version" "6.1.0" + +"detective@^5.2.0": + "integrity" "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==" + "resolved" "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz" + "version" "5.2.0" + dependencies: + "acorn-node" "^1.6.1" + "defined" "^1.0.0" + "minimist" "^1.1.1" + +"dezalgo@^1.0.0": + "integrity" "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=" + "resolved" "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "asap" "^2.0.0" + "wrappy" "1" + +"diffie-hellman@^5.0.0": + "integrity" "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==" + "resolved" "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz" + "version" "5.0.3" + dependencies: + "bn.js" "^4.1.0" + "miller-rabin" "^4.0.0" + "randombytes" "^2.0.0" + +"dir-glob@^3.0.1": + "integrity" "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==" + "resolved" "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "path-type" "^4.0.0" + +"domain-browser@^1.2.0": + "integrity" "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + "resolved" "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz" + "version" "1.2.0" + +"dot-prop@^5.1.0": + "integrity" "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==" + "resolved" "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz" + "version" "5.3.0" + dependencies: + "is-obj" "^2.0.0" + +"dot-prop@^6.0.1": + "integrity" "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==" + "resolved" "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz" + "version" "6.0.1" + dependencies: + "is-obj" "^2.0.0" + +"dotignore@~0.1.2": + "integrity" "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==" + "resolved" "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz" + "version" "0.1.2" + dependencies: + "minimatch" "^3.0.4" + +"duplexer@^0.1.1", "duplexer@~0.1.1": + "integrity" "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + "resolved" "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" + "version" "0.1.2" + +"duplexer2@^0.1.2", "duplexer2@~0.1.0", "duplexer2@~0.1.2": + "integrity" "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=" + "resolved" "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz" + "version" "0.1.4" + dependencies: + "readable-stream" "^2.0.2" + +"ecc-jsbn@~0.1.1": + "integrity" "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=" + "resolved" "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" + "version" "0.1.2" + dependencies: + "jsbn" "~0.1.0" + "safer-buffer" "^2.1.0" + +"ee-first@1.1.1": + "integrity" "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "resolved" "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + "version" "1.1.1" + +"elliptic@^6.5.3": + "integrity" "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==" + "resolved" "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" + "version" "6.5.4" + dependencies: + "bn.js" "^4.11.9" + "brorand" "^1.1.0" + "hash.js" "^1.0.0" + "hmac-drbg" "^1.0.1" + "inherits" "^2.0.4" + "minimalistic-assert" "^1.0.1" + "minimalistic-crypto-utils" "^1.0.1" + +"emoji-regex@^8.0.0": + "integrity" "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "resolved" "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + "version" "8.0.0" + +"encodeurl@~1.0.2": + "integrity" "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + "resolved" "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" + "version" "1.0.2" + +"encoding@^0.1.12": + "integrity" "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==" + "resolved" "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz" + "version" "0.1.13" + dependencies: + "iconv-lite" "^0.6.2" + +"env-paths@^2.2.0": + "integrity" "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" + "resolved" "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz" + "version" "2.2.1" + +"envinfo@^7.7.4": + "integrity" "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" + "resolved" "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz" + "version" "7.8.1" + +"err-code@^2.0.2": + "integrity" "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + "resolved" "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz" + "version" "2.0.3" + +"error-ex@^1.3.1": + "integrity" "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==" + "resolved" "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + "version" "1.3.2" + dependencies: + "is-arrayish" "^0.2.1" + +"es-abstract@^1.19.1": + "integrity" "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==" + "resolved" "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz" + "version" "1.19.1" + dependencies: + "call-bind" "^1.0.2" + "es-to-primitive" "^1.2.1" + "function-bind" "^1.1.1" + "get-intrinsic" "^1.1.1" + "get-symbol-description" "^1.0.0" + "has" "^1.0.3" + "has-symbols" "^1.0.2" + "internal-slot" "^1.0.3" + "is-callable" "^1.2.4" + "is-negative-zero" "^2.0.1" + "is-regex" "^1.1.4" + "is-shared-array-buffer" "^1.0.1" + "is-string" "^1.0.7" + "is-weakref" "^1.0.1" + "object-inspect" "^1.11.0" + "object-keys" "^1.1.1" + "object.assign" "^4.1.2" + "string.prototype.trimend" "^1.0.4" + "string.prototype.trimstart" "^1.0.4" + "unbox-primitive" "^1.0.1" + +"es-to-primitive@^1.2.1": + "integrity" "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==" + "resolved" "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" + "version" "1.2.1" + dependencies: + "is-callable" "^1.1.4" + "is-date-object" "^1.0.1" + "is-symbol" "^1.0.2" + +"escalade@^3.1.1": + "integrity" "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "resolved" "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + "version" "3.1.1" + +"escape-html@~1.0.3": + "integrity" "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "resolved" "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" + "version" "1.0.3" + +"escape-string-regexp@^1.0.5": + "integrity" "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + "version" "1.0.5" + +"etag@~1.8.1": + "integrity" "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "resolved" "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" + "version" "1.8.1" + +"event-stream@3.3.4": + "integrity" "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=" + "resolved" "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz" + "version" "3.3.4" + dependencies: + "duplexer" "~0.1.1" + "from" "~0" + "map-stream" "~0.1.0" + "pause-stream" "0.0.11" + "split" "0.3" + "stream-combiner" "~0.0.4" + "through" "~2.3.1" + +"eventemitter3@^4.0.4": + "integrity" "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + "resolved" "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" + "version" "4.0.7" + +"events@^2.0.0": + "integrity" "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==" + "resolved" "https://registry.npmjs.org/events/-/events-2.1.0.tgz" + "version" "2.1.0" + +"evp_bytestokey@^1.0.0", "evp_bytestokey@^1.0.3": + "integrity" "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==" + "resolved" "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "md5.js" "^1.3.4" + "safe-buffer" "^5.1.1" + +"execa@^5.0.0": + "integrity" "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==" + "resolved" "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" + "version" "5.1.1" + dependencies: + "cross-spawn" "^7.0.3" + "get-stream" "^6.0.0" + "human-signals" "^2.1.0" + "is-stream" "^2.0.0" + "merge-stream" "^2.0.0" + "npm-run-path" "^4.0.1" + "onetime" "^5.1.2" + "signal-exit" "^3.0.3" + "strip-final-newline" "^2.0.0" + +"expand-brackets@^2.1.4": + "integrity" "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=" + "resolved" "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz" + "version" "2.1.4" + dependencies: + "debug" "^2.3.3" + "define-property" "^0.2.5" + "extend-shallow" "^2.0.1" + "posix-character-classes" "^0.1.0" + "regex-not" "^1.0.0" + "snapdragon" "^0.8.1" + "to-regex" "^3.0.1" + +"extend-shallow@^2.0.1": + "integrity" "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=" + "resolved" "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "is-extendable" "^0.1.0" + +"extend-shallow@^3.0.0": + "integrity" "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=" + "resolved" "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz" + "version" "3.0.2" + dependencies: + "assign-symbols" "^1.0.0" + "is-extendable" "^1.0.1" + +"extend-shallow@^3.0.2": + "integrity" "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=" + "resolved" "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz" + "version" "3.0.2" + dependencies: + "assign-symbols" "^1.0.0" + "is-extendable" "^1.0.1" + +"extend@~3.0.2": + "integrity" "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "resolved" "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" + "version" "3.0.2" + +"external-editor@^3.0.3": + "integrity" "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==" + "resolved" "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "chardet" "^0.7.0" + "iconv-lite" "^0.4.24" + "tmp" "^0.0.33" + +"extglob@^2.0.4": + "integrity" "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==" + "resolved" "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz" + "version" "2.0.4" + dependencies: + "array-unique" "^0.3.2" + "define-property" "^1.0.0" + "expand-brackets" "^2.1.4" + "extend-shallow" "^2.0.1" + "fragment-cache" "^0.2.1" + "regex-not" "^1.0.0" + "snapdragon" "^0.8.1" + "to-regex" "^3.0.1" + +"extsprintf@^1.2.0", "extsprintf@1.3.0": + "integrity" "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "resolved" "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" + "version" "1.3.0" + +"fast-deep-equal@^3.1.1": + "integrity" "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "resolved" "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + "version" "3.1.3" + +"fast-glob@^3.1.1": + "integrity" "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==" + "resolved" "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz" + "version" "3.2.7" + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + "glob-parent" "^5.1.2" + "merge2" "^1.3.0" + "micromatch" "^4.0.4" + +"fast-json-stable-stringify@^2.0.0": + "integrity" "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "resolved" "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + "version" "2.1.0" + +"fast-safe-stringify@^2.0.7": + "integrity" "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + "resolved" "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz" + "version" "2.1.1" + +"fastq@^1.6.0": + "integrity" "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==" + "resolved" "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" + "version" "1.13.0" + dependencies: + "reusify" "^1.0.4" + +"faye-websocket@0.11.x": + "integrity" "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==" + "resolved" "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz" + "version" "0.11.4" + dependencies: + "websocket-driver" ">=0.5.1" + +"figures@^3.0.0": + "integrity" "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==" + "resolved" "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "escape-string-regexp" "^1.0.5" + +"fill-range@^4.0.0": + "integrity" "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=" + "resolved" "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "extend-shallow" "^2.0.1" + "is-number" "^3.0.0" + "repeat-string" "^1.6.1" + "to-regex-range" "^2.1.0" + +"fill-range@^7.0.1": + "integrity" "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==" + "resolved" "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + "version" "7.0.1" + dependencies: + "to-regex-range" "^5.0.1" + +"filter-obj@^1.1.0": + "integrity" "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=" + "resolved" "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz" + "version" "1.1.0" + +"finalhandler@1.1.2": + "integrity" "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==" + "resolved" "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "debug" "2.6.9" + "encodeurl" "~1.0.2" + "escape-html" "~1.0.3" + "on-finished" "~2.3.0" + "parseurl" "~1.3.3" + "statuses" "~1.5.0" + "unpipe" "~1.0.0" + +"find-up@^2.0.0": + "integrity" "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=" + "resolved" "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "locate-path" "^2.0.0" + +"find-up@^4.0.0", "find-up@^4.1.0": + "integrity" "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==" + "resolved" "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "locate-path" "^5.0.0" + "path-exists" "^4.0.0" + +"for-each@~0.3.3": + "integrity" "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==" + "resolved" "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" + "version" "0.3.3" + dependencies: + "is-callable" "^1.1.3" + +"for-in@^1.0.2": + "integrity" "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + "resolved" "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz" + "version" "1.0.2" + +"forever-agent@~0.6.1": + "integrity" "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "resolved" "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + "version" "0.6.1" + +"form-data@~2.3.2": + "integrity" "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==" + "resolved" "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" + "version" "2.3.3" + dependencies: + "asynckit" "^0.4.0" + "combined-stream" "^1.0.6" + "mime-types" "^2.1.12" + +"fragment-cache@^0.2.1": + "integrity" "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=" + "resolved" "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz" + "version" "0.2.1" + dependencies: + "map-cache" "^0.2.2" + +"fresh@0.5.2": + "integrity" "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "resolved" "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" + "version" "0.5.2" + +"from@~0": + "integrity" "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" + "resolved" "https://registry.npmjs.org/from/-/from-0.1.7.tgz" + "version" "0.1.7" + +"fs-extra@^9.1.0": + "integrity" "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==" + "resolved" "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz" + "version" "9.1.0" + dependencies: + "at-least-node" "^1.0.0" + "graceful-fs" "^4.2.0" + "jsonfile" "^6.0.1" + "universalify" "^2.0.0" + +"fs-minipass@^1.2.7": + "integrity" "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==" + "resolved" "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz" + "version" "1.2.7" + dependencies: + "minipass" "^2.6.0" + +"fs-minipass@^2.0.0", "fs-minipass@^2.1.0": + "integrity" "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==" + "resolved" "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "minipass" "^3.0.0" + +"fs.realpath@^1.0.0": + "integrity" "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + "version" "1.0.0" + +"function-bind@^1.1.1": + "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + "version" "1.1.1" + +"gauge@~2.7.3": + "integrity" "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=" + "resolved" "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" + "version" "2.7.4" + dependencies: + "aproba" "^1.0.3" + "console-control-strings" "^1.0.0" + "has-unicode" "^2.0.0" + "object-assign" "^4.1.0" + "signal-exit" "^3.0.0" + "string-width" "^1.0.1" + "strip-ansi" "^3.0.1" + "wide-align" "^1.1.0" + +"get-assigned-identifiers@^1.2.0": + "integrity" "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==" + "resolved" "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz" + "version" "1.2.0" + +"get-caller-file@^2.0.5": + "integrity" "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "resolved" "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + "version" "2.0.5" + +"get-intrinsic@^1.0.2", "get-intrinsic@^1.1.0", "get-intrinsic@^1.1.1": + "integrity" "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==" + "resolved" "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "function-bind" "^1.1.1" + "has" "^1.0.3" + "has-symbols" "^1.0.1" + +"get-pkg-repo@^4.0.0": + "integrity" "sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==" + "resolved" "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz" + "version" "4.2.1" + dependencies: + "@hutson/parse-repository-url" "^3.0.0" + "hosted-git-info" "^4.0.0" + "through2" "^2.0.0" + "yargs" "^16.2.0" + +"get-port@^5.1.1": + "integrity" "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==" + "resolved" "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz" + "version" "5.1.1" + +"get-stream@^6.0.0": + "integrity" "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" + "version" "6.0.1" + +"get-symbol-description@^1.0.0": + "integrity" "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==" + "resolved" "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "call-bind" "^1.0.2" + "get-intrinsic" "^1.1.1" + +"get-value@^2.0.3", "get-value@^2.0.6": + "integrity" "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + "resolved" "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz" + "version" "2.0.6" + +"getpass@^0.1.1": + "integrity" "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=" + "resolved" "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" + "version" "0.1.7" + dependencies: + "assert-plus" "^1.0.0" + +"git-raw-commits@^2.0.8": + "integrity" "sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ==" + "resolved" "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.10.tgz" + "version" "2.0.10" + dependencies: + "dargs" "^7.0.0" + "lodash" "^4.17.15" + "meow" "^8.0.0" + "split2" "^3.0.0" + "through2" "^4.0.0" + +"git-remote-origin-url@^2.0.0": + "integrity" "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=" + "resolved" "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "gitconfiglocal" "^1.0.0" + "pify" "^2.3.0" + +"git-semver-tags@^4.1.1": + "integrity" "sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==" + "resolved" "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz" + "version" "4.1.1" + dependencies: + "meow" "^8.0.0" + "semver" "^6.0.0" + +"git-up@^4.0.0": + "integrity" "sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA==" + "resolved" "https://registry.npmjs.org/git-up/-/git-up-4.0.5.tgz" + "version" "4.0.5" + dependencies: + "is-ssh" "^1.3.0" + "parse-url" "^6.0.0" + +"git-url-parse@^11.4.4": + "integrity" "sha512-WWUxvJs5HsyHL6L08wOusa/IXYtMuCAhrMmnTjQPpBU0TTHyDhnOATNH3xNQz7YOQUsqIIPTGr4xiVti1Hsk5g==" + "resolved" "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.6.0.tgz" + "version" "11.6.0" + dependencies: + "git-up" "^4.0.0" + +"gitconfiglocal@^1.0.0": + "integrity" "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=" + "resolved" "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "ini" "^1.3.2" + +"glob-parent@^3.1.0": + "integrity" "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=" + "resolved" "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "is-glob" "^3.1.0" + "path-dirname" "^1.0.0" + +"glob-parent@^5.1.1", "glob-parent@^5.1.2": + "integrity" "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==" + "resolved" "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + "version" "5.1.2" + dependencies: + "is-glob" "^4.0.1" + +"glob@^7.1.0", "glob@^7.1.1", "glob@^7.1.3", "glob@^7.1.4", "glob@^7.1.6": + "integrity" "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==" + "resolved" "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + "version" "7.2.0" + dependencies: + "fs.realpath" "^1.0.0" + "inflight" "^1.0.4" + "inherits" "2" + "minimatch" "^3.0.4" + "once" "^1.3.0" + "path-is-absolute" "^1.0.0" + +"glob@~7.1.7": + "integrity" "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==" + "resolved" "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" + "version" "7.1.7" + dependencies: + "fs.realpath" "^1.0.0" + "inflight" "^1.0.4" + "inherits" "2" + "minimatch" "^3.0.4" + "once" "^1.3.0" + "path-is-absolute" "^1.0.0" + +"globby@^11.0.2": + "integrity" "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==" + "resolved" "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz" + "version" "11.0.4" + dependencies: + "array-union" "^2.1.0" + "dir-glob" "^3.0.1" + "fast-glob" "^3.1.1" + "ignore" "^5.1.4" + "merge2" "^1.3.0" + "slash" "^3.0.0" + +"graceful-fs@^4.1.11", "graceful-fs@^4.1.15", "graceful-fs@^4.1.2", "graceful-fs@^4.1.6", "graceful-fs@^4.2.0", "graceful-fs@^4.2.2", "graceful-fs@^4.2.3": + "integrity" "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + "resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz" + "version" "4.2.8" + +"handlebars@^4.7.6": + "integrity" "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==" + "resolved" "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz" + "version" "4.7.7" + dependencies: + "minimist" "^1.2.5" + "neo-async" "^2.6.0" + "source-map" "^0.6.1" + "wordwrap" "^1.0.0" + optionalDependencies: + "uglify-js" "^3.1.4" + +"har-schema@^2.0.0": + "integrity" "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "resolved" "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" + "version" "2.0.0" + +"har-validator@~5.1.3": + "integrity" "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==" + "resolved" "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" + "version" "5.1.5" + dependencies: + "ajv" "^6.12.3" + "har-schema" "^2.0.0" + +"hard-rejection@^2.1.0": + "integrity" "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==" + "resolved" "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz" + "version" "2.1.0" + +"has-bigints@^1.0.1": + "integrity" "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + "resolved" "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz" + "version" "1.0.1" + +"has-flag@^3.0.0": + "integrity" "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + "version" "3.0.0" + +"has-flag@^4.0.0": + "integrity" "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + "version" "4.0.0" + +"has-symbols@^1.0.1", "has-symbols@^1.0.2": + "integrity" "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + "resolved" "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz" + "version" "1.0.2" + +"has-tostringtag@^1.0.0": + "integrity" "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==" + "resolved" "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "has-symbols" "^1.0.2" + +"has-unicode@^2.0.0", "has-unicode@^2.0.1": + "integrity" "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + "resolved" "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" + "version" "2.0.1" + +"has-value@^0.3.1": + "integrity" "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=" + "resolved" "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz" + "version" "0.3.1" + dependencies: + "get-value" "^2.0.3" + "has-values" "^0.1.4" + "isobject" "^2.0.0" + +"has-value@^1.0.0": + "integrity" "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=" + "resolved" "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "get-value" "^2.0.6" + "has-values" "^1.0.0" + "isobject" "^3.0.0" + +"has-values@^0.1.4": + "integrity" "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + "resolved" "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz" + "version" "0.1.4" + +"has-values@^1.0.0": + "integrity" "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=" + "resolved" "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "is-number" "^3.0.0" + "kind-of" "^4.0.0" + +"has@^1.0.0", "has@^1.0.3", "has@~1.0.3": + "integrity" "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" + "resolved" "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "function-bind" "^1.1.1" + +"hash-base@^3.0.0": + "integrity" "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==" + "resolved" "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "inherits" "^2.0.4" + "readable-stream" "^3.6.0" + "safe-buffer" "^5.2.0" + +"hash.js@^1.0.0", "hash.js@^1.0.3": + "integrity" "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==" + "resolved" "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" + "version" "1.1.7" + dependencies: + "inherits" "^2.0.3" + "minimalistic-assert" "^1.0.1" + +"hmac-drbg@^1.0.1": + "integrity" "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=" + "resolved" "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "hash.js" "^1.0.3" + "minimalistic-assert" "^1.0.0" + "minimalistic-crypto-utils" "^1.0.1" + +"hosted-git-info@^2.1.4": + "integrity" "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + "resolved" "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" + "version" "2.8.9" + +"hosted-git-info@^4.0.0", "hosted-git-info@^4.0.1": + "integrity" "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==" + "resolved" "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz" + "version" "4.0.2" + dependencies: + "lru-cache" "^6.0.0" + +"htmlescape@^1.1.0": + "integrity" "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" + "resolved" "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz" + "version" "1.1.1" + +"http-auth@3.1.x": + "integrity" "sha1-lFz63WZSHq+PfISRPTd9exXyTjE=" + "resolved" "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz" + "version" "3.1.3" + dependencies: + "apache-crypt" "^1.1.2" + "apache-md5" "^1.0.6" + "bcryptjs" "^2.3.0" + "uuid" "^3.0.0" + +"http-cache-semantics@^4.1.0": + "integrity" "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "resolved" "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" + "version" "4.1.0" + +"http-errors@~1.6.2": + "integrity" "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=" + "resolved" "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + "version" "1.6.3" + dependencies: + "depd" "~1.1.2" + "inherits" "2.0.3" + "setprototypeof" "1.1.0" + "statuses" ">= 1.4.0 < 2" + +"http-errors@~1.7.2": + "integrity" "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==" + "resolved" "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz" + "version" "1.7.3" + dependencies: + "depd" "~1.1.2" + "inherits" "2.0.4" + "setprototypeof" "1.1.1" + "statuses" ">= 1.5.0 < 2" + "toidentifier" "1.0.0" + +"http-parser-js@>=0.5.1": + "integrity" "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==" + "resolved" "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz" + "version" "0.5.3" + +"http-proxy-agent@^4.0.1": + "integrity" "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==" + "resolved" "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "@tootallnate/once" "1" + "agent-base" "6" + "debug" "4" + +"http-signature@~1.2.0": + "integrity" "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=" + "resolved" "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "assert-plus" "^1.0.0" + "jsprim" "^1.2.2" + "sshpk" "^1.7.0" + +"https-browserify@^1.0.0": + "integrity" "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + "resolved" "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz" + "version" "1.0.0" + +"https-proxy-agent@^5.0.0": + "integrity" "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==" + "resolved" "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "agent-base" "6" + "debug" "4" + +"human-signals@^2.1.0": + "integrity" "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + "resolved" "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" + "version" "2.1.0" + +"humanize-ms@^1.2.1": + "integrity" "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=" + "resolved" "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" + "version" "1.2.1" + dependencies: + "ms" "^2.0.0" + +"iconv-lite@^0.4.24": + "integrity" "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==" + "resolved" "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" + "version" "0.4.24" + dependencies: + "safer-buffer" ">= 2.1.2 < 3" + +"iconv-lite@^0.6.2": + "integrity" "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==" + "resolved" "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" + "version" "0.6.3" + dependencies: + "safer-buffer" ">= 2.1.2 < 3.0.0" + +"ieee754@^1.1.4": + "integrity" "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + "resolved" "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + "version" "1.2.1" + +"ignore-walk@^3.0.3": + "integrity" "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==" + "resolved" "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz" + "version" "3.0.4" + dependencies: + "minimatch" "^3.0.4" + +"ignore@^5.1.4": + "integrity" "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" + "resolved" "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz" + "version" "5.1.8" + +"import-fresh@^3.2.1": + "integrity" "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==" + "resolved" "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "parent-module" "^1.0.0" + "resolve-from" "^4.0.0" + +"import-local@^3.0.2": + "integrity" "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==" + "resolved" "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "pkg-dir" "^4.2.0" + "resolve-cwd" "^3.0.0" + +"imurmurhash@^0.1.4": + "integrity" "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "resolved" "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + "version" "0.1.4" + +"indent-string@^4.0.0": + "integrity" "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + "resolved" "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" + "version" "4.0.0" + +"infer-owner@^1.0.4": + "integrity" "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + "resolved" "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz" + "version" "1.0.4" + +"inflight@^1.0.4": + "integrity" "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "resolved" "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + "version" "1.0.6" + dependencies: + "once" "^1.3.0" + "wrappy" "1" + +"inherits@^2.0.1", "inherits@^2.0.3", "inherits@^2.0.4", "inherits@~2.0.1", "inherits@~2.0.3", "inherits@~2.0.4", "inherits@2", "inherits@2.0.4": + "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + "version" "2.0.4" + +"inherits@2.0.1": + "integrity" "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + "version" "2.0.1" + +"inherits@2.0.3": + "integrity" "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "version" "2.0.3" + +"ini@^1.3.2", "ini@^1.3.4": + "integrity" "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "resolved" "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" + "version" "1.3.8" + +"init-package-json@^2.0.2": + "integrity" "sha512-u1uGAtEFu3VA6HNl/yUWw57jmKEMx8SKOxHhxjGnOFUiIlFnohKDFg4ZrPpv9wWqk44nDxGJAtqjdQFm+9XXQA==" + "resolved" "https://registry.npmjs.org/init-package-json/-/init-package-json-2.0.5.tgz" + "version" "2.0.5" + dependencies: + "npm-package-arg" "^8.1.5" + "promzard" "^0.3.0" + "read" "~1.0.1" + "read-package-json" "^4.1.1" + "semver" "^7.3.5" + "validate-npm-package-license" "^3.0.4" + "validate-npm-package-name" "^3.0.0" + +"inline-source-map@~0.6.0": + "integrity" "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=" + "resolved" "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz" + "version" "0.6.2" + dependencies: + "source-map" "~0.5.3" + +"inquirer@^7.3.3": + "integrity" "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==" + "resolved" "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz" + "version" "7.3.3" + dependencies: + "ansi-escapes" "^4.2.1" + "chalk" "^4.1.0" + "cli-cursor" "^3.1.0" + "cli-width" "^3.0.0" + "external-editor" "^3.0.3" + "figures" "^3.0.0" + "lodash" "^4.17.19" + "mute-stream" "0.0.8" + "run-async" "^2.4.0" + "rxjs" "^6.6.0" + "string-width" "^4.1.0" + "strip-ansi" "^6.0.0" + "through" "^2.3.6" + +"insert-module-globals@^7.0.0": + "integrity" "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==" + "resolved" "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz" + "version" "7.2.1" + dependencies: + "acorn-node" "^1.5.2" + "combine-source-map" "^0.8.0" + "concat-stream" "^1.6.1" + "is-buffer" "^1.1.0" + "JSONStream" "^1.0.3" + "path-is-absolute" "^1.0.1" + "process" "~0.11.0" + "through2" "^2.0.0" + "undeclared-identifiers" "^1.1.2" + "xtend" "^4.0.0" + +"internal-slot@^1.0.3": + "integrity" "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==" + "resolved" "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "get-intrinsic" "^1.1.0" + "has" "^1.0.3" + "side-channel" "^1.0.4" + +"ip@^1.1.5": + "integrity" "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + "resolved" "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz" + "version" "1.1.5" + +"is-accessor-descriptor@^0.1.6": + "integrity" "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=" + "resolved" "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz" + "version" "0.1.6" + dependencies: + "kind-of" "^3.0.2" + +"is-accessor-descriptor@^1.0.0": + "integrity" "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==" + "resolved" "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "kind-of" "^6.0.0" + +"is-arguments@^1.0.4": + "integrity" "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==" + "resolved" "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "call-bind" "^1.0.2" + "has-tostringtag" "^1.0.0" + +"is-arrayish@^0.2.1": + "integrity" "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + "version" "0.2.1" + +"is-bigint@^1.0.1": + "integrity" "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==" + "resolved" "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "has-bigints" "^1.0.1" + +"is-binary-path@^1.0.0": + "integrity" "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=" + "resolved" "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "binary-extensions" "^1.0.0" + +"is-boolean-object@^1.1.0": + "integrity" "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==" + "resolved" "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "call-bind" "^1.0.2" + "has-tostringtag" "^1.0.0" + +"is-buffer@^1.1.0", "is-buffer@^1.1.5": + "integrity" "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "resolved" "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + "version" "1.1.6" + +"is-callable@^1.1.3", "is-callable@^1.1.4", "is-callable@^1.2.4": + "integrity" "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + "resolved" "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz" + "version" "1.2.4" + +"is-ci@^2.0.0": + "integrity" "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==" + "resolved" "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "ci-info" "^2.0.0" + +"is-core-module@^2.2.0", "is-core-module@^2.5.0": + "integrity" "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==" + "resolved" "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz" + "version" "2.7.0" + dependencies: + "has" "^1.0.3" + +"is-data-descriptor@^0.1.4": + "integrity" "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=" + "resolved" "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz" + "version" "0.1.4" + dependencies: + "kind-of" "^3.0.2" + +"is-data-descriptor@^1.0.0": + "integrity" "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==" + "resolved" "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "kind-of" "^6.0.0" + +"is-date-object@^1.0.1": + "integrity" "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==" + "resolved" "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" + "version" "1.0.5" + dependencies: + "has-tostringtag" "^1.0.0" + +"is-descriptor@^0.1.0": + "integrity" "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==" + "resolved" "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz" + "version" "0.1.6" + dependencies: + "is-accessor-descriptor" "^0.1.6" + "is-data-descriptor" "^0.1.4" + "kind-of" "^5.0.0" + +"is-descriptor@^1.0.0": + "integrity" "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==" + "resolved" "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "is-accessor-descriptor" "^1.0.0" + "is-data-descriptor" "^1.0.0" + "kind-of" "^6.0.2" + +"is-descriptor@^1.0.2": + "integrity" "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==" + "resolved" "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "is-accessor-descriptor" "^1.0.0" + "is-data-descriptor" "^1.0.0" + "kind-of" "^6.0.2" + +"is-extendable@^0.1.0", "is-extendable@^0.1.1": + "integrity" "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + "resolved" "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + "version" "0.1.1" + +"is-extendable@^1.0.1": + "integrity" "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==" + "resolved" "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "is-plain-object" "^2.0.4" + +"is-extglob@^2.1.0", "is-extglob@^2.1.1": + "integrity" "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "resolved" "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + "version" "2.1.1" + +"is-fullwidth-code-point@^1.0.0": + "integrity" "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=" + "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "number-is-nan" "^1.0.0" + +"is-fullwidth-code-point@^2.0.0": + "integrity" "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" + "version" "2.0.0" + +"is-fullwidth-code-point@^3.0.0": + "integrity" "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + "version" "3.0.0" + +"is-glob@^3.1.0": + "integrity" "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=" + "resolved" "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "is-extglob" "^2.1.0" + +"is-glob@^4.0.0", "is-glob@^4.0.1": + "integrity" "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==" + "resolved" "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "is-extglob" "^2.1.1" + +"is-lambda@^1.0.1": + "integrity" "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=" + "resolved" "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz" + "version" "1.0.1" + +"is-negative-zero@^2.0.1": + "integrity" "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + "resolved" "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz" + "version" "2.0.1" + +"is-number-object@^1.0.4": + "integrity" "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==" + "resolved" "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz" + "version" "1.0.6" + dependencies: + "has-tostringtag" "^1.0.0" + +"is-number@^3.0.0": + "integrity" "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=" + "resolved" "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "kind-of" "^3.0.2" + +"is-number@^7.0.0": + "integrity" "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "resolved" "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + "version" "7.0.0" + +"is-obj@^2.0.0": + "integrity" "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + "resolved" "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz" + "version" "2.0.0" + +"is-plain-obj@^1.0.0", "is-plain-obj@^1.1.0": + "integrity" "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + "resolved" "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" + "version" "1.1.0" + +"is-plain-obj@^2.0.0": + "integrity" "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + "resolved" "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" + "version" "2.1.0" + +"is-plain-object@^2.0.3": + "integrity" "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==" + "resolved" "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" + "version" "2.0.4" + dependencies: + "isobject" "^3.0.1" + +"is-plain-object@^2.0.4": + "integrity" "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==" + "resolved" "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" + "version" "2.0.4" + dependencies: + "isobject" "^3.0.1" + +"is-plain-object@^5.0.0": + "integrity" "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + "resolved" "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz" + "version" "5.0.0" + +"is-regex@^1.0.4", "is-regex@^1.1.4", "is-regex@~1.1.3": + "integrity" "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==" + "resolved" "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" + "version" "1.1.4" + dependencies: + "call-bind" "^1.0.2" + "has-tostringtag" "^1.0.0" + +"is-shared-array-buffer@^1.0.1": + "integrity" "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==" + "resolved" "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz" + "version" "1.0.1" + +"is-ssh@^1.3.0": + "integrity" "sha512-NKzJmQzJfEEma3w5cJNcUMxoXfDjz0Zj0eyCalHn2E6VOwlzjZo0yuO2fcBSf8zhFuVCL/82/r5gRcoi6aEPVQ==" + "resolved" "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.3.tgz" + "version" "1.3.3" + dependencies: + "protocols" "^1.1.0" + +"is-stream@^2.0.0": + "integrity" "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + "resolved" "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" + "version" "2.0.1" + +"is-string@^1.0.5", "is-string@^1.0.7": + "integrity" "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==" + "resolved" "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" + "version" "1.0.7" + dependencies: + "has-tostringtag" "^1.0.0" + +"is-symbol@^1.0.2", "is-symbol@^1.0.3": + "integrity" "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==" + "resolved" "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "has-symbols" "^1.0.2" + +"is-text-path@^1.0.1": + "integrity" "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=" + "resolved" "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "text-extensions" "^1.0.0" + +"is-typedarray@^1.0.0", "is-typedarray@~1.0.0": + "integrity" "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "resolved" "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + "version" "1.0.0" + +"is-weakref@^1.0.1": + "integrity" "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==" + "resolved" "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "call-bind" "^1.0.0" + +"is-windows@^1.0.2": + "integrity" "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + "resolved" "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" + "version" "1.0.2" + +"is-wsl@^1.1.0": + "integrity" "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + "resolved" "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz" + "version" "1.1.0" + +"isarray@~1.0.0", "isarray@1.0.0": + "integrity" "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "resolved" "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "version" "1.0.0" + +"isexe@^2.0.0": + "integrity" "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "resolved" "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + "version" "2.0.0" + +"isobject@^2.0.0": + "integrity" "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=" + "resolved" "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "isarray" "1.0.0" + +"isobject@^3.0.0", "isobject@^3.0.1": + "integrity" "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "resolved" "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" + "version" "3.0.1" + +"isstream@~0.1.2": + "integrity" "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "resolved" "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + "version" "0.1.2" + +"js-tokens@^4.0.0": + "integrity" "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "resolved" "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + "version" "4.0.0" + +"jsbn@~0.1.0": + "integrity" "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "resolved" "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" + "version" "0.1.1" + +"json-parse-better-errors@^1.0.1": + "integrity" "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + "resolved" "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" + "version" "1.0.2" + +"json-parse-even-better-errors@^2.3.0": + "integrity" "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "resolved" "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" + "version" "2.3.1" + +"json-schema-traverse@^0.4.1": + "integrity" "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + "version" "0.4.1" + +"json-schema@0.2.3": + "integrity" "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "resolved" "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" + "version" "0.2.3" + +"json-stable-stringify@~0.0.0": + "integrity" "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=" + "resolved" "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz" + "version" "0.0.1" + dependencies: + "jsonify" "~0.0.0" + +"json-stringify-safe@^5.0.1", "json-stringify-safe@~5.0.1": + "integrity" "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "resolved" "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + "version" "5.0.1" + +"jsonfile@^6.0.1": + "integrity" "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==" + "resolved" "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "universalify" "^2.0.0" + optionalDependencies: + "graceful-fs" "^4.1.6" + +"jsonify@~0.0.0": + "integrity" "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + "resolved" "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + "version" "0.0.0" + +"jsonparse@^1.2.0", "jsonparse@^1.3.1": + "integrity" "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + "resolved" "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" + "version" "1.3.1" + +"JSONStream@^1.0.3", "JSONStream@^1.0.4": + "integrity" "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==" + "resolved" "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" + "version" "1.3.5" + dependencies: + "jsonparse" "^1.2.0" + "through" ">=2.2.7 <3" + +"jsprim@^1.2.2": + "integrity" "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=" + "resolved" "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz" + "version" "1.4.1" + dependencies: + "assert-plus" "1.0.0" + "extsprintf" "1.3.0" + "json-schema" "0.2.3" + "verror" "1.10.0" + +"kind-of@^3.0.2": + "integrity" "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "is-buffer" "^1.1.5" + +"kind-of@^3.0.3": + "integrity" "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "is-buffer" "^1.1.5" + +"kind-of@^3.2.0": + "integrity" "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "is-buffer" "^1.1.5" + +"kind-of@^4.0.0": + "integrity" "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "is-buffer" "^1.1.5" + +"kind-of@^5.0.0": + "integrity" "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz" + "version" "5.1.0" + +"kind-of@^6.0.0", "kind-of@^6.0.2", "kind-of@^6.0.3": + "integrity" "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" + "version" "6.0.3" + +"labeled-stream-splicer@^2.0.0": + "integrity" "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==" + "resolved" "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "inherits" "^2.0.1" + "stream-splicer" "^2.0.0" + +"lerna@^4.0.0": + "integrity" "sha512-DD/i1znurfOmNJb0OBw66NmNqiM8kF6uIrzrJ0wGE3VNdzeOhz9ziWLYiRaZDGGwgbcjOo6eIfcx9O5Qynz+kg==" + "resolved" "https://registry.npmjs.org/lerna/-/lerna-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "@lerna/add" "4.0.0" + "@lerna/bootstrap" "4.0.0" + "@lerna/changed" "4.0.0" + "@lerna/clean" "4.0.0" + "@lerna/cli" "4.0.0" + "@lerna/create" "4.0.0" + "@lerna/diff" "4.0.0" + "@lerna/exec" "4.0.0" + "@lerna/import" "4.0.0" + "@lerna/info" "4.0.0" + "@lerna/init" "4.0.0" + "@lerna/link" "4.0.0" + "@lerna/list" "4.0.0" + "@lerna/publish" "4.0.0" + "@lerna/run" "4.0.0" + "@lerna/version" "4.0.0" + "import-local" "^3.0.2" + "npmlog" "^4.1.2" + +"libnpmaccess@^4.0.1": + "integrity" "sha512-sPeTSNImksm8O2b6/pf3ikv4N567ERYEpeKRPSmqlNt1dTZbvgpJIzg5vAhXHpw2ISBsELFRelk0jEahj1c6nQ==" + "resolved" "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "aproba" "^2.0.0" + "minipass" "^3.1.1" + "npm-package-arg" "^8.1.2" + "npm-registry-fetch" "^11.0.0" + +"libnpmpublish@^4.0.0": + "integrity" "sha512-+AD7A2zbVeGRCFI2aO//oUmapCwy7GHqPXFJh3qpToSRNU+tXKJ2YFUgjt04LPPAf2dlEH95s6EhIHM1J7bmOw==" + "resolved" "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-4.0.2.tgz" + "version" "4.0.2" + dependencies: + "normalize-package-data" "^3.0.2" + "npm-package-arg" "^8.1.2" + "npm-registry-fetch" "^11.0.0" + "semver" "^7.1.3" + "ssri" "^8.0.1" + +"lines-and-columns@^1.1.6": + "integrity" "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + "resolved" "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz" + "version" "1.1.6" + +"live-server@^1.2.1": + "integrity" "sha512-Yn2XCVjErTkqnM3FfTmM7/kWy3zP7+cEtC7x6u+wUzlQ+1UW3zEYbbyJrc0jNDwiMDZI0m4a0i3dxlGHVyXczw==" + "resolved" "https://registry.npmjs.org/live-server/-/live-server-1.2.1.tgz" + "version" "1.2.1" + dependencies: + "chokidar" "^2.0.4" + "colors" "latest" + "connect" "^3.6.6" + "cors" "latest" + "event-stream" "3.3.4" + "faye-websocket" "0.11.x" + "http-auth" "3.1.x" + "morgan" "^1.9.1" + "object-assign" "latest" + "opn" "latest" + "proxy-middleware" "latest" + "send" "latest" + "serve-index" "^1.9.1" + +"load-json-file@^4.0.0": + "integrity" "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=" + "resolved" "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "graceful-fs" "^4.1.2" + "parse-json" "^4.0.0" + "pify" "^3.0.0" + "strip-bom" "^3.0.0" + +"load-json-file@^6.2.0": + "integrity" "sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ==" + "resolved" "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz" + "version" "6.2.0" + dependencies: + "graceful-fs" "^4.1.15" + "parse-json" "^5.0.0" + "strip-bom" "^4.0.0" + "type-fest" "^0.6.0" + +"locate-path@^2.0.0": + "integrity" "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=" + "resolved" "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "p-locate" "^2.0.0" + "path-exists" "^3.0.0" + +"locate-path@^5.0.0": + "integrity" "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==" + "resolved" "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "p-locate" "^4.1.0" + +"lodash._reinterpolate@^3.0.0": + "integrity" "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + "resolved" "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + "version" "3.0.0" + +"lodash.ismatch@^4.4.0": + "integrity" "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=" + "resolved" "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz" + "version" "4.4.0" + +"lodash.memoize@~3.0.3": + "integrity" "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" + "resolved" "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" + "version" "3.0.4" + +"lodash.template@^4.5.0": + "integrity" "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==" + "resolved" "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz" + "version" "4.5.0" + dependencies: + "lodash._reinterpolate" "^3.0.0" + "lodash.templatesettings" "^4.0.0" + +"lodash.templatesettings@^4.0.0": + "integrity" "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==" + "resolved" "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "lodash._reinterpolate" "^3.0.0" + +"lodash@^4.17.15", "lodash@^4.17.19", "lodash@^4.7.0": + "integrity" "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "resolved" "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + "version" "4.17.21" + +"lru-cache@^6.0.0": + "integrity" "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==" + "resolved" "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + "version" "6.0.0" + dependencies: + "yallist" "^4.0.0" + +"make-dir@^2.1.0": + "integrity" "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==" + "resolved" "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "pify" "^4.0.1" + "semver" "^5.6.0" + +"make-dir@^3.0.0": + "integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==" + "resolved" "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "semver" "^6.0.0" + +"make-fetch-happen@^8.0.9": + "integrity" "sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ==" + "resolved" "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz" + "version" "8.0.14" + dependencies: + "agentkeepalive" "^4.1.3" + "cacache" "^15.0.5" + "http-cache-semantics" "^4.1.0" + "http-proxy-agent" "^4.0.1" + "https-proxy-agent" "^5.0.0" + "is-lambda" "^1.0.1" + "lru-cache" "^6.0.0" + "minipass" "^3.1.3" + "minipass-collect" "^1.0.2" + "minipass-fetch" "^1.3.2" + "minipass-flush" "^1.0.5" + "minipass-pipeline" "^1.2.4" + "promise-retry" "^2.0.1" + "socks-proxy-agent" "^5.0.0" + "ssri" "^8.0.0" + +"make-fetch-happen@^9.0.1": + "integrity" "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==" + "resolved" "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz" + "version" "9.1.0" + dependencies: + "agentkeepalive" "^4.1.3" + "cacache" "^15.2.0" + "http-cache-semantics" "^4.1.0" + "http-proxy-agent" "^4.0.1" + "https-proxy-agent" "^5.0.0" + "is-lambda" "^1.0.1" + "lru-cache" "^6.0.0" + "minipass" "^3.1.3" + "minipass-collect" "^1.0.2" + "minipass-fetch" "^1.3.2" + "minipass-flush" "^1.0.5" + "minipass-pipeline" "^1.2.4" + "negotiator" "^0.6.2" + "promise-retry" "^2.0.1" + "socks-proxy-agent" "^6.0.0" + "ssri" "^8.0.0" + +"map-cache@^0.2.2": + "integrity" "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "resolved" "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz" + "version" "0.2.2" + +"map-obj@^1.0.0": + "integrity" "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + "resolved" "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" + "version" "1.0.1" + +"map-obj@^4.0.0": + "integrity" "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==" + "resolved" "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz" + "version" "4.3.0" + +"map-stream@~0.1.0": + "integrity" "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" + "resolved" "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz" + "version" "0.1.0" + +"map-visit@^1.0.0": + "integrity" "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=" + "resolved" "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "object-visit" "^1.0.0" + +"md5.js@^1.3.4": + "integrity" "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==" + "resolved" "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" + "version" "1.3.5" + dependencies: + "hash-base" "^3.0.0" + "inherits" "^2.0.1" + "safe-buffer" "^5.1.2" + +"meow@^8.0.0": + "integrity" "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==" + "resolved" "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz" + "version" "8.1.2" + dependencies: + "@types/minimist" "^1.2.0" + "camelcase-keys" "^6.2.2" + "decamelize-keys" "^1.1.0" + "hard-rejection" "^2.1.0" + "minimist-options" "4.1.0" + "normalize-package-data" "^3.0.0" + "read-pkg-up" "^7.0.1" + "redent" "^3.0.0" + "trim-newlines" "^3.0.0" + "type-fest" "^0.18.0" + "yargs-parser" "^20.2.3" + +"merge-stream@^2.0.0": + "integrity" "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "resolved" "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" + "version" "2.0.0" + +"merge2@^1.3.0": + "integrity" "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + "resolved" "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + "version" "1.4.1" + +"micromatch@^3.1.10": + "integrity" "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==" + "resolved" "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz" + "version" "3.1.10" + dependencies: + "arr-diff" "^4.0.0" + "array-unique" "^0.3.2" + "braces" "^2.3.1" + "define-property" "^2.0.2" + "extend-shallow" "^3.0.2" + "extglob" "^2.0.4" + "fragment-cache" "^0.2.1" + "kind-of" "^6.0.2" + "nanomatch" "^1.2.9" + "object.pick" "^1.3.0" + "regex-not" "^1.0.0" + "snapdragon" "^0.8.1" + "to-regex" "^3.0.2" + +"micromatch@^3.1.4": + "integrity" "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==" + "resolved" "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz" + "version" "3.1.10" + dependencies: + "arr-diff" "^4.0.0" + "array-unique" "^0.3.2" + "braces" "^2.3.1" + "define-property" "^2.0.2" + "extend-shallow" "^3.0.2" + "extglob" "^2.0.4" + "fragment-cache" "^0.2.1" + "kind-of" "^6.0.2" + "nanomatch" "^1.2.9" + "object.pick" "^1.3.0" + "regex-not" "^1.0.0" + "snapdragon" "^0.8.1" + "to-regex" "^3.0.2" + +"micromatch@^4.0.4": + "integrity" "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==" + "resolved" "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz" + "version" "4.0.4" + dependencies: + "braces" "^3.0.1" + "picomatch" "^2.2.3" + +"miller-rabin@^4.0.0": + "integrity" "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==" + "resolved" "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "bn.js" "^4.0.0" + "brorand" "^1.0.1" + +"mime-db@1.50.0": + "integrity" "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==" + "resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz" + "version" "1.50.0" + +"mime-types@^2.1.12", "mime-types@~2.1.17", "mime-types@~2.1.19", "mime-types@~2.1.24": + "integrity" "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==" + "resolved" "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz" + "version" "2.1.33" + dependencies: + "mime-db" "1.50.0" + +"mime@1.6.0": + "integrity" "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + "resolved" "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" + "version" "1.6.0" + +"mimic-fn@^2.1.0": + "integrity" "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "resolved" "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" + "version" "2.1.0" + +"min-indent@^1.0.0": + "integrity" "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" + "resolved" "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" + "version" "1.0.1" + +"minimalistic-assert@^1.0.0", "minimalistic-assert@^1.0.1": + "integrity" "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "resolved" "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + "version" "1.0.1" + +"minimalistic-crypto-utils@^1.0.1": + "integrity" "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "resolved" "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + "version" "1.0.1" + +"minimatch@^3.0.4": + "integrity" "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "resolved" "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + "version" "3.0.4" + dependencies: + "brace-expansion" "^1.1.7" + +"minimist-options@4.1.0": + "integrity" "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==" + "resolved" "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "arrify" "^1.0.1" + "is-plain-obj" "^1.1.0" + "kind-of" "^6.0.3" + +"minimist@^1.1.0", "minimist@^1.1.1", "minimist@^1.2.0", "minimist@^1.2.5", "minimist@~1.2.5": + "integrity" "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "resolved" "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" + "version" "1.2.5" + +"minipass-collect@^1.0.2": + "integrity" "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==" + "resolved" "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "minipass" "^3.0.0" + +"minipass-fetch@^1.3.0", "minipass-fetch@^1.3.2": + "integrity" "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==" + "resolved" "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz" + "version" "1.4.1" + dependencies: + "minipass" "^3.1.0" + "minipass-sized" "^1.0.3" + "minizlib" "^2.0.0" + optionalDependencies: + "encoding" "^0.1.12" + +"minipass-flush@^1.0.5": + "integrity" "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==" + "resolved" "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz" + "version" "1.0.5" + dependencies: + "minipass" "^3.0.0" + +"minipass-json-stream@^1.0.1": + "integrity" "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==" + "resolved" "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "jsonparse" "^1.3.1" + "minipass" "^3.0.0" + +"minipass-pipeline@^1.2.2", "minipass-pipeline@^1.2.4": + "integrity" "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==" + "resolved" "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz" + "version" "1.2.4" + dependencies: + "minipass" "^3.0.0" + +"minipass-sized@^1.0.3": + "integrity" "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==" + "resolved" "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "minipass" "^3.0.0" + +"minipass@^2.6.0", "minipass@^2.9.0": + "integrity" "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==" + "resolved" "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz" + "version" "2.9.0" + dependencies: + "safe-buffer" "^5.1.2" + "yallist" "^3.0.0" + +"minipass@^3.0.0", "minipass@^3.1.0", "minipass@^3.1.1", "minipass@^3.1.3": + "integrity" "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==" + "resolved" "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz" + "version" "3.1.5" + dependencies: + "yallist" "^4.0.0" + +"minizlib@^1.3.3": + "integrity" "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==" + "resolved" "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz" + "version" "1.3.3" + dependencies: + "minipass" "^2.9.0" + +"minizlib@^2.0.0", "minizlib@^2.1.1": + "integrity" "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==" + "resolved" "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "minipass" "^3.0.0" + "yallist" "^4.0.0" + +"mixin-deep@^1.2.0": + "integrity" "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==" + "resolved" "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz" + "version" "1.3.2" + dependencies: + "for-in" "^1.0.2" + "is-extendable" "^1.0.1" + +"mkdirp-classic@^0.5.2": + "integrity" "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + "resolved" "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" + "version" "0.5.3" + +"mkdirp-infer-owner@^2.0.0": + "integrity" "sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw==" + "resolved" "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "chownr" "^2.0.0" + "infer-owner" "^1.0.4" + "mkdirp" "^1.0.3" + +"mkdirp@^0.5.1", "mkdirp@^0.5.5": + "integrity" "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" + "version" "0.5.5" + dependencies: + "minimist" "^1.2.5" + +"mkdirp@^1.0.3", "mkdirp@^1.0.4": + "integrity" "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" + "version" "1.0.4" + +"modify-values@^1.0.0": + "integrity" "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==" + "resolved" "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz" + "version" "1.0.1" + +"module-deps@^6.2.3": + "integrity" "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==" + "resolved" "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz" + "version" "6.2.3" + dependencies: + "browser-resolve" "^2.0.0" + "cached-path-relative" "^1.0.2" + "concat-stream" "~1.6.0" + "defined" "^1.0.0" + "detective" "^5.2.0" + "duplexer2" "^0.1.2" + "inherits" "^2.0.1" + "JSONStream" "^1.0.3" + "parents" "^1.0.0" + "readable-stream" "^2.0.2" + "resolve" "^1.4.0" + "stream-combiner2" "^1.1.1" + "subarg" "^1.0.0" + "through2" "^2.0.0" + "xtend" "^4.0.0" + +"morgan@^1.9.1": + "integrity" "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==" + "resolved" "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz" + "version" "1.10.0" + dependencies: + "basic-auth" "~2.0.1" + "debug" "2.6.9" + "depd" "~2.0.0" + "on-finished" "~2.3.0" + "on-headers" "~1.0.2" + +"ms@^2.0.0", "ms@2.0.0": + "integrity" "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + "version" "2.0.0" + +"ms@2.1.1": + "integrity" "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz" + "version" "2.1.1" + +"ms@2.1.2": + "integrity" "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + "version" "2.1.2" + +"multimatch@^5.0.0": + "integrity" "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==" + "resolved" "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "@types/minimatch" "^3.0.3" + "array-differ" "^3.0.0" + "array-union" "^2.1.0" + "arrify" "^2.0.1" + "minimatch" "^3.0.4" + +"mute-stream@~0.0.4", "mute-stream@0.0.8": + "integrity" "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + "resolved" "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz" + "version" "0.0.8" + +"nanomatch@^1.2.9": + "integrity" "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==" + "resolved" "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz" + "version" "1.2.13" + dependencies: + "arr-diff" "^4.0.0" + "array-unique" "^0.3.2" + "define-property" "^2.0.2" + "extend-shallow" "^3.0.2" + "fragment-cache" "^0.2.1" + "is-windows" "^1.0.2" + "kind-of" "^6.0.2" + "object.pick" "^1.3.0" + "regex-not" "^1.0.0" + "snapdragon" "^0.8.1" + "to-regex" "^3.0.1" + +"negotiator@^0.6.2", "negotiator@0.6.2": + "integrity" "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "resolved" "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz" + "version" "0.6.2" + +"neo-async@^2.6.0": + "integrity" "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "resolved" "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" + "version" "2.6.2" + +"node-fetch@^2.6.0", "node-fetch@^2.6.1": + "integrity" "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==" + "resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz" + "version" "2.6.5" + dependencies: + "whatwg-url" "^5.0.0" + +"node-gyp@^5.0.2": + "integrity" "sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw==" + "resolved" "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.1.tgz" + "version" "5.1.1" + dependencies: + "env-paths" "^2.2.0" + "glob" "^7.1.4" + "graceful-fs" "^4.2.2" + "mkdirp" "^0.5.1" + "nopt" "^4.0.1" + "npmlog" "^4.1.2" + "request" "^2.88.0" + "rimraf" "^2.6.3" + "semver" "^5.7.1" + "tar" "^4.4.12" + "which" "^1.3.1" + +"node-gyp@^7.1.0": + "integrity" "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==" + "resolved" "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz" + "version" "7.1.2" + dependencies: + "env-paths" "^2.2.0" + "glob" "^7.1.4" + "graceful-fs" "^4.2.3" + "nopt" "^5.0.0" + "npmlog" "^4.1.2" + "request" "^2.88.2" + "rimraf" "^3.0.2" + "semver" "^7.3.2" + "tar" "^6.0.2" + "which" "^2.0.2" + +"nopt@^4.0.1": + "integrity" "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==" + "resolved" "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "abbrev" "1" + "osenv" "^0.1.4" + +"nopt@^5.0.0": + "integrity" "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==" + "resolved" "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "abbrev" "1" + +"normalize-package-data@^2.0.0": + "integrity" "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==" + "resolved" "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "hosted-git-info" "^2.1.4" + "resolve" "^1.10.0" + "semver" "2 || 3 || 4 || 5" + "validate-npm-package-license" "^3.0.1" + +"normalize-package-data@^2.3.2": + "integrity" "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==" + "resolved" "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "hosted-git-info" "^2.1.4" + "resolve" "^1.10.0" + "semver" "2 || 3 || 4 || 5" + "validate-npm-package-license" "^3.0.1" + +"normalize-package-data@^2.5.0": + "integrity" "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==" + "resolved" "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "hosted-git-info" "^2.1.4" + "resolve" "^1.10.0" + "semver" "2 || 3 || 4 || 5" + "validate-npm-package-license" "^3.0.1" + +"normalize-package-data@^3.0.0", "normalize-package-data@^3.0.2": + "integrity" "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==" + "resolved" "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "hosted-git-info" "^4.0.1" + "is-core-module" "^2.5.0" + "semver" "^7.3.4" + "validate-npm-package-license" "^3.0.1" + +"normalize-path@^2.1.1": + "integrity" "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=" + "resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz" + "version" "2.1.1" + dependencies: + "remove-trailing-separator" "^1.0.1" + +"normalize-path@^3.0.0": + "integrity" "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + "version" "3.0.0" + +"normalize-url@^6.1.0": + "integrity" "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + "resolved" "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz" + "version" "6.1.0" + +"npm-bundled@^1.1.1": + "integrity" "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==" + "resolved" "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "npm-normalize-package-bin" "^1.0.1" + +"npm-install-checks@^4.0.0": + "integrity" "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==" + "resolved" "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "semver" "^7.1.1" + +"npm-lifecycle@^3.1.5": + "integrity" "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==" + "resolved" "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz" + "version" "3.1.5" + dependencies: + "byline" "^5.0.0" + "graceful-fs" "^4.1.15" + "node-gyp" "^5.0.2" + "resolve-from" "^4.0.0" + "slide" "^1.1.6" + "uid-number" "0.0.6" + "umask" "^1.1.0" + "which" "^1.3.1" + +"npm-normalize-package-bin@^1.0.0", "npm-normalize-package-bin@^1.0.1": + "integrity" "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" + "resolved" "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz" + "version" "1.0.1" + +"npm-package-arg@^8.0.0", "npm-package-arg@^8.0.1", "npm-package-arg@^8.1.0", "npm-package-arg@^8.1.2", "npm-package-arg@^8.1.5": + "integrity" "sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q==" + "resolved" "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz" + "version" "8.1.5" + dependencies: + "hosted-git-info" "^4.0.1" + "semver" "^7.3.4" + "validate-npm-package-name" "^3.0.0" + +"npm-packlist@^2.1.4": + "integrity" "sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==" + "resolved" "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz" + "version" "2.2.2" + dependencies: + "glob" "^7.1.6" + "ignore-walk" "^3.0.3" + "npm-bundled" "^1.1.1" + "npm-normalize-package-bin" "^1.0.1" + +"npm-pick-manifest@^6.0.0", "npm-pick-manifest@^6.1.1": + "integrity" "sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA==" + "resolved" "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz" + "version" "6.1.1" + dependencies: + "npm-install-checks" "^4.0.0" + "npm-normalize-package-bin" "^1.0.1" + "npm-package-arg" "^8.1.2" + "semver" "^7.3.4" + +"npm-registry-fetch@^11.0.0": + "integrity" "sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA==" + "resolved" "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz" + "version" "11.0.0" + dependencies: + "make-fetch-happen" "^9.0.1" + "minipass" "^3.1.3" + "minipass-fetch" "^1.3.0" + "minipass-json-stream" "^1.0.1" + "minizlib" "^2.0.0" + "npm-package-arg" "^8.0.0" + +"npm-registry-fetch@^9.0.0": + "integrity" "sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA==" + "resolved" "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz" + "version" "9.0.0" + dependencies: + "@npmcli/ci-detect" "^1.0.0" + "lru-cache" "^6.0.0" + "make-fetch-happen" "^8.0.9" + "minipass" "^3.1.3" + "minipass-fetch" "^1.3.0" + "minipass-json-stream" "^1.0.1" + "minizlib" "^2.0.0" + "npm-package-arg" "^8.0.0" + +"npm-run-path@^4.0.1": + "integrity" "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==" + "resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "path-key" "^3.0.0" + +"npmlog@^4.1.2": + "integrity" "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==" + "resolved" "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz" + "version" "4.1.2" + dependencies: + "are-we-there-yet" "~1.1.2" + "console-control-strings" "~1.1.0" + "gauge" "~2.7.3" + "set-blocking" "~2.0.0" + +"number-is-nan@^1.0.0": + "integrity" "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "resolved" "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + "version" "1.0.1" + +"oauth-sign@~0.9.0": + "integrity" "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "resolved" "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" + "version" "0.9.0" + +"object-assign@^4", "object-assign@^4.1.0", "object-assign@^4.1.1", "object-assign@latest": + "integrity" "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "resolved" "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + "version" "4.1.1" + +"object-copy@^0.1.0": + "integrity" "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=" + "resolved" "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz" + "version" "0.1.0" + dependencies: + "copy-descriptor" "^0.1.0" + "define-property" "^0.2.5" + "kind-of" "^3.0.3" + +"object-inspect@^1.11.0", "object-inspect@^1.9.0", "object-inspect@~1.11.0": + "integrity" "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + "resolved" "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz" + "version" "1.11.0" + +"object-is@^1.0.1": + "integrity" "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==" + "resolved" "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz" + "version" "1.1.5" + dependencies: + "call-bind" "^1.0.2" + "define-properties" "^1.1.3" + +"object-keys@^1.0.12", "object-keys@^1.1.1": + "integrity" "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + "resolved" "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" + "version" "1.1.1" + +"object-visit@^1.0.0": + "integrity" "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=" + "resolved" "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "isobject" "^3.0.0" + +"object.assign@^4.1.2": + "integrity" "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==" + "resolved" "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz" + "version" "4.1.2" + dependencies: + "call-bind" "^1.0.0" + "define-properties" "^1.1.3" + "has-symbols" "^1.0.1" + "object-keys" "^1.1.1" + +"object.getownpropertydescriptors@^2.0.3": + "integrity" "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==" + "resolved" "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz" + "version" "2.1.3" + dependencies: + "call-bind" "^1.0.2" + "define-properties" "^1.1.3" + "es-abstract" "^1.19.1" + +"object.pick@^1.3.0": + "integrity" "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=" + "resolved" "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz" + "version" "1.3.0" + dependencies: + "isobject" "^3.0.1" + +"on-finished@~2.3.0": + "integrity" "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=" + "resolved" "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" + "version" "2.3.0" + dependencies: + "ee-first" "1.1.1" + +"on-headers@~1.0.2": + "integrity" "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + "resolved" "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" + "version" "1.0.2" + +"once@^1.3.0", "once@^1.4.0": + "integrity" "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + "version" "1.4.0" + dependencies: + "wrappy" "1" + +"onetime@^5.1.0", "onetime@^5.1.2": + "integrity" "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==" + "resolved" "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" + "version" "5.1.2" + dependencies: + "mimic-fn" "^2.1.0" + +"opn@latest": + "integrity" "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==" + "resolved" "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz" + "version" "6.0.0" + dependencies: + "is-wsl" "^1.1.0" + +"os-browserify@~0.3.0": + "integrity" "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + "resolved" "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz" + "version" "0.3.0" + +"os-homedir@^1.0.0": + "integrity" "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + "resolved" "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + "version" "1.0.2" + +"os-tmpdir@^1.0.0", "os-tmpdir@~1.0.2": + "integrity" "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "resolved" "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + "version" "1.0.2" + +"osenv@^0.1.4": + "integrity" "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==" + "resolved" "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz" + "version" "0.1.5" + dependencies: + "os-homedir" "^1.0.0" + "os-tmpdir" "^1.0.0" + +"p-finally@^1.0.0": + "integrity" "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + "resolved" "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" + "version" "1.0.0" + +"p-limit@^1.1.0": + "integrity" "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==" + "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" + "version" "1.3.0" + dependencies: + "p-try" "^1.0.0" + +"p-limit@^2.2.0": + "integrity" "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==" + "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + "version" "2.3.0" + dependencies: + "p-try" "^2.0.0" + +"p-locate@^2.0.0": + "integrity" "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=" + "resolved" "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "p-limit" "^1.1.0" + +"p-locate@^4.1.0": + "integrity" "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==" + "resolved" "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "p-limit" "^2.2.0" + +"p-map-series@^2.1.0": + "integrity" "sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q==" + "resolved" "https://registry.npmjs.org/p-map-series/-/p-map-series-2.1.0.tgz" + "version" "2.1.0" + +"p-map@^4.0.0": + "integrity" "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==" + "resolved" "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "aggregate-error" "^3.0.0" + +"p-pipe@^3.1.0": + "integrity" "sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw==" + "resolved" "https://registry.npmjs.org/p-pipe/-/p-pipe-3.1.0.tgz" + "version" "3.1.0" + +"p-queue@^6.6.2": + "integrity" "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==" + "resolved" "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz" + "version" "6.6.2" + dependencies: + "eventemitter3" "^4.0.4" + "p-timeout" "^3.2.0" + +"p-reduce@^2.0.0", "p-reduce@^2.1.0": + "integrity" "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==" + "resolved" "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz" + "version" "2.1.0" + +"p-timeout@^3.2.0": + "integrity" "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==" + "resolved" "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "p-finally" "^1.0.0" + +"p-try@^1.0.0": + "integrity" "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + "resolved" "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" + "version" "1.0.0" + +"p-try@^2.0.0": + "integrity" "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "resolved" "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + "version" "2.2.0" + +"p-waterfall@^2.1.1": + "integrity" "sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw==" + "resolved" "https://registry.npmjs.org/p-waterfall/-/p-waterfall-2.1.1.tgz" + "version" "2.1.1" + dependencies: + "p-reduce" "^2.0.0" + +"pacote@^11.2.6": + "integrity" "sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg==" + "resolved" "https://registry.npmjs.org/pacote/-/pacote-11.3.5.tgz" + "version" "11.3.5" + dependencies: + "@npmcli/git" "^2.1.0" + "@npmcli/installed-package-contents" "^1.0.6" + "@npmcli/promise-spawn" "^1.2.0" + "@npmcli/run-script" "^1.8.2" + "cacache" "^15.0.5" + "chownr" "^2.0.0" + "fs-minipass" "^2.1.0" + "infer-owner" "^1.0.4" + "minipass" "^3.1.3" + "mkdirp" "^1.0.3" + "npm-package-arg" "^8.0.1" + "npm-packlist" "^2.1.4" + "npm-pick-manifest" "^6.0.0" + "npm-registry-fetch" "^11.0.0" + "promise-retry" "^2.0.1" + "read-package-json-fast" "^2.0.1" + "rimraf" "^3.0.2" + "ssri" "^8.0.1" + "tar" "^6.1.0" + +"pact-lang-api@^3.2.0": + "integrity" "sha512-6UlpMT+Bm9gdBpfrWMHkWkP71KxkBAJE7ukfd81bb5jdxrzm7tR7LfhpInN/+/7aMFSdvUX8hJNg8sEdHd33yQ==" + "resolved" "https://registry.npmjs.org/pact-lang-api/-/pact-lang-api-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "base64-url" "^2.2.1" + "blakejs" "^1.0.1" + "blue-tape" "^1.0.0" + "browserify" "^16.2.3" + "node-fetch" "^2.6.0" + "tape" "^4.11.0" + "tweetnacl" "^0.14.5" + +"pako@~1.0.5": + "integrity" "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + "resolved" "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" + "version" "1.0.11" + +"parent-module@^1.0.0": + "integrity" "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==" + "resolved" "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "callsites" "^3.0.0" + +"parents@^1.0.0", "parents@^1.0.1": + "integrity" "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=" + "resolved" "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "path-platform" "~0.11.15" + +"parse-asn1@^5.0.0", "parse-asn1@^5.1.5": + "integrity" "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==" + "resolved" "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz" + "version" "5.1.6" + dependencies: + "asn1.js" "^5.2.0" + "browserify-aes" "^1.0.0" + "evp_bytestokey" "^1.0.0" + "pbkdf2" "^3.0.3" + "safe-buffer" "^5.1.1" + +"parse-json@^4.0.0": + "integrity" "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=" + "resolved" "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "error-ex" "^1.3.1" + "json-parse-better-errors" "^1.0.1" + +"parse-json@^5.0.0": + "integrity" "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==" + "resolved" "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + "version" "5.2.0" + dependencies: + "@babel/code-frame" "^7.0.0" + "error-ex" "^1.3.1" + "json-parse-even-better-errors" "^2.3.0" + "lines-and-columns" "^1.1.6" + +"parse-path@^4.0.0": + "integrity" "sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA==" + "resolved" "https://registry.npmjs.org/parse-path/-/parse-path-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "is-ssh" "^1.3.0" + "protocols" "^1.4.0" + "qs" "^6.9.4" + "query-string" "^6.13.8" + +"parse-url@^6.0.0": + "integrity" "sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw==" + "resolved" "https://registry.npmjs.org/parse-url/-/parse-url-6.0.0.tgz" + "version" "6.0.0" + dependencies: + "is-ssh" "^1.3.0" + "normalize-url" "^6.1.0" + "parse-path" "^4.0.0" + "protocols" "^1.4.0" + +"parseurl@~1.3.2", "parseurl@~1.3.3": + "integrity" "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "resolved" "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" + "version" "1.3.3" + +"pascalcase@^0.1.1": + "integrity" "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + "resolved" "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz" + "version" "0.1.1" + +"path-browserify@~0.0.0": + "integrity" "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + "resolved" "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz" + "version" "0.0.1" + +"path-dirname@^1.0.0": + "integrity" "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "resolved" "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz" + "version" "1.0.2" + +"path-exists@^3.0.0": + "integrity" "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" + "version" "3.0.0" + +"path-exists@^4.0.0": + "integrity" "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + "version" "4.0.0" + +"path-is-absolute@^1.0.0", "path-is-absolute@^1.0.1": + "integrity" "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + "version" "1.0.1" + +"path-key@^3.0.0", "path-key@^3.1.0": + "integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + "version" "3.1.1" + +"path-parse@^1.0.6": + "integrity" "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "resolved" "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + "version" "1.0.7" + +"path-platform@~0.11.15": + "integrity" "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" + "resolved" "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz" + "version" "0.11.15" + +"path-type@^3.0.0": + "integrity" "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==" + "resolved" "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "pify" "^3.0.0" + +"path-type@^4.0.0": + "integrity" "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + "resolved" "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + "version" "4.0.0" + +"pause-stream@0.0.11": + "integrity" "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=" + "resolved" "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz" + "version" "0.0.11" + dependencies: + "through" "~2.3" + +"pbkdf2@^3.0.3": + "integrity" "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==" + "resolved" "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" + "version" "3.1.2" + dependencies: + "create-hash" "^1.1.2" + "create-hmac" "^1.1.4" + "ripemd160" "^2.0.1" + "safe-buffer" "^5.0.1" + "sha.js" "^2.4.8" + +"performance-now@^2.1.0": + "integrity" "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "resolved" "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" + "version" "2.1.0" + +"picomatch@^2.2.3": + "integrity" "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + "resolved" "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz" + "version" "2.3.0" + +"pify@^2.3.0": + "integrity" "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "resolved" "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" + "version" "2.3.0" + +"pify@^3.0.0": + "integrity" "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "resolved" "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz" + "version" "3.0.0" + +"pify@^4.0.1": + "integrity" "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "resolved" "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" + "version" "4.0.1" + +"pify@^5.0.0": + "integrity" "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==" + "resolved" "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz" + "version" "5.0.0" + +"pkg-dir@^4.2.0": + "integrity" "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==" + "resolved" "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "find-up" "^4.0.0" + +"posix-character-classes@^0.1.0": + "integrity" "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "resolved" "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz" + "version" "0.1.1" + +"process-nextick-args@~2.0.0": + "integrity" "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "resolved" "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" + "version" "2.0.1" + +"process@~0.11.0": + "integrity" "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + "resolved" "https://registry.npmjs.org/process/-/process-0.11.10.tgz" + "version" "0.11.10" + +"promise-inflight@^1.0.1": + "integrity" "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "resolved" "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" + "version" "1.0.1" + +"promise-retry@^2.0.1": + "integrity" "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==" + "resolved" "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "err-code" "^2.0.2" + "retry" "^0.12.0" + +"promzard@^0.3.0": + "integrity" "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=" + "resolved" "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz" + "version" "0.3.0" + dependencies: + "read" "1" + +"proto-list@~1.2.1": + "integrity" "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" + "resolved" "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz" + "version" "1.2.4" + +"protocols@^1.1.0", "protocols@^1.4.0": + "integrity" "sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg==" + "resolved" "https://registry.npmjs.org/protocols/-/protocols-1.4.8.tgz" + "version" "1.4.8" + +"proxy-middleware@latest": + "integrity" "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=" + "resolved" "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz" + "version" "0.15.0" + +"psl@^1.1.28": + "integrity" "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "resolved" "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz" + "version" "1.8.0" + +"public-encrypt@^4.0.0": + "integrity" "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==" + "resolved" "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "bn.js" "^4.1.0" + "browserify-rsa" "^4.0.0" + "create-hash" "^1.1.0" + "parse-asn1" "^5.0.0" + "randombytes" "^2.0.1" + "safe-buffer" "^5.1.2" + +"punycode@^1.3.2": + "integrity" "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + "version" "1.4.1" + +"punycode@^2.1.0": + "integrity" "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + "version" "2.1.1" + +"punycode@^2.1.1": + "integrity" "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + "version" "2.1.1" + +"punycode@1.3.2": + "integrity" "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + "version" "1.3.2" + +"q@^1.5.1": + "integrity" "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + "resolved" "https://registry.npmjs.org/q/-/q-1.5.1.tgz" + "version" "1.5.1" + +"qs@^6.9.4": + "integrity" "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz" + "version" "6.10.1" + dependencies: + "side-channel" "^1.0.4" + +"qs@~6.5.2": + "integrity" "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz" + "version" "6.5.2" + +"query-string@^6.13.8": + "integrity" "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==" + "resolved" "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz" + "version" "6.14.1" + dependencies: + "decode-uri-component" "^0.2.0" + "filter-obj" "^1.1.0" + "split-on-first" "^1.0.0" + "strict-uri-encode" "^2.0.0" + +"querystring-es3@~0.2.0": + "integrity" "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + "resolved" "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" + "version" "0.2.1" + +"querystring@0.2.0": + "integrity" "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "resolved" "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + "version" "0.2.0" + +"queue-microtask@^1.2.2": + "integrity" "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + "resolved" "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + "version" "1.2.3" + +"quick-lru@^4.0.1": + "integrity" "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==" + "resolved" "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz" + "version" "4.0.1" + +"randombytes@^2.0.0", "randombytes@^2.0.1", "randombytes@^2.0.5": + "integrity" "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==" + "resolved" "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "safe-buffer" "^5.1.0" + +"randomfill@^1.0.3": + "integrity" "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==" + "resolved" "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "randombytes" "^2.0.5" + "safe-buffer" "^5.1.0" + +"range-parser@~1.2.1": + "integrity" "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "resolved" "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" + "version" "1.2.1" + +"read-cmd-shim@^2.0.0": + "integrity" "sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw==" + "resolved" "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz" + "version" "2.0.0" + +"read-only-stream@^2.0.0": + "integrity" "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=" + "resolved" "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "readable-stream" "^2.0.2" + +"read-package-json-fast@^2.0.1": + "integrity" "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==" + "resolved" "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz" + "version" "2.0.3" + dependencies: + "json-parse-even-better-errors" "^2.3.0" + "npm-normalize-package-bin" "^1.0.1" + +"read-package-json@^2.0.0": + "integrity" "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==" + "resolved" "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "glob" "^7.1.1" + "json-parse-even-better-errors" "^2.3.0" + "normalize-package-data" "^2.0.0" + "npm-normalize-package-bin" "^1.0.0" + +"read-package-json@^3.0.0": + "integrity" "sha512-aLcPqxovhJTVJcsnROuuzQvv6oziQx4zd3JvG0vGCL5MjTONUc4uJ90zCBC6R7W7oUKBNoR/F8pkyfVwlbxqng==" + "resolved" "https://registry.npmjs.org/read-package-json/-/read-package-json-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "glob" "^7.1.1" + "json-parse-even-better-errors" "^2.3.0" + "normalize-package-data" "^3.0.0" + "npm-normalize-package-bin" "^1.0.0" + +"read-package-json@^4.1.1": + "integrity" "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==" + "resolved" "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz" + "version" "4.1.1" + dependencies: + "glob" "^7.1.1" + "json-parse-even-better-errors" "^2.3.0" + "normalize-package-data" "^3.0.0" + "npm-normalize-package-bin" "^1.0.0" + +"read-package-tree@^5.3.1": + "integrity" "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==" + "resolved" "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz" + "version" "5.3.1" + dependencies: + "read-package-json" "^2.0.0" + "readdir-scoped-modules" "^1.0.0" + "util-promisify" "^2.1.0" + +"read-pkg-up@^3.0.0": + "integrity" "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=" + "resolved" "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "find-up" "^2.0.0" + "read-pkg" "^3.0.0" + +"read-pkg-up@^7.0.1": + "integrity" "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==" + "resolved" "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz" + "version" "7.0.1" + dependencies: + "find-up" "^4.1.0" + "read-pkg" "^5.2.0" + "type-fest" "^0.8.1" + +"read-pkg@^3.0.0": + "integrity" "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=" + "resolved" "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "load-json-file" "^4.0.0" + "normalize-package-data" "^2.3.2" + "path-type" "^3.0.0" + +"read-pkg@^5.2.0": + "integrity" "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==" + "resolved" "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz" + "version" "5.2.0" + dependencies: + "@types/normalize-package-data" "^2.4.0" + "normalize-package-data" "^2.5.0" + "parse-json" "^5.0.0" + "type-fest" "^0.6.0" + +"read@~1.0.1", "read@1": + "integrity" "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=" + "resolved" "https://registry.npmjs.org/read/-/read-1.0.7.tgz" + "version" "1.0.7" + dependencies: + "mute-stream" "~0.0.4" + +"readable-stream@^2.0.2", "readable-stream@^2.0.6", "readable-stream@^2.2.2", "readable-stream@~2.3.6": + "integrity" "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz" + "version" "2.3.7" + dependencies: + "core-util-is" "~1.0.0" + "inherits" "~2.0.3" + "isarray" "~1.0.0" + "process-nextick-args" "~2.0.0" + "safe-buffer" "~5.1.1" + "string_decoder" "~1.1.1" + "util-deprecate" "~1.0.1" + +"readable-stream@^3.0.0": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readable-stream@^3.0.2": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readable-stream@^3.6.0": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readable-stream@3": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readdir-scoped-modules@^1.0.0": + "integrity" "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==" + "resolved" "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "debuglog" "^1.0.1" + "dezalgo" "^1.0.0" + "graceful-fs" "^4.1.2" + "once" "^1.3.0" + +"readdirp@^2.2.1": + "integrity" "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==" + "resolved" "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz" + "version" "2.2.1" + dependencies: + "graceful-fs" "^4.1.11" + "micromatch" "^3.1.10" + "readable-stream" "^2.0.2" + +"readline@^1.3.0": + "integrity" "sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw=" + "resolved" "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz" + "version" "1.3.0" + +"redent@^3.0.0": + "integrity" "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==" + "resolved" "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "indent-string" "^4.0.0" + "strip-indent" "^3.0.0" + +"regex-not@^1.0.0", "regex-not@^1.0.2": + "integrity" "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==" + "resolved" "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "extend-shallow" "^3.0.2" + "safe-regex" "^1.1.0" + +"regexp.prototype.flags@^1.2.0": + "integrity" "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==" + "resolved" "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz" + "version" "1.3.1" + dependencies: + "call-bind" "^1.0.2" + "define-properties" "^1.1.3" + +"remove-trailing-separator@^1.0.1": + "integrity" "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + "resolved" "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" + "version" "1.1.0" + +"repeat-element@^1.1.2": + "integrity" "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" + "resolved" "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz" + "version" "1.1.4" + +"repeat-string@^1.6.1": + "integrity" "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "resolved" "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + "version" "1.6.1" + +"request@^2.88.0", "request@^2.88.2": + "integrity" "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==" + "resolved" "https://registry.npmjs.org/request/-/request-2.88.2.tgz" + "version" "2.88.2" + dependencies: + "aws-sign2" "~0.7.0" + "aws4" "^1.8.0" + "caseless" "~0.12.0" + "combined-stream" "~1.0.6" + "extend" "~3.0.2" + "forever-agent" "~0.6.1" + "form-data" "~2.3.2" + "har-validator" "~5.1.3" + "http-signature" "~1.2.0" + "is-typedarray" "~1.0.0" + "isstream" "~0.1.2" + "json-stringify-safe" "~5.0.1" + "mime-types" "~2.1.19" + "oauth-sign" "~0.9.0" + "performance-now" "^2.1.0" + "qs" "~6.5.2" + "safe-buffer" "^5.1.2" + "tough-cookie" "~2.5.0" + "tunnel-agent" "^0.6.0" + "uuid" "^3.3.2" + +"require-directory@^2.1.1": + "integrity" "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "resolved" "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + "version" "2.1.1" + +"resolve-cwd@^3.0.0": + "integrity" "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==" + "resolved" "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "resolve-from" "^5.0.0" + +"resolve-from@^4.0.0": + "integrity" "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + "version" "4.0.0" + +"resolve-from@^5.0.0": + "integrity" "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + "version" "5.0.0" + +"resolve-url@^0.2.1": + "integrity" "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "resolved" "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz" + "version" "0.2.1" + +"resolve@^1.1.4", "resolve@^1.10.0", "resolve@^1.17.0", "resolve@^1.4.0", "resolve@~1.20.0": + "integrity" "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==" + "resolved" "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz" + "version" "1.20.0" + dependencies: + "is-core-module" "^2.2.0" + "path-parse" "^1.0.6" + +"restore-cursor@^3.1.0": + "integrity" "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==" + "resolved" "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "onetime" "^5.1.0" + "signal-exit" "^3.0.2" + +"resumer@~0.0.0": + "integrity" "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=" + "resolved" "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz" + "version" "0.0.0" + dependencies: + "through" "~2.3.4" + +"ret@~0.1.10": + "integrity" "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "resolved" "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" + "version" "0.1.15" + +"retry@^0.12.0": + "integrity" "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + "resolved" "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" + "version" "0.12.0" + +"reusify@^1.0.4": + "integrity" "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + "resolved" "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + "version" "1.0.4" + +"rimraf@^2.6.3": + "integrity" "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==" + "resolved" "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" + "version" "2.7.1" + dependencies: + "glob" "^7.1.3" + +"rimraf@^3.0.2": + "integrity" "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==" + "resolved" "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + "version" "3.0.2" + dependencies: + "glob" "^7.1.3" + +"ripemd160@^2.0.0", "ripemd160@^2.0.1": + "integrity" "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==" + "resolved" "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "hash-base" "^3.0.0" + "inherits" "^2.0.1" + +"run-async@^2.4.0": + "integrity" "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" + "resolved" "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" + "version" "2.4.1" + +"run-parallel@^1.1.9": + "integrity" "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==" + "resolved" "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "queue-microtask" "^1.2.2" + +"rxjs@^6.6.0": + "integrity" "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==" + "resolved" "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz" + "version" "6.6.7" + dependencies: + "tslib" "^1.9.0" + +"safe-buffer@^5.0.1", "safe-buffer@^5.1.0", "safe-buffer@^5.1.1", "safe-buffer@^5.1.2", "safe-buffer@^5.2.0", "safe-buffer@^5.2.1", "safe-buffer@>=5.1.0", "safe-buffer@~5.2.0": + "integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + "version" "5.2.1" + +"safe-buffer@~5.1.0", "safe-buffer@~5.1.1": + "integrity" "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + "version" "5.1.2" + +"safe-buffer@5.1.2": + "integrity" "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + "version" "5.1.2" + +"safe-regex@^1.1.0": + "integrity" "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=" + "resolved" "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "ret" "~0.1.10" + +"safer-buffer@^2.0.2", "safer-buffer@^2.1.0", "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", "safer-buffer@~2.1.0": + "integrity" "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "resolved" "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" + "version" "2.1.2" + +"semver@^5.6.0": + "integrity" "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "resolved" "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" + "version" "5.7.1" + +"semver@^5.7.1": + "integrity" "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "resolved" "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" + "version" "5.7.1" + +"semver@^6.0.0": + "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + "version" "6.3.0" + +"semver@^7.1.1", "semver@^7.1.3", "semver@^7.3.2", "semver@^7.3.4", "semver@^7.3.5": + "integrity" "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==" + "resolved" "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz" + "version" "7.3.5" + dependencies: + "lru-cache" "^6.0.0" + +"semver@2 || 3 || 4 || 5": + "integrity" "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "resolved" "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" + "version" "5.7.1" + +"send@latest": + "integrity" "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==" + "resolved" "https://registry.npmjs.org/send/-/send-0.17.1.tgz" + "version" "0.17.1" + dependencies: + "debug" "2.6.9" + "depd" "~1.1.2" + "destroy" "~1.0.4" + "encodeurl" "~1.0.2" + "escape-html" "~1.0.3" + "etag" "~1.8.1" + "fresh" "0.5.2" + "http-errors" "~1.7.2" + "mime" "1.6.0" + "ms" "2.1.1" + "on-finished" "~2.3.0" + "range-parser" "~1.2.1" + "statuses" "~1.5.0" + +"serve-index@^1.9.1": + "integrity" "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=" + "resolved" "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz" + "version" "1.9.1" + dependencies: + "accepts" "~1.3.4" + "batch" "0.6.1" + "debug" "2.6.9" + "escape-html" "~1.0.3" + "http-errors" "~1.6.2" + "mime-types" "~2.1.17" + "parseurl" "~1.3.2" + +"set-blocking@~2.0.0": + "integrity" "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "resolved" "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + "version" "2.0.0" + +"set-value@^2.0.0", "set-value@^2.0.1": + "integrity" "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==" + "resolved" "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "extend-shallow" "^2.0.1" + "is-extendable" "^0.1.1" + "is-plain-object" "^2.0.3" + "split-string" "^3.0.1" + +"setprototypeof@1.1.0": + "integrity" "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + "resolved" "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" + "version" "1.1.0" + +"setprototypeof@1.1.1": + "integrity" "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "resolved" "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz" + "version" "1.1.1" + +"sha.js@^2.4.0", "sha.js@^2.4.8", "sha.js@~2.4.4": + "integrity" "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==" + "resolved" "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" + "version" "2.4.11" + dependencies: + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"shallow-clone@^3.0.0": + "integrity" "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==" + "resolved" "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "kind-of" "^6.0.2" + +"shasum-object@^1.0.0": + "integrity" "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==" + "resolved" "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "fast-safe-stringify" "^2.0.7" + +"shasum@^1.0.0": + "integrity" "sha1-5wEjENj0F/TetXEhUOVni4euVl8=" + "resolved" "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "json-stable-stringify" "~0.0.0" + "sha.js" "~2.4.4" + +"shebang-command@^2.0.0": + "integrity" "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==" + "resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "shebang-regex" "^3.0.0" + +"shebang-regex@^3.0.0": + "integrity" "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + "version" "3.0.0" + +"shell-quote@^1.6.1": + "integrity" "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" + "resolved" "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz" + "version" "1.7.2" + +"side-channel@^1.0.4": + "integrity" "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==" + "resolved" "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "call-bind" "^1.0.0" + "get-intrinsic" "^1.0.2" + "object-inspect" "^1.9.0" + +"signal-exit@^3.0.0", "signal-exit@^3.0.2", "signal-exit@^3.0.3": + "integrity" "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" + "resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz" + "version" "3.0.5" + +"simple-concat@^1.0.0": + "integrity" "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + "resolved" "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz" + "version" "1.0.1" + +"slash@^3.0.0": + "integrity" "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + "resolved" "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + "version" "3.0.0" + +"slide@^1.1.6": + "integrity" "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" + "resolved" "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz" + "version" "1.1.6" + +"smart-buffer@^4.1.0": + "integrity" "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + "resolved" "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz" + "version" "4.2.0" + +"snapdragon-node@^2.0.1": + "integrity" "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==" + "resolved" "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz" + "version" "2.1.1" + dependencies: + "define-property" "^1.0.0" + "isobject" "^3.0.0" + "snapdragon-util" "^3.0.1" + +"snapdragon-util@^3.0.1": + "integrity" "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==" + "resolved" "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "kind-of" "^3.2.0" + +"snapdragon@^0.8.1": + "integrity" "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==" + "resolved" "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz" + "version" "0.8.2" + dependencies: + "base" "^0.11.1" + "debug" "^2.2.0" + "define-property" "^0.2.5" + "extend-shallow" "^2.0.1" + "map-cache" "^0.2.2" + "source-map" "^0.5.6" + "source-map-resolve" "^0.5.0" + "use" "^3.1.0" + +"socks-proxy-agent@^5.0.0": + "integrity" "sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ==" + "resolved" "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz" + "version" "5.0.1" + dependencies: + "agent-base" "^6.0.2" + "debug" "4" + "socks" "^2.3.3" + +"socks-proxy-agent@^6.0.0": + "integrity" "sha512-57e7lwCN4Tzt3mXz25VxOErJKXlPfXmkMLnk310v/jwW20jWRVcgsOit+xNkN3eIEdB47GwnfAEBLacZ/wVIKg==" + "resolved" "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "agent-base" "^6.0.2" + "debug" "^4.3.1" + "socks" "^2.6.1" + +"socks@^2.3.3", "socks@^2.6.1": + "integrity" "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==" + "resolved" "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz" + "version" "2.6.1" + dependencies: + "ip" "^1.1.5" + "smart-buffer" "^4.1.0" + +"sort-keys@^2.0.0": + "integrity" "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=" + "resolved" "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "is-plain-obj" "^1.0.0" + +"sort-keys@^4.0.0": + "integrity" "sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==" + "resolved" "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "is-plain-obj" "^2.0.0" + +"source-map-resolve@^0.5.0": + "integrity" "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==" + "resolved" "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz" + "version" "0.5.3" + dependencies: + "atob" "^2.1.2" + "decode-uri-component" "^0.2.0" + "resolve-url" "^0.2.1" + "source-map-url" "^0.4.0" + "urix" "^0.1.0" + +"source-map-url@^0.4.0": + "integrity" "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + "resolved" "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz" + "version" "0.4.1" + +"source-map@^0.5.6", "source-map@~0.5.3": + "integrity" "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "resolved" "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" + "version" "0.5.7" + +"source-map@^0.6.1": + "integrity" "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "resolved" "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + "version" "0.6.1" + +"spdx-correct@^3.0.0": + "integrity" "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==" + "resolved" "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz" + "version" "3.1.1" + dependencies: + "spdx-expression-parse" "^3.0.0" + "spdx-license-ids" "^3.0.0" + +"spdx-exceptions@^2.1.0": + "integrity" "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + "resolved" "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" + "version" "2.3.0" + +"spdx-expression-parse@^3.0.0": + "integrity" "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==" + "resolved" "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "spdx-exceptions" "^2.1.0" + "spdx-license-ids" "^3.0.0" + +"spdx-license-ids@^3.0.0": + "integrity" "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + "resolved" "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz" + "version" "3.0.10" + +"split-on-first@^1.0.0": + "integrity" "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==" + "resolved" "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz" + "version" "1.1.0" + +"split-string@^3.0.1", "split-string@^3.0.2": + "integrity" "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==" + "resolved" "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "extend-shallow" "^3.0.0" + +"split@^1.0.0": + "integrity" "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==" + "resolved" "https://registry.npmjs.org/split/-/split-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "through" "2" + +"split@0.3": + "integrity" "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=" + "resolved" "https://registry.npmjs.org/split/-/split-0.3.3.tgz" + "version" "0.3.3" + dependencies: + "through" "2" + +"split2@^3.0.0": + "integrity" "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==" + "resolved" "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "readable-stream" "^3.0.0" + +"sshpk@^1.7.0": + "integrity" "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==" + "resolved" "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz" + "version" "1.16.1" + dependencies: + "asn1" "~0.2.3" + "assert-plus" "^1.0.0" + "bcrypt-pbkdf" "^1.0.0" + "dashdash" "^1.12.0" + "ecc-jsbn" "~0.1.1" + "getpass" "^0.1.1" + "jsbn" "~0.1.0" + "safer-buffer" "^2.0.2" + "tweetnacl" "~0.14.0" + +"ssri@^8.0.0", "ssri@^8.0.1": + "integrity" "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==" + "resolved" "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz" + "version" "8.0.1" + dependencies: + "minipass" "^3.1.1" + +"static-extend@^0.1.1": + "integrity" "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=" + "resolved" "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz" + "version" "0.1.2" + dependencies: + "define-property" "^0.2.5" + "object-copy" "^0.1.0" + +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", "statuses@~1.5.0": + "integrity" "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "resolved" "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" + "version" "1.5.0" + +"stream-browserify@^2.0.0": + "integrity" "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==" + "resolved" "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "inherits" "~2.0.1" + "readable-stream" "^2.0.2" + +"stream-combiner@~0.0.4": + "integrity" "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=" + "resolved" "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" + "version" "0.0.4" + dependencies: + "duplexer" "~0.1.1" + +"stream-combiner2@^1.1.1": + "integrity" "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=" + "resolved" "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "duplexer2" "~0.1.0" + "readable-stream" "^2.0.2" + +"stream-http@^3.0.0": + "integrity" "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==" + "resolved" "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "builtin-status-codes" "^3.0.0" + "inherits" "^2.0.4" + "readable-stream" "^3.6.0" + "xtend" "^4.0.2" + +"stream-splicer@^2.0.0": + "integrity" "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==" + "resolved" "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "inherits" "^2.0.1" + "readable-stream" "^2.0.2" + +"strict-uri-encode@^2.0.0": + "integrity" "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" + "resolved" "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz" + "version" "2.0.0" + +"string_decoder@^1.1.1": + "integrity" "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==" + "resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + "version" "1.3.0" + dependencies: + "safe-buffer" "~5.2.0" + +"string_decoder@~1.1.1": + "integrity" "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==" + "resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "safe-buffer" "~5.1.0" + +"string-width@^1.0.1": + "integrity" "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" + "resolved" "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "code-point-at" "^1.0.0" + "is-fullwidth-code-point" "^1.0.0" + "strip-ansi" "^3.0.0" + +"string-width@^1.0.2 || 2": + "integrity" "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==" + "resolved" "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" + "version" "2.1.1" + dependencies: + "is-fullwidth-code-point" "^2.0.0" + "strip-ansi" "^4.0.0" + +"string-width@^4.1.0", "string-width@^4.2.0": + "integrity" "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==" + "resolved" "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + "version" "4.2.3" + dependencies: + "emoji-regex" "^8.0.0" + "is-fullwidth-code-point" "^3.0.0" + "strip-ansi" "^6.0.1" + +"string.prototype.trim@~1.2.4": + "integrity" "sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg==" + "resolved" "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz" + "version" "1.2.5" + dependencies: + "call-bind" "^1.0.2" + "define-properties" "^1.1.3" + "es-abstract" "^1.19.1" + +"string.prototype.trimend@^1.0.4": + "integrity" "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==" + "resolved" "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "call-bind" "^1.0.2" + "define-properties" "^1.1.3" + +"string.prototype.trimstart@^1.0.4": + "integrity" "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==" + "resolved" "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "call-bind" "^1.0.2" + "define-properties" "^1.1.3" + +"strip-ansi@^3.0.0", "strip-ansi@^3.0.1": + "integrity" "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "ansi-regex" "^2.0.0" + +"strip-ansi@^4.0.0": + "integrity" "sha1-qEeQIusaw2iocTibY1JixQXuNo8=" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "ansi-regex" "^3.0.0" + +"strip-ansi@^6.0.0": + "integrity" "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + "version" "6.0.1" + dependencies: + "ansi-regex" "^5.0.1" + +"strip-ansi@^6.0.1": + "integrity" "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + "version" "6.0.1" + dependencies: + "ansi-regex" "^5.0.1" + +"strip-bom@^3.0.0": + "integrity" "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "resolved" "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" + "version" "3.0.0" + +"strip-bom@^4.0.0": + "integrity" "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==" + "resolved" "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" + "version" "4.0.0" + +"strip-final-newline@^2.0.0": + "integrity" "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + "resolved" "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" + "version" "2.0.0" + +"strip-indent@^3.0.0": + "integrity" "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==" + "resolved" "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "min-indent" "^1.0.0" + +"strong-log-transformer@^2.1.0": + "integrity" "sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==" + "resolved" "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "duplexer" "^0.1.1" + "minimist" "^1.2.0" + "through" "^2.3.4" + +"subarg@^1.0.0": + "integrity" "sha1-9izxdYHplrSPyWVpn1TAauJouNI=" + "resolved" "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "minimist" "^1.1.0" + +"supports-color@^5.3.0": + "integrity" "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + "version" "5.5.0" + dependencies: + "has-flag" "^3.0.0" + +"supports-color@^7.1.0": + "integrity" "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + "version" "7.2.0" + dependencies: + "has-flag" "^4.0.0" + +"syntax-error@^1.1.1": + "integrity" "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==" + "resolved" "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz" + "version" "1.4.0" + dependencies: + "acorn-node" "^1.2.0" + +"tape@^4.11.0", "tape@>=2.0.0 <5.0.0": + "integrity" "sha512-z0+WrUUJuG6wIdWrl4W3rTte2CR26G6qcPOj3w1hfRdcmhF3kHBhOBW9VHsPVAkz08ZmGzp7phVpDupbLzrYKQ==" + "resolved" "https://registry.npmjs.org/tape/-/tape-4.14.0.tgz" + "version" "4.14.0" + dependencies: + "call-bind" "~1.0.2" + "deep-equal" "~1.1.1" + "defined" "~1.0.0" + "dotignore" "~0.1.2" + "for-each" "~0.3.3" + "glob" "~7.1.7" + "has" "~1.0.3" + "inherits" "~2.0.4" + "is-regex" "~1.1.3" + "minimist" "~1.2.5" + "object-inspect" "~1.11.0" + "resolve" "~1.20.0" + "resumer" "~0.0.0" + "string.prototype.trim" "~1.2.4" + "through" "~2.3.8" + +"tar@^4.4.12": + "integrity" "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==" + "resolved" "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz" + "version" "4.4.19" + dependencies: + "chownr" "^1.1.4" + "fs-minipass" "^1.2.7" + "minipass" "^2.9.0" + "minizlib" "^1.3.3" + "mkdirp" "^0.5.5" + "safe-buffer" "^5.2.1" + "yallist" "^3.1.1" + +"tar@^6.0.2", "tar@^6.1.0": + "integrity" "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==" + "resolved" "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz" + "version" "6.1.11" + dependencies: + "chownr" "^2.0.0" + "fs-minipass" "^2.0.0" + "minipass" "^3.0.0" + "minizlib" "^2.1.1" + "mkdirp" "^1.0.3" + "yallist" "^4.0.0" + +"temp-dir@^1.0.0": + "integrity" "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=" + "resolved" "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz" + "version" "1.0.0" + +"temp-write@^4.0.0": + "integrity" "sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw==" + "resolved" "https://registry.npmjs.org/temp-write/-/temp-write-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "graceful-fs" "^4.1.15" + "is-stream" "^2.0.0" + "make-dir" "^3.0.0" + "temp-dir" "^1.0.0" + "uuid" "^3.3.2" + +"text-extensions@^1.0.0": + "integrity" "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==" + "resolved" "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz" + "version" "1.9.0" + +"through@^2.3.4", "through@^2.3.6", "through@>=2.2.7 <3", "through@~2.3", "through@~2.3.1", "through@~2.3.4", "through@~2.3.8", "through@2": + "integrity" "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "resolved" "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + "version" "2.3.8" + +"through2@^2.0.0": + "integrity" "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==" + "resolved" "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" + "version" "2.0.5" + dependencies: + "readable-stream" "~2.3.6" + "xtend" "~4.0.1" + +"through2@^4.0.0": + "integrity" "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==" + "resolved" "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz" + "version" "4.0.2" + dependencies: + "readable-stream" "3" + +"timers-browserify@^1.0.1": + "integrity" "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=" + "resolved" "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz" + "version" "1.4.2" + dependencies: + "process" "~0.11.0" + +"tmp@^0.0.33": + "integrity" "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==" + "resolved" "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" + "version" "0.0.33" + dependencies: + "os-tmpdir" "~1.0.2" + +"to-object-path@^0.3.0": + "integrity" "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=" + "resolved" "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz" + "version" "0.3.0" + dependencies: + "kind-of" "^3.0.2" + +"to-regex-range@^2.1.0": + "integrity" "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=" + "resolved" "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz" + "version" "2.1.1" + dependencies: + "is-number" "^3.0.0" + "repeat-string" "^1.6.1" + +"to-regex-range@^5.0.1": + "integrity" "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==" + "resolved" "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + "version" "5.0.1" + dependencies: + "is-number" "^7.0.0" + +"to-regex@^3.0.1", "to-regex@^3.0.2": + "integrity" "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==" + "resolved" "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz" + "version" "3.0.2" + dependencies: + "define-property" "^2.0.2" + "extend-shallow" "^3.0.2" + "regex-not" "^1.0.2" + "safe-regex" "^1.1.0" + +"toidentifier@1.0.0": + "integrity" "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "resolved" "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz" + "version" "1.0.0" + +"tough-cookie@~2.5.0": + "integrity" "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==" + "resolved" "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "psl" "^1.1.28" + "punycode" "^2.1.1" + +"tr46@^2.1.0": + "integrity" "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==" + "resolved" "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "punycode" "^2.1.1" + +"tr46@~0.0.3": + "integrity" "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "resolved" "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + "version" "0.0.3" + +"trim-newlines@^3.0.0": + "integrity" "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==" + "resolved" "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" + "version" "3.0.1" + +"tslib@^1.9.0": + "integrity" "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "resolved" "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" + "version" "1.14.1" + +"tty-browserify@0.0.1": + "integrity" "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + "resolved" "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz" + "version" "0.0.1" + +"tunnel-agent@^0.6.0": + "integrity" "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=" + "resolved" "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + "version" "0.6.0" + dependencies: + "safe-buffer" "^5.0.1" + +"tweetnacl@^0.14.3", "tweetnacl@^0.14.5", "tweetnacl@~0.14.0": + "integrity" "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "resolved" "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" + "version" "0.14.5" + +"type-fest@^0.18.0": + "integrity" "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz" + "version" "0.18.1" + +"type-fest@^0.21.3": + "integrity" "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" + "version" "0.21.3" + +"type-fest@^0.4.1": + "integrity" "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.4.1.tgz" + "version" "0.4.1" + +"type-fest@^0.6.0": + "integrity" "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz" + "version" "0.6.0" + +"type-fest@^0.8.1": + "integrity" "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" + "version" "0.8.1" + +"typedarray-to-buffer@^3.1.5": + "integrity" "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==" + "resolved" "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" + "version" "3.1.5" + dependencies: + "is-typedarray" "^1.0.0" + +"typedarray@^0.0.6": + "integrity" "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "resolved" "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + "version" "0.0.6" + +"uglify-js@^3.1.4": + "integrity" "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==" + "resolved" "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz" + "version" "3.14.2" + +"uid-number@0.0.6": + "integrity" "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + "resolved" "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" + "version" "0.0.6" + +"umask@^1.1.0": + "integrity" "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=" + "resolved" "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz" + "version" "1.1.0" + +"umd@^3.0.0": + "integrity" "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==" + "resolved" "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz" + "version" "3.0.3" + +"unbox-primitive@^1.0.1": + "integrity" "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==" + "resolved" "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "function-bind" "^1.1.1" + "has-bigints" "^1.0.1" + "has-symbols" "^1.0.2" + "which-boxed-primitive" "^1.0.2" + +"undeclared-identifiers@^1.1.2": + "integrity" "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==" + "resolved" "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz" + "version" "1.1.3" + dependencies: + "acorn-node" "^1.3.0" + "dash-ast" "^1.0.0" + "get-assigned-identifiers" "^1.2.0" + "simple-concat" "^1.0.0" + "xtend" "^4.0.1" + +"union-value@^1.0.0": + "integrity" "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==" + "resolved" "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "arr-union" "^3.1.0" + "get-value" "^2.0.6" + "is-extendable" "^0.1.1" + "set-value" "^2.0.1" + +"unique-filename@^1.1.1": + "integrity" "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==" + "resolved" "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "unique-slug" "^2.0.0" + +"unique-slug@^2.0.0": + "integrity" "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==" + "resolved" "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "imurmurhash" "^0.1.4" + +"universal-user-agent@^6.0.0": + "integrity" "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + "resolved" "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz" + "version" "6.0.0" + +"universalify@^2.0.0": + "integrity" "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + "resolved" "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" + "version" "2.0.0" + +"unix-crypt-td-js@^1.1.4": + "integrity" "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==" + "resolved" "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz" + "version" "1.1.4" + +"unpipe@~1.0.0": + "integrity" "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "resolved" "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + "version" "1.0.0" + +"unset-value@^1.0.0": + "integrity" "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=" + "resolved" "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "has-value" "^0.3.1" + "isobject" "^3.0.0" + +"upath@^1.1.1": + "integrity" "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + "resolved" "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz" + "version" "1.2.0" + +"upath@^2.0.1": + "integrity" "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==" + "resolved" "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz" + "version" "2.0.1" + +"uri-js@^4.2.2": + "integrity" "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==" + "resolved" "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + "version" "4.4.1" + dependencies: + "punycode" "^2.1.0" + +"urix@^0.1.0": + "integrity" "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "resolved" "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" + "version" "0.1.0" + +"url@~0.11.0": + "integrity" "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=" + "resolved" "https://registry.npmjs.org/url/-/url-0.11.0.tgz" + "version" "0.11.0" + dependencies: + "punycode" "1.3.2" + "querystring" "0.2.0" + +"use@^3.1.0": + "integrity" "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + "resolved" "https://registry.npmjs.org/use/-/use-3.1.1.tgz" + "version" "3.1.1" + +"util-deprecate@^1.0.1", "util-deprecate@~1.0.1": + "integrity" "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "version" "1.0.2" + +"util-promisify@^2.1.0": + "integrity" "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=" + "resolved" "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "object.getownpropertydescriptors" "^2.0.3" + +"util@~0.10.1": + "integrity" "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==" + "resolved" "https://registry.npmjs.org/util/-/util-0.10.4.tgz" + "version" "0.10.4" + dependencies: + "inherits" "2.0.3" + +"util@0.10.3": + "integrity" "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=" + "resolved" "https://registry.npmjs.org/util/-/util-0.10.3.tgz" + "version" "0.10.3" + dependencies: + "inherits" "2.0.1" + +"utils-merge@1.0.1": + "integrity" "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "resolved" "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" + "version" "1.0.1" + +"uuid@^3.0.0", "uuid@^3.3.2": + "integrity" "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "resolved" "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" + "version" "3.4.0" + +"validate-npm-package-license@^3.0.1", "validate-npm-package-license@^3.0.4": + "integrity" "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==" + "resolved" "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" + "version" "3.0.4" + dependencies: + "spdx-correct" "^3.0.0" + "spdx-expression-parse" "^3.0.0" + +"validate-npm-package-name@^3.0.0": + "integrity" "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=" + "resolved" "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "builtins" "^1.0.3" + +"vary@^1": + "integrity" "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "resolved" "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" + "version" "1.1.2" + +"verror@1.10.0": + "integrity" "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=" + "resolved" "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" + "version" "1.10.0" + dependencies: + "assert-plus" "^1.0.0" + "core-util-is" "1.0.2" + "extsprintf" "^1.2.0" + +"vm-browserify@^1.0.0": + "integrity" "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + "resolved" "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz" + "version" "1.1.2" + +"wcwidth@^1.0.0": + "integrity" "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=" + "resolved" "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "defaults" "^1.0.3" + +"webidl-conversions@^3.0.0": + "integrity" "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "resolved" "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + "version" "3.0.1" + +"webidl-conversions@^6.1.0": + "integrity" "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" + "resolved" "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz" + "version" "6.1.0" + +"websocket-driver@>=0.5.1": + "integrity" "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==" + "resolved" "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" + "version" "0.7.4" + dependencies: + "http-parser-js" ">=0.5.1" + "safe-buffer" ">=5.1.0" + "websocket-extensions" ">=0.1.1" + +"websocket-extensions@>=0.1.1": + "integrity" "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" + "resolved" "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz" + "version" "0.1.4" + +"whatwg-url@^5.0.0": + "integrity" "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=" + "resolved" "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "tr46" "~0.0.3" + "webidl-conversions" "^3.0.0" + +"whatwg-url@^8.4.0": + "integrity" "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==" + "resolved" "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz" + "version" "8.7.0" + dependencies: + "lodash" "^4.7.0" + "tr46" "^2.1.0" + "webidl-conversions" "^6.1.0" + +"which-boxed-primitive@^1.0.2": + "integrity" "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==" + "resolved" "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "is-bigint" "^1.0.1" + "is-boolean-object" "^1.1.0" + "is-number-object" "^1.0.4" + "is-string" "^1.0.5" + "is-symbol" "^1.0.3" + +"which@^1.3.1": + "integrity" "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==" + "resolved" "https://registry.npmjs.org/which/-/which-1.3.1.tgz" + "version" "1.3.1" + dependencies: + "isexe" "^2.0.0" + +"which@^2.0.1", "which@^2.0.2": + "integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==" + "resolved" "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "isexe" "^2.0.0" + +"wide-align@^1.1.0": + "integrity" "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==" + "resolved" "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz" + "version" "1.1.3" + dependencies: + "string-width" "^1.0.2 || 2" + +"wordwrap@^1.0.0": + "integrity" "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "resolved" "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + "version" "1.0.0" + +"wrap-ansi@^7.0.0": + "integrity" "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==" + "resolved" "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + "version" "7.0.0" + dependencies: + "ansi-styles" "^4.0.0" + "string-width" "^4.1.0" + "strip-ansi" "^6.0.0" + +"wrappy@1": + "integrity" "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "version" "1.0.2" + +"write-file-atomic@^2.4.2": + "integrity" "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==" + "resolved" "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz" + "version" "2.4.3" + dependencies: + "graceful-fs" "^4.1.11" + "imurmurhash" "^0.1.4" + "signal-exit" "^3.0.2" + +"write-file-atomic@^3.0.0", "write-file-atomic@^3.0.3": + "integrity" "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==" + "resolved" "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "imurmurhash" "^0.1.4" + "is-typedarray" "^1.0.0" + "signal-exit" "^3.0.2" + "typedarray-to-buffer" "^3.1.5" + +"write-json-file@^3.2.0": + "integrity" "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==" + "resolved" "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "detect-indent" "^5.0.0" + "graceful-fs" "^4.1.15" + "make-dir" "^2.1.0" + "pify" "^4.0.1" + "sort-keys" "^2.0.0" + "write-file-atomic" "^2.4.2" + +"write-json-file@^4.3.0": + "integrity" "sha512-PxiShnxf0IlnQuMYOPPhPkhExoCQuTUNPOa/2JWCYTmBquU9njyyDuwRKN26IZBlp4yn1nt+Agh2HOOBl+55HQ==" + "resolved" "https://registry.npmjs.org/write-json-file/-/write-json-file-4.3.0.tgz" + "version" "4.3.0" + dependencies: + "detect-indent" "^6.0.0" + "graceful-fs" "^4.1.15" + "is-plain-obj" "^2.0.0" + "make-dir" "^3.0.0" + "sort-keys" "^4.0.0" + "write-file-atomic" "^3.0.0" + +"write-pkg@^4.0.0": + "integrity" "sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==" + "resolved" "https://registry.npmjs.org/write-pkg/-/write-pkg-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "sort-keys" "^2.0.0" + "type-fest" "^0.4.1" + "write-json-file" "^3.2.0" + +"xtend@^4.0.0", "xtend@^4.0.1", "xtend@^4.0.2", "xtend@~4.0.1": + "integrity" "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + "resolved" "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" + "version" "4.0.2" + +"y18n@^5.0.5": + "integrity" "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + "resolved" "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + "version" "5.0.8" + +"yallist@^3.0.0", "yallist@^3.1.1": + "integrity" "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "resolved" "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" + "version" "3.1.1" + +"yallist@^4.0.0": + "integrity" "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "resolved" "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + "version" "4.0.0" + +"yaml@^1.10.0": + "integrity" "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + "resolved" "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" + "version" "1.10.2" + +"yargs-parser@^20.2.2", "yargs-parser@^20.2.3", "yargs-parser@20.2.4": + "integrity" "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + "resolved" "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + "version" "20.2.4" + +"yargs@^16.2.0": + "integrity" "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==" + "resolved" "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + "version" "16.2.0" + dependencies: + "cliui" "^7.0.2" + "escalade" "^3.1.1" + "get-caller-file" "^2.0.5" + "require-directory" "^2.1.1" + "string-width" "^4.2.0" + "y18n" "^5.0.5" + "yargs-parser" "^20.2.2"